summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2015-11-21 23:10:27 +0000
committeragc <agc@pkgsrc.org>2015-11-21 23:10:27 +0000
commitef1dd0cb9b8796482c02efb73ba4d759ea21814c (patch)
tree9c7e9d663427db58192ea59d89b65b62a734f96e /pkgtools
parent5d01e61ac92b9cb67c2253536c5dc475c0723e61 (diff)
downloadpkgsrc-ef1dd0cb9b8796482c02efb73ba4d759ea21814c.tar.gz
Update pkg_comp to 1.38nb1
pkgsrc uses the "BUILD_TARGET" definition internally as the primary target for building in a package's WRKDIR. It defaults to "all". So pkgsrc cd's to ${WRKDIR} and does a "make ${BUILD_TARGET}" pkg_comp also wants to use the same "BUILD_TARGET" definition internally for itself to guide the builds for making binary packages. It's done at a higher level than the pkgsrc definition. It defaults to "package". The use of the same name for two different purposes can cause pkg_comp to fail to build packages. This commit renames the pkg_comp definition to be "BUILD_PKG_COMP_TARGET". With this change in place, my pkg_comp builds now complete successfully. Bump PKGREVISION for the BUILD_PKG_COMP_TARGET fix
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkg_comp/Makefile3
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.86
-rw-r--r--pkgtools/pkg_comp/files/pkg_comp.sh18
3 files changed, 14 insertions, 13 deletions
diff --git a/pkgtools/pkg_comp/Makefile b/pkgtools/pkg_comp/Makefile
index da9d50a3e9b..71527cdb274 100644
--- a/pkgtools/pkg_comp/Makefile
+++ b/pkgtools/pkg_comp/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.54 2015/08/17 08:18:31 wiz Exp $
+# $NetBSD: Makefile,v 1.55 2015/11/21 23:10:27 agc Exp $
PKGNAME= pkg_comp-1.38
+PKGREVISION= 1
CATEGORIES= pkgtools
MAINTAINER= jmmv@NetBSD.org
diff --git a/pkgtools/pkg_comp/files/pkg_comp.8 b/pkgtools/pkg_comp/files/pkg_comp.8
index 2a3aba5927a..57ef2bf474c 100644
--- a/pkgtools/pkg_comp/files/pkg_comp.8
+++ b/pkgtools/pkg_comp/files/pkg_comp.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_comp.8,v 1.40 2015/08/17 08:18:31 wiz Exp $
+.\" $NetBSD: pkg_comp.8,v 1.41 2015/11/21 23:10:27 agc Exp $
.\"
.\" pkg_comp - Build packages inside a clean chroot environment
.\" Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
@@ -185,7 +185,7 @@ like
or a plain name like
.Sq colorls .
Defaults to nothing.
-.It BUILD_TARGET
+.It BUILD_PKG_COMP_TARGET
The pkgsrc target to use when building packages.
It can contain any target supported by the pkgsrc system, but
reasonable values are:
@@ -507,7 +507,7 @@ will take care to umount needed mount points.
This executes several targets automatically, using
.Sy AUTO_TARGET
as
-.Sy BUILD_TARGET
+.Sy BUILD_PKG_COMP_TARGET
during the build.
The order is: makeroot, build and removeroot.
This is useful to create binary packages of several pkgsrc and their
diff --git a/pkgtools/pkg_comp/files/pkg_comp.sh b/pkgtools/pkg_comp/files/pkg_comp.sh
index 8941cb7127f..5850c01b9a6 100644
--- a/pkgtools/pkg_comp/files/pkg_comp.sh
+++ b/pkgtools/pkg_comp/files/pkg_comp.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pkg_comp.sh,v 1.42 2015/08/17 08:18:31 wiz Exp $
+# $NetBSD: pkg_comp.sh,v 1.43 2015/11/21 23:10:27 agc Exp $
#
# pkg_comp - Build packages inside a clean chroot environment
# Copyright (c) 2002, 2003, 2004, 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
@@ -45,8 +45,8 @@ _MKCONF_VARS="WRKDIR_BASENAME MKOBJDIRS BSDSRCDIR WRKOBJDIR DISTDIR PACKAGES \
PKGSRC_COMPILER \
LIBKVER_STANDALONE_PREFIX PKG_DBDIR"
-_TEMPLATE_VARS="DESTDIR ROOTSHELL COPYROOTCFG BUILD_TARGET DISTRIBDIR SETS \
- SETS_X11 REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \
+_TEMPLATE_VARS="DESTDIR ROOTSHELL BUILD_PKG_COMP_TARGET COPYROOTCFG DISTRIBDIR \
+ SETS SETS_X11 REAL_SRC REAL_SRC_OPTS REAL_PKGSRC \
REAL_PKGSRC_OPTS REAL_DISTFILES REAL_DISTFILES_OPTS \
REAL_PACKAGES REAL_PACKAGES_OPTS REAL_PKGVULNDIR \
NETBSD_RELEASE MAKEROOT_HOOKS MOUNT_HOOKS UMOUNT_HOOKS \
@@ -105,7 +105,7 @@ env_setdefaults()
: ${ROOTSHELL:=/bin/ksh}
: ${COPYROOTCFG:=no}
: ${AUTO_TARGET:=package}
- : ${BUILD_TARGET:=package}
+ : ${BUILD_PKG_COMP_TARGET:=package}
: ${DISTRIBDIR:=/var/pub/NetBSD}
: ${SETS:=base.tgz comp.tgz etc.tgz kern-GENERIC.tgz text.tgz}
: ${SETS_X11:=xbase.tgz xcomp.tgz xetc.tgz xfont.tgz xserver.tgz}
@@ -621,10 +621,10 @@ makeroot_libkver()
local prefix script statfile
if [ "$NETBSD_RELEASE" != "no" ]; then
- _BUILD_TARGET="$BUILD_TARGET"
- BUILD_TARGET="standalone-install"
+ _BUILD_PKG_COMP_TARGET="$BUILD_PKG_COMP_TARGET"
+ BUILD_PKG_COMP_TARGET="standalone-install"
build_and_install pkgtools/libkver
- BUILD_TARGET="$_BUILD_TARGET"
+ BUILD_PKG_COMP_TARGET="$_BUILD_PKG_COMP_TARGET"
echo "LD_PRELOAD=${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so; export LD_PRELOAD" >> $DESTDIR/etc/shrc
echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.login
echo "setenv LD_PRELOAD ${LIBKVER_STANDALONE_PREFIX}/lib/libkver.so" >> $DESTDIR/etc/csh.cshrc
@@ -678,7 +678,7 @@ pkg_auto()
fi
checkroot
- _BUILD_RESUME=${rfile} BUILD_TARGET=${target} pkg_build ${pkgs}
+ _BUILD_RESUME=${rfile} BUILD_PKG_COMP_TARGET=${target} pkg_build ${pkgs}
pkg_removeroot
}
@@ -734,7 +734,7 @@ pkg_build()
init_script $script
cat >> $script <<EOF
cd /usr/pkgsrc/$p
-make $BUILD_TARGET
+make $BUILD_PKG_COMP_TARGET
if [ \$? != 0 ]; then
touch /pkg_comp/tmp/`basename $statfile`
fi