-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuildenv
More file actions
85 lines (71 loc) · 2.26 KB
/
buildenv
File metadata and controls
85 lines (71 loc) · 2.26 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# bump: which-version /WHICH_VERSION="(.*)"/ https://ftp.gnu.org/gnu/which/|re:/which-([\d.]+).tar.gz/$1/|semver:*
export WHICH_VERSION="2.23"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_CATEGORIES="utilities"
export ZOPEN_STABLE_URL="https://ftp.gnu.org/gnu/which/which-${WHICH_VERSION}.tar.gz"
export ZOPEN_STABLE_DEPS="curl gzip make m4 grep sed gettext coreutils getopt diffutils gettext gawk bash"
export ZOPEN_CHECK="zopen_check"
export ZOPEN_CHECK_OPTS="--version"
export ZOPEN_COMP=CLANG
export ZOPEN_EXTRA_CFLAGS="-mzos-target=zosv2r5 -march=z13"
export ZOPEN_SYSTEM_PREREQS="zos25"
export ZOPEN_DEV_URL="https://git.savannah.gnu.org/git/which.git"
export ZOPEN_DEV_DEPS="curl gzip make m4 grep sed gettext coreutils getopt gettext automake autoconf perl bash git texinfo help2man"
export CONFIG_SHELL=bash
if [ "$ZOPEN_BUILD_LINE" = "DEV" ]; then
export ZOPEN_BOOTSTRAP="./autogen.sh"
export ZOPEN_CONFIGURE="./configure"
export ZOPEN_CONFIGURE_OPTS="--prefix=${ZOPEN_INSTALL_DIR}"
fi
zopen_check()
{
./which --version
# Run this manually on an update:
#PATH=$PWD:$PATH PATH_TO_WHICH=$PWD ../tests/whichtest generate
PATH=$PWD:$PATH PATH_TO_WHICH=$PWD ../tests/whichtest check
}
zopen_check_results()
{
dir="$1"
pfx="$2"
failures=0;
passed=0;
chk="$1/$2_check.log"
VERSION_CHK=$(./which --version | cut -d "," -f 1 | head -n 1 | cut -d " " -f 3 | tr -d 'v')
grep "$VERSION_CHK" "$chk"
if [ $? -eq 1 ]; then
failures=`expr $failures + 1`
else
passed=`expr $passed + 1`
fi
$PWD/which traceroute 2> /dev/null > /dev/null
if [ $? -eq 1 ]; then
failures=`expr $failures + 1`
else
passed=`expr $passed + 1`
fi
TEST_CHK="Check successful!"
grep "$TEST_CHK" "$chk"
if [ $? -eq 1 ]; then
failures=`expr $failures + 1`
else
passed=`expr $passed + 1`
fi
total=`expr $passed + $failures`
# Echo the following information to gauge build health
echo "actualFailures:$failures"
echo "totalTests:$total"
echo "expectedFailures:0"
}
zopen_append_to_env()
{
# echo envars outside of PATH, MANPATH, LIBPATH
}
zopen_append_to_setup()
{
# echo commands that will run when installing via setup.sh
}
zopen_get_version()
{
./which --version | cut -d "," -f 1 | head -n 1 | cut -d " " -f 3 | tr -d 'v'
}