blob: e9027fcb0d5d31d58a77da287acf3a580610633b (
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
|
# Contributor: Borys Zhukov <mp5@mp5.im>
# Maintainer: Borys Zhukov <mp5@mp5.im>
pkgname=ocaml
pkgver=4.02.3
pkgrel=0
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-${pkgver%.*}/$pkgname-$pkgver.tar.gz
010_all_execstacks.patch
020_all_configure.patch
050_all_objinfoldflags.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 \
|| return 1
make 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="ef1a324608c97031cbd92a442d685ab7 ocaml-4.02.3.tar.gz
fd073bf6c3a451a031b4900a86c0db48 010_all_execstacks.patch
3838542279e0367271bf4dfd3dbb73c7 020_all_configure.patch
2dbce3de02afd4041311c3eb0076fa1e 050_all_objinfoldflags.patch"
sha256sums="928fb5f64f4e141980ba567ff57b62d8dc7b951b58be9590ffb1be2172887a72 ocaml-4.02.3.tar.gz
63e22fa143c3503951e5f3919028969b1713e2818a1158e5b0a340c4cf27bef8 010_all_execstacks.patch
5344d1cf1a90fd5c12467da35688dde283cf2f0b19eefd7a04a6d570841a3fb8 020_all_configure.patch
817fac532237d986277476c6890a498e5095f584c1959b286d188b51b0de1dbc 050_all_objinfoldflags.patch"
sha512sums="be69e00abc2503582d7a07440a59db6bc992cce8ed2812bf02de07578760ead2858544013bb1a7a28a3c812b79c2f545cdaef11653b04a39c04a898510c36187 ocaml-4.02.3.tar.gz
9c3ed77d84c4d1766f4d5568ca6c33aff08bd9d118b5a8c7af84b1263e39d3bba1e74221aad7290a10bc79a2c8ee86a7fa57d02eacabc9d36c14c7dacdda42cb 010_all_execstacks.patch
a4fb27979a75d951ee5c065e628028f03527618855fac4af3321cd2466953e0d1d40dec01816c012596ae656fb5bee51a2112b5038122a98e60d190f13e474b1 020_all_configure.patch
7d3f60153ab7df98879c6acff04e90977633449e16d176a48f492a6995a0a201e0f14255e6c45788edb6174832316e1ab893622a0b24d8dd1864ab8a0109e6ba 050_all_objinfoldflags.patch"
|