summaryrefslogtreecommitdiff
path: root/user/erlang/APKBUILD
blob: 733fcae802faaccc2c0346a3ea326b1f8006dfb6 (plain) (blame)
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
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=erlang
pkgver=22.2.7
pkgrel=0
pkgdesc="Soft real-time system programming language"
url="https://www.erlang.org/"
arch="all"
license="Apache-2.0"
depends=""
makedepends="autoconf automake flex libxml2-utils libxslt-dev m4 ncurses-dev
	openssl-dev perl unixodbc-dev"
subpackages="$pkgname-dev"
source="erlang-$pkgver.tar.gz::https://github.com/erlang/otp/archive/OTP-$pkgver.tar.gz
	fix-wx-linking.patch
	"
builddir="$srcdir/otp-OTP-$pkgver"

build() {
	./otp_build autoconf
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-shared-zlib \
		--enable-ssl=dynamic-ssl-lib \
		--enable-threads \
		--disable-hipe
	make
}

check() {
	export ERL_TOP=$builddir

	make release_tests

	for _header in erl_fixed_size_int_types.h \
		${CHOST}/erl_int_sizes_config.h \
		erl_memory_trace_parser.h; do
		cp erts/include/$_header erts/emulator/beam/
	done
	cd release/tests/test_server
	$ERL_TOP/bin/erl -s ts install -s ts smoke_test batch -s init stop
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="1746acd526eda37c769b70bba1ad0f73ee1e658d05d0cbbe4063f34c11f8061932b2cde04df725537f5c5b81b537897ada2f0f9b6b18b7554b0f7596c492906b  erlang-22.2.7.tar.gz
4331f4b9a8cd0787d79f26304415604118cf2f750cb2e98f3d0bb16dbf9e2b5e230b4b4b15fed4ac207a0ae83a0963adebd3f5e9423b98f0b7f733334669709d  fix-wx-linking.patch"