summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-03-06 15:11:22 +0000
committerjlam <jlam@pkgsrc.org>2004-03-06 15:11:22 +0000
commit43fa93841cf396748aaa496ec1702be871aea1e9 (patch)
tree1c49b1f8a9e409a4fda07aa05076dc855930ed4f /pkgtools
parent6a87a364b0edd116b1b6e2f6e418b4b5617687c3 (diff)
downloadpkgsrc-43fa93841cf396748aaa496ec1702be871aea1e9.tar.gz
Update pkgtools/createbuildlink to 3.3. Changes from version 3.2 include
fixes to the whitespace in the generated files to more closely match the template buildlink3.mk file.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/createbuildlink/Makefile4
-rwxr-xr-xpkgtools/createbuildlink/files/createbuildlink24
2 files changed, 20 insertions, 8 deletions
diff --git a/pkgtools/createbuildlink/Makefile b/pkgtools/createbuildlink/Makefile
index 11db361fcb0..07637d632d4 100644
--- a/pkgtools/createbuildlink/Makefile
+++ b/pkgtools/createbuildlink/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.27 2004/03/05 19:42:09 jlam Exp $
+# $NetBSD: Makefile,v 1.28 2004/03/06 15:11:22 jlam Exp $
-DISTNAME= createbuildlink-3.2
+DISTNAME= createbuildlink-3.3
CATEGORIES= pkgtools sysutils
MASTER_SITES= # Nothing
DISTFILES= # Nothing
diff --git a/pkgtools/createbuildlink/files/createbuildlink b/pkgtools/createbuildlink/files/createbuildlink
index e46181b3436..288cc6bb52f 100755
--- a/pkgtools/createbuildlink/files/createbuildlink
+++ b/pkgtools/createbuildlink/files/createbuildlink
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: createbuildlink,v 1.19 2004/03/05 19:42:09 jlam Exp $
+# $NetBSD: createbuildlink,v 1.20 2004/03/06 15:11:22 jlam Exp $
#
# Copyright (c) 2002 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -40,8 +40,9 @@
# and PLIST
#
-REV=`echo '$Revision: 1.19 $' | sed 's/\\$//g'`
+REV=`echo '$Revision: 1.20 $' | sed 's/\\$//g'`
tmpdir=/tmp
+spacesintab=8
makefile=Makefile
sedrules=$tmpdir/sedrules.buildlink.$$
PLIST=PLIST
@@ -151,9 +152,20 @@ EOF
else # buildlink 3
+gap=" "
+for i in 1 2 3; do
+ n=`expr $i \* $spacesintab`
+ if [ ${#PKGUPPER} -ge $n ]; then
+ gap=" $gap"
+ fi
+done
+
sed -f $sedrules <<EOF
-BUILDLINK_DEPTH:= \${BUILDLINK_DEPTH}+
+BUILDLINK_DEPTH:=${gap}\${BUILDLINK_DEPTH}+
${PKGUPPER}_BUILDLINK3_MK:= \${${PKGUPPER}_BUILDLINK3_MK}+
+EOF
+
+sed -f $sedrules <<EOF
.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= ${PKGNOVER}
@@ -184,7 +196,6 @@ fi
sed -f $sedrules <<EOF
BUILDLINK_PKGSRCDIR.$PKGNOVER?= ../../$CURDIR
-
EOF
##
@@ -192,6 +203,7 @@ EOF
##
if [ $blver = 2 ]; then
sed -f $sedrules <<EOF
+
EVAL_PREFIX+= BUILDLINK_PREFIX.$PKGNOVER=$PKGNOVER
BUILDLINK_PREFIX.${PKGNOVER}_DEFAULT= \${$PREFIX}
EOF
@@ -220,13 +232,13 @@ for i in \
echo "BUILDLINK_FILES.$PKGNOVER+= $i"
done
-echo ""
-
fi ## end of buildlink2-only part
##
## buildlinked dependencies
##
+grep -l '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $makefile $commons \
+ >/dev/null 2>&1 && echo "" # Be careful not to print duplicate \n
for i in $makefile $commons ; do
[ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink[23].mk\"' $i |
sed "s/buildlink$otherver/buildlink$blver/" |