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
54 lines (49 loc) · 1.59 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
pkg_name=erlang19
pkg_origin=core
pkg_version=19.3
pkg_description="A programming language for massively scalable soft real-time systems."
pkg_upstream_url="http://www.erlang.org/"
pkg_dirname=otp_src_${pkg_version}
pkg_license=('Apache-2.0')
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_source=http://www.erlang.org/download/otp_src_${pkg_version}.tar.gz
pkg_filename=otp_src_${pkg_version}.tar.gz
pkg_shasum=fe4a00651db39b8542b04530a48d24b2f2e7e0b77cbe93d728c9f05325bdfe83
pkg_deps=(core/glibc core/zlib core/ncurses core/openssl core/sed)
pkg_build_deps=(core/coreutils core/gcc core/make core/openssl core/perl core/m4)
pkg_bin_dirs=(bin)
pkg_include_dirs=(include)
pkg_lib_dirs=(lib)
do_prepare() {
# The `/bin/pwd` path is hardcoded, so we'll add a symlink if needed.
if [[ ! -r /bin/pwd ]]; then
ln -sv "$(pkg_path_for coreutils)/bin/pwd" /bin/pwd
_clean_pwd=true
fi
if [[ ! -r /bin/rm ]]; then
ln -sv "$(pkg_path_for coreutils)/bin/rm" /bin/rm
_clean_rm=true
fi
}
do_build() {
./configure --prefix="${pkg_prefix}" \
--enable-threads \
--enable-smp-support \
--enable-kernel-poll \
--enable-dynamic-ssl-lib \
--enable-shared-zlib \
--enable-hipe \
--with-ssl="$(pkg_path_for openssl)/lib" \
--with-ssl-include="$(pkg_path_for openssl)/include" \
--without-javac
make
}
do_end() {
# Clean up the `pwd` link, if we set it up.
if [[ -n "$_clean_pwd" ]]; then
rm -fv /bin/pwd
fi
if [[ -n "$_clean_rm" ]]; then
rm -fv /bin/rm
fi
}