1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/testing/ocaml-labltk/APKBUILD

60 lines
1.6 KiB
Text

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer:
pkgname=ocaml-labltk
_pkgname=labltk
pkgver=8.06.12
pkgrel=0
_ocamlver=4.14.0
pkgdesc="Tcl/Tk interface for OCaml"
url="https://garrigue.github.io/labltk/"
arch="all !riscv64" # limited by ocaml aport
license="LGPL-2.0-or-later-WITH-linking-exception"
depends="ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="ocaml=~$_ocamlver ocaml-compiler-libs=~$_ocamlver tcl-dev tk tk-dev"
options="!check" # no tests provided
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/garrigue/labltk/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
./configure --tk-no-x11
make -j1 all
make -j1 opt
}
package() {
local libdir="$pkgdir/usr/lib/ocaml"
cd "$builddir"
mkdir -p "$libdir"/$_pkgname \
"$libdir"/stublibs \
"$pkgdir"/usr/bin
make install \
BINDIR="$pkgdir/usr/bin" \
INSTALLDIR="$pkgdir/usr/lib/ocaml/$_pkgname" \
STUBLIBDIR="$pkgdir/usr/lib/ocaml/stublibs"
# The *.o files are not installed by the Makefile.
# AIUI that prevents linking with native code programs.
install -m 0644 camltk/*.o "$libdir"/$_pkgname/
}
dev() {
local sitelib="usr/lib/ocaml/$_pkgname"
default_dev
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
cd "$pkgdir"/$sitelib
mkdir -p "$subpkgdir"/$sitelib
mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
}
sha512sums="
e1564ab2d8922276bd8ad586b37308d60ca2dd563bac3cdd992d8a6ba4de26e5499350a62a1d4cb2bbb9a5b7aff609b5187aad5fba118eb55d1b4c8355d2979a ocaml-labltk-8.06.12.tar.gz
"