Eliminate pkg-config workaround using Requires instead of Requires.private

as it should be and fix resulting pkg-config file for shared lib linking.
This gets rid of overlinking with shared libs.

Run through a bulk build by sthen@

ok ajacoutot@
This commit is contained in:
brad 2013-01-30 13:17:51 +00:00
parent 0c161a72a8
commit 4b448ae789
3 changed files with 16 additions and 21 deletions

View File

@ -1,15 +1,15 @@
# $OpenBSD: Makefile,v 1.44 2013/01/16 14:28:35 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.45 2013/01/30 13:17:51 brad Exp $
COMMENT= vector graphics library
DISTNAME= cairo-1.12.8
REVISION= 1
SHARED_LIBS+= cairo 12.1
SHARED_LIBS+= cairo-gobject 1.0
SHARED_LIBS+= cairo-script-interpreter 1.0
CATEGORIES= graphics
DPB_PROPERTIES= parallel
EXTRACT_SUFX= .tar.xz
REVISION= 0
HOMEPAGE= http://cairographics.org/
@ -48,6 +48,9 @@ CONFIGURE_ENV +=ac_cv_path_GTKDOC_CHECK="" \
ac_cv_path_GTKDOC_REBASE="" \
ac_cv_path_GTKDOC_MKPDF=""
pre-configure:
${SUBST_CMD} ${WRKSRC}/src/cairo.pc.in
post-install:
rm ${PREFIX}/lib/cairo/*.{a,la}

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-configure,v 1.11 2012/11/12 12:29:07 eric Exp $
Use `Requires', not `Requires.private', because otherwise libraries
required for linking aren't exposed.
--- configure.orig Mon Oct 22 06:08:43 2012
+++ configure Wed Oct 24 03:51:46 2012
@@ -17954,10 +17954,7 @@ if test "x$PKG_CONFIG" = x; then
as_fn_error $? "pkg-config >= $PKGCONFIG_REQUIRED required but not found (http://pkgconfig.freedesktop.org/)" "$LINENO" 5
fi
-case `$PKG_CONFIG --version` in
-0.?|0.?.?|0.1[0-7]|0.1[0-7].?) PKGCONFIG_REQUIRES="Requires"; ;;
-*) PKGCONFIG_REQUIRES="Requires.private"; ;;
-esac
+PKGCONFIG_REQUIRES="Requires"

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-src_cairo_pc_in,v 1.1 2013/01/30 13:17:51 brad Exp $
--- src/cairo.pc.in.orig Tue Jan 29 07:56:53 2013
+++ src/cairo.pc.in Tue Jan 29 08:22:13 2013
@@ -8,6 +8,6 @@ Description: Multi-platform 2D graphics library
Version: @VERSION@
@PKGCONFIG_REQUIRES@: @CAIRO_REQUIRES@
-Libs: -L${libdir} -lcairo
+Libs: -L${libdir} -Wl,-rpath-link,${X11BASE}/lib -lcairo
Libs.private: @CAIRO_NONPKGCONFIG_LIBS@
Cflags: -I${includedir}/cairo