aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-zarith/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-zarith/APKBUILD')
-rw-r--r--testing/ocaml-zarith/APKBUILD58
1 files changed, 44 insertions, 14 deletions
diff --git a/testing/ocaml-zarith/APKBUILD b/testing/ocaml-zarith/APKBUILD
index 7cf3c2fb837..6b48859b8f8 100644
--- a/testing/ocaml-zarith/APKBUILD
+++ b/testing/ocaml-zarith/APKBUILD
@@ -2,22 +2,31 @@
# Maintainer: River Dillon <oss@outerpassage.net>
pkgname=ocaml-zarith
pkgver=1.12
-pkgrel=0
+pkgrel=5
pkgdesc="library implementing arithmetic and logical operations"
url="https://github.com/ocaml/Zarith"
-arch="aarch64 ppc64le x86_64" # limited by ocaml
-license="custom"
-makedepends="ocaml ocaml-findlib ocaml-compiler-libs ocaml-ocamldoc gmp-dev"
-subpackages="$pkgname-doc"
-source="
- https://github.com/ocaml/Zarith/archive/refs/tags/release-$pkgver.tar.gz
- project.mak.patch
+arch="all !riscv64 !loongarch64" # ocaml
+license="LGPL-2.0-only WITH OCaml-LGPL-linking-exception"
+depends="gmp-dev" # zarith is not split into a -dev subpackage
+makedepends="
+ ocaml
+ ocaml-findlib
+ ocaml-compiler-libs
+ ocaml-ocamldoc
"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/Zarith/archive/refs/tags/release-$pkgver.tar.gz"
builddir="$srcdir/Zarith-release-$pkgver"
+# 32bit archs
+case "$CARCH" in
+armv7|armhf|x86) options="$options textrels" ;;
+esac
+
build() {
- LDFLAGS= ./configure
+ ./configure -installdir "$pkgdir"/usr/lib/ocaml
make
+ make doc
}
check() {
@@ -25,12 +34,33 @@ check() {
}
package() {
- mkdir -p "$pkgdir"/usr/lib/ocaml
- INSTALLDIR="$pkgdir"/usr/lib/ocaml LDCONF=/dev/null make -e install
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ mkdir -p "$pkgdir"/usr/lib/ocaml "$pkgdir"/usr/lib/ocaml/stublibs
+ OCAMLFIND_LDCONF=ignore make install
+ install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname/
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
+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="
-8075573ae65579a2606b37dd1b213032a07d220d28c733f9288ae80d36f8a2cc4d91632806df2503c130ea9658dc207ee3a64347c21aa53969050a208f5b2bb4 release-1.12.tar.gz
-e642848b515ef3f60b7348307beb7e8a04d13527ff87021912eb1f06bbb88090b5ad68ff5a39c42be93ef03f1da5156d9b2e11f909cb940d9d5d64819507735b project.mak.patch
+8075573ae65579a2606b37dd1b213032a07d220d28c733f9288ae80d36f8a2cc4d91632806df2503c130ea9658dc207ee3a64347c21aa53969050a208f5b2bb4 ocaml-zarith-1.12.tar.gz
"