commit 980578ce6b8a7e95663e84890a24b937887db2f1
parent 433ddbe8ad02c21ca4d1e74dd7f2223fa0fc0a7c
Author: Jan Pobrislo <ccx@te2000.cz>
Date: Wed, 22 Oct 2025 03:11:33 +0000
ocaml packages
Diffstat:
5 files changed, 121 insertions(+), 3 deletions(-)
diff --git a/templates/pkg/ocamlbuild b/templates/pkg/ocamlbuild
@@ -1,5 +1,5 @@
{%- set pkg_version="0.14.1" -%}
-{% extends "generic" %}
+{% extends "genlinks" %}
{% block package_deps -%}
#+{{pkg_install_name("busybox-diffutils")}}
#+{{pkg_install_name("musl-cross-make")}}
diff --git a/variants/ccx-x86_64/ocamlbuild b/variants/ccx-x86_64/ocamlbuild
@@ -1,4 +1,7 @@
#!/usr/bin/env pthbs-build
+#+busybox.1ece97f2192661a6f5605f3f9bccbc8e917ed4adcecd1d8ca7cf9710363f495f
+#+busybox-findutils.37324a26742f7757965c3863bab9b3b08211c9d57539f455839ecd90e6fa3a59
+#+busybox-awk.f58cd25bab650fb74567bab10fc34f5b591f481611f885dcd429aedbf73a490f
#+busybox-diffutils.1aa76d52d9aa0d4541fde1ed8cac30606ca4ec9985ce43454ffc7cd60ab1a0be
#+musl-cross-make.1047ba507930d3bb4139073c872c1e856d7d9f4c542bb22dd0af05422d475054
#+gnu-make.55eb259e0f312d10457a458d9323e532dda3d8a934982a307b5298d7711bb299
@@ -28,4 +31,60 @@ make DESTDIR="$pthbs_destdir" install
check_static command/ocamlbuild
+cd "$pthbs_destdir/home/ccx/versions/$pthbs_package"
+find -type d -o -print | awk -F/ '
+BEGIN {
+ x["./command/ocamlbuild"]=1
+}
+
+function r1(s) {
+ sub("^[.]/[^/]*", ".", s)
+ return s
+}
+function s1(repl, s) {
+ sub("^[.]/[^/]*", "./"repl, s)
+ return s
+}
+function link(src) {
+ x[$0]=0
+ printf "%s\t%s\n", $0, src
+ printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
+}
+$1!="."{exit 1}
+
+
+$2 == "config" { link($0); next }
+$2 == "keys" { link($0); next }
+$2 == "zsh" { link($0); next }
+$2 == "env" { link($0); next }
+$2 == "command" { link($0); next }
+$2 == "bin" { link(s1("command", $0)); next }
+
+$2 == "library.so" { link($0); next }
+$2 == "library" { link($0); next }
+$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
+$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next }
+
+$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
+
+$2 == "man" { link($0); next }
+$2 == "info" { link($0); next }
+$2 == "doc" { link($0); next }
+$2 == "icons" { link($0); next }
+$2 == "terminfo" { link($0); next }
+$2 == "data" { link($0); next }
+$2 == "include" { link($0); next }
+
+{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
+
+END {
+ for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
+ for(fname in x) {
+ if(x[fname]) {
+ printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
+ exit 3
+ }
+ }
+}' >.install-links.new
+mv .install-links.new .install-links
diff --git a/variants/ccx-x86_64/wip.environment b/variants/ccx-x86_64/wip.environment
@@ -1,4 +1,4 @@
#!/usr/bin/env pthbs-build
#+ocaml.b0526442df83b45ad9c3cf412eb7efa6b5497de16ecf317d1e92fe492b472798
-#+ocamlbuild.9a5e6e9c73510c27e39a99bf30448926166acac11c079b70bbffee9628e2699a
+#+ocamlbuild.6d192fa9a25caacea5cf56909c6cd3b19a606942e3bfcdd2e4b9630b66038e03
#+ocaml-findlib.9eb5097bb7a1e3080bd3c204a046d140b95946885be87a279e4b050f338a4859
\ No newline at end of file
diff --git a/variants/root-x86_64/ocamlbuild b/variants/root-x86_64/ocamlbuild
@@ -1,4 +1,7 @@
#!/usr/bin/env pthbs-build
+#+busybox.48c54b64ed4d28b2c4df9ff3167d560e1f8e4bc338c328a71779b3d28413c1e2
+#+busybox-findutils.fb6b808e4bf71082490eef4c8fd0369371046381b5087084822094c27cd7a36b
+#+busybox-awk.4e38799dd0815d4fb9b0c701fff3b41b58366ebf022ccec71b03b0881a2b326f
#+busybox-diffutils.7c9e0bee30fb6332bf7fa171c534c15d5d7d4fb0702c8f3cad054b4c34cd52ab
#+musl-cross-make.73b05cc53eb90f3881270d6a6cb7fe89b148029d6233f164737a24b2093d0d81
#+gnu-make.e1f59e1987776008a08c9fe7ff91402ed39981e46614e7f4846429b4c41a7da7
@@ -28,4 +31,60 @@ make DESTDIR="$pthbs_destdir" install
check_static command/ocamlbuild
+cd "$pthbs_destdir/versions/$pthbs_package"
+find -type d -o -print | awk -F/ '
+BEGIN {
+ x["./command/ocamlbuild"]=1
+}
+
+function r1(s) {
+ sub("^[.]/[^/]*", ".", s)
+ return s
+}
+function s1(repl, s) {
+ sub("^[.]/[^/]*", "./"repl, s)
+ return s
+}
+function link(src) {
+ x[$0]=0
+ printf "%s\t%s\n", $0, src
+ printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr"
+}
+$1!="."{exit 1}
+
+
+$2 == "config" { link($0); next }
+$2 == "keys" { link($0); next }
+$2 == "zsh" { link($0); next }
+$2 == "env" { link($0); next }
+$2 == "command" { link($0); next }
+$2 == "bin" { link(s1("command", $0)); next }
+
+$2 == "library.so" { link($0); next }
+$2 == "library" { link($0); next }
+$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next }
+$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next }
+
+$2 == "share" && $3 ~ /^(info|man|doc|icons|terminfo)$/ { link(r1($0)); next }
+
+$2 == "man" { link($0); next }
+$2 == "info" { link($0); next }
+$2 == "doc" { link($0); next }
+$2 == "icons" { link($0); next }
+$2 == "terminfo" { link($0); next }
+$2 == "data" { link($0); next }
+$2 == "include" { link($0); next }
+
+{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" }
+
+END {
+ for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" }
+ for(fname in x) {
+ if(x[fname]) {
+ printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr"
+ exit 3
+ }
+ }
+}' >.install-links.new
+mv .install-links.new .install-links
diff --git a/variants/root-x86_64/wip.environment b/variants/root-x86_64/wip.environment
@@ -1,4 +1,4 @@
#!/usr/bin/env pthbs-build
#+ocaml.d0a50294cecef01ed0f7ed6ad4704e5179c255b6e894537fe948f7b4ae8095dd
-#+ocamlbuild.4f0b9eb3fb5d9b427429be66f945876fc597c559d31aaac2e8ac266702737855
+#+ocamlbuild.4564929bff88405d8f58138fbca36bbe04f29aee647efe5afa9301729c256c63
#+ocaml-findlib.a7e7553cc0376d70ac470ae3676c0facb5eca28461950cde34887a341ec8b0a7
\ No newline at end of file