forked from Lainports/freebsd-ports
56 lines
1.6 KiB
Text
56 lines
1.6 KiB
Text
# Set up the build variables which are used by a given build
|
|
#
|
|
# Code fragment used by other scripts for commonality
|
|
|
|
buildenv () {
|
|
pb=$1
|
|
branch=$2
|
|
|
|
case "x$branch" in
|
|
x4)
|
|
export XFREE86_VERSION=4
|
|
;;
|
|
x4-exp)
|
|
export XFREE86_VERSION=4
|
|
;;
|
|
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=1
|
|
export HAVE_MOTIF=1
|
|
export PACKAGE_BUILDING=1
|
|
export PARALLEL_PACKAGE_BUILD=1
|
|
export PORTOBJFORMAT=elf
|
|
export USA_RESIDENT=yes
|
|
|
|
# Need to make it fetch a full set say once a week to catch distfiles
|
|
# which change md5 sum but not name
|
|
export MASTER_SITE_OVERRIDE='ftp://ftp-master.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/'
|
|
|
|
# XXX Are these supposed to be used for release CD builds?
|
|
#export NO_RESTRICTED=1
|
|
#export FOR_CDROM=1
|
|
|
|
# XXX Probably old and mouldy
|
|
#export INDEX_NOSORT=1
|
|
#export FORCE_PKG_REGISTER=1
|
|
#export FORCE_PACKAGE=1
|
|
#export PKG_NOCOMPRESS=1
|
|
|
|
}
|