-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildenv
87 lines (76 loc) · 2.03 KB
/
buildenv
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
82
83
84
85
86
87
# bump: netpbm-version /NETPBM_VERSION="(.*)"/ https://github.com/jwilk-mirrors/netpbm.git|semver:*
NETPBM_VERSION="11.05.00"
export ZOPEN_STABLE_URL="git@github.com:jwilk-mirrors/netpbm.git"
export ZOPEN_STABLE_DEPS="make perl coreutils diffutils findutils zlib flex bison m4 zoslib pkgconfig bash gettext"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_RUNTIME_DEPS="perl"
export ZOPEN_CATEGORIES="core"
export ZOPEN_CONFIGURE='zopen_configure_netpbm'
export ZOPEN_CONFIGURE_OPTS=''
export ZOPEN_MAKE='zopen_make_netpbm'
export ZOPEN_MAKE_OPTS=''
export ZOPEN_MAKE_CHECK='zopen_make_check_netpbm'
export ZOPEN_MAKE_CHECK_OPTS=''
export ZOPEN_INSTALL='zopen_install_netpbm'
export ZOPEN_COMP='clang'
zopen_configure_netpbm()
{
#
# Use envsubst (from gettext) to substitute
# environment variables in the config file
#
envsubst <../config.mk >./config.mk
}
zopen_make_netpbm()
{
# Delete the old package - it will not overwrite an existing package
rm -rf "${ZOPEN_ROOT}/netpbm/pkg"
make && make package
}
zopen_make_check_netpbm()
{
make check
}
zopen_make_check_netpbm()
{
make install
}
#
# For now, only copy over what we need
# Later we can run ./installnetpbm to install everything
# (but it is interactive)
#
zopen_install_netpbm()
{
tools='pnm* xpmtoppm'
mkdir -p "${ZOPEN_INSTALL_DIR}/bin/"
for toolset in $tools; do
for tool in ${ZOPEN_ROOT}/netpbm/pkg/bin/${toolset}; do
cp "${tool}" "${ZOPEN_INSTALL_DIR}/bin/"
done
done
}
# Test summary:
#==================
#SUCCESS 29
#FAILURE 179
#NOT TESTABLE 9
#TOTAL TESTABLE 208
#==================
zopen_check_results()
{
dir="$1"
pfx="$2"
chk="$1/$2_check.log"
success=$(egrep '^SUCCESS ' "${chk}" | awk ' { print $2; }')
failure=$(egrep '^FAILURE ' "${chk}" | awk ' { print $2; }')
total=$(egrep '^TOTAL ' "${chk}" | awk ' { print $3; }')
echo "actualFailures:${failure}"
echo "totalTests:${total}"
echo "expectedFailures:179"
echo "expectedTotalTests:208"
}
zopen_get_version()
{
pkg/bin/xpmtoppm --version 2>&1 | head -1 | awk ' { print $8; }'
}