pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/cairo Since a proper solution does not appear...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c367f3e38c4c
branches:  trunk
changeset: 604257:c367f3e38c4c
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun May 27 18:21:44 2012 +0000

description:
Since a proper solution does not appear to be forthcoming anytime soon,
add a hack for "the pixman problem" on netbsd-5. Add -lpixman-1 to the
libs in cairo's .pc file when on netbsd-5.

diffstat:

 graphics/cairo/Makefile |   4 ++--
 graphics/cairo/hacks.mk |  40 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r fcd2678e4753 -r c367f3e38c4c graphics/cairo/Makefile
--- a/graphics/cairo/Makefile   Sun May 27 18:16:31 2012 +0000
+++ b/graphics/cairo/Makefile   Sun May 27 18:21:44 2012 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.98 2012/04/08 17:21:13 bsiegert Exp $
+# $NetBSD: Makefile,v 1.99 2012/05/27 18:21:44 dholland Exp $
 
 DISTNAME=      cairo-1.10.2
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    graphics
 MASTER_SITES=  http://cairographics.org/releases/
 
diff -r fcd2678e4753 -r c367f3e38c4c graphics/cairo/hacks.mk
--- a/graphics/cairo/hacks.mk   Sun May 27 18:16:31 2012 +0000
+++ b/graphics/cairo/hacks.mk   Sun May 27 18:21:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.2 2011/11/16 03:45:03 minskim Exp $
+# $NetBSD: hacks.mk,v 1.3 2012/05/27 18:21:44 dholland Exp $
 
 .if !defined(CAIRO_HACKS_MK)
 CAIRO_HACKS_MK=        defined
@@ -15,4 +15,42 @@
 .  endif
 .endif
 
+#
+# Workaround for "the pixman problem" with netbsd-5 native X. The
+# problem is that if the order of rpath options isn't right when
+# linking client programs (right being /usr/pkg before /usr/X11R7),
+# the native pixman library gets pulled in instead of the pkgsrc one,
+# and then the link fails with undefined symbols from cairo; these are
+# symbols that are present only in the newer pkgsrc pixman. The
+# problem with rpath options and ordering is complicated by there
+# being multiple ways of writing them (-R, -Wl,-rpath, etc.) and as
+# many packages just blat out flags from various sources they don't
+# necessarily match or come out in the right order.
+#
+# Some cases of "the pixman problem" were solved with one set of
+# changes a month ago or so, but other packages still fail for the
+# reasons cited. In the absence of a wrappers-based general solution
+# to keep the order correct, most or all remaining instances can be
+# solved by explicitly adding the necessary pixman lib to the link
+# line instead of pulling it in via cairo's dependency on it. Or at
+# least, this fixes the build. It should also make the right things
+# happen during library search (I think) but that's less clear. I hate
+# ELF.
+#
+# The best way to explicitly add pixman to the link line is to hack it
+# into cairo's .pc file. This is what we do here.
+#
+# Note that this hack is also required for 5.99 earlier than whatever
+# point the necessary updates to X were applied. I'm assuming this is
+# old enough that nobody's going to care.
+#
+.if !empty(MACHINE_PLATFORM:MNetBSD-5.*) && \
+    empty(MACHINE_PLATFORM:MNetBSD-5.99.*)
+SUBST_CLASSES+=                pixman
+SUBST_STAGE.pixman=    post-build
+SUBST_MESSAGE.pixman=  Hacking pixman into cairo.pc for the "pixman problem".
+SUBST_FILES.pixman=    src/cairo.pc
+SUBST_SED.pixman=      -e '/^Libs:/s/-lcairo/-lcairo -lpixman-1/'
+.endif
+
 .endif # CAIRO_HACKS_MK



Home | Main Index | Thread Index | Old Index