From 530ba84e622a27dfb91481fc855960c59cea967a Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Mon, 11 Mar 2002 11:52:15 +0000 Subject: Set all of the control variables to be used in port/package operations in one central place, instead of doing them piecemeal all over the place. This also includes the ability to customize settings per port branch (e.g. XFREE86_VERSION) Also, instead of hardcoding values of OSVERSION and OSREL which are going to get forgotten again, pull them out of the source tree in ${branch}/src so they track the head of the branch. --- Tools/portbuild/scripts/buildenv | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Tools/portbuild/scripts/buildenv (limited to 'Tools') diff --git a/Tools/portbuild/scripts/buildenv b/Tools/portbuild/scripts/buildenv new file mode 100644 index 000000000000..0ac8ea603264 --- /dev/null +++ b/Tools/portbuild/scripts/buildenv @@ -0,0 +1,44 @@ +# Set up the build variables which are used by a given build +# +# Code fragment used by other scripts for commonality + +buildenv () { + branch=$1 + + case "x$branch" in + x4) + export XFREE86_VERSION=3 + ;; + x4-exp) + export XFREE86_VERSION=3 + ;; + x5) + export XFREE86_VERSION=4 + ;; + *) + echo "buildvars: invalid branch" + exit 1 + ;; + esac + + # Have to use realpath because 'make index' doesn't deal with symlinks in PORTSDIR + # - kk 020311 + export PORTSDIR=$(realpath ${pb}/${branch}/ports) + export SRCBASE=$(realpath ${pb}/${branch}/src) + export SRCPREFIX=${SRCBASE} #XXX Which one is canonical? + + export OSVERSION=$(awk '/^#define __FreeBSD_version/ {print $3}' < ${SRCBASE}/sys/sys/param.h) + 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) + + export BATCH=t + export HAVE_MOTIF=t + export PACKAGE_BUILDING=t + export PARALLEL_PACKAGE_BUILD=t + export PORTOBJFORMAT=elf + + # XXX Probably old and mouldy + #export NO_RESTRICTED=t + #export FOR_CDROM=t + #export INDEX_NOSORT=t +} -- cgit v1.2.3