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
66 lines (60 loc) · 1.85 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
pkg_name=musl
pkg_origin=core
pkg_version=1.2.2
pkg_maintainer="The Habitat Maintainers <[email protected]>"
pkg_description="\
musl is a new standard library to power a new generation of Linux-based \
devices. musl is lightweight, fast, simple, free, and strives to be correct \
in the sense of standards-conformance and safety.\
"
pkg_upstream_url="https://www.musl-libc.org/"
pkg_license=('MIT')
pkg_source="http://www.musl-libc.org/releases/${pkg_name}-${pkg_version}.tar.gz"
pkg_shasum="9b969322012d796dc23dda27a35866034fa67d8fb67e0e2c45c913c3d43219dd"
pkg_deps=()
pkg_build_deps=(
core/coreutils
core/diffutils
core/gcc
core/make
core/patch
core/sed
)
pkg_bin_dirs=(bin)
pkg_include_dirs=(include)
pkg_lib_dirs=(lib)
do_prepare() {
stack_size="2097152"
build_line "Setting default stack size to '$stack_size' from default '81920'"
sed \
-i "s/#define DEFAULT_STACK_SIZE .*/#define DEFAULT_STACK_SIZE $stack_size/" \
src/internal/pthread_impl.h
}
do_build() {
./configure \
--prefix="$pkg_prefix" \
--syslibdir="$pkg_prefix/lib"
make -j "$(nproc)"
}
do_install() {
do_default_install
# Install license
install -Dm0644 COPYRIGHT "$pkg_prefix/share/licenses/COPYRIGHT"
}
# ----------------------------------------------------------------------------
# **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
)
fi