This repository has been archived by the owner on Aug 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plan.sh
76 lines (69 loc) · 2.24 KB
/
plan.sh
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
pkg_name=check
pkg_origin=core
pkg_version=0.15.2
pkg_maintainer="The Habitat Maintainers <[email protected]>"
pkg_description="\
Check is a unit testing framework for C. It features a simple interface for \
defining unit tests, putting little in the way of the developer. Tests are run \
in a separate address space, so both assertion failures and code errors that \
cause segmentation faults or other signals can be caught.\
"
pkg_upstream_url="https://libcheck.github.io/check"
pkg_license=('LGPL-2.1-or-later')
pkg_source="https://github.com/libcheck/check/releases/download/${pkg_version}/check-${pkg_version}.tar.gz"
pkg_shasum="a8de4e0bacfb4d76dd1c618ded263523b53b85d92a146d8835eb1a52932fa20a"
pkg_deps=(
core/gawk
core/glibc
)
pkg_build_deps=(
core/coreutils
core/diffutils
core/file
core/gcc
core/make
core/sed
)
pkg_bin_dirs=(bin)
pkg_include_dirs=(include)
pkg_lib_dirs=(lib)
pkg_pconfig_dirs=(lib/pkgconfig)
do_prepare() {
# Update all references to the `/usr/bin/file` absolute path with `file`
# which will be on `$PATH` due to file being a build dependency.
sed -i -e "s,/usr/bin/file,file,g" ./configure
}
do_check() {
# Fix interpreters for test scripts
_interpreter="$(pkg_path_for "core/coreutils")/bin/env"
sed -e "s#\#\!/usr/bin/env#\#\!${_interpreter}#" \
-i "checkmk/test/check_checkmk"
for f in tests/test_*; do
sed -e "s#\#\!/usr/bin/env#\#\!${_interpreter}#" -i "$f"
done
make check
}
do_install() {
do_default_install
# Clean up extra files
rm -rfv "${pkg_prefix}/share/info/dir" \
"${pkg_prefix}/share/doc/check/*ChangeLog*"
}
# ----------------------------------------------------------------------------
# **NOTICE:** What follows are implementation details required for building a
# first-pass, "stage1" toolchain and environment. It is only used when running
# in a "stage1" Studio and can be safely ignored by almost everyone. Having
# said that, it performs a vital bootstrapping process and cannot be removed or
# significantly altered. Thank you!
# ----------------------------------------------------------------------------
if [[ "$STUDIO_TYPE" = "stage1" ]]; then
pkg_build_deps=(
core/gcc
core/coreutils
core/sed
core/diffutils
core/make
core/patch
core/file
)
fi