Skip to content
Snippets Groups Projects
Commit 0d9169d6 authored by Celeste's avatar Celeste
Browse files

testing/ocaml-ppx_blob: new aport

https://github.com/johnwhitington/ppx_blob
Include a file as a string at compile time
parent b82a86ee
1 merge request!64628OCaml combo pack April 2024
# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=ocaml-ppx_blob
pkgver=0.8.0
pkgrel=0
_pkgreal=ppx_blob
pkgdesc="Include a file as a string at compile time"
url="https://github.com/johnwhitington/ppx_blob"
arch="all !riscv64 !loongarch64" # ocaml
license="Unlicense"
depends_dev="
$pkgname=$pkgver-r$pkgrel
ocaml-ppxlib-dev
"
makedepends="
$depends_dev
dune
ocaml
"
checkdepends="ocaml-alcotest-dev"
subpackages="$pkgname-dev"
source="$_pkgreal-$pkgver.tar.bz2::https://github.com/johnwhitington/ppx_blob/releases/download/$pkgver/ppx_blob-$pkgver.tbz"
builddir="$srcdir/$_pkgreal-$pkgver"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
dune build --release --verbose
}
check() {
dune runtest --build-dir=.testenv --verbose
}
package() {
dune install --destdir="$pkgdir" --docdir=/.omit
}
dev() {
default_dev
cd "$pkgdir"
local path; find usr/lib/ocaml \( \
-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="
bcbd58f7b0505063eaf4799792696f633a11ee734ce57d75b8f24b53d05fafbda8330bbf577a1d7a6149bb936b535216ae83574c1d40a61434e8d3bc6b6fd973 ppx_blob-0.8.0.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