diff options
author | jmmv <jmmv> | 2005-10-09 21:30:55 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2005-10-09 21:30:55 +0000 |
commit | ae5f7aefb23a1d69b9bd14f38bb8a863472a2035 (patch) | |
tree | 9cb2b9bce2f914680df0a30a2552564a3435a642 | |
parent | f27dd2f9a087c0bb1aa1600c1943a6ffb3e648e5 (diff) | |
download | pkgsrc-ae5f7aefb23a1d69b9bd14f38bb8a863472a2035.tar.gz |
Fix previous (finally, I hope): do not check for the existence of the .pc
file using make constructions, as BUILDLINK_PREFIX.Xrender is not defined
at this point. Delay evaluation until the target is executed by using
shell code.
-rw-r--r-- | x11/Xrender/builtin.mk | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/x11/Xrender/builtin.mk b/x11/Xrender/builtin.mk index adf9e124290..4f28f9daf1c 100644 --- a/x11/Xrender/builtin.mk +++ b/x11/Xrender/builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: builtin.mk,v 1.14 2005/10/08 10:17:44 jmmv Exp $ +# $NetBSD: builtin.mk,v 1.15 2005/10/09 21:30:55 jmmv Exp $ BUILTIN_PKG:= Xrender @@ -109,24 +109,28 @@ BUILDLINK_PREFIX.Xrender= ${X11BASE} USE_BUILTIN.render= yes . endif -# Check whether the implementation we selected has a xrender.pc file +# If we are using the builtin version, check whether it has a xrender.pc file # or not. If the latter, generate a fake one. -. if !empty(IS_BUILTIN.Xrender:M[Yy][Ee][Ss]) && \ - exists(${BUILDLINK_PREFIX.Xrender}/lib/pkgconfig/xrender.pc) -BUILDLINK_FILES.Xrender+= lib/pkgconfig/xrender.pc -. else +. if !empty(USE_BUILTIN.Xrender:M[Yy][Ee][Ss]) 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}/lib" \ - "${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.Xrender}/lib" \ - "-lXrender"; \ - } >${BUILDLINK_DIR}/lib/pkgconfig/xrender.pc + ${_PKG_SILENT}${_PKG_DEBUG} \ + src=${BUILDLINK_PREFIX.Xrender}/lib/pkgconfig/xrender.pc \ + dst=${BUILDLINK_DIR}/lib/pkgconfig/xrender.pc; \ + ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ + if ${TEST} -f $${src}; then \ + ${LN} -sf $${src} $${dst}; \ + else \ + { ${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}/lib" \ + "${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.Xrender}/lib" \ + "-lXrender"; \ + } >$${dst}; \ + fi . endif .endif # CHECK_BUILTIN.Xrender |