GNOME Bugzilla – Bug 690281
do not add unused gnome dependencies to libgdata.pc when configured with --disable-gnome
Last modified: 2012-12-16 18:49:42 UTC
When libgdata (current git master) is configured with --disable-gnome, it still adds GNOME_PACKAGES dependencies to libgdata.pc's Requires.private, even though these dependencies are neither checked for nor linked to: # cat /usr/lib/pkgconfig/libgdata.pc prefix=/usr exec_prefix=${prefix} libdir=/usr/lib64 includedir=${prefix}/include Name: libgdata Description: GData client library Version: 0.13.2 Requires: gobject-2.0 glib-2.0 >= 2.31.0 gio-2.0 >= 2.17.3 libxml-2.0 libsoup-2.4 >= 2.37.91 Requires.private: gthread-2.0 oauth >= 0.9.4 libsoup-gnome-2.4 gcr-base-3 libxml-2.0 goa-1.0 >= 3.2 Libs: -L${libdir} -lgdata Cflags: -I${includedir}/libgdata The resulting libgdata.pc file is invalid when installed on a system that does not have goa or libsoup-gnome installed: # pkg-config --exists --print-errors libgdata Package goa-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `goa-1.0.pc' to the PKG_CONFIG_PATH environment variable Package 'goa-1.0', required by 'libgdata', not found
Created attachment 231639 [details] [review] proposed patch
Review of attachment 231639 [details] [review]: Looks good to me. Please commit to master with the minor fix below. Thanks! ::: configure.ac @@ +95,3 @@ + GNOME_PACKAGES_PUBLIC="" + GNOME_PACKAGES_PRIVATE="libsoup-gnome-2.4 gcr-base-3 libxml-2.0 goa-1.0 >= $GOA_REQS" + GNOME_PACKAGES="$GNOME_PACKAGES_PUBLIC $GNOME_PACKAGES_PRIVATE" You could move the definition of GNOME_PACKAGES out of the conditional to just before the AC_SUBSTs to save a duplicated line.
(In reply to comment #2) > You could move the definition of GNOME_PACKAGES out of the conditional to just > before the AC_SUBSTs to save a duplicated line. Can't do that, it's used inside the conditional: PKG_CHECK_MODULES([GNOME], [$GNOME_PACKAGES])
(In reply to comment #3) > Can't do that, it's used inside the conditional: > PKG_CHECK_MODULES([GNOME], [$GNOME_PACKAGES]) Whoops, missed that. Please commit the patch unmodified then. Thanks.
Thanks, committed: http://git.gnome.org/browse/libgdata/commit/?id=60230e288e465091380135ed2d2397cce7ae956c