mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
added extra/ocaml
This commit is contained in:
parent
c5b0c19624
commit
4b53f63302
1 changed files with 61 additions and 0 deletions
61
extra/ocaml/PKGBUILD
Normal file
61
extra/ocaml/PKGBUILD
Normal file
|
@ -0,0 +1,61 @@
|
|||
# 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=4.14.0
|
||||
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=('0fae5b8752ce900bc69f71ebdc82faa588272fd3dce6795aa03467e89e1e376f127a288221761e353191fb5941b563e183098c0c74b18374aa0ca1c8e0715e97')
|
||||
options=('!makeflags' '!emptydirs' 'staticlibs')
|
||||
|
||||
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
CFLAGS+=' -ffat-lto-objects'
|
||||
CXXFLAGS+=' -ffat-lto-objects'
|
||||
./configure --prefix /usr --mandir /usr/share/man --disable-force-safe-string
|
||||
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
|
||||
rm -rf "${pkgdir}/usr/bin" "${pkgdir}/usr/lib/ocaml/caml" \
|
||||
"${pkgdir}/usr/lib/ocaml/ocamldoc" "${pkgdir}/usr/lib/ocaml/stublibs" \
|
||||
"${pkgdir}/usr/lib/ocaml/threads" "${pkgdir}/usr/share"
|
||||
find "${pkgdir}/usr/lib/ocaml/" -maxdepth 1 -type f -delete
|
||||
|
||||
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
|
||||
}
|
Loading…
Reference in a new issue