PKGBUILDs/extra/ocaml/PKGBUILD

59 lines
1.9 KiB
Bash
Raw Permalink Normal View History

2022-08-09 23:38:56 +00:00
# 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')
2024-06-01 19:20:49 +00:00
pkgver=5.2.0
2022-08-09 23:38:56 +00:00
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)
2024-06-01 19:20:49 +00:00
sha512sums=('6c2376777f0ec567fc414d534cba65e5f2120f7c766de25f36bbf80260e882f5d1c94c2ce8e12f2b2982097089c6e8f928f26dbc0b559a0463e7dcdd8baf20fe')
2022-08-09 23:38:56 +00:00
options=('!makeflags' '!emptydirs' 'staticlibs')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
CFLAGS+=' -ffat-lto-objects'
CXXFLAGS+=' -ffat-lto-objects'
2023-05-18 20:42:51 +00:00
./configure --prefix /usr --mandir /usr/share/man
2022-08-09 23:38:56 +00:00
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
2023-05-18 20:42:51 +00:00
find "${pkgdir}/usr/lib/ocaml/" -mindepth 1 -maxdepth 1 -not -name "compiler-libs" -execdir rm -rf "{}" "+"
rm -rf "${pkgdir}/usr/bin" "${pkgdir}/usr/share"
2022-08-09 23:38:56 +00:00
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
}