# Contributor: Borys Zhukov # Maintainer: Borys Zhukov pkgname=ocaml pkgver=4.03.0 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="43812739ea1b4641cf480f57f977c149 ocaml-4.03.0.tar.gz 08f8697f0c9aca620fb946418cd7272e 010_all_execstacks.patch 6e11ac70d23a21d9b38ac6b30cecc243 020_all_configure.patch 6d63f3e63a4bd533fd1884e78a6de2ba 050_all_objinfoldflags.patch" sha256sums="7fdf280cc6c0a2de4fc9891d0bf4633ea417046ece619f011fd44540fcfc8da2 ocaml-4.03.0.tar.gz a32653d95498bdbdec4595d2d93270d6719b5512d7f0c2787fc216699aa5bc23 010_all_execstacks.patch 747c8a48b5988776d1b0e9cbbf77b9dac63315d17854e9202b150362c16054e7 020_all_configure.patch 59c2bf7465bfc44ca5b984ba84a25341b2b7b7aae2c5019c1e3d3f26aeb22766 050_all_objinfoldflags.patch" sha512sums="91d5c0b2fcc52fc05be64bf54d3c7be8d77ee754e847907909d4e123c1d00c9f62523770d56bb81f80200f75ec53ab874e031ce46f7b437febbd3a8e6800e2ca ocaml-4.03.0.tar.gz 71ac807fb1173863b9dcf8e5fb4e651e0155d6cd0e4b327f5457b83fc09e1b5fbe34150c5d8ccd24f0faff1a8419f5ed8310aa60af1f38c2766ccc37dc6c3835 010_all_execstacks.patch 286758402517a1345556d374b0c3fc49eb93f1ec2bb9ccd2ffe1cc043f59d93b154f68eb9ff410020a15d3d8f148b27f249b7f97954b0e8a080cdd32d6014b4a 020_all_configure.patch 61d9cae6c8be7c16ed4aa6fafc533e2879caadbbe0e023775c1d735c0e54e66e94b9ffab8dc0b0b12c19ccf5c389e05f62af822014d202ae54c52943a0639753 050_all_objinfoldflags.patch"