1 # Maintainer: Jürgen Hötzel <juergen@archlinux.org>
4 pkgname=('ocaml' 'ocaml-compiler-libs')
7 pkgdesc="A functional language with OO extensions"
9 license=('LGPL2.1' 'custom: QPL-1.0')
10 url="https://caml.inria.fr/"
11 makedepends=('ncurses>=5.6-7')
12 optdepends=('ncurses: advanced ncurses features' 'tk: advanced tk features')
13 source=(https://caml.inria.fr/distrib/ocaml-${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
14 sha512sums=('1ddc5ae1cbdccdb44dd1bb9878470bbac3ba225d4339aae35220cac99dda2640c74d48e536111ee47e7fe2a9848db8581966a6f1e182bb102ffade0454dc4ecd')
15 options=('!makeflags' '!emptydirs' 'staticlibs')
20 cd "${srcdir}/${pkgname}-${pkgver}"
21 CFLAGS+=' -ffat-lto-objects'
22 CXXFLAGS+=' -ffat-lto-objects'
23 ./configure --prefix /usr --mandir /usr/share/man -enable-frame-pointers
24 make --debug=v world.opt
28 cd "${srcdir}/${pkgbase}-${pkgver}"
29 make DESTDIR="${pkgdir}" install
31 # Save >10MB with this one, makepkg only strips debug symbols.
32 #find "${pkgdir}/usr/lib" -type f -name '*.so.*' -exec strip --strip-unneeded {} \;
35 install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
36 install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
38 # remove compiler libs
39 rm -rf "${pkgdir}/usr/lib/ocaml/compiler-libs"
42 package_ocaml-compiler-libs() {
43 pkgdesc="Several modules used internally by the OCaml compiler"
44 license=('custom: QPL-1.0')
48 cd "${srcdir}/${pkgbase}-${pkgver}"
49 make DESTDIR="${pkgdir}" install
50 # Remove non-compiler-libs
51 find "${pkgdir}/usr/lib/ocaml/" -mindepth 1 -maxdepth 1 -not -name "compiler-libs" -execdir rm -rf "{}" "+"
52 rm -rf "${pkgdir}/usr/bin" "${pkgdir}/usr/share"
53 install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
54 install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"