-
Notifications
You must be signed in to change notification settings - Fork 0
/
list-depends
executable file
·47 lines (33 loc) · 946 Bytes
/
list-depends
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
#!/usr/local/bin/zsh
set -e -u -o pipefail
CURDIR=$(dirname $0)
: ${PACKAGE_SET:=}
while getopts "z:" OPT; do
case $OPT in
z)
PACKAGE_SET=${OPTARG}
;;
esac
done
shift $((${OPTIND} - 1))
[ -n "${PACKAGE_SET}" ] || {
echo "run-make: package set not specified."
exit 1
}
export PORT_DBDIR=/usr/local/etc/poudriere.d/${PACKAGE_SET}-options
export PORTSDIR=/usr/local/poudriere/ports/default
typeset -A ports
list-depends ()
{
if [ -n "$ports[$1]" ]; then
return 0
fi
ports[$1]=1
echo $1
for _depend in `make __MAKE_CONF=/usr/local/etc/poudriere.d/${PACKAGE_SET}-make.conf -VPKG_DEPENDS -VBUILD_DEPENDS -VEXTRACT_DEPENDS -VLIB_DEPENDS -VFETCH_DEPENDS -VRUN_DEPENDS LOCALBASE=/nonexistent -C ${PORTSDIR}/$1`; do
_depend=$(echo ${_depend} | sed -e "s/.*://")
_depend=${_depend#${PORTSDIR}/}
list-depends "${_depend}"
done
}
list-depends "$1"