pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/xextensions BUILDLINK_PREFIX.xextensions is not av...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c6c4edb2b8ed
branches:  trunk
changeset: 500514:c6c4edb2b8ed
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Sun Oct 09 21:43:02 2005 +0000

description:
BUILDLINK_PREFIX.xextensions is not available in builtin.mk, so the check
for it never works if using make constructions.  Change it to use shell
code, as done in Xrender.  (Also for consistency in both packages.)

diffstat:

 x11/xextensions/builtin.mk |  29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diffs (46 lines):

diff -r 958fa6ba65be -r c6c4edb2b8ed x11/xextensions/builtin.mk
--- a/x11/xextensions/builtin.mk        Sun Oct 09 21:30:55 2005 +0000
+++ b/x11/xextensions/builtin.mk        Sun Oct 09 21:43:02 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.7 2005/10/08 10:07:30 jmmv Exp $
+# $NetBSD: builtin.mk,v 1.8 2005/10/09 21:43:02 jmmv Exp $
 
 BUILTIN_PKG:=  xextensions
 
@@ -65,20 +65,25 @@
 .    include "../../mk/x11.builtin.mk"
 .  endif
 
-# Check whether the implementation we selected has a xextensions.pc file
-# or not.  If the latter, generate a fake one.
-.  if exists(${BUILDLINK_PREFIX.xextensions}/lib/pkgconfig/xextensions.pc)
-BUILDLINK_FILES.xextensions+=  lib/pkgconfig/xextensions.pc
-.  else
+# If we are using the builtin version, check whether it has a xextensions.pc
+# file or not.  If the latter, generate a fake one.
+.  if !empty(USE_BUILTIN.xextensions:M[Yy][Ee][Ss])
 BUILDLINK_TARGETS+=    xextensions-fake-pc
 
 xextensions-fake-pc:
-       @${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig
-       @{ ${ECHO} "Name: XExtensions"; \
-          ${ECHO} "Description: Sundry X extension headers"; \
-          ${ECHO} "Version: 1.0.1"; \
-          ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.xextensions}/include"; \
-       } >${BUILDLINK_DIR}/lib/pkgconfig/xextensions.pc
+       ${_PKG_SILENT}${_PKG_DEBUG} \
+       src=${BUILDLINK_PREFIX.xextensions}/lib/pkgconfig/xextensions.pc \
+       dst=${BUILDLINK_DIR}/lib/pkgconfig/xextensions.pc; \
+       ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
+       if ${TEST} -f $${src}; then \
+               ${LN} -sf $${src} $${dst}; \
+       else \
+               { ${ECHO} "Name: XExtensions"; \
+               ${ECHO} "Description: Sundry X extension headers"; \
+               ${ECHO} "Version: 1.0.1"; \
+               ${ECHO} "Cflags: -I${BUILDLINK_PREFIX.xextensions}/include"; \
+               } >$${dst}; \
+       fi
 .  endif
 
 .endif # CHECK_BUILTIN.xextensions



Home | Main Index | Thread Index | Old Index