summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2005-10-07 19:40:11 +0000
committerjmmv <jmmv@pkgsrc.org>2005-10-07 19:40:11 +0000
commit021e40e8d021f5fbea17695aa4925ca766046a1b (patch)
tree88d8b7377b40158143cafaab0ef9295353b8d798
parent406162c47da1f6436f267a60b1225d91283a6cc9 (diff)
downloadpkgsrc-021e40e8d021f5fbea17695aa4925ca766046a1b.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...
-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