From 95085d0d79ff63783338b7b59c28374984a320b4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 28 Oct 2011 16:52:00 -0500 Subject: [PATCH] poppler-glib.pc pkgconfig file broken (#749898) %check: verify pkgconfig sanity --- poppler-0.18.1-pkgconfig_GLIB_REQUIRED.patch | 47 ++++++++++++++++++++ poppler.spec | 25 +++++++++-- 2 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 poppler-0.18.1-pkgconfig_GLIB_REQUIRED.patch diff --git a/poppler-0.18.1-pkgconfig_GLIB_REQUIRED.patch b/poppler-0.18.1-pkgconfig_GLIB_REQUIRED.patch new file mode 100644 index 0000000..b15b6e9 --- /dev/null +++ b/poppler-0.18.1-pkgconfig_GLIB_REQUIRED.patch @@ -0,0 +1,47 @@ +diff -up poppler-0.18.1/configure.ac.pkgconfig_GLIB_REQUIRED poppler-0.18.1/configure.ac +--- poppler-0.18.1/configure.ac.pkgconfig_GLIB_REQUIRED 2011-10-26 07:34:22.000000000 -0500 ++++ poppler-0.18.1/configure.ac 2011-10-28 16:46:07.357243072 -0500 +@@ -409,6 +409,7 @@ if test x$enable_cairo_output = xyes; th + POPPLER_GLIB_DISABLE_SINGLE_INCLUDES="" + + GLIB_REQUIRED=2.18 ++ AC_SUBST(GLIB_REQUIRED) + AC_ARG_ENABLE(poppler-glib, + AC_HELP_STRING([--disable-poppler-glib], + [Don't compile poppler glib wrapper.]), +diff -up poppler-0.18.1/poppler-glib.pc.cmake.pkgconfig_GLIB_REQUIRED poppler-0.18.1/poppler-glib.pc.cmake +--- poppler-0.18.1/poppler-glib.pc.cmake.pkgconfig_GLIB_REQUIRED 2011-10-17 06:42:29.000000000 -0500 ++++ poppler-0.18.1/poppler-glib.pc.cmake 2011-10-28 16:43:22.997297849 -0500 +@@ -6,7 +6,7 @@ includedir=${prefix}/include + Name: poppler-glib + Description: GLib wrapper for poppler + Version: @POPPLER_VERSION@ +-Requires: glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION ++Requires: glib-2.0 >= @GLIB_REQUIRED@ gobject-2.0 >= @GLIB_REQUIRED@ cairo >= @CAIRO_VERSION@ + @PC_REQUIRES_PRIVATE@ + + Libs: -L${libdir} -lpoppler-glib +diff -up poppler-0.18.1/poppler-glib.pc.in.pkgconfig_GLIB_REQUIRED poppler-0.18.1/poppler-glib.pc.in +--- poppler-0.18.1/poppler-glib.pc.in.pkgconfig_GLIB_REQUIRED 2011-10-17 06:42:29.000000000 -0500 ++++ poppler-0.18.1/poppler-glib.pc.in 2011-10-28 16:43:22.998297837 -0500 +@@ -6,7 +6,7 @@ includedir=@includedir@ + Name: poppler-glib + Description: GLib wrapper for poppler + Version: @VERSION@ +-Requires: glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION ++Requires: glib-2.0 >= @GLIB_REQUIRED@ gobject-2.0 >= @GLIB_REQUIRED@ cairo >= @CAIRO_VERSION@ + @PC_REQUIRES_PRIVATE@ + + Libs: -L${libdir} -lpoppler-glib +diff -up poppler-0.18.1/poppler-glib-uninstalled.pc.in.pkgconfig_GLIB_REQUIRED poppler-0.18.1/poppler-glib-uninstalled.pc.in +--- poppler-0.18.1/poppler-glib-uninstalled.pc.in.pkgconfig_GLIB_REQUIRED 2011-10-17 06:42:29.000000000 -0500 ++++ poppler-0.18.1/poppler-glib-uninstalled.pc.in 2011-10-28 16:43:22.998297837 -0500 +@@ -1,7 +1,7 @@ + Name: poppler-glib + Description: GLib wrapper for poppler - uninstalled + Version: @VERSION@ +-Requires: glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION ++Requires: glib-2.0 >= @GLIB_REQUIRED@ gobject-2.0 >= @GLIB_REQUIRED@ cairo >= @CAIRO_VERSION@ + + Libs: ${pc_top_builddir}/${pcfiledir}/glib/libpoppler-glib.la + Cflags: -I${pc_top_builddir}/${pcfiledir}/glib diff --git a/poppler.spec b/poppler.spec index 6546925..0ce2843 100644 --- a/poppler.spec +++ b/poppler.spec @@ -2,7 +2,7 @@ Summary: PDF rendering library Name: poppler Version: 0.18.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: Development/Libraries URL: http://poppler.freedesktop.org/ @@ -15,6 +15,9 @@ Patch1: poppler-0.12.4-annot-appearance.patch # poppler-glib-demo, drop extraneous g_thread_init Patch2: poppler-0.18.1-glib.patch +# fix poppler-glib.pc +Patch3: poppler-0.18.1-pkgconfig_GLIB_REQUIRED.patch + Requires: poppler-data >= 0.4.0 BuildRequires: automake libtool BuildRequires: gettext-devel @@ -123,9 +126,10 @@ converting PDF files to a number of other formats. #patch1 -p1 -b .annot -#if 0%{?fedora} > 16 +%if 0%{?fedora} > 16 %patch2 -p1 -b .glib -#endif +%endif +%patch3 -p1 -b .pkgconfig_GLIB_REQUIRED chmod -x goo/GooTimer.h @@ -157,6 +161,17 @@ make install DESTDIR=$RPM_BUILD_ROOT rm -fv $RPM_BUILD_ROOT%{_libdir}/lib*.la +%check +# verify pkg-config sanity/version +export PKG_CONFIG_PATH=%{buildroot}%{_datadir}/pkgconfig:%{buildroot}%{_libdir}/pkgconfig +test "$(pkg-config --modversion poppler)" = "%{version}" +test "$(pkg-config --modversion poppler-cairo)" = "%{version}" +test "$(pkg-config --modversion poppler-cpp)" = "%{version}" +test "$(pkg-config --modversion poppler-glib)" = "%{version}" +test "$(pkg-config --modversion poppler-qt4)" = "%{version}" +test "$(pkg-config --modversion poppler-splash)" = "%{version}" + + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -225,6 +240,10 @@ rm -fv $RPM_BUILD_ROOT%{_libdir}/lib*.la %changelog +* Fri Oct 28 2011 Rex Dieter 0.18.1-2 +- poppler-glib.pc pkgconfig file broken (#749898) +- %%check: verify pkgconfig sanity + * Fri Oct 28 2011 Rex Dieter 0.18.1-1 - Update to 0.18.1 - pkgconfig-style deps