forked from zopencommunity/autoconfport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildenv
66 lines (53 loc) · 1.89 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
#!/bin/sh
#
# Set up environment variables for general build tool to operate
#
# Note: requires zlib to be installed into system as pre-req
# bump: autoconf-version /AUTOCONF_VERSION="(.*)"/ https://ftp.gnu.org/gnu/autoconf/|re:/href="autoconf-([\d.]+).tar.gz"/$1/|semver:*
AUTOCONF_VERSION="2.71"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_STABLE_URL="https://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.gz"
export ZOPEN_STABLE_DEPS="curl gzip make m4 perl zlib texinfo automake autoconf bash flex"
export ZOPEN_DEV_URL="https://github.com/autotools-mirror/autoconf.git"
export ZOPEN_DEV_DEPS="git make m4 perl autoconf automake help2man texinfo xz zlib bash flex"
export ZOPEN_EXTRA_CFLAGS=""
export ZOPEN_EXTRA_LDFLAGS=""
export PERL="/bin/env perl"
export ZOPEN_RUNTIME_DEPS="perl m4"
export ZOPEN_CHECK_TIMEOUT=72000 # 20 hours
zopen_append_to_env()
{
cat <<EOF
export autom4te_perllibdir=\${PWD}/share/autoconf
export AC_MACRODIR=\${PWD}/share/autoconf
# To set M4 variable path
if [ ! -z "\${M4_HOME}" ]; then
export M4="\$M4_HOME/bin/m4"
fi
EOF
}
zopen_check_results()
{
chk="$1/$2_check.log"
ac_success=$(grep -c -E '^ *[0-9]+\: .{48}ok$' ${chk})
ac_failures=$(grep -c -E '^ *[0-9]+\: .{48}FAILED' ${chk})
ac_expectedFailures=$(grep -c -E '^ *[0-9]+\: .{48}expected failure' ${chk})
ac_skipped=$(grep -c -E '^ *[0-9]+\: .{48}skipped' ${chk})
ac_totalTests=$(grep -c -E '^ *[0-9]+\: .{48}' ${chk})
let t=${ac_success}+${ac_failures}+${ac_expectedFailures}+${ac_skipped}
if [ ${t} -ne ${ac_totalTests} ] ; then
echo "Failed to calculate number of test failures."
fi
let actualFailures=${ac_failures}+${ac_expectedFailures}
let totalTests=${ac_totalTests}
let expectedFailures=13
cat <<ZZ
actualFailures:$actualFailures
totalTests:$totalTests
expectedFailures:$expectedFailures
ZZ
}
zopen_get_version()
{
./bin/autoconf --version | head -1 | awk '{print $4; }'
}