Kelson has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/333593 )
Change subject: pkg_config dependencies are properly declared.
......................................................................
pkg_config dependencies are properly declared.
The 'Requires' field now use a variable from the configure to properly set
the dependencies depending of what compression algorithms are really used.
Change-Id: I282a8039bce4cfec23ae13d8a3240d45c5cab1ac
---
M zimlib/configure.ac
M zimlib/libzim.pc.in
2 files changed, 7 insertions(+), 1 deletion(-)
Approvals:
Kelson: Verified; Looks good to me, approved
diff --git a/zimlib/configure.ac b/zimlib/configure.ac
index da71e40..6be35df 100644
--- a/zimlib/configure.ac
+++ b/zimlib/configure.ac
@@ -65,6 +65,7 @@
# compression algorithms
#
+pkg_config_deps=""
# zlib
AC_ARG_ENABLE([zlib],
AS_HELP_STRING([--enable-zlib], [add support for zlib compression (disabled
by default)]),
@@ -75,6 +76,7 @@
then
AC_CHECK_HEADER([zlib.h], , AC_MSG_ERROR([zlib header not found]))
AC_DEFINE(ENABLE_ZLIB, [1], [defined if zlib compression is enabled])
+ pkg_config_deps+=" zlib"
fi
AM_CONDITIONAL(WITH_ZLIB, test "$enable_zlib" = "yes")
@@ -89,6 +91,7 @@
then
AC_CHECK_HEADER([bzlib.h], , AC_MSG_ERROR([bzip2 header files not found]))
AC_DEFINE(ENABLE_BZIP2, [1], [defined if bzip2 compression is enabled])
+ pkg_config_deps+=" bzip2"
fi
AM_CONDITIONAL(WITH_BZIP2, test "$enable_bzip2" = "yes")
@@ -103,10 +106,13 @@
then
AC_CHECK_HEADER([lzma.h], , AC_MSG_ERROR([lzma header files not found]))
AC_DEFINE(ENABLE_LZMA, [1], [defined if lzma compression is enabled])
+ pkg_config_deps+=" liblzma"
fi
AM_CONDITIONAL(WITH_LZMA, test "$enable_lzma" = "yes")
+AC_SUBST(PKG_CONFIG_DEPENDENCIES, $pkg_config_deps)
+
#
# unittest
#
diff --git a/zimlib/libzim.pc.in b/zimlib/libzim.pc.in
index 58cc155..d17e236 100644
--- a/zimlib/libzim.pc.in
+++ b/zimlib/libzim.pc.in
@@ -6,7 +6,7 @@
Name: libzim
Description: implements read and write methods for ZIM files
Version: @VERSION@
-Requires: liblzma
+Requires: @PKG_CONFIG_DEPENDENCIES@
Libs: -L${libdir} -lzim
Cflags: -I${includedir}
--
To view, visit https://gerrit.wikimedia.org/r/333593
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I282a8039bce4cfec23ae13d8a3240d45c5cab1ac
Gerrit-PatchSet: 1
Gerrit-Project: openzim
Gerrit-Branch: master
Gerrit-Owner: Mgautierfr <[email protected]>
Gerrit-Reviewer: Kelson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits