-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuildenv
More file actions
70 lines (58 loc) · 2.63 KB
/
buildenv
File metadata and controls
70 lines (58 loc) · 2.63 KB
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
# bump: coreutils-version /COREUTILS_VERSION="(.*)"/ https://ftp.gnu.org/gnu/coreutils/|re:/href="coreutils-([\d.]+).tar.gz"/$1/|semver:*
COREUTILS_VERSION="9.10"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_STABLE_URL="https://ftp.gnu.org/gnu/coreutils/coreutils-${COREUTILS_VERSION}.tar.gz"
export ZOPEN_STABLE_DEPS="make gzip tar curl perl automake autoconf m4 sed gettext zoslib diffutils findutils getopt gawk"
export ZOPEN_BOOTSTRAP="skip"
export ZOPEN_EXTRA_CPPFLAGS="-DSLOW_BUT_NO_HACKS=1 -DNO_ASM -D_LARGE_TIME_API"
export ZOPEN_EXTRA_CONFIGURE_OPTS="--disable-dependency-tracking"
export ZOPEN_CHECK_TIMEOUT=30000 # 8 hours and a bit
export PERL="/bin/env perl"
export ZOPEN_COMP=CLANG
export ZOSLIB_ERROR_COMPAT=""
zopen_check_results()
{
chk="$1/$2_check.log"
totalTests=$(grep "^# TOTAL: " ${chk} | head -1 | awk '{ print $3 }')
actualFailures=$(grep "^# FAIL: " ${chk} | head -1 | awk '{ print $3 }')
actualPass=$(grep "^# PASS: " ${chk} | head -1 | awk '{ print $3 }')
actualErrors=$(grep "^# ERROR: " ${chk} | head -1 | awk '{ print $3 }')
actualSkip=$(grep "^# SKIP: " ${chk} | head -1 | awk '{ print $3 }')
expectedFailures=63
expectedErrors=3
expectedPass=414
expectedSkip=173
totalExpectedFailures=$(($expectedFailures+$expectedErrors))
totalActualFailures=$(($actualFailures+$actualErrors))
totalRunTests=$(($totalTests-$actualSkip))
cat <<ZZ
actualFailures:$totalActualFailures
totalTests:$totalRunTests
expectedFailures:$totalExpectedFailures
ZZ
}
zopen_pre_patch()
{
export CFLAGS="$CFLAGS $CPPFLAGS"
}
zopen_post_install()
{
export ZOPEN_COREUTILS="b2sum base32 base64 basename blake2 cat chcon chgrp chmod chown chroot chksum comm cp csplit cut date dd dir dircolors dirname df du echo env expand expr factor false fmt groups head id install join ls md5sum mkfifo mktemp mknod nproc numfmt od pinky printf printenv ptx readlink realpath sha1sum sha224sum sha256sum sha384sum sha512sum shasum stdbuf shred shuf sort stat stdbuf sync sleep touch tr tty vdir wc yes seq tac timeout truncate users"
findstring="find . -type f"
for cmd in $ZOPEN_COREUTILS; do
findstring="${findstring} ! -name ${cmd}"
done
# remove unsupported binaries: run as a child process so the directory change does not 'survive'
(cd "$1/bin" && ${findstring} -print | xargs rm)
findstring="find . -type f"
for cmd in $ZOPEN_COREUTILS; do
findstring="${findstring} ! -name ${cmd}.1"
done
# remove unsupported man pages: run as a child process so the directory change does not 'survive'
(cd "$1/share/man/man1" && ${findstring} -print | xargs rm)
}
zopen_get_version()
{
# pick one of the tools
./src/cp --version | head -1 | awk '{print $4; }'
}