mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
58 lines
1.9 KiB
Bash
58 lines
1.9 KiB
Bash
# Maintainer: Jürgen Hötzel <juergen@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - remove --enable-frame-pointers from configure, not supported on ARM
|
|
|
|
pkgbase='ocaml'
|
|
pkgname=('ocaml' 'ocaml-compiler-libs')
|
|
pkgver=5.1.1
|
|
pkgrel=1
|
|
pkgdesc="A functional language with OO extensions"
|
|
arch=('x86_64')
|
|
license=('LGPL2.1' 'custom: QPL-1.0')
|
|
url="https://caml.inria.fr/"
|
|
makedepends=('ncurses>=5.6-7')
|
|
optdepends=('ncurses: advanced ncurses features' 'tk: advanced tk features')
|
|
source=(https://caml.inria.fr/distrib/ocaml-${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
|
|
sha512sums=('e534881eec10b79141b6598ba6d3f59e32ed46a2c64b90c226bbec199c73cdb70e6e5bfa555c34c385d3d83c15e5115f0ea9a182fdda6547db7bbb416f8ed98f')
|
|
options=('!makeflags' '!emptydirs' 'staticlibs')
|
|
|
|
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
CFLAGS+=' -ffat-lto-objects'
|
|
CXXFLAGS+=' -ffat-lto-objects'
|
|
./configure --prefix /usr --mandir /usr/share/man
|
|
make --debug=v world.opt
|
|
}
|
|
|
|
package_ocaml() {
|
|
cd "${srcdir}/${pkgbase}-${pkgver}"
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
# Save >10MB with this one, makepkg only strips debug symbols.
|
|
#find "${pkgdir}/usr/lib" -type f -name '*.so.*' -exec strip --strip-unneeded {} \;
|
|
|
|
# install license
|
|
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
|
|
|
|
# remove compiler libs
|
|
rm -rf "${pkgdir}/usr/lib/ocaml/compiler-libs"
|
|
}
|
|
|
|
package_ocaml-compiler-libs() {
|
|
pkgdesc="Several modules used internally by the OCaml compiler"
|
|
license=('custom: QPL-1.0')
|
|
depends=('ocaml')
|
|
optdepends=()
|
|
|
|
cd "${srcdir}/${pkgbase}-${pkgver}"
|
|
make DESTDIR="${pkgdir}" install
|
|
# Remove non-compiler-libs
|
|
find "${pkgdir}/usr/lib/ocaml/" -mindepth 1 -maxdepth 1 -not -name "compiler-libs" -execdir rm -rf "{}" "+"
|
|
rm -rf "${pkgdir}/usr/bin" "${pkgdir}/usr/share"
|
|
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
|
|
}
|