diff options
author | kris <kris@FreeBSD.org> | 2002-03-11 19:54:40 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2002-03-11 19:54:40 +0800 |
commit | 244488f3216874000cbc2268fe96061845e6dce7 (patch) | |
tree | 68d5eddca85c3096f7f3b4c50c4247693e178cd7 /Tools | |
parent | 14a1925081160561d21882cd191c51cfad2a0a56 (diff) | |
download | freebsd-ports-gnome-244488f3216874000cbc2268fe96061845e6dce7.tar.gz freebsd-ports-gnome-244488f3216874000cbc2268fe96061845e6dce7.tar.zst freebsd-ports-gnome-244488f3216874000cbc2268fe96061845e6dce7.zip |
Clean up index generation:
* Don't assume the script will be called from the ports directory
* Use buildenv to set environment variables
* Set LOCALBASE and X11BASE to dummy variables to prevent the ports tree
from picking up packages installed on the host system, and patch up
the generated index at the end
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/makeindex | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/Tools/portbuild/scripts/makeindex b/Tools/portbuild/scripts/makeindex index 75215bd623cd..8dffc420b0e1 100755 --- a/Tools/portbuild/scripts/makeindex +++ b/Tools/portbuild/scripts/makeindex @@ -1,60 +1,57 @@ #!/bin/sh # usage: $0 branch -#### -j# to make index -###INDEXJOBS=1 +# -j# to make index +# XXX corrupts index file because of lack of synchronization? +#INDEXJOBS=1 + +pb=/var/portbuild +. ${pb}/portbuild.conf + +. ${pb}/scripts/buildenv usage () { echo "usage: makeindex branch" exit 1 } + if [ $# != 1 ]; then usage fi + case "x$1" in x4) branch=4 - export PORTOBJFORMAT=elf - export OSREL=4.5 - export OSVERSION=450000 ;; x4-exp) branch=4-exp - export PORTOBJFORMAT=elf - export OSREL=4.5 - export OSVERSION=450000 ;; x5) branch=5 - export PORTOBJFORMAT=elf - export OSREL=5.0 - export OSVERSION=500027 ;; *) usage ;; esac -export PORTSDIR=$(pwd) +# Set up the build env variables +buildenv $branch -if [ "x$NODUMMY" = "x" ]; then - unset XFREE86_VERSION - unset MOTIF_OPEN -else - export XFREE86_VERSION=4 - export MOTIF_OPEN=t -fi +#if [ "x$NODUMMY" = "x" ]; then +# unset XFREE86_VERSION +# unset MOTIF_OPEN +#fi unset DISPLAY -export BATCH=t -export HAVE_MOTIF=t -export PACKAGE_BUILDING=t -export PARALLEL_PACKAGE_BUILD=t -export SRCBASE=/var/portbuild/${branch}/src -#export NO_RESTRICTED=t -#export FOR_CDROM=t -#export INDEX_NOSORT=t + +# Don't pick up installed packages from the host +export LOCALBASE=/nonexistentlocal +export X11BASE=/nonexistentx + +cd ${PORTSDIR} make index -# remove extra spaces in dependency list -- this could cause problems -sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' INDEX > INDEX.tmp +# remove extra spaces in dependency list -- this causes problems +# Also transform the dummy paths to their canonical locations +sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e "s,${LOCALBASE},/usr/local," -e "s,${X11BASE},/usr/X11R6," INDEX > INDEX.tmp + mv -f INDEX.tmp INDEX |