blob: 472a3bade40fc584c1da40d13d0c8b55cb78e681 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
#!/bin/sh
# usage: $0 arch branch
# Don't want to pick up bento customizations
INDEX_PRISTINE=1
# Don't give luser advice if it fails
INDEX_QUIET=1
# Concurrency of index build
INDEX_JOBS=6
pb=/var/portbuild
arch=$1
shift
. ${pb}/${arch}/portbuild.conf
. ${pb}/scripts/buildenv
usage () {
echo "usage: makeindex arch branch"
exit 1
}
if [ $# != 1 ]; then
usage
fi
case "x$1" in
x5)
branch=5
INDEXFILE=INDEX-5
;;
x5-exp)
branch=5-exp
INDEXFILE=INDEX-5
;;
x6)
branch=6
INDEXFILE=INDEX-6
;;
x6-exp)
branch=6-exp
INDEXFILE=INDEX-6
;;
x6-exp2)
branch=6-exp2
INDEXFILE=INDEX-6
;;
x7)
branch=7
INDEXFILE=INDEX-7
;;
x7-exp)
branch=7-exp
INDEXFILE=INDEX-7
;;
x8)
branch=8
INDEXFILE=INDEX-8
;;
*)
usage
;;
esac
# Set up the build env variables
buildenv ${pb} ${arch} ${branch}
unset DISPLAY
# 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 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," ${INDEXFILE} > ${INDEXFILE}.tmp
mv -f ${INDEXFILE}.tmp ${INDEXFILE}
|