diff options
author | cube <cube> | 2008-10-06 13:08:16 +0000 |
---|---|---|
committer | cube <cube> | 2008-10-06 13:08:16 +0000 |
commit | 9f14c03dbe6b9bd17a23cb9701f02bfde7bd5c61 (patch) | |
tree | 77bcfc6f5e452bfc115c6419bac89298eb643075 /mk | |
parent | 38cee74a0e908c02b9e7402bc9f2b1bec79a6c8d (diff) | |
download | pkgsrc-9f14c03dbe6b9bd17a23cb9701f02bfde7bd5c61.tar.gz |
Allow the caller to override the script that extracts the version of the
built-in package. That means pkgconfig-builtin.mk can be used in even
more situations now.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/pkgconfig-builtin.mk | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mk/buildlink3/pkgconfig-builtin.mk b/mk/buildlink3/pkgconfig-builtin.mk index 1cd204d94f6..7907847e62b 100644 --- a/mk/buildlink3/pkgconfig-builtin.mk +++ b/mk/buildlink3/pkgconfig-builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: pkgconfig-builtin.mk,v 1.2 2008/10/05 21:36:35 cube Exp $ +# $NetBSD: pkgconfig-builtin.mk,v 1.3 2008/10/06 13:08:16 cube Exp $ # This file is used to factor out a common pattern in builtin.mk files backed # up by the existence of a pkgconfig file. @@ -8,6 +8,10 @@ # Optionally, caller may define PKGCONFIG_BASE.<BUILTIN_PKG> as the base # location for a native implementation of the package. It conveniently # defaults to X11BASE. +# +# The caller may also override the default, pkgconfig-specific, version +# script. That means this file can be called by a lot more generic +# builtin.mk files. BUILTIN_FIND_FILES_VAR:= FIND_FILES_${BUILTIN_PKG} BUILTIN_FIND_FILES.FIND_FILES_${BUILTIN_PKG}= ${PKGCONFIG_FILE.${BUILTIN_PKG}} @@ -27,8 +31,11 @@ MAKEVARS:= ${MAKEVARS} IS_BUILTIN.${BUILTIN_PKG} .if !defined(BUILTIN_PKG.${BUILTIN_PKG}) && \ !empty(IS_BUILTIN.${BUILTIN_PKG}:M[yY][eE][sS]) && \ !empty(FIND_FILES_${BUILTIN_PKG}:M*.pc) -BUILTIN_VERSION.${BUILTIN_PKG}!= \ - ${SED} -n -e 's/Version: //p' ${FIND_FILES_${BUILTIN_PKG}} +. if !defined(BUILTIN_VERSION_SCRIPT.${BUILTIN_PKG}) +BUILTIN_VERSION_SCRIPT.${BUILTIN_PKG}= ${SED} -n -e 's/Version: //p' +. endif +BUILTIN_VERSION.${BUILTIN_PKG}!= ${BUILTIN_VERSION_SCRIPT.${BUILTIN_PKG}} \ + ${FIND_FILES_${BUILTIN_PKG}} BUILTIN_PKG.${BUILTIN_PKG}:= ${BUILTIN_PKG}-${BUILTIN_VERSION.${BUILTIN_PKG}} .endif MAKEVARS:= ${MAKEVARS} BUILTIN_PKG.${BUILTIN_PKG} |