diff options
author | rh <rh> | 2002-05-11 11:27:28 +0000 |
---|---|---|
committer | rh <rh> | 2002-05-11 11:27:28 +0000 |
commit | 53e840964eceea177b218fdea4a4572f539a5785 (patch) | |
tree | e1b9b2965198ecf5139f1300d9e7081b43b8e192 /pkgtools | |
parent | ba73f6c1c100d839d610b6b9cbe9acece817d470 (diff) | |
download | pkgsrc-53e840964eceea177b218fdea4a4572f539a5785.tar.gz |
Update createbuildlink to 1.4. This fixes the following problems:
* when creating BUILDLINK_CONFIG_WRAPPER_SED we also need to create
a corresponding REPLACE_BUILDLINK_SED to reverse the effects
* account for packages that set USE_X11BASE to an empty string.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/createbuildlink/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/createbuildlink/files/createbuildlink | 33 |
2 files changed, 21 insertions, 16 deletions
diff --git a/pkgtools/createbuildlink/Makefile b/pkgtools/createbuildlink/Makefile index aeeb7c8efc8..19bbf925740 100644 --- a/pkgtools/createbuildlink/Makefile +++ b/pkgtools/createbuildlink/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2002/05/11 08:11:46 rh Exp $ +# $NetBSD: Makefile,v 1.5 2002/05/11 11:27:28 rh Exp $ # -DISTNAME= createbuildlink-1.3 +DISTNAME= createbuildlink-1.4 CATEGORIES= pkgtools sysutils MASTER_SITES= # Nothing DISTFILES= # Nothing diff --git a/pkgtools/createbuildlink/files/createbuildlink b/pkgtools/createbuildlink/files/createbuildlink index 76714186802..b50c14a6f52 100755 --- a/pkgtools/createbuildlink/files/createbuildlink +++ b/pkgtools/createbuildlink/files/createbuildlink @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: createbuildlink,v 1.4 2002/05/11 08:11:47 rh Exp $ +# $NetBSD: createbuildlink,v 1.5 2002/05/11 11:27:28 rh Exp $ # # Copyright (c) 2002 The NetBSD Foundation, Inc. # All rights reserved. @@ -39,7 +39,7 @@ # Create an initial buildlink.mk from a package's Makefile and PLIST # -REV=`echo '$Revision: 1.4 $' | sed 's/\\$//g'` +REV=`echo '$Revision: 1.5 $' | sed 's/\\$//g'` tmpdir=/tmp makefile=Makefile sedrules=$tmpdir/sedrules.buildlink.$$ @@ -61,6 +61,12 @@ if [ ! -f "$PLIST" ]; then fi ## +## try to find any included Makefile.common's +## +commons=`grep '^.include.*Makefile.common\"' $makefile | \ + sed 's/^.*"\(.*\)".*/\1/'` + +## ## package specific variables ## CURDIR=`pwd | sed 's|^.*/\([^/]*/[^/]*\)$|\1|'` @@ -68,11 +74,12 @@ PKGNAME=`make show-var VARNAME=PKGNAME` PKGVER=`echo $PKGNAME | sed -e 's/^.*-//'` PKGNOVER=`echo $PKGNAME | sed -e 's/-[^-]*$//'` PKGUPPER=`echo $PKGNOVER | tr '[:lower:]' '[:upper:]' | tr - _` +PREFIX=X11PREFIX USE_X11BASE=`make show-var VARNAME=USE_X11BASE` if [ -z "$USE_X11BASE" ]; then - PREFIX=LOCALBASE -else - PREFIX=X11PREFIX + if ! grep -q "^USE_X11BASE" $makefile $commons ; then + PREFIX=LOCALBASE + fi fi ## @@ -138,12 +145,6 @@ done echo "" ## -## try to find any included Makefile.common's -## -commons=`grep '^.include.*Makefile.common\"' $makefile | \ - sed 's/^.*"\(.*\)".*/\1/'` - -## ## buildlinked dependencies ## for i in $makefile $commons ; do @@ -187,7 +188,7 @@ for i in $configs ; do echo "BUILDLINK_CONFIG_WRAPPER.$PKGNOVER-$ctg= \\" echo " \${BUILDLINK_DIR}/$i" echo "REPLACE_BUILDLINK_SED+= \\" - echo "-e \"s|\${BUILDLINK_CONFIG_WRAPPER.$PKGNOVER-$ctg}|\${BUILDLINK_CONFIG.$PKGNOVER-$ctg}|g\"" + echo " -e \"s|\${BUILDLINK_CONFIG_WRAPPER.$PKGNOVER-$ctg}|\${BUILDLINK_CONFIG.$PKGNOVER-$ctg}|g\"" echo "" done @@ -200,7 +201,9 @@ if [ -n "$configs" ]; then dir=$i while [ "$dir" != "include" ] ; do echo "BUILDLINK_CONFIG_WRAPPER_SED+= \\" - echo "-e \"s|-I[ ]*\${BUILDLINK_PREFIX.$PKGNOVER}/$dir|-I\${BUILDLINK_DIR}/$dir|g\"" + echo " -e \"s|-I[ ]*\${BUILDLINK_PREFIX.$PKGNOVER}/$dir|-I\${BUILDLINK_DIR}/$dir|g\"" + echo "REPLACE_BUILDLINK_SED+= \\" + echo " -e \"s|-I\${BUILDLINK_DIR}/$dir|-I[ ]*\${BUILDLINK_PREFIX.$PKGNOVER}/$dir|g\"" dir=`echo $dir | sed 's|/[^/]*$||'` done done @@ -210,7 +213,9 @@ if [ -n "$configs" ]; then dir=$i while [ "$dir" != "lib" ] ; do echo "BUILDLINK_CONFIG_WRAPPER_SED+= \\" - echo "-e \"s|-L[ ]*\${BUILDLINK_PREFIX.$PKGNOVER}/$dir|-L\${BUILDLINK_DIR}/$dir|g\"" + echo " -e \"s|-L[ ]*\${BUILDLINK_PREFIX.$PKGNOVER}/$dir|-L\${BUILDLINK_DIR}/$dir|g\"" + echo "REPLACE_BUILDLINK_SED+= \\" + echo " -e \"s|-L\${BUILDLINK_DIR}/$dir|-L[ ]*\${BUILDLINK_PREFIX.$PKGNOVER}/$dir|g\"" dir=`echo $dir | sed 's|/[^/]*$||'` done done |