aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml/APKBUILD
blob: 2c26c4148e98af0ac0f9053d605b2ae6f7d4796e (plain)
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
# Contributor: Borys Zhukov <mp5@mp5.im>
# Maintainer: Borys Zhukov <mp5@mp5.im>
pkgname=ocaml
pkgver=3.12.1
pkgrel=1
pkgdesc="Main implementation of the Caml programming language"
url="http://caml.inria.fr"
arch="all"
license="QPL-1.0/GPLv2"
makedepends="ncurses-dev zlib-dev gdbm-dev"
install=""
options="textrels"
subpackages="$pkgname-doc"
source="http://caml.inria.fr/pub/distrib/ocaml-3.12/$pkgname-$pkgver.tar.gz
	010_all_execstacks.patch
	020_all_configure.patch
	040_all_yaccldflags.patch
	050_all_objinfoldflags.patch
	060_all_linkorder.patch
	"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"

	#strip out -fomit-frame-pointer due to -pg
	local _cflags="$CFLAGS"
	CFLAGS="-fPIC"
	for i in $_cflags; do
		case $i in
		-fomit-frame-pointer);;
		*) CFLAGS="$CFLAGS $i";;
		esac
	done

	LDFLAGS="$LDFLAGS -fno-pie" ./configure -cc "${CC:-gcc}" \
		-bindir /usr/bin \
		-libdir /usr/lib/ocaml \
		-mandir /usr/share/man \
		-no-tk \
		|| return 1
	make -j1 world.opt || return 1
}

package() {
	cd "$_builddir"
	make BINDIR="$pkgdir"/usr/bin LIBDIR="$pkgdir"/usr/lib/ocaml MANDIR="$pkgdir"/usr/share/man install || return 1

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

	install -Dm644 INSTALL "$pkgdir"/usr/share/doc/$pkgname/INSTALL
	install -Dm644 Changes "$pkgdir"/usr/share/doc/$pkgname/Changes
	install -Dm644 README "$pkgdir"/usr/share/doc/$pkgname/README

	find "$pkgdir"/usr/lib/ocaml -name \*.ml -delete
}
md5sums="814a047085f0f901ab7d8e3a4b7a9e65  ocaml-3.12.1.tar.gz
ef0810371df5ca55843f8faf6707cd6f  010_all_execstacks.patch
2a88918e39e30016b1575b3ac740bb63  020_all_configure.patch
2c7171ae2c8c77ceadabbd4db7f6e01b  040_all_yaccldflags.patch
baed56051b58c3a7aef9248e85771de0  050_all_objinfoldflags.patch
b52c8999a7bf66fc3eab0de79cd2b4cc  060_all_linkorder.patch"
sha256sums="4f81ab86258be0eea1507dd5338c8670490f8616249821e731f8ac1c64caa4a7  ocaml-3.12.1.tar.gz
083649669bcafb2778336f776bfa37e0448a2e52b104447ef3a4bc212f1df87b  010_all_execstacks.patch
ff91dc8def0a2829bca64cdd8af5cb59073ca958753f18172d3bbc3bfede6c11  020_all_configure.patch
f663febae991b57c8b02cfe2b25f7ee0cbc1c6307f6d1b8b4148fda6b8f8d871  040_all_yaccldflags.patch
29e4fb60d61c73cca31da65c0742c17a6f67ef18c04b24d591cbc44c3b8dec9a  050_all_objinfoldflags.patch
1ce54407303ff6e03c7c8ba39bac7ede7d252e8fcf56b5bde54ffe4c3843b3e9  060_all_linkorder.patch"
sha512sums="9d594721816bb5e0edbb50e35496bc5f228a4419b05d518ea7fc72975b18c27ee0f34247efc3bdd264214eb285e72ddb42516fbae2f499a780e62ea4f9b85756  ocaml-3.12.1.tar.gz
2f408565a249e26bceaf1055e7923b103bb0e94f2381b1294aa8de286e6c06942ae89958e1c1dc275fe85ad56ff95484c3ca8a836cd29edaf27dadb1d06f4706  010_all_execstacks.patch
7ff4ad6dfbfbf97d44269fae8cb3bee1ea4e55ae7c83385a5acf27c1041a8c96e9dbf25f6359be65d263f4b6ae854b447855eda9e6ac64da3d48a3083456c5a8  020_all_configure.patch
007a787fd57e209302c999b1fb018bae94fe2150f7ecbbddec7e637444ee8e3f9965b14d0f89eab4e68cf5c374cc7e4bdc1087120be64efe7a953a21cd160bce  040_all_yaccldflags.patch
02c3dcf8c18bafc984f1396c576704b20a566e08a963bad877295018ede86dd530a6f770bab156506532564606f148454407e2497c19985a52a1d68625f1330f  050_all_objinfoldflags.patch
888f3aac57751fc6944f62e8cb14e3c17184f331144a58058ee8ac49a3a9add49f7a6e0f6024a36b960d0b8e8db9e80fbf91318c63241f86248caab4b2fdd99e  060_all_linkorder.patch"