Skip to content
Snippets Groups Projects
Commit d8ac7a7a authored by rubicon's avatar rubicon Committed by alice
Browse files

testing/ocaml-result: move back from unmaintained as depends for ocaml-charinfo-width

parent 71ac588a
1 merge request!34358testing/ocaml-*: bring the rest of the OCaml aports up to date, and bring utop back from unmaintained
...@@ -2,46 +2,58 @@ ...@@ -2,46 +2,58 @@
# Maintainer: # Maintainer:
pkgname=ocaml-result pkgname=ocaml-result
_pkgname=result _pkgname=result
pkgver=1.4 pkgver=1.5
pkgrel=1 pkgrel=0
pkgdesc="Compat result type" pkgdesc="Compatibility Result module"
url="https://github.com/janestreet/result" url="https://github.com/janestreet/result"
arch="all !x86 !armhf !armv7 !s390x !mips !mips64" # limited by ocaml arch="all !riscv64" # limited by ocaml
license="BSD-3-Clause" license="BSD-3-Clause"
depends="ocaml-runtime" depends="ocaml-runtime"
makedepends="dune ocaml ocaml-findlib opam" depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="dune ocaml ocaml-findlib"
options="!check" # no tests provided options="!check" # no tests provided
subpackages="$pkgname-dev" subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/janestreet/$_pkgname/archive/$pkgver/result-$pkgver.tar.gz" source="$pkgname-$pkgver.tar.bz2::https://github.com/janestreet/result/releases/download/$pkgver/result-$pkgver.tbz"
builddir="$srcdir/$_pkgname-$pkgver" builddir="$srcdir/$_pkgname-$pkgver"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() { build() {
jbuilder build @install export OCAMLPATH=/usr/lib/ocaml
dune build --root . @install --no-buffer --verbose
} }
package() { package() {
mkdir -p "$pkgdir"/usr/lib/ocaml dune install \
jbuilder install \
--destdir="$pkgdir" \ --destdir="$pkgdir" \
--prefix=/usr \ --prefix=/usr \
--libdir=/usr/lib/ocaml --libdir=/usr/lib/ocaml
# Remove annotation files.
rm "$pkgdir"/usr/lib/ocaml/$_pkgname/*.cmt
# Contains just a readme and changelog. # Contains just a readme and changelog.
rm -Rf "$pkgdir"/usr/doc rm -Rf "$pkgdir"/usr/doc
} }
dev() { dev() {
default_dev default_dev
depends="$pkgname=$pkgver-r$pkgrel"
local sitelib="usr/lib/ocaml/$_pkgname"
cd "$pkgdir"/$sitelib
mkdir -p "$subpkgdir"/$sitelib cd "$pkgdir"
mv *.cmx *.cmxa *.ml "$subpkgdir"/$sitelib/
local path; for path in $(find usr/lib/ocaml \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.cmx' -o \
-name '*.cmxa' -o \
-name '*.ml' -o \
-name '*.mli' \
\))
do
amove "$path"
done
} }
sha512sums="2e709fee6ceb54463c3989a90aed351c5b48f7a5edce9ccbba4d163cbfb795a19393be0d75885e762d4609961a64e273bb298b94bd3858dc2c20de9396b655d3 ocaml-result-1.4.tar.gz" sha512sums="
4dfabc121fd69b3e0fe742f4da483830104d8fedf5ad3d83b4fb3efa2d544cb05eadc8719960b24bdf5760bff3434c5225f280339d70af9fb2842f3efe1bb87b ocaml-result-1.5.tar.bz2
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment