GNOME Bugzilla – Bug 570525
Don't change name of pkg-config file every minor release
Last modified: 2009-02-04 23:48:11 UTC
Please modify the Makefile.am rule that generates epiphany-major.minor.pc from epiphany.pc.in to only change the name when the api has changed. Changing the name needlessly results in very long configure lines for modules that build epiphany extensions outside of an epiphany tree. The way this is done in epiphany-extensions requires one to build epiphany and have any dependencies met (i.e. Mozilla at present). For example from seahorse-plugins: PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY], [\ libxml-2.0 >= $EPIPHANY_LIBXML_REQUIRED \ libglade-2.0 \ glib-2.0 >= $EPIPHANY_LIBGLIB_REQUIRED \ gmodule-2.0 \ gtk+-2.0 >= $EPIPHANY_LIBGTK_REQUIRED \ epiphany-2.24 >= $EPIPHANY_REQUIRED], [with_epiphany_plugin=yes E_API_VERSION=2.24 e_api_minor=24], [PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY], [\ libxml-2.0 >= $EPIPHANY_LIBXML_REQUIRED \ libglade-2.0 \ glib-2.0 >= $EPIPHANY_LIBGLIB_REQUIRED \ gmodule-2.0 \ gtk+-2.0 >= $EPIPHANY_LIBGTK_REQUIRED \ epiphany-2.23 >= $EPIPHANY_REQUIRED], [with_epiphany_plugin=yes E_API_VERSION=2.23 e_api_minor=23], [PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY], [\ libxml-2.0 >= $EPIPHANY_LIBXML_REQUIRED \ libglade-2.0 \ glib-2.0 >= $EPIPHANY_LIBGLIB_REQUIRED \ gmodule-2.0 \ gtk+-2.0 >= $EPIPHANY_LIBGTK_REQUIRED \ epiphany-2.22 >= $EPIPHANY_REQUIRED], [with_epiphany_plugin=yes E_API_VERSION=2.22 e_api_minor=22], [PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY], [\ libxml-2.0 >= $EPIPHANY_LIBXML_REQUIRED \ libglade-2.0 \ glib-2.0 >= $EPIPHANY_LIBGLIB_REQUIRED \ gmodule-2.0 \ gtk+-2.0 >= $EPIPHANY_LIBGTK_REQUIRED \ epiphany-2.20 >= $EPIPHANY_REQUIRED], [with_epiphany_plugin=yes E_API_VERSION=2.20 e_api_minor=20], [PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY], [\ libxml-2.0 >= $EPIPHANY_LIBXML_REQUIRED \ libglade-2.0 \ glib-2.0 >= $EPIPHANY_LIBGLIB_REQUIRED \ gmodule-2.0 \ gtk+-2.0 >= $EPIPHANY_LIBGTK_REQUIRED \ epiphany-2.18 >= $EPIPHANY_REQUIRED], [with_epiphany_plugin=yes E_API_VERSION=2.18 e_api_minor=18], [PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY],[\ libxml-2.0 >= $EPIPHANY_LIBXML_REQUIRED \ libglade-2.0 \ glib-2.0 >= $EPIPHANY_LIBGLIB_REQUIRED \ gmodule-2.0 \ gtk+-2.0 >= $EPIPHANY_LIBGTK_REQUIRED \ epiphany-2.16 >= $EPIPHANY_REQUIRED], [with_epiphany_plugin=yes E_API_VERSION=2.16 e_api_minor=16], [PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY],[\ libxml-2.0 >= $EPIPHANY_LIBXML_REQUIRED \ libglade-2.0 \ glib-2.0 >= $EPIPHANY_LIBGLIB_REQUIRED \ gmodule-2.0 \ gtk+-2.0 >= $EPIPHANY_LIBGTK_REQUIRED \ epiphany-2.14 >= $EPIPHANY_REQUIRED], [with_epiphany_plugin=yes E_API_VERSION=2.14 e_api_minor=14],[with_epiphany_plugin=no; echo "no"; echo "disabling epiphany plugin"])])])])])])])
Well, that configure bit certainly blows. How about rewriting it like this: AC_MSG_CHECKING([for Epiphany API version]) apis="2.26 2.25 2.24 ........" epiphany_api_version= for api in $apis; do PKG_CHECK_EXISTS([epiphany-$api],[epiphany_api_version=$api; break],[]) done AC_MSG_RESULT([$epiphany_api_version]) if test -z "$epiphany_api_version"; then AC_MSG_ERROR([epiphany not found]) fi PKG_CHECK_MODULES([EPIPHANY_DEPENDENCY],[epiphany-$epiphany_api_version ....])
Thanks Christian! That should make upgrading much less painful. I bow to your autofoo. 2009-02-04 Adam Schreiber <sadam@clemson.edu> * configure.in: * plugins/epiphany/seahorse-extension.c: Update version number to 2.25.91 Update epiphany checking code. Patch from Christian Persch. Fixes bugs #570525 and #570494
Christian: still, is it worth changing the name of the pkg-config file each time?
Well. On trunk I've changed it to track the EPIPHANY_API_VERSION define which is manually bumped instead of auto-tracking major.minor. Still, we're probably going to keep doing API/ABI incompatible changes in each series, so will require API bumps...