summaryrefslogtreecommitdiff
path: root/x11/Xrender
diff options
context:
space:
mode:
authorjmmv <jmmv>2005-10-07 19:40:11 +0000
committerjmmv <jmmv>2005-10-07 19:40:11 +0000
commitd63baa7d869411bf37028c0d4bcdad67014daa36 (patch)
tree88d8b7377b40158143cafaab0ef9295353b8d798 /x11/Xrender
parentbe73cef1f0c9e448ee3c87162508fd023eb80a61 (diff)
downloadpkgsrc-d63baa7d869411bf37028c0d4bcdad67014daa36.tar.gz
When using the Xrender builtin, generate a fake pkg-config file in the
buildlink directory (or use the one provided by the X11 installation, if any) so that packages needing this file can use it. Should fix build problems of applications using cairo (whose cairo.pc file needs xrender.pc). Reported in tech-pkg@ by Ian Zagorskih. Note that this solution is suboptimal, although we are already using it in xextensions. If someone wants to use, e.g., cairo outside pkgsrc, he won't be able to because its .pc file won't be able to find xrender.pc...
Diffstat (limited to 'x11/Xrender')
-rw-r--r--x11/Xrender/builtin.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/x11/Xrender/builtin.mk b/x11/Xrender/builtin.mk
index c59c88ac84c..3354b18ece8 100644
--- a/x11/Xrender/builtin.mk
+++ b/x11/Xrender/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.12 2005/07/09 04:36:42 grant Exp $
+# $NetBSD: builtin.mk,v 1.13 2005/10/07 19:40:11 jmmv Exp $
BUILTIN_PKG:= Xrender
@@ -109,4 +109,22 @@ BUILDLINK_PREFIX.Xrender= ${X11BASE}
USE_BUILTIN.render= yes
. endif
+# Check whether the implementation we selected has a xrender.pc file
+# or not. If the latter, generate a fake one.
+. if exists(${BUILDLINK_PREFIX.Xrender}/lib/pkgconfig/xrender.pc)
+BUILDLINK_FILES.Xrender+= lib/pkgconfig/fontconfig.pc
+. else
+BUILDLINK_TARGETS+= Xrender-fake-pc
+
+Xrender-fake-pc:
+ @${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig
+ @{ ${ECHO} "Name: Xrender"; \
+ ${ECHO} "Description: X Render Library"; \
+ ${ECHO} "Version: 0.8.4"; \
+ ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.Xrender}/include"; \
+ ${ECHO} "Libs: -L${BUILDLINK_PREFIX.Xrender}/include" \
+ "${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.Xrender} -lXrender"; \
+ } >${BUILDLINK_DIR}/lib/pkgconfig/xrender.pc
+. endif
+
.endif # CHECK_BUILTIN.Xrender