blob: f36f614b73a554c1d4dcc945c40dae77d6e6bb92 (
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
|
# Contributor: Borys Zhukov <mp5@mp5.im>
# Maintainer: Borys Zhukov <mp5@mp5.im>
pkgname=ocaml
pkgver=4.04.0
pkgrel=2
pkgdesc="Main implementation of the Caml programming language"
url="http://caml.inria.fr"
arch="all !x86 !armhf"
license="LGPLv2"
makedepends="ncurses-dev zlib-dev gdbm-dev"
depends="ncurses-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
./configure -cc "${CC:-gcc}" \
--bindir /usr/bin \
--libdir /usr/lib/ocaml \
--mandir /usr/share/man \
|| 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="496f99822133bb905171bae8f64b7be4 ocaml-4.04.0.tar.gz
08f8697f0c9aca620fb946418cd7272e 010_all_execstacks.patch
6e11ac70d23a21d9b38ac6b30cecc243 020_all_configure.patch
6d63f3e63a4bd533fd1884e78a6de2ba 050_all_objinfoldflags.patch"
sha256sums="cb63486f6cb837a5a57ab93e4c429551127561d0da61b7712116769a6a8322de ocaml-4.04.0.tar.gz
a32653d95498bdbdec4595d2d93270d6719b5512d7f0c2787fc216699aa5bc23 010_all_execstacks.patch
747c8a48b5988776d1b0e9cbbf77b9dac63315d17854e9202b150362c16054e7 020_all_configure.patch
59c2bf7465bfc44ca5b984ba84a25341b2b7b7aae2c5019c1e3d3f26aeb22766 050_all_objinfoldflags.patch"
sha512sums="ad69a42d4ff525d85f472a60ea5d565163698b2929cf0f35a33df7f724958c1b6d3aff57dfcfdc3aa6619807c626e756058cf935e74776ece9e7e984f0b3c418 ocaml-4.04.0.tar.gz
71ac807fb1173863b9dcf8e5fb4e651e0155d6cd0e4b327f5457b83fc09e1b5fbe34150c5d8ccd24f0faff1a8419f5ed8310aa60af1f38c2766ccc37dc6c3835 010_all_execstacks.patch
286758402517a1345556d374b0c3fc49eb93f1ec2bb9ccd2ffe1cc043f59d93b154f68eb9ff410020a15d3d8f148b27f249b7f97954b0e8a080cdd32d6014b4a 020_all_configure.patch
61d9cae6c8be7c16ed4aa6fafc533e2879caadbbe0e023775c1d735c0e54e66e94b9ffab8dc0b0b12c19ccf5c389e05f62af822014d202ae54c52943a0639753 050_all_objinfoldflags.patch"
|