diff options
author | dholland <dholland@pkgsrc.org> | 2012-05-27 18:21:44 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2012-05-27 18:21:44 +0000 |
commit | 6b3461625da45bd78822221476e278ee28429540 (patch) | |
tree | e7a66b3a2c3fa1693fa8878626cf4d753d9ed9f5 /graphics | |
parent | 4eb61da9451f035b4861cee05a0d8b9cfeb22edb (diff) | |
download | pkgsrc-6b3461625da45bd78822221476e278ee28429540.tar.gz |
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 (limited to 'graphics')
-rw-r--r-- | graphics/cairo/Makefile | 4 | ||||
-rw-r--r-- | graphics/cairo/hacks.mk | 40 |
2 files changed, 41 insertions, 3 deletions
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile index 1908655871d..73546e7fdb4 100644 --- a/graphics/cairo/Makefile +++ b/graphics/cairo/Makefile @@ -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 --git a/graphics/cairo/hacks.mk b/graphics/cairo/hacks.mk index 69924d520b8..80243329917 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.3 2012/05/27 18:21:44 dholland 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 |