aboutsummaryrefslogtreecommitdiffstats
path: root/community/dune/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/dune/APKBUILD')
-rw-r--r--community/dune/APKBUILD85
1 files changed, 69 insertions, 16 deletions
diff --git a/community/dune/APKBUILD b/community/dune/APKBUILD
index dae1923b132..ae8ba95db96 100644
--- a/community/dune/APKBUILD
+++ b/community/dune/APKBUILD
@@ -1,33 +1,57 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
-# Maintainer: omni <omni+alpine@hack.org>
+# Contributor: omni <omni+alpine@hack.org>
+# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=dune
-pkgver=2.9.1
+pkgver=3.14.2
pkgrel=1
pkgdesc="A composable build system for OCaml (formerly Jbuilder)"
-url="https://github.com/ocaml/dune"
-# mips64 and riscv64 blocked by ocaml
-arch="all !mips64 !riscv64"
-license="Apache-2.0"
+url="https://dune.build/"
+arch="all !riscv64" # limited by ocaml aport
+license="MIT"
checkdepends="bash"
-makedepends="ocaml ocaml-compiler-libs ocaml-findlib-dev"
+makedepends="ocaml"
provides="jbuilder=$pkgver-r$pkgrel"
-subpackages="$pkgname-doc $pkgname-emacs::noarch"
+subpackages="$pkgname-doc $pkgname-emacs::noarch $pkgname-configurator"
source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml/dune/archive/$pkgver.tar.gz"
options="!check" # FIXME requires ocaml-menhir
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
+prepare() {
+ default_prepare
+
+ # This allows 'dune --version' to output the correct version instead of "n/a"
+ sed -i "/^(name dune)/a (version $pkgver)" dune-project
+ # This enables dune-configurator to use the vendored csexp module
+ sed -i 's/stdune.csexp/dune-configurator.csexp/' vendor/csexp/src/dune
+}
+
build() {
- make release
+ ./configure --libdir="$(ocamlc -where)" \
+ --bindir="/usr/bin" --sbindir="/usr/sbin" --etcdir="/etc" \
+ --mandir="/usr/share/man" --docdir="/usr/share/doc" \
+ --datadir="/usr/share"
+
+ ocaml boot/bootstrap.ml --verbose
+ ./dune.exe build \
+ -p dune,dune-configurator \
+ --profile dune-bootstrap --verbose
}
check() {
- make test
+ ./dune.exe runtest --verbose
}
package() {
- DESTDIR="$pkgdir" make install
+ ./dune.exe install \
+ --destdir="$pkgdir" \
+ dune dune-configurator
- # Fix docs location
- mv "$pkgdir"/usr/doc "$pkgdir"/usr/man "$pkgdir"/usr/share
+ # Duplicate of usr/share/doc/dune
+ rm -Rf "$pkgdir"/usr/share/doc/dune-configurator
}
emacs() {
@@ -35,8 +59,37 @@ emacs() {
install_if="$pkgname=$pkgver-r$pkgrel emacs"
pkgdesc="Emacs plugins for $pkgname"
- mkdir -p "$subpkgdir"/usr/share/
- mv "$pkgdir"/usr/share/emacs/ "$subpkgdir"/usr/share/emacs/
+ amove usr/share/emacs
+}
+
+configurator() {
+ pkgdesc="System config helper for the Dune OCaml build system"
+ provides="$subpkgname-dev=$pkgver-r$pkgrel"
+
+ amove usr/lib/ocaml/"$subpkgname"
+}
+
+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="4fcff34de4acc4429dd73864ca90e695d8ba436839fd679608f7db292e44be70c3db455a58f59477f2055f84ce497bfa8e90e485ed9536acad3c1b3be3d4be77 dune-2.9.1.tar.gz"
+sha512sums="
+33079fce72a86e6d4c0d33686b17c7056bd361959d3873f8bb5fc3d1993341c4645b2f389944a2e0a071243a7f22936bdcb28261dae79b517cf14aa230af448c dune-3.14.2.tar.gz
+"