[Libreoffice-commits] .: 3 commits - apache-commons/ExternalProject_apache_commons_httpclient.mk config_host.mk.in configure.in libcdr/ExternalProject_libcdr.mk libcdr/libcdr-configure.patch.1 libcdr/UnpackedTarball_cdr.mk RepositoryExternal.mk solenv/gbuild
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 5 13:34:22 PDT 2012
RepositoryExternal.mk | 33
apache-commons/ExternalProject_apache_commons_httpclient.mk | 4
config_host.mk.in | 2
configure.in | 12
libcdr/ExternalProject_libcdr.mk | 68 -
libcdr/UnpackedTarball_cdr.mk | 4
libcdr/libcdr-configure.patch.1 | 466 ++++++++++++
solenv/gbuild/ExternalProject.mk | 60 +
8 files changed, 579 insertions(+), 70 deletions(-)
New commits:
commit e80f565c3886f8bc87b03d43acbb1453f7edcc48
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Oct 5 22:30:21 2012 +0200
libcdr: remove boilerplate:
Define the various FOO_CFLAGS/FOO_LIBS used by libcdr in configure even
for the case of internal FOO, and then just pass those variables into
libcdr configure to get rid of SYSTEM_FOO conditionals.
Change-Id: I0edabc13f8a068cb13792a16499593b8c589da1a
diff --git a/config_host.mk.in b/config_host.mk.in
index b8988b1..7bc85e1 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -676,3 +676,5 @@ export XRENDER_CFLAGS=@XRENDER_CFLAGS@
export XRENDER_LIBS=@XRENDER_LIBS@
export XSLTML_TARBALL=@XSLTML_TARBALL@
export XSLTPROC=@XSLTPROC@
+export ZLIB_CFLAGS=@ZLIB_CFLAGS@
+export ZLIB_LIBS=@ZLIB_LIBS@
diff --git a/configure.in b/configure.in
index e4fddeb..bd0682e 100644
--- a/configure.in
+++ b/configure.in
@@ -6687,7 +6687,11 @@ else
SYSTEM_ZLIB=NO
SYSTEM_MINIZIP=NO
BUILD_TYPE="$BUILD_TYPE ZLIB"
+ ZLIB_CFLAGS="-I${OUTDIR}/inc/external/zlib"
+ ZLIB_LIBS="-L${OUTDIR}/lib"
fi
+AC_SUBST(ZLIB_CFLAGS)
+AC_SUBST(ZLIB_LIBS)
AC_SUBST(SYSTEM_ZLIB)
AC_SUBST([SYSTEM_MINIZIP])
AC_SUBST([MINGW_MINIZIP_DLL])
@@ -6872,6 +6876,8 @@ elif test $_os = iOS; then
else
AC_MSG_RESULT([internal])
SYSTEM_LIBWPD=NO
+ WPD_CFLAGS="-I${OUTDIR}/inc/external"
+ WPD_LIBS="-L${OUTDIR}/lib"
WPD_TARBALL=e7f84e3199dfee9122949448cab3823f-libwpd-0.9.6.tar.bz2
fi
AC_SUBST(SYSTEM_LIBWPD)
@@ -6892,6 +6898,8 @@ else
AC_MSG_RESULT([internal])
SYSTEM_LCMS2=NO
BUILD_TYPE="$BUILD_TYPE LCMS2"
+ LCMS2_CFLAGS="-I${OUTDIR}/inc/lcms2"
+ LCMS2_LIBS="-L${OUTDIR}/lib"
fi
AC_SUBST(SYSTEM_LCMS2)
AC_SUBST(LCMS2_CFLAGS)
@@ -6945,6 +6953,8 @@ elif test $_os = iOS; then
else
AC_MSG_RESULT([internal])
SYSTEM_LIBWPS=NO
+ WPS_CFLAGS="-I${OUTDIR}/inc/external"
+ WPS_LIBS="-L${OUTDIR}/lib"
WPS_TARBALL=d197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2
fi
AC_SUBST(SYSTEM_LIBWPS)
@@ -6965,6 +6975,8 @@ elif test $_os = iOS; then
else
AC_MSG_RESULT([internal])
SYSTEM_LIBWPG=NO
+ WPG_CFLAGS="-I${OUTDIR}/inc/external"
+ WPG_LIBS="-L${OUTDIR}/lib"
WPG_TARBALL=9d283e02441d8cebdcd1e5d9df227d67-libwpg-0.2.1.tar.bz2
fi
AC_SUBST(SYSTEM_LIBWPG)
diff --git a/libcdr/ExternalProject_libcdr.mk b/libcdr/ExternalProject_libcdr.mk
index fe6ce5f..eb48909 100644
--- a/libcdr/ExternalProject_libcdr.mk
+++ b/libcdr/ExternalProject_libcdr.mk
@@ -33,61 +33,17 @@ $(call gb_ExternalProject_get_state_target,libcdr,build) :
else
-libcdr_cflags :=
-libcdr_libs :=
-
-ifeq ($(SYSTEM_LIBWPD),YES)
-
-libcdr_cflags += $(WPD_CFLAGS)
-libcdr_libs += $(WPD_LIBS)
-
-else # !SYSTEM_LIBWPD
-
-libcdr_cflags += -I$(OUTDIR)/inc/external
-libcdr_libs += $(SOLARLIB)
-
-endif # SYSTEM_LIBWPD
-
-
-ifeq ($(SYSTEM_LIBWPG),YES)
-
-libcdr_cflags += $(WPG_CFLAGS)
-libcdr_libs += $(WPG_LIBS)
-
-else # !SYSTEM_LIBWPG
-
-libcdr_cflags += -I$(OUTDIR)/inc/external
-libcdr_libs += $(SOLARLIB)
-
-endif # SYSTEM_LIBWPG
-
-
-ifeq ($(SYSTEM_LCMS2),YES)
-
-else # !SYSTEM_LCMS2
-
-libcdr_cflags += -I$(OUTDIR)/inc/lcms2
-libcdr_libs += $(SOLARLIB)
-
-endif # SYSTEM_LCMS2
-
-zlib_cflags :=
-zlib_libs :=
-
-ifneq ($(SYSTEM_ZLIB),YES)
-
-zlib_cflags += -I$(OUTDIR)/inc/external/zlib
-zlib_libs += $(SOLARLIB)
-
-endif # !SYSTEM_ZLIB
-
$(call gb_ExternalProject_get_state_target,libcdr,build) :
cd $(EXTERNAL_WORKDIR) \
&& PKG_CONFIG="" \
- LIBCDR_CFLAGS="$(libcdr_cflags)" \
- LIBCDR_LIBS="$(libcdr_libs)" \
- ZLIB_CFLAGS="$(zlib_cflags)" \
- ZLIB_LIBS="$(zlib_libs)" \
+ WPD_CFLAGS="$(WPD_CFLAGS)" \
+ WPD_LIBS="$(WPD_LIBS)" \
+ WPG_CFLAGS="$(WPG_CFLAGS)" \
+ WPG_LIBS="$(WPG_LIBS)" \
+ LCMS2_CFLAGS="$(LCMS2_CFLAGS)" \
+ LCMS2_LIBS="$(LCMS2_LIBS)" \
+ ZLIB_CFLAGS="$(ZLIB_CFLAGS)" \
+ ZLIB_LIBS="$(ZLIB_LIBS)" \
./configure \
--with-pic \
--enable-static \
diff --git a/libcdr/UnpackedTarball_cdr.mk b/libcdr/UnpackedTarball_cdr.mk
index be1e7d7..32d898b 100644
--- a/libcdr/UnpackedTarball_cdr.mk
+++ b/libcdr/UnpackedTarball_cdr.mk
@@ -11,4 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,cdr))
$(eval $(call gb_UnpackedTarball_set_tarball,cdr,$(CDR_TARBALL)))
+$(eval $(call gb_UnpackedTarball_add_patches,cdr,\
+ libcdr/libcdr-configure.patch.1 \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/libcdr/libcdr-configure.patch.1 b/libcdr/libcdr-configure.patch.1
new file mode 100644
index 0000000..5100732
--- /dev/null
+++ b/libcdr/libcdr-configure.patch.1
@@ -0,0 +1,466 @@
+diff -u cdr.old/configure cdr/configure
+--- cdr.old/configure 2012-10-05 21:47:11.246958344 +0200
++++ cdr/configure 2012-10-05 22:05:33.913874511 +0200
+@@ -637,6 +617,7 @@
+ DOXYGEN
+ STATIC_TOOLS_FALSE
+ STATIC_TOOLS_TRUE
++LIBCDR_LIBS
+ LIBCDR_CXXFLAGS
+ DEBUG_CXXFLAGS
+ WINDRES
+@@ -658,8 +639,12 @@
+ CDR_MAJOR_VERSION
+ ZLIB_LIBS
+ ZLIB_CFLAGS
+-LIBCDR_LIBS
+-LIBCDR_CFLAGS
++LCMS2_LIBS
++LCMS2_CFLAGS
++WPG_LIBS
++WPG_CFLAGS
++WPD_LIBS
++WPD_CFLAGS
+ PKG_CONFIG_LIBDIR
+ PKG_CONFIG_PATH
+ PKG_CONFIG
+@@ -816,8 +801,12 @@
+ PKG_CONFIG
+ PKG_CONFIG_PATH
+ PKG_CONFIG_LIBDIR
+-LIBCDR_CFLAGS
+-LIBCDR_LIBS
++WPD_CFLAGS
++WPD_LIBS
++WPG_CFLAGS
++WPG_LIBS
++LCMS2_CFLAGS
++LCMS2_LIBS
+ ZLIB_CFLAGS
+ ZLIB_LIBS'
+
+@@ -1481,9 +1472,13 @@
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
+- LIBCDR_CFLAGS
+- C compiler flags for LIBCDR, overriding pkg-config
+- LIBCDR_LIBS linker flags for LIBCDR, overriding pkg-config
++ WPD_CFLAGS C compiler flags for WPD, overriding pkg-config
++ WPD_LIBS linker flags for WPD, overriding pkg-config
++ WPG_CFLAGS C compiler flags for WPG, overriding pkg-config
++ WPG_LIBS linker flags for WPG, overriding pkg-config
++ LCMS2_CFLAGS
++ C compiler flags for LCMS2, overriding pkg-config
++ LCMS2_LIBS linker flags for LCMS2, overriding pkg-config
+ ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
+ ZLIB_LIBS linker flags for ZLIB, overriding pkg-config
+
+@@ -16098,33 +16094,27 @@
+ # ====================
+
+ pkg_failed=no
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBCDR" >&5
+-$as_echo_n "checking for LIBCDR... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPD" >&5
++$as_echo_n "checking for WPD... " >&6; }
+
+-if test -n "$LIBCDR_CFLAGS"; then
+- pkg_cv_LIBCDR_CFLAGS="$LIBCDR_CFLAGS"
++if test -n "$WPD_CFLAGS"; then
++ pkg_cv_WPD_CFLAGS="$WPD_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_LIBCDR_CFLAGS=`$PKG_CONFIG --cflags "
++ pkg_cv_WPD_CFLAGS=`$PKG_CONFIG --cflags "
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ " 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+@@ -16133,30 +16123,24 @@
+ else
+ pkg_failed=untried
+ fi
+-if test -n "$LIBCDR_LIBS"; then
+- pkg_cv_LIBCDR_LIBS="$LIBCDR_LIBS"
++if test -n "$WPD_LIBS"; then
++ pkg_cv_WPD_LIBS="$WPD_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ \""; } >&5
+ ($PKG_CONFIG --exists --print-errors "
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ ") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_LIBCDR_LIBS=`$PKG_CONFIG --libs "
++ pkg_cv_WPD_LIBS=`$PKG_CONFIG --libs "
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ " 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+@@ -16178,37 +16162,251 @@
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- LIBCDR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
++ WPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ " 2>&1`
+ else
+- LIBCDR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
++ WPD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
+ libwpd-0.9
+ libwpd-stream-0.9
+- libwpg-0.2
+- lcms2
+ " 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+- echo "$LIBCDR_PKG_ERRORS" >&5
++ echo "$WPD_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (
+ libwpd-0.9
+ libwpd-stream-0.9
++) were not met:
++
++$WPD_PKG_ERRORS
++
++Consider adjusting the PKG_CONFIG_PATH environment variable if you
++installed software in a non-standard prefix.
++
++Alternatively, you may set the environment variables WPD_CFLAGS
++and WPD_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details." "$LINENO" 5
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
++is in your PATH or set the PKG_CONFIG environment variable to the full
++path to pkg-config.
++
++Alternatively, you may set the environment variables WPD_CFLAGS
++and WPD_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.
++
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.
++See \`config.log' for more details" "$LINENO" 5; }
++else
++ WPD_CFLAGS=$pkg_cv_WPD_CFLAGS
++ WPD_LIBS=$pkg_cv_WPD_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++fi
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPG" >&5
++$as_echo_n "checking for WPG... " >&6; }
++
++if test -n "$WPG_CFLAGS"; then
++ pkg_cv_WPG_CFLAGS="$WPG_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
++ libwpg-0.2
++\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "
++ libwpg-0.2
++") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_WPG_CFLAGS=`$PKG_CONFIG --cflags "
++ libwpg-0.2
++" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$WPG_LIBS"; then
++ pkg_cv_WPG_LIBS="$WPG_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
++ libwpg-0.2
++\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "
++ libwpg-0.2
++") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_WPG_LIBS=`$PKG_CONFIG --libs "
++ libwpg-0.2
++" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ WPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
++ libwpg-0.2
++" 2>&1`
++ else
++ WPG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
++ libwpg-0.2
++" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$WPG_PKG_ERRORS" >&5
++
++ as_fn_error $? "Package requirements (
+ libwpg-0.2
++) were not met:
++
++$WPG_PKG_ERRORS
++
++Consider adjusting the PKG_CONFIG_PATH environment variable if you
++installed software in a non-standard prefix.
++
++Alternatively, you may set the environment variables WPG_CFLAGS
++and WPG_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details." "$LINENO" 5
++elif test $pkg_failed = untried; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
++is in your PATH or set the PKG_CONFIG environment variable to the full
++path to pkg-config.
++
++Alternatively, you may set the environment variables WPG_CFLAGS
++and WPG_LIBS to avoid the need to call pkg-config.
++See the pkg-config man page for more details.
++
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.
++See \`config.log' for more details" "$LINENO" 5; }
++else
++ WPG_CFLAGS=$pkg_cv_WPG_CFLAGS
++ WPG_LIBS=$pkg_cv_WPG_LIBS
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++$as_echo "yes" >&6; }
++
++fi
++
++
++pkg_failed=no
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS2" >&5
++$as_echo_n "checking for LCMS2... " >&6; }
++
++if test -n "$LCMS2_CFLAGS"; then
++ pkg_cv_LCMS2_CFLAGS="$LCMS2_CFLAGS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
++ lcms2
++\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "
++ lcms2
++") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LCMS2_CFLAGS=`$PKG_CONFIG --cflags "
++ lcms2
++" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++if test -n "$LCMS2_LIBS"; then
++ pkg_cv_LCMS2_LIBS="$LCMS2_LIBS"
++ elif test -n "$PKG_CONFIG"; then
++ if test -n "$PKG_CONFIG" && \
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
++ lcms2
++\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "
++ lcms2
++") 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; then
++ pkg_cv_LCMS2_LIBS=`$PKG_CONFIG --libs "
++ lcms2
++" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
++else
++ pkg_failed=yes
++fi
++ else
++ pkg_failed=untried
++fi
++
++
++
++if test $pkg_failed = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++
++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
++ _pkg_short_errors_supported=yes
++else
++ _pkg_short_errors_supported=no
++fi
++ if test $_pkg_short_errors_supported = yes; then
++ LCMS2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
++ lcms2
++" 2>&1`
++ else
++ LCMS2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
++ lcms2
++" 2>&1`
++ fi
++ # Put the nasty error message in config.log where it belongs
++ echo "$LCMS2_PKG_ERRORS" >&5
++
++ as_fn_error $? "Package requirements (
+ lcms2
+ ) were not met:
+
+-$LIBCDR_PKG_ERRORS
++$LCMS2_PKG_ERRORS
+
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
+ installed software in a non-standard prefix.
+
+-Alternatively, you may set the environment variables LIBCDR_CFLAGS
+-and LIBCDR_LIBS to avoid the need to call pkg-config.
++Alternatively, you may set the environment variables LCMS2_CFLAGS
++and LCMS2_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details." "$LINENO" 5
+ elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+@@ -16219,15 +16417,15 @@
+ is in your PATH or set the PKG_CONFIG environment variable to the full
+ path to pkg-config.
+
+-Alternatively, you may set the environment variables LIBCDR_CFLAGS
+-and LIBCDR_LIBS to avoid the need to call pkg-config.
++Alternatively, you may set the environment variables LCMS2_CFLAGS
++and LCMS2_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details.
+
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+ See \`config.log' for more details" "$LINENO" 5; }
+ else
+- LIBCDR_CFLAGS=$pkg_cv_LIBCDR_CFLAGS
+- LIBCDR_LIBS=$pkg_cv_LIBCDR_LIBS
++ LCMS2_CFLAGS=$pkg_cv_LCMS2_CFLAGS
++ LCMS2_LIBS=$pkg_cv_LCMS2_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+
+@@ -16574,7 +16772,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_WINDRES="windres"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -16678,7 +16876,9 @@
+ DEBUG_CXXFLAGS="-DNDEBUG"
+
+ fi
+-LIBCDR_CXXFLAGS="$LIBCDR_CFLAGS"
++LIBCDR_CXXFLAGS="${WPD_CFLAGS} ${WPG_CFLAGS} ${LCMS2_CFLAGS}"
++LIBCDR_LIBS="${WPD_LIBS} ${WPG_LIBS} ${LCMS2_LIBS}"
++
+
+
+
+diff -u cdr.old/configure.ac cdr/configure.ac
+--- cdr.old/configure.ac 2012-10-05 21:47:11.248958454 +0200
++++ cdr/configure.ac 2012-10-05 22:05:22.847875386 +0200
+@@ -37,10 +37,16 @@
+ # ====================
+ # Find additional apps
+ # ====================
+-PKG_CHECK_MODULES([LIBCDR],[
++PKG_CHECK_MODULES([WPD],[
+ libwpd-0.9
+ libwpd-stream-0.9
++])
++
++PKG_CHECK_MODULES([WPG],[
+ libwpg-0.2
++])
++
++PKG_CHECK_MODULES([LCMS2],[
+ lcms2
+ ])
+
+@@ -168,8 +174,10 @@
+ ], [
+ DEBUG_CXXFLAGS="-DNDEBUG"
+ ])
+-LIBCDR_CXXFLAGS="$LIBCDR_CFLAGS"
++LIBCDR_CXXFLAGS="${WPD_CFLAGS} ${WPG_CFLAGS} ${LCMS2_CFLAGS}"
++LIBCDR_LIBS="${WPD_LIBS} ${WPG_LIBS} ${LCMS2_LIBS}"
+ AC_SUBST(LIBCDR_CXXFLAGS)
++AC_SUBST(LIBCDR_LIBS)
+ AC_SUBST(DEBUG_CXXFLAGS)
+
+ # ============
commit 2b7536a99839543cc535c1c60a019bd2f784a847
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Oct 5 21:17:25 2012 +0200
gbuild: add gb_ExternalProject_use_external:
Or rather, re-purpose that for consistency (and rename original to
gb_ExternalProject_use_external_project), to abstract over the
system/internal status of dependencies of external projects.
Use it in libcdr and replace exisiting uses in apache-commons.
Change-Id: Ie144600688fa884b5b6faa986c6b95bdfc1ee15c
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index cbf3379..6b3b2e5 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1020,6 +1020,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
endef
+gb_ExternalProject__use_wpd :=
else # !SYSTEM_LIBWPD
@@ -1036,6 +1037,10 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_ExternalProject__use_wpd
+$(call gb_ExternalProject_use_package,$(1),libwpd)
+
+endef
endif # SYSTEM_LIBWPD
@@ -1050,6 +1055,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
endef
+gb_ExternalProject__use_wpg :=
else # !SYSTEM_LIBWPG
@@ -1066,6 +1072,11 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_ExternalProject__use_wpg
+$(call gb_ExternalProject_use_package,$(1),libwpg_inc)
+$(call gb_ExternalProject_use_static_libraries,$(1),wpglib)
+
+endef
endif # SYSTEM_LIBWPG
@@ -1080,6 +1091,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
endef
+gb_ExternalProject__use_wps :=
else # !SYSTEM_LIBWPS
@@ -1093,6 +1105,11 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_ExternalProject__use_wps
+$(call gb_ExternalProject_use_package,$(1),libwps_inc)
+$(call gb_ExternalProject_use_static_libraries,$(1),wpslib)
+
+endef
endif # SYSTEM_LIBWPS
@@ -2161,18 +2178,22 @@ ifeq ($(SYSTEM_APACHE_COMMONS),YES)
define gb_Jar__use_commons-codec
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
endef
+gb_ExternalProject__use_commons-codec :=
define gb_Jar__use_commons-httpclient
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
endef
+gb_ExternalProject__use_commons-httpclient :=
define gb_Jar__use_commons-lang
$(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
endef
+gb_ExternalProject__use_commons-lang :=
define gb_Jar__use_commons-logging
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
endef
+gb_ExternalProject__use_commons-logging :=
else # !SYSTEM_APACHE_COMMONS
@@ -2186,18 +2207,30 @@ $(eval $(call gb_Helper_register_jars,OXT,\
define gb_Jar__use_commons-codec
$(call gb_Jar_use_jar,$(1),commons-codec-1.3)
endef
+define gb_ExternalProject__use_commons-codec
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
+endef
define gb_Jar__use_commons-httpclient
$(call gb_Jar_use_jar,$(1),commons-httpclient-3.1)
endef
+define gb_ExternalProject__use_commons-httpclient
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
+endef
define gb_Jar__use_commons-lang
$(call gb_Jar_use_jar,$(1),commons-lang-2.3)
endef
+define gb_ExternalProject__use_commons-lang
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
+endef
define gb_Jar__use_commons-logging
$(call gb_Jar_use_jar,$(1),commons-logging-1.1.1)
endef
+define gb_ExternalProject__use_commons-logging
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
+endef
endif # SYSTEM_APACHE_COMMONS
diff --git a/apache-commons/ExternalProject_apache_commons_httpclient.mk b/apache-commons/ExternalProject_apache_commons_httpclient.mk
index 9dad40d..921ae1c 100644
--- a/apache-commons/ExternalProject_apache_commons_httpclient.mk
+++ b/apache-commons/ExternalProject_apache_commons_httpclient.mk
@@ -14,8 +14,8 @@ $(eval $(call gb_ExternalProject_ExternalProject,apache_commons_httpclient))
$(eval $(call gb_ExternalProject_use_unpacked,apache_commons_codec,apache_commons_httpclient))
-$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,apache_commons_codec))
-$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,apache_commons_logging))
+$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,commons-codec))
+$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,commons-logging))
$(eval $(call gb_ExternalProject_register_targets,apache_commons_httpclient,\
build \
diff --git a/libcdr/ExternalProject_libcdr.mk b/libcdr/ExternalProject_libcdr.mk
index 95d0eeb..fe6ce5f 100644
--- a/libcdr/ExternalProject_libcdr.mk
+++ b/libcdr/ExternalProject_libcdr.mk
@@ -16,7 +16,8 @@ $(eval $(call gb_ExternalProject_register_targets,libcdr,\
))
$(eval $(call gb_ExternalProject_use_externals,cdrlib,\
- libwpd \
+ wpd \
+ wpg \
))
ifeq ($(OS)$(COM),WNTMSC)
@@ -45,8 +46,6 @@ else # !SYSTEM_LIBWPD
libcdr_cflags += -I$(OUTDIR)/inc/external
libcdr_libs += $(SOLARLIB)
-$(eval $(call gb_ExternalProject_use_package,libcdr,libwpd))
-
endif # SYSTEM_LIBWPD
@@ -60,9 +59,6 @@ else # !SYSTEM_LIBWPG
libcdr_cflags += -I$(OUTDIR)/inc/external
libcdr_libs += $(SOLARLIB)
-$(eval $(call gb_ExternalProject_use_package,libcdr,libwpg_inc))
-$(eval $(call gb_ExternalProject_use_static_libraries,libcdr,wpglib))
-
endif # SYSTEM_LIBWPG
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk
index 81081b5..ff504bb 100644
--- a/solenv/gbuild/ExternalProject.mk
+++ b/solenv/gbuild/ExternalProject.mk
@@ -103,14 +103,24 @@ $(foreach target,$(2),$(call gb_ExternalProject_register_target,$(1),$(target)))
endef
-# Make an external Project depend on another external project
-define gb_ExternalProject_use_external
+# Make an external Project depend on another ExternalProject
+define gb_ExternalProject_use_external_project
$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_ExternalProject_get_target,$(2))
endef
+# Make an ExternalProject depend on an external
+#
+# this forwards to functions that must be defined in RepositoryExternal.mk.
+# $(eval $(call gb_ExternalProject_use_external,library,external))
+define gb_ExternalProject_use_external
+$(if $(filter undefined,$(origin gb_ExternalProject__use_$(2))),\
+ $(error gb_ExternalProject_use_external: unknown external: $(2)),\
+ $(call gb_ExternalProject__use_$(2),$(1)))
+endef
+
define gb_ExternalProject_use_externals
-$(foreach external,$(2),$(call gb_ExternalProject_use_external,$(1),$(2)))
+$(foreach external,$(2),$(call gb_ExternalProject_use_external,$(1),$(external)))
endef
# Make an external project depend on a package
commit 51852f04d1971b7f41cee9dbed14d1aa9e05e25f
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Oct 5 20:36:46 2012 +0200
gbuild: ExternalProject: add use_libraries, use_static_libraries
Change-Id: Idc8b0adf1a9ed26b2e0bec3454fed0ee34e277aa
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk
index b604d7f..81081b5 100644
--- a/solenv/gbuild/ExternalProject.mk
+++ b/solenv/gbuild/ExternalProject.mk
@@ -124,13 +124,6 @@ $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Package_get_t
endef
-# TODO: do we really want to have projects depending on gbuild libraries?
-define gb_ExternalProject_use_static_libraries
-$(foreach lib,$(2),$(call gb_ExternalProject_get_preparation_target,$(1)) : \
- $(call gb_StaticLibrary_get_target,$(lib)))
-
-endef
-
# Make an external project depend on several packages at once
#
# gb_ExternalProject_use_packages external package(s)
@@ -139,4 +132,41 @@ $(foreach package,$(2),$(call gb_ExternalProject_use_package,$(1),$(package)))
endef
+# Make an external project depend on a StaticLibrary
+#
+# Realistically there are some externals that do not have a usable build
+# system, and other externals that do may depend on those.
+#
+# gb_ExternalProject_use_static_libraries external staticlibraries
+define gb_ExternalProject_use_static_libraries
+ifneq (,$$(filter-out $(gb_StaticLibrary_KNOWNLIBS),$(2)))
+$$(eval $$(call gb_Output_info, currently known static libraries are: $(sort $(gb_StaticLibrary_KNOWNLIBS)),ALL))
+$$(eval $$(call gb_Output_error,Cannot link against static library/libraries $$(filter-out $(gb_StaticLibrary_KNOWNLIBS),$(2)). Static libraries must be registered in Repository.mk))
+endif
+
+$(call gb_ExternalProject_get_preparation_target,$(1)) : \
+ $(foreach lib,$(2),$(call gb_StaticLibrary_get_target,$(lib)))
+
+endef
+
+# Make an external project depend on a Library
+#
+# Realistically there are some externals that do not have a usable build
+# system, and other externals that do may depend on those.
+#
+# gb_ExternalProject_use_libraries external libraries
+define gb_ExternalProject_use_libraries
+ifneq (,$$(filter-out $(gb_Library_KNOWNLIBS),$(2)))
+$$(eval $$(call gb_Output_info,currently known libraries are: $(sort $(gb_Library_KNOWNLIBS)),ALL))
+$$(eval $$(call gb_Output_error,Cannot link against library/libraries $$(filter-out $(gb_Library_KNOWNLIBS),$(2)). Libraries must be registered in Repository.mk))
+endif
+ifneq (,$$(filter $$(gb_MERGEDLIBS),$(2)))
+$$(eval $$(call gb_Output_error,Cannot link against library/libraries $$(filter $$(gb_MERGEDLIBS),$(2)) because they are merged.))
+endif
+
+$(call gb_ExternalProject_get_preparation_target,$(1)) : \
+ $(foreach lib,$(2),$(call gb_Library_get_target,$(lib)))
+
+endef
+
# vim: set noet sw=4 ts=4:
More information about the Libreoffice-commits
mailing list