summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>2012-06-01 12:29:32 +0000
committertron <tron>2012-06-01 12:29:32 +0000
commit5fa13796393247ba76c960698ce5b914b6ae8b45 (patch)
tree650fe2cbd8eebbb2e4aa904a5bbe717582c2150f
parent8038b0e03bcc1121c2bbd0e1941272f3d23e7d9b (diff)
downloadpkgsrc-5fa13796393247ba76c960698ce5b914b6ae8b45.tar.gz
Pullup ticket #3815 - requested by dholland
graphics/cairo: build fix Revisions pulled up: - graphics/cairo/Makefile 1.99 - graphics/cairo/hacks.mk 1.3 --- Module Name: pkgsrc Committed By: dholland Date: Sun May 27 18:21:44 UTC 2012 Modified Files: pkgsrc/graphics/cairo: Makefile hacks.mk Log Message: 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.
-rw-r--r--graphics/cairo/Makefile4
-rw-r--r--graphics/cairo/hacks.mk40
2 files changed, 41 insertions, 3 deletions
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile
index e71bb716b73..df3004713c5 100644
--- a/graphics/cairo/Makefile
+++ b/graphics/cairo/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.97.2.1 2012/04/09 19:52:24 spz Exp $
+# $NetBSD: Makefile,v 1.97.2.2 2012/06/01 12:29:32 tron Exp $
DISTNAME= cairo-1.10.2
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= graphics
MASTER_SITES= http://cairographics.org/releases/
diff --git a/graphics/cairo/hacks.mk b/graphics/cairo/hacks.mk
index 69924d520b8..0c3fb661532 100644
--- a/graphics/cairo/hacks.mk
+++ b/graphics/cairo/hacks.mk
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.2 2011/11/16 03:45:03 minskim Exp $
+# $NetBSD: hacks.mk,v 1.2.4.1 2012/06/01 12:29:32 tron Exp $
.if !defined(CAIRO_HACKS_MK)
CAIRO_HACKS_MK= defined
@@ -15,4 +15,42 @@ CONFIGURE_ENV+= ac_cv_prog_CC=gcc-4.2
. 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