pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/Xrender When using the Xrender builtin, generate a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5a10f870ba17
branches:  trunk
changeset: 500408:5a10f870ba17
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Fri Oct 07 19:40:11 2005 +0000

description:
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:

 x11/Xrender/builtin.mk |  20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 4096fec19983 -r 5a10f870ba17 x11/Xrender/builtin.mk
--- a/x11/Xrender/builtin.mk    Fri Oct 07 18:43:40 2005 +0000
+++ b/x11/Xrender/builtin.mk    Fri Oct 07 19:40:11 2005 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index