summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2010-12-01 02:32:49 +0000
committerMark Linimon <linimon@FreeBSD.org>2010-12-01 02:32:49 +0000
commitc836d9acadb691a21b28cafe9c77f5710f4564f0 (patch)
treee47c1ce2d307410f245556caa2bbe476d903d32b /Tools
parentCanonicalize the use of SRC_BASE to fix INDEX and duds builds on head (diff)
Canonicalize the use of SRC_BASE to fix INDEX and duds builds on head
nodes that don't have /usr/src. On pointyhat, this "just happens to work"; on a cleanly installed system like pointyhat-west, it didn't. Add overrides for Linux compatibility (again, it "just happened to work" on pointyhat). Move the code that sets PORTSDIR and SRC_BASE to the server side only. The code that overrides OSVERSION, OSREL, and BRANCH _must_ remain in the common code.
Notes
Notes: svn path=/head/; revision=265488
Diffstat (limited to 'Tools')
-rw-r--r--Tools/portbuild/scripts/buildenv62
1 files changed, 38 insertions, 24 deletions
diff --git a/Tools/portbuild/scripts/buildenv b/Tools/portbuild/scripts/buildenv
index 59119c20a31f..b49ef5c3884a 100644
--- a/Tools/portbuild/scripts/buildenv
+++ b/Tools/portbuild/scripts/buildenv
@@ -71,19 +71,46 @@ buildenv () {
branch=$3
builddir=$4
- # Don't pick up host OPTIONS
+ # set up things for INDEX/duds builds
+
+ # first, don't pick up host OPTIONS
export PORT_DBDIR=/nonexistent
+ # Have to use realpath because 'make index' doesn't deal with
+ # symlinks in PORTSDIR - kk 020311
+ if [ -d ${builddir}/ports/ ]; then
+ export PORTSDIR=$(realpath ${builddir}/ports)
+ else
+ export PORTSDIR=/nonexistent
+ fi
+
+ if [ -d ${builddir}/src/ ]; then
+ export SRC_BASE=$(realpath ${builddir}/src)
+ else
+ export SRC_BASE=/nonexistent
+ fi
+
+ # for archs that support COMPAT_IA32, set some flags for INDEX.
+ # Client kernels should be built appropriately.
+ for i in ${ARCHS_SUPPORTING_COMPAT_IA32}; do
+ if [ ${i} = ${arch} ]; then
+ export HAVE_COMPAT_IA32_KERN="yes"
+ export HAVE_COMPAT_IA32_LIBS="yes"
+ break
+ fi
+ done
+ for i in ${ARCHS_REQUIRING_LINPROCFS}; do
+ if [ ${i} = ${arch} ]; then
+ export LINUX_OSRELEASE=${DEFAULT_LINUX_OSRELEASE}
+ break
+ fi
+ done
+
buildenv.common ${pb} ${arch} ${branch} ${builddir}
# override things destined for bsd.port.mk
- export LOCALBASE=/usr/local
export DISTDIR=${builddir}/distfiles
export PACKAGES=${builddir}/packages
- export PKGSUFFIX=.tbz
-
- # now unused:
- # export PKGZIPCMD=bzip2
branchbase=$(get_branch_base ${branch})
if [ -z "${branchbase}" ]; then
@@ -126,25 +153,12 @@ buildenv.common() {
branch=$3
builddir=$4
- # Have to use realpath because 'make index' doesn't deal with
- # symlinks in PORTSDIR - kk 020311
- if [ -d ${builddir}/ports/ ]; then
- export PORTSDIR=$(realpath ${builddir}/ports)
- else
- export PORTSDIR=/nonexistent
- fi
- if [ -d ${builddir}/src/ ]; then
- export SRCBASE=$(realpath ${builddir}/src)
- else
- export SRCBASE=/nonexistent
- fi
-
- if [ -f ${SRCBASE}/sys/sys/param.h ]; then
- export OSVERSION=$(awk '/^#define __FreeBSD_version/ {print $3}' < ${SRCBASE}/sys/sys/param.h)
+ if [ -f ${SRC_BASE}/sys/sys/param.h ]; then
+ export OSVERSION=$(awk '/^#define __FreeBSD_version/ {print $3}' < ${SRC_BASE}/sys/sys/param.h)
fi
- if [ -f ${SRCBASE}/sys/conf/newvers.sh ]; then
- export OSREL=$(awk 'BEGIN {FS="\""}; /^REVISION/ {print $2}' < ${SRCBASE}/sys/conf/newvers.sh)
- export BRANCH=$(awk 'BEGIN {FS="\""}; /^BRANCH/ {print $2}' < ${SRCBASE}/sys/conf/newvers.sh)
+ if [ -f ${SRC_BASE}/sys/conf/newvers.sh ]; then
+ export OSREL=$(awk 'BEGIN {FS="\""}; /^REVISION/ {print $2}' < ${SRC_BASE}/sys/conf/newvers.sh)
+ export BRANCH=$(awk 'BEGIN {FS="\""}; /^BRANCH/ {print $2}' < ${SRC_BASE}/sys/conf/newvers.sh)
fi
export ARCH=${arch}