1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/bash
# Build script for OCaml alcotest library
set -e
# Find and enter the extracted source directory
cd "$SRCDIR"
# Ensure OCaml toolchain is in PATH
export PATH="$PREFIX/bin:$PATH"
# libatomic is at /usr/lib (hammerhead BSD layout)
export LD_LIBRARY_PATH="/usr/lib:${LD_LIBRARY_PATH:-}"
export LIBRARY_PATH="/usr/lib:${LIBRARY_PATH:-}"
# Patch alcotest_stubs.c for illumos (add sys/termios.h for struct winsize)
if [[ "$(uname -s)" == "SunOS" || "$(uname -s)" == "Hammerhead" ]]; then
sed -i 's|#include <sys/ioctl.h>|#include <sys/ioctl.h>\n#include <sys/termios.h>|' src/alcotest/alcotest_stubs.c
fi
# Build only the alcotest package (skip tests and optional deps)
dune build -p alcotest
# Install to package directory
dune install alcotest --prefix=$PREFIX --destdir="$PKGDIR"
# OCaml alcotest - Lightweight testing framework
# https://github.com/mirage/alcotest
[package]
name = "ocaml-alcotest"
version = "1.8.0"
release = 1
description = "OCaml lightweight and colorful test framework"
url = "https://github.com/mirage/alcotest"
license = "ISC"
maintainer = "Chris Tusa <chris.tusa@leafscale.com>"
arch = "x86_64"
[dependencies]
runtime = ["ocaml", "ocaml-fmt", "ocaml-astring", "ocaml-cmdliner", "ocaml-uutf", "ocaml-re", "ocaml-seq", "ocaml-stdlib-shims", "ocaml-syntax-shims"]
build = ["ocaml", "dune", "ocaml-fmt", "ocaml-astring", "ocaml-cmdliner", "ocaml-uutf", "ocaml-re", "ocaml-seq", "ocaml-stdlib-shims", "ocaml-syntax-shims"]
[[source]]
file = "alcotest-1.8.0.tar.gz"
urls = [
"https://github.com/mirage/alcotest/archive/refs/tags/1.8.0.tar.gz"
]
checksum = "skip"
extract = true
[build]
parallel = false
|