Lines 1-16
Link Here
|
1 |
#!/bin/sh |
1 |
#!/bin/sh |
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
# |
3 |
# |
4 |
# MAINTAINER: portmgr@FreeBSD.org |
4 |
# MAINTAINER: portmgr@FreeBSD.org |
5 |
|
5 |
|
6 |
set -e |
6 |
set -e |
|
|
7 |
set -o pipefail |
7 |
|
8 |
|
8 |
. "${dp_SCRIPTSDIR}/functions.sh" |
9 |
. "${dp_SCRIPTSDIR}/functions.sh" |
9 |
|
10 |
|
10 |
validate_env dp_ACTUAL_PACKAGE_DEPENDS dp_CATEGORIES dp_COMMENT \ |
11 |
validate_env dp_ACTUAL_PACKAGE_DEPENDS dp_CATEGORIES dp_COMMENT \ |
11 |
dp_COMPLETE_OPTIONS_LIST dp_DEPRECATED dp_DESCR dp_EXPIRATION_DATE \ |
12 |
dp_COMPLETE_OPTIONS_LIST dp_DEPRECATED dp_DESCR dp_EXPIRATION_DATE \ |
12 |
dp_GROUPS dp_LICENSE dp_LICENSE_COMB dp_MAINTAINER dp_METADIR \ |
13 |
dp_GROUPS dp_LICENSE dp_LICENSE_COMB dp_MAINTAINER dp_METADIR \ |
13 |
dp_NO_ARCH dp_PKGBASE dp_PKGDEINSTALL dp_PKGINSTALL dp_PKGMESSAGES \ |
14 |
dp_NO_ARCH dp_PKGBASE dp_PKGDEINSTALL dp_PKGINSTALL dp_PKGMESSAGES \ |
14 |
dp_PKGORIGIN dp_PKGPOSTDEINSTALL dp_PKGPOSTINSTALL dp_PKGPOSTUPGRADE \ |
15 |
dp_PKGORIGIN dp_PKGPOSTDEINSTALL dp_PKGPOSTINSTALL dp_PKGPOSTUPGRADE \ |
15 |
dp_PKGPREDEINSTALL dp_PKGPREINSTALL dp_PKGPREUPGRADE dp_PKGUPGRADE \ |
16 |
dp_PKGPREDEINSTALL dp_PKGPREINSTALL dp_PKGPREUPGRADE dp_PKGUPGRADE \ |
16 |
dp_PKGVERSION dp_PKG_BIN dp_PKG_IGNORE_DEPENDS dp_PKG_NOTES \ |
17 |
dp_PKGVERSION dp_PKG_BIN dp_PKG_IGNORE_DEPENDS dp_PKG_NOTES \ |
Lines 55-75
EOT
Link Here
|
55 |
# Then, the optional bits |
56 |
# Then, the optional bits |
56 |
[ -z "${dp_WWW}" ] || echo "www: ${dp_WWW}" |
57 |
[ -z "${dp_WWW}" ] || echo "www: ${dp_WWW}" |
57 |
[ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]" |
58 |
[ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]" |
58 |
[ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]" |
59 |
[ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]" |
59 |
[ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]" |
60 |
[ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]" |
60 |
[ -n "${dp_NO_ARCH}" ] && echo "arch : $(${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2):*" |
61 |
[ -n "${dp_NO_ARCH}" ] && echo "arch : $(${dp_PKG_BIN} config abi | tr '[:upper:]' '[:lower:]' | cut -d: -f1,2):*" |
61 |
[ -n "${dp_NO_ARCH}" ] && echo "abi : $(${dp_PKG_BIN} config abi | cut -d: -f1,2):*" |
62 |
[ -n "${dp_NO_ARCH}" ] && echo "abi : $(${dp_PKG_BIN} config abi | cut -d: -f1,2):*" |
62 |
|
63 |
|
63 |
# Then the key/values sections |
64 |
# Then the key/values sections |
64 |
echo "deps: { " |
65 |
echo "deps: { " |
65 |
eval ${dp_ACTUAL_PACKAGE_DEPENDS} | grep -v -E ${dp_PKG_IGNORE_DEPENDS} | sort -u |
66 |
# Ignore grep's return value. |
|
|
67 |
eval ${dp_ACTUAL_PACKAGE_DEPENDS} | { grep -v -E ${dp_PKG_IGNORE_DEPENDS} || :; } | sort -u |
66 |
echo "}" |
68 |
echo "}" |
67 |
|
69 |
|
68 |
echo "options: {" |
70 |
echo "options: {" |
69 |
for opt in ${dp_COMPLETE_OPTIONS_LIST}; do |
71 |
for opt in ${dp_COMPLETE_OPTIONS_LIST}; do |
70 |
if listcontains ${opt} "${dp_PORT_OPTIONS}"; then |
72 |
if listcontains ${opt} "${dp_PORT_OPTIONS}"; then |
71 |
echo " ${opt}: on," |
73 |
echo " ${opt}: on," |
72 |
else |
74 |
else |
73 |
echo " ${opt}: off," |
75 |
echo " ${opt}: off," |
74 |
fi |
76 |
fi |
75 |
done |
77 |
done |