mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-05 09:27:19 +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
80 lines
1.8 KiB
Text
80 lines
1.8 KiB
Text
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-gen
|
|
_pkgname=gen
|
|
pkgver=1.1
|
|
pkgrel=1
|
|
pkgdesc="Simple, efficient iterators for OCaml"
|
|
url="https://github.com/c-cube/gen/"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="BSD-2-Clause"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-seq-dev"
|
|
makedepends="$depends_dev dune dune-configurator ocaml"
|
|
checkdepends="ocaml-ounit-dev ocaml-qcheck-dev ocaml-qtest-dev"
|
|
options="!check"
|
|
subpackages="$pkgname-dev"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/c-cube/gen/archive/v$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
_ocamldir=usr/lib/ocaml
|
|
|
|
# 32-bit archs
|
|
case "$CARCH" in
|
|
arm*|x86) options="$options textrels" ;;
|
|
esac
|
|
|
|
build() {
|
|
dune build --release --verbose
|
|
}
|
|
|
|
check() {
|
|
dune runtest --verbose
|
|
}
|
|
|
|
package() {
|
|
dune install \
|
|
--destdir="$pkgdir" \
|
|
--docdir=/.omit
|
|
rm -Rf "$pkgdir"/.omit
|
|
}
|
|
|
|
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="
|
|
71a4b5c3666a7c11935398a78feea7383f61d2c549dfb96e324d40783ffa87b5ec492c5ec468803aabfb9b48e7d0ebaa30b24d2b974540afc7cca5feea3121c1 ocaml-gen-1.1.tar.gz
|
|
"
|