From 44e1d93529a4d7003d681166f5f1f7cbbb13e970 Mon Sep 17 00:00:00 2001 From: Stefan Schweizer Date: Thu, 6 Sep 2007 17:48:22 +0000 Subject: Fix -cairo glib compilation thanks Denny Reeh in bug 191298 (Portage version: 2.1.3.7) --- app-text/poppler-bindings/ChangeLog | 9 +- .../files/digest-poppler-bindings-0.5.9 | 3 - .../files/digest-poppler-bindings-0.5.91 | 3 - .../files/poppler-0.5.9-bindings.patch | 93 ---------- .../poppler-bindings/files/poppler-nocairo.patch | 191 +++++++++++++++++++++ .../poppler-bindings/poppler-bindings-0.5.9.ebuild | 69 -------- .../poppler-bindings-0.5.91.ebuild | 69 -------- .../poppler-bindings/poppler-bindings-0.6.ebuild | 3 +- 8 files changed, 201 insertions(+), 239 deletions(-) delete mode 100644 app-text/poppler-bindings/files/digest-poppler-bindings-0.5.9 delete mode 100644 app-text/poppler-bindings/files/digest-poppler-bindings-0.5.91 delete mode 100644 app-text/poppler-bindings/files/poppler-0.5.9-bindings.patch create mode 100644 app-text/poppler-bindings/files/poppler-nocairo.patch delete mode 100644 app-text/poppler-bindings/poppler-bindings-0.5.9.ebuild delete mode 100644 app-text/poppler-bindings/poppler-bindings-0.5.91.ebuild (limited to 'app-text') diff --git a/app-text/poppler-bindings/ChangeLog b/app-text/poppler-bindings/ChangeLog index 42475b896c98..f67da32c2cd6 100644 --- a/app-text/poppler-bindings/ChangeLog +++ b/app-text/poppler-bindings/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-text/poppler-bindings # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/poppler-bindings/ChangeLog,v 1.68 2007/09/04 10:43:47 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/poppler-bindings/ChangeLog,v 1.69 2007/09/06 17:48:22 genstef Exp $ + + 06 Sep 2007; Stefan Schweizer + -files/poppler-0.5.9-bindings.patch, +files/poppler-nocairo.patch, + -poppler-bindings-0.5.9.ebuild, -poppler-bindings-0.5.91.ebuild, + poppler-bindings-0.6.ebuild: + Fix -cairo glib compilation thanks Denny Reeh in bug + 191298 04 Sep 2007; Stefan Schweizer +files/poppler-0.6-bindings.patch: diff --git a/app-text/poppler-bindings/files/digest-poppler-bindings-0.5.9 b/app-text/poppler-bindings/files/digest-poppler-bindings-0.5.9 deleted file mode 100644 index 85ee4a6c1d4d..000000000000 --- a/app-text/poppler-bindings/files/digest-poppler-bindings-0.5.9 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 8d1ac008614c0e413bcac95b8102fa07 poppler-0.5.9.tar.gz 1169002 -RMD160 3aab75dfb1f4226048c23ed9b6f08fdb2608feb1 poppler-0.5.9.tar.gz 1169002 -SHA256 bee251e5149ac9dd8824aac316456b78a82f4e1954eb3c1a94db3625340ef61e poppler-0.5.9.tar.gz 1169002 diff --git a/app-text/poppler-bindings/files/digest-poppler-bindings-0.5.91 b/app-text/poppler-bindings/files/digest-poppler-bindings-0.5.91 deleted file mode 100644 index abefa4595d7f..000000000000 --- a/app-text/poppler-bindings/files/digest-poppler-bindings-0.5.91 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 0cc1b0f183b1559f10154bb57268c6e1 poppler-0.5.91.tar.gz 1184826 -RMD160 fa4d68efde6d0f4c14fff2d1f986c7c64275f8af poppler-0.5.91.tar.gz 1184826 -SHA256 4e046b243c2a322008aa2dd7ed09e39d6b2e183482d09486873735031c30b888 poppler-0.5.91.tar.gz 1184826 diff --git a/app-text/poppler-bindings/files/poppler-0.5.9-bindings.patch b/app-text/poppler-bindings/files/poppler-0.5.9-bindings.patch deleted file mode 100644 index a45afc73fb4e..000000000000 --- a/app-text/poppler-bindings/files/poppler-0.5.9-bindings.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -ur poppler-0.5.9.orig/glib/Makefile.am poppler-0.5.9/glib/Makefile.am ---- poppler-0.5.9.orig/glib/Makefile.am 2007-05-31 12:38:10.000000000 +0200 -+++ poppler-0.5.9/glib/Makefile.am 2007-05-31 12:38:17.000000000 +0200 -@@ -82,7 +82,7 @@ - poppler-private.h - - libpoppler_glib_la_LIBADD = \ -- $(top_builddir)/poppler/libpoppler.la \ -+ -lpoppler \ - $(POPPLER_GLIB_LIBS) \ - $(FREETYPE_LIBS) \ - $(FONTCONFIG_LIBS) \ -@@ -96,7 +96,7 @@ - test-poppler-glib.c - - test_poppler_glib_LDADD = \ -- $(top_builddir)/poppler/libpoppler.la \ -+ -lpoppler \ - libpoppler-glib.la \ - $(POPPLER_GLIB_LIBS) \ - $(FREETYPE_LIBS) \ -Nur in poppler-0.5.9/glib: Makefile.am.orig. -diff -ur poppler-0.5.9.orig/Makefile.am poppler-0.5.9/Makefile.am ---- poppler-0.5.9.orig/Makefile.am 2007-05-31 12:38:10.000000000 +0200 -+++ poppler-0.5.9/Makefile.am 2007-05-31 12:38:17.000000000 +0200 -@@ -29,7 +29,7 @@ - utils_subdir = utils - endif - --SUBDIRS = goo fofi $(splash_subdir) poppler $(utils_subdir) $(glib_subdir) $(qt_subdir) test $(qt4_subdir) -+SUBDIRS = $(glib_subdir) $(qt_subdir) $(qt4_subdir) - - EXTRA_DIST = \ - README-XPDF \ -@@ -40,9 +40,7 @@ - - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = \ -- poppler.pc \ - $(cairo_pc_file) \ -- $(splash_pc_file) \ - $(glib_pc_file) \ - $(qt_pc_file) \ - $(qt4_pc_file) -diff -ur poppler-0.5.9.orig/qt/Makefile.am poppler-0.5.9/qt/Makefile.am ---- poppler-0.5.9.orig/qt/Makefile.am 2007-05-31 12:38:10.000000000 +0200 -+++ poppler-0.5.9/qt/Makefile.am 2007-05-31 12:38:17.000000000 +0200 -@@ -24,7 +24,7 @@ - poppler-private.h - - libpoppler_qt_la_LIBADD = \ -- $(top_builddir)/poppler/libpoppler.la \ -+ -lpoppler \ - $(POPPLER_QT_LIBS) \ - $(FREETYPE_LIBS) \ - $(FONTCONFIG_LIBS) -@@ -41,7 +41,7 @@ - test-poppler-qt.cpp - - test_poppler_qt_LDADD = \ -- $(top_builddir)/poppler/libpoppler.la \ -+ -lpoppler \ - libpoppler-qt.la \ - $(POPPLER_QT_LIBS) \ - $(FREETYPE_LIBS) -Nur in poppler-0.5.9/qt: Makefile.am.orig. -diff -ur poppler-0.5.9.orig/qt4/src/Makefile.am poppler-0.5.9/qt4/src/Makefile.am ---- poppler-0.5.9.orig/qt4/src/Makefile.am 2007-05-31 12:38:10.000000000 +0200 -+++ poppler-0.5.9/qt4/src/Makefile.am 2007-05-31 12:38:55.000000000 +0200 -@@ -35,7 +35,7 @@ - poppler-private.h - - libpoppler_qt4_la_LIBADD = \ -- $(top_builddir)/poppler/libpoppler.la \ -+ -lpoppler \ - $(FONTCONFIG_LIBS) \ - $(POPPLER_QT4_LIBS) - -Nur in poppler-0.5.9/qt4/src: Makefile.am.orig. -Nur in poppler-0.5.9/qt4/src: Makefile.am.rej. -diff -ur poppler-0.5.9.orig/qt4/tests/Makefile.am poppler-0.5.9/qt4/tests/Makefile.am ---- poppler-0.5.9.orig/qt4/tests/Makefile.am 2007-05-31 12:38:10.000000000 +0200 -+++ poppler-0.5.9/qt4/tests/Makefile.am 2007-05-31 12:38:17.000000000 +0200 -@@ -7,7 +7,7 @@ - $(POPPLER_QT4_CFLAGS) - - LDADDS = \ -- $(top_builddir)/poppler/libpoppler.la \ -+ -lpoppler \ - $(top_builddir)/qt4/src/libpoppler-qt4.la \ - $(FONTCONFIG_LIBS) \ - $(POPPLER_QT4_LIBS) -Nur in poppler-0.5.9/qt4/tests: Makefile.am.orig. diff --git a/app-text/poppler-bindings/files/poppler-nocairo.patch b/app-text/poppler-bindings/files/poppler-nocairo.patch new file mode 100644 index 000000000000..88add4fa73f8 --- /dev/null +++ b/app-text/poppler-bindings/files/poppler-nocairo.patch @@ -0,0 +1,191 @@ +--- glib/poppler-page.cc 2007/09/03 08:54:03 1.69 ++++ glib/poppler-page.cc 2007/09/05 10:57:30 1.69.2.1 +@@ -581,10 +581,11 @@ + #if defined (HAVE_CAIRO) + + static void +-poppler_page_set_selection_alpha (PopplerPage *page, +- double scale, +- GdkPixbuf *pixbuf, +- PopplerRectangle *selection) ++poppler_page_set_selection_alpha (PopplerPage *page, ++ double scale, ++ GdkPixbuf *pixbuf, ++ PopplerSelectionStyle style, ++ PopplerRectangle *selection) + { + /* Cairo doesn't need this, since cairo generates an alpha channel. */ + } +@@ -592,10 +593,11 @@ + #elif defined (HAVE_SPLASH) + + static void +-poppler_page_set_selection_alpha (PopplerPage *page, +- double scale, +- GdkPixbuf *pixbuf, +- PopplerRectangle *selection) ++poppler_page_set_selection_alpha (PopplerPage *page, ++ double scale, ++ GdkPixbuf *pixbuf, ++ PopplerSelectionStyle style, ++ PopplerRectangle *selection) + { + GdkRegion *region; + gint n_rectangles, i, x, y, width, height; +@@ -620,7 +622,7 @@ + } + } + +- region = poppler_page_get_selection_region (page, scale, selection); ++ region = poppler_page_get_selection_region (page, scale, style, selection); + + gdk_region_get_rectangles (region, &rectangles, &n_rectangles); + for (i = 0; i < n_rectangles; i++) { +@@ -803,7 +805,7 @@ + + poppler_page_copy_to_pixbuf (page, pixbuf, &data); + +- poppler_page_set_selection_alpha (page, scale, pixbuf, selection); ++ poppler_page_set_selection_alpha (page, scale, pixbuf, style, selection); + + /* We'll need a function to destroy page->text_dev and page->gfx + * when the application wants to get rid of them. +--- glib/demo/render.c 2007/08/26 10:52:19 1.1 ++++ glib/demo/render.c 2007/09/05 10:57:30 1.1.2.1 +@@ -16,13 +16,17 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + ++#include "config.h" ++ + #include + #include + + #include "render.h" + + typedef enum { ++#if defined (HAVE_CAIRO) + PGD_RENDER_CAIRO, ++#endif + PGD_RENDER_PIXBUF + } PgdRenderMode; + +@@ -43,8 +47,10 @@ + GtkWidget *slice_w; + GtkWidget *slice_h; + GtkWidget *timer_label; +- ++ ++#if defined (HAVE_CAIRO) + cairo_surface_t *surface; ++#endif + GdkPixbuf *pixbuf; + } PgdRenderDemo; + +@@ -58,11 +64,13 @@ + g_object_unref (demo->doc); + demo->doc = NULL; + } +- ++ ++#if defined (HAVE_CAIRO) + if (demo->surface) { + cairo_surface_destroy (demo->surface); + demo->surface = NULL; + } ++#endif + + if (demo->pixbuf) { + g_object_unref (demo->pixbuf); +@@ -77,13 +85,17 @@ + GdkEventExpose *event, + PgdRenderDemo *demo) + { ++#if defined (HAVE_CAIRO) + if (demo->mode == PGD_RENDER_CAIRO && !demo->surface) + return FALSE; ++#endif ++ + if (demo->mode == PGD_RENDER_PIXBUF && !demo->pixbuf) + return FALSE; + + gdk_window_clear (area->window); + ++#if defined (HAVE_CAIRO) + if (demo->mode == PGD_RENDER_CAIRO) { + cairo_t *cr; + +@@ -92,6 +104,7 @@ + cairo_paint (cr); + cairo_destroy (cr); + } else if (demo->mode == PGD_RENDER_PIXBUF) { ++#endif + gdk_draw_pixbuf (area->window, + area->style->fg_gc[GTK_STATE_NORMAL], + demo->pixbuf, +@@ -101,10 +114,12 @@ + gdk_pixbuf_get_height (demo->pixbuf), + GDK_RGB_DITHER_NORMAL, + 0, 0); ++#if defined (HAVE_CAIRO) + } else { + g_assert_not_reached (); + } +- ++#endif ++ + return TRUE; + } + +@@ -122,9 +137,12 @@ + if (!page) + return; + ++#if defined (HAVE_CAIRO) + if (demo->surface) + cairo_surface_destroy (demo->surface); + demo->surface = NULL; ++#endif ++ + if (demo->pixbuf) + g_object_unref (demo->pixbuf); + demo->pixbuf = NULL; +@@ -139,6 +157,7 @@ + height = page_width * demo->scale; + } + ++#if defined (HAVE_CAIRO) + if (demo->mode == PGD_RENDER_CAIRO) { + cairo_t *cr; + +@@ -179,6 +198,7 @@ + + cairo_destroy (cr); + } else if (demo->mode == PGD_RENDER_PIXBUF) { ++#endif + timer = g_timer_new (); + demo->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, + FALSE, 8, width, height); +@@ -190,10 +210,11 @@ + demo->rotate, + demo->pixbuf); + g_timer_stop (timer); ++#if defined (HAVE_CAIRO) + } else { + g_assert_not_reached (); + } +- ++#endif + g_object_unref (page); + + str = g_strdup_printf ("Page rendered in %.4f seconds", +@@ -360,7 +381,9 @@ + gtk_widget_show (label); + + mode_selector = gtk_combo_box_new_text (); ++#if defined (HAVE_CAIRO) + gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "cairo"); ++#endif + gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "pixbuf"); + gtk_combo_box_set_active (GTK_COMBO_BOX (mode_selector), 0); + g_signal_connect (G_OBJECT (mode_selector), "changed", diff --git a/app-text/poppler-bindings/poppler-bindings-0.5.9.ebuild b/app-text/poppler-bindings/poppler-bindings-0.5.9.ebuild deleted file mode 100644 index 9f4b1b6c98b3..000000000000 --- a/app-text/poppler-bindings/poppler-bindings-0.5.9.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/poppler-bindings/poppler-bindings-0.5.9.ebuild,v 1.1 2007/05/31 13:58:40 genstef Exp $ - -inherit autotools eutils multilib - -MY_P=${P/-bindings/} -DESCRIPTION="rendering bindings for GUI toolkits for poppler" -HOMEPAGE="http://poppler.freedesktop.org/" -SRC_URI="http://poppler.freedesktop.org/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="gtk qt3 cairo qt4" - -RDEPEND="~app-text/poppler-${PV} - cairo? ( >=x11-libs/cairo-0.5 ) - gtk? ( - >=x11-libs/gtk+-2.6 - >=gnome-base/libglade-2 - ) - qt3? ( =x11-libs/qt-3* ) - qt4? ( =x11-libs/qt-4* )" -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=sys-devel/automake-1.9.6" - -S=${WORKDIR}/${MY_P} - -src_unpack(){ - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/poppler-0.5.9-bindings.patch - - AT_M4DIR="m4" eautoreconf - sed -i s:/usr/lib/qt:/usr/lib/qt4: configure -} - -src_compile() { - # Configure needs help finding qt libs on multilib systems - export QTLIB="${QTDIR}/$(get_libdir)" - echo $QTLIB - - econf --enable-opi \ - $(use_enable cairo cairo-output) \ - $(use_enable gtk poppler-glib) \ - $(use_enable qt3 poppler-qt) \ - $(use_enable qt4 poppler-qt4) \ - || die "configuration failed" - cd poppler - if use cairo; then - emake libpoppler-cairo.la || die "cairo failed" - fi - if use qt4; then - emake libpoppler-arthur.la || die "arthur failed" - fi - cd .. - emake || die "compilation failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "make install failed" -} - -pkg_postinst() { - ewarn "You need to rebuild everything depending on poppler, use revdep-rebuild" -} diff --git a/app-text/poppler-bindings/poppler-bindings-0.5.91.ebuild b/app-text/poppler-bindings/poppler-bindings-0.5.91.ebuild deleted file mode 100644 index f6bdcbc638ae..000000000000 --- a/app-text/poppler-bindings/poppler-bindings-0.5.91.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/poppler-bindings/poppler-bindings-0.5.91.ebuild,v 1.1 2007/08/23 06:28:28 genstef Exp $ - -inherit autotools eutils multilib - -MY_P=${P/-bindings/} -DESCRIPTION="rendering bindings for GUI toolkits for poppler" -HOMEPAGE="http://poppler.freedesktop.org/" -SRC_URI="http://poppler.freedesktop.org/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="gtk qt3 cairo qt4" - -RDEPEND="~app-text/poppler-${PV} - cairo? ( >=x11-libs/cairo-0.5 ) - gtk? ( - >=x11-libs/gtk+-2.6 - >=gnome-base/libglade-2 - ) - qt3? ( =x11-libs/qt-3* ) - qt4? ( =x11-libs/qt-4* )" -DEPEND="${RDEPEND} - dev-util/pkgconfig - >=sys-devel/automake-1.9.6" - -S=${WORKDIR}/${MY_P} - -src_unpack(){ - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/poppler-0.5.9-bindings.patch - - AT_M4DIR="m4" eautoreconf - sed -i s:/usr/lib/qt:/usr/lib/qt4: configure -} - -src_compile() { - # Configure needs help finding qt libs on multilib systems - export QTLIB="${QTDIR}/$(get_libdir)" - echo $QTLIB - - econf --enable-opi \ - $(use_enable cairo cairo-output) \ - $(use_enable gtk poppler-glib) \ - $(use_enable qt3 poppler-qt) \ - $(use_enable qt4 poppler-qt4) \ - || die "configuration failed" - cd poppler - if use cairo; then - emake libpoppler-cairo.la || die "cairo failed" - fi - if use qt4; then - emake libpoppler-arthur.la || die "arthur failed" - fi - cd .. - emake || die "compilation failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "make install failed" -} - -pkg_postinst() { - ewarn "You need to rebuild everything depending on poppler, use revdep-rebuild" -} diff --git a/app-text/poppler-bindings/poppler-bindings-0.6.ebuild b/app-text/poppler-bindings/poppler-bindings-0.6.ebuild index 76173d2a3343..0686c0fb18e6 100644 --- a/app-text/poppler-bindings/poppler-bindings-0.6.ebuild +++ b/app-text/poppler-bindings/poppler-bindings-0.6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/poppler-bindings/poppler-bindings-0.6.ebuild,v 1.1 2007/09/04 06:53:33 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/poppler-bindings/poppler-bindings-0.6.ebuild,v 1.2 2007/09/06 17:48:22 genstef Exp $ inherit autotools eutils multilib @@ -33,6 +33,7 @@ src_unpack(){ cd "${S}" epatch "${FILESDIR}"/poppler-0.6-bindings.patch + epatch "${FILESDIR}"/poppler-nocairo.patch AT_M4DIR="m4" eautoreconf sed -i s:/usr/lib/qt:/usr/lib/qt4: configure -- cgit v1.2.3-65-gdbad