summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrh <rh@pkgsrc.org>2002-05-05 00:00:37 +0000
committerrh <rh@pkgsrc.org>2002-05-05 00:00:37 +0000
commit3a1065045230fa0441fea45217409b1798f9f569 (patch)
tree6858dc181dfae79d7e4e21e790109f4d96148dc7 /pkgtools
parent848a96d7cd57afbf2e4314fb948f8f1a09b64640 (diff)
downloadpkgsrc-3a1065045230fa0441fea45217409b1798f9f569.tar.gz
Update createbuildlink to 1.1. Includes the following changes:
* -buildlink-config-wrapper is a hardcoded suffix in bsd.buildlink.mk. Therefore, make sure the created config wapper targets actually have this suffix. * Prevent pkgconfig logic from twice including pkgconfig/buildlink.mk * Add missing \" in created sed rules * Include createbuildlink revision in created files
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/createbuildlink/Makefile4
-rwxr-xr-xpkgtools/createbuildlink/files/createbuildlink29
2 files changed, 20 insertions, 13 deletions
diff --git a/pkgtools/createbuildlink/Makefile b/pkgtools/createbuildlink/Makefile
index a4d7a5d72ab..ed5d87fef68 100644
--- a/pkgtools/createbuildlink/Makefile
+++ b/pkgtools/createbuildlink/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.1.1.1 2002/04/29 11:03:54 rh Exp $
+# $NetBSD: Makefile,v 1.2 2002/05/05 00:00:37 rh Exp $
#
-DISTNAME= createbuildlink-1.0
+DISTNAME= createbuildlink-1.1
CATEGORIES= pkgtools sysutils
MASTER_SITES= # Nothing
DISTFILES= # Nothing
diff --git a/pkgtools/createbuildlink/files/createbuildlink b/pkgtools/createbuildlink/files/createbuildlink
index 358054be26a..c162788d457 100755
--- a/pkgtools/createbuildlink/files/createbuildlink
+++ b/pkgtools/createbuildlink/files/createbuildlink
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: createbuildlink,v 1.1.1.1 2002/04/29 11:03:55 rh Exp $
+# $NetBSD: createbuildlink,v 1.2 2002/05/05 00:00:38 rh Exp $
#
# Copyright (c) 2002 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -39,6 +39,7 @@
# Create an initial buildlink.mk from a package's Makefile and PLIST
#
+REV=`echo '$Revision: 1.2 $' | sed 's/\\$//g'`
tmpdir=/tmp
makefile=Makefile
sedrules=$tmpdir/sedrules.buildlink.$$
@@ -84,6 +85,7 @@ echo >>$sedrules "s|@@PKGNOVER@@|$PKGNOVER|g"
echo >>$sedrules "s|@@PKGUPPER@@|$PKGUPPER|g"
echo >>$sedrules "s|@@PKGVER@@|$PKGVER|g"
echo >>$sedrules "s|@@PREFIX@@|$PREFIX|g"
+echo >>$sedrules "s|@@REV@@|$REV|g"
#
# buildlink header
@@ -93,7 +95,7 @@ sed -f $sedrules <<EOF
#
# This Makefile fragment is included by packages that use $PKGNOVER.
#
-# This file was created automatically using the createbuildlink script
+# This file was created automatically using createbuildlink @@REV@@
#
# To use this Makefile fragment, simply:
#
@@ -143,7 +145,8 @@ grep '^.include.*\.\.\/.*\/.*/buildlink.mk\"' $makefile
## check for pkgconfig style config files
##
pkgconfigs=`grep "^lib/pkgconfig/.*.pc" $PLIST`
-[ -z "$pkgconfigs" ] || echo ".include \"../../devel/pkgconfig/buildlink.mk\""
+inplist=`grep "^.include.*devel/pkgconfig/buildlink.mk" $makefile`
+[ -z "$pkgconfigs" -o -n "$inplist" ] || echo ".include \"../../devel/pkgconfig/buildlink.mk\""
##
## main buildlink target for this package
@@ -158,7 +161,8 @@ configs=`grep 'bin/.*-config$' $PLIST`
for i in $configs ; do
cfg=`echo $i | sed 's|.*/||'`
- echo "BUILDLINK_TARGETS.$PKGNOVER+= $PKGNOVER-buildlink-$cfg-wrapper"
+ blc=`echo $cfg | sed 's|\(.*\)-config|\1-buildlink-config|'`
+ echo "BUILDLINK_TARGETS.$PKGNOVER+= $PKGNOVER-$blc-wrapper"
done
echo "BUILDLINK_TARGETS+= \${BUILDLINK_TARGETS.$PKGNOVER}"
@@ -168,10 +172,11 @@ echo ""
for i in $configs ; do
cfg=`echo $i | sed 's|.*/||'`
- echo "BUILDLINK_CONFIG.$PKGNOVER.$cfg= \${BUILDLINK_PREFIX.$PKGNOVER}/$i"
- echo "BUILDLINK_CONFIG_WRAPPER.$PKGNOVER.$cfg= \${BUILDLINK_DIR}/$i"
+ ctg=`echo $cfg | sed 's|\(.*\)-config|\1|'`
+ echo "BUILDLINK_CONFIG.$PKGNOVER-$ctg= \${BUILDLINK_PREFIX.$PKGNOVER}/$i"
+ echo "BUILDLINK_CONFIG_WRAPPER.$PKGNOVER-$ctg= \${BUILDLINK_DIR}/$i"
echo "REPLACE_BUILDLINK_SED+= \\"
- echo "-e \"s|\${BUILDLINK_CONFIG_WRAPPER.$PKGNOVER.$cfg}|\${BUILDLINK_CONFIG.$PKGNOVER.$cfg}|g"
+ echo "-e \"s|\${BUILDLINK_CONFIG_WRAPPER.$PKGNOVER-$ctg}|\${BUILDLINK_CONFIG.$PKGNOVER-$ctg}|g\""
done
##
@@ -183,9 +188,10 @@ if [ ! -z "$configs" ]; then
for i in $configs ; do
cfg=`echo $i | sed 's|.*/||'`
CFG=`echo $cfg | tr '[:lower:]' '[:upper:]' | tr - _`
- echo "${PKGUPPER}_${CFG}?= \${BUILDLINK_CONFIG_WRAPPER.$PKGNOVER.$cfg}"
- echo "CONFIGURE_ENV+= \${PKGUPPER}_${CFG}=\"\${${PKGUPPER}_${CFG}}\""
- echo "MAKE_ENV+= \${PKGUPPER}_${CFG}=\"\${${PKGUPPER}_${CFG}}\""
+ ctg=`echo $cfg | sed 's|\(.*\)-config|\1|'`
+ echo "${PKGUPPER}_${CFG}?= \${BUILDLINK_CONFIG_WRAPPER.$PKGNOVER-$ctg}"
+ echo "CONFIGURE_ENV+= ${PKGUPPER}_${CFG}=\"\${${PKGUPPER}_${CFG}}\""
+ echo "MAKE_ENV+= ${PKGUPPER}_${CFG}=\"\${${PKGUPPER}_${CFG}}\""
done
echo ".endif"
echo ""
@@ -198,7 +204,8 @@ echo "pre-configure: \${BUILDLINK_TARGETS}"
echo "${PKGNOVER}-buildlink: _BUILDLINK_USE"
for i in $configs ; do
cfg=`echo $i | sed 's|.*/||'`
- echo "$PKGNOVER-buildlink-$cfg-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE"
+ blc=`echo $cfg | sed 's|\(.*\)-config|\1-buildlink-config|'`
+ echo "$PKGNOVER-$blc-wrapper: _BUILDLINK_CONFIG_WRAPPER_USE"
done
echo ""