# Contributor: rubicon # Maintainer: pkgname=ocaml-fmt _pkgname=fmt pkgver=0.9.0 pkgrel=1 pkgdesc="OCaml Format pretty-printer combinators" url="https://erratique.ch/software/fmt" arch="all !riscv64" # restricted by ocaml aport license="ISC" depends="ocaml-runtime" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends=" ocaml ocaml-findlib ocaml-topkg ocamlbuild ocaml-cmdliner-dev ocaml-compiler-libs cmd:opam-installer " options="!check" # no tests provided subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/fmt/releases/fmt-$pkgver.tbz" builddir="$srcdir/$_pkgname-$pkgver" _ocamldir=usr/lib/ocaml # 32-bit archs case "$CARCH" in arm*|x86) options="$options textrels" ;; esac build() { ocaml pkg/pkg.ml build \ --with-base-unix 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; for path in $(find $_ocamldir \( \ -name '*.cmt' -o \ -name '*.cmti' -o \ -name '*.cmx' -o \ -name '*.cmxa' -o \ -name '*.ml' -o \ -name '*.mli' \ \)) do amove "$path" done } sha512sums=" 66cf4b8bb92232a091dfda5e94d1c178486a358cdc34b1eec516d48ea5acb6209c0dfcb416f0c516c50ddbddb3c94549a45e4a6d5c5fd1c81d3374dec823a83b ocaml-fmt-0.9.0.tar.bz2 "