mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-05 05:57:14 +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
94 lines
2 KiB
Text
94 lines
2 KiB
Text
# Contributor: rubicon <rubicon@mailo.com>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=ocaml-uunf
|
|
_pkgname=uunf
|
|
pkgver=14.0.0
|
|
pkgrel=2
|
|
pkgdesc="Unicode text normalization for OCaml"
|
|
url="https://erratique.ch/software/uunf"
|
|
arch="all !riscv64 !loongarch64" # ocaml
|
|
license="ISC"
|
|
depends_dev="$pkgname=$pkgver-r$pkgrel"
|
|
makedepends="
|
|
ocaml
|
|
ocaml-compiler-libs
|
|
ocaml-findlib
|
|
ocamlbuild
|
|
ocaml-topkg
|
|
ocaml-cmdliner-dev
|
|
ocaml-uucd-dev
|
|
ocaml-uutf-dev
|
|
cmd:opam-installer
|
|
"
|
|
options="!check" # no tests provided
|
|
subpackages="$pkgname-dev"
|
|
source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/uunf/releases/uunf-$pkgver.tbz"
|
|
builddir="$srcdir/$_pkgname-$pkgver"
|
|
_ocamldir=usr/lib/ocaml
|
|
|
|
# 32-bit archs
|
|
case "$CARCH" in
|
|
arm*|x86) options="$options textrels" ;;
|
|
esac
|
|
|
|
build() {
|
|
# Workaround ocamlopt exiting with code 2 while compiling uunf_data.ml
|
|
if [ "$CARCH" = ppc64le ]; then
|
|
ulimit -Hs unlimited
|
|
ulimit -Ss 65536
|
|
fi
|
|
|
|
ocaml pkg/pkg.ml build \
|
|
--with-uutf true \
|
|
--with-cmdliner true
|
|
}
|
|
|
|
package() {
|
|
opam-installer -i \
|
|
--prefix="$pkgdir/usr" \
|
|
--libdir="$pkgdir/$_ocamldir" \
|
|
--docdir="$builddir/.omit" \
|
|
$_pkgname.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="
|
|
9aac01483abb8a8a5d68832d7f7692909d61559f2c9b0284c1da293f8115d1100df26e9e4cf7280bda6499ba866f5da2c72c4c21ca99a1d594b29d000e9bb051 ocaml-uunf-14.0.0.tar.bz2
|
|
"
|