mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 17:16:44 +02:00
leaving the Maintainer comment there for better visual cues, syntax highlighting, and easy conversion to a Contributor comment since Contributor comments are not being removed, just treat my Maintainer comments like Contributor ones, as a normal comment
100 lines
2 KiB
Text
100 lines
2 KiB
Text
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-tsdl
|
|
pkgver=1.0.0
|
|
pkgrel=0
|
|
_pkgreal=tsdl
|
|
pkgdesc="Thin bindings to SDL"
|
|
url="https://erratique.ch/software/tsdl"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="ISC"
|
|
depends_dev="
|
|
$pkgname=$pkgver-r$pkgrel
|
|
ocaml-ctypes-dev
|
|
ocaml-stdlib-shims
|
|
sdl2-dev
|
|
"
|
|
makedepends="
|
|
$depends_dev
|
|
ocaml
|
|
ocamlbuild
|
|
ocaml-findlib
|
|
ocaml-topkg
|
|
cmd:opam-installer
|
|
"
|
|
checkdepends="
|
|
libffi-dev
|
|
mesa-dri-gallium
|
|
ocaml-bigarray-compat-dev
|
|
ocaml-integers-dev
|
|
vulkan-loader
|
|
xvfb-run
|
|
"
|
|
options="!check" # sdlevents test seems to hang
|
|
subpackages="$pkgname-dev"
|
|
source="$_pkgreal-$pkgver.tar.bz2::https://erratique.ch/software/tsdl/releases/tsdl-$pkgver.tbz"
|
|
builddir="$srcdir/$_pkgreal-$pkgver"
|
|
_ocamldir=usr/lib/ocaml
|
|
|
|
# 32-bit archs
|
|
case "$CARCH" in
|
|
arm*|x86) options="$options textrels" ;;
|
|
esac
|
|
|
|
build() {
|
|
ocaml pkg/pkg.ml build -v \
|
|
--tests "$(want_check && echo true || echo false)"
|
|
}
|
|
|
|
check() {
|
|
xvfb-run -a ocaml pkg/pkg.ml test -v
|
|
}
|
|
|
|
package() {
|
|
opam-installer -i \
|
|
--prefix="$pkgdir/usr" \
|
|
--libdir="$pkgdir/$_ocamldir" \
|
|
--docdir="$builddir/.omit" \
|
|
$_pkgreal.install
|
|
}
|
|
|
|
dev() {
|
|
default_dev
|
|
|
|
cd "$pkgdir"
|
|
|
|
local path; find $_ocamldir \( \
|
|
-name '*.cmt' -o \
|
|
-name '*.cmti' -o \
|
|
-name '*.ml' -o \
|
|
-name '*.mli' \
|
|
\) | while read -r path
|
|
do
|
|
amove "$path"
|
|
done
|
|
}
|
|
|
|
prepare_py_provides() {
|
|
local datadir="${subpkgdir:-$pkgdir}"
|
|
local pkgbasedir=${pkgbasedir:-"$startdir/pkg"}
|
|
local controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
|
|
|
|
options_has "!tracedeps" && return 0
|
|
|
|
ocaml4-abuild-find provides \
|
|
"$datadir"/usr/lib/ocaml \
|
|
"$controldir" \
|
|
"$pkgver-r$pkgrel"
|
|
}
|
|
|
|
scan_python3_dependency() {
|
|
local controldir="$2" datadir="$3"
|
|
|
|
ocaml4-abuild-find requires \
|
|
"$datadir"/usr/lib/ocaml \
|
|
"$controldir"
|
|
}
|
|
|
|
sha512sums="
|
|
70ba93a07d8add11d29cf94ce173c022a52a7d57af7b9dad3abdae7fde6314d4690d3aacc8f75e598b6af2e692568399638813664db0331e0a898bdc14bfe670 tsdl-1.0.0.tar.bz2
|
|
"
|