Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [WIP] ocaml: update to 5.0.0.
@ 2022-12-21 22:30 leahneukirchen
  2023-03-22  1:54 ` github-actions
                   ` (45 more replies)
  0 siblings, 46 replies; 47+ messages in thread
From: leahneukirchen @ 2022-12-21 22:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

There is a new pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [ ] coq
	- [ ] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 19966 bytes --]

From 7b0fb20bd6d22d3e2589d369b08232ddf3236787 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/14] ocaml: update to 5.0.0.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  17 +-
 4 files changed, 6 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab..000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf..000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e18..000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a..acef81a19055 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,21 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.0.0
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
 make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="ncurses-devel"
+short_desc="Main implementation of the Objective Caml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b
 nocross=yes
 
 export ASPP="cc -c"
 
-case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
-esac
-
 post_install() {
 	vlicense LICENSE
 }

From 44f1c76271b3f8de7b29b7d03bc0fd245c979aad Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/14] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index fb2283612ba8..1e09f9b0d4ef 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
@@ -11,7 +11,7 @@ maintainer="John Regan <john@jrjrtech.com>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From a185fd62d7e9e38390118c6f324e5b2fd8d3ba95 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/14] ocaml-num: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-num/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d07..adf35962a57e 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
 version=1.4
-revision=4
+revision=5
 build_style=gnu-makefile
 make_install_target="findlib-install"
 makedepends="ocaml ocaml-findlib"

From 713ea9b9c895888a61e2a4e84ffb426a9351acca Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/14] ocaml-zarith: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-zarith/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e69818..c8c2c5ed0c3b 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
 version=1.12
-revision=4
+revision=5
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -19,6 +19,9 @@ disable_parallel_build=yes
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 48fc5272fa841d8d851b3278e405b67a235c2ae7 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/14] ocamlbuild: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocamlbuild/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc03..558c8adbed35 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,7 +1,7 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
 version=0.14.2
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="ocaml"
 short_desc="OCaml build tool"

From 5840bea8ab88882e1b3e212f48525dedad13df2a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/14] ocaml-stdcompat: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce8..a7251039c3c0 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From 3c945b38fbc5749958cbd4f7f80031985efb6f83 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:22:41 +0100
Subject: [PATCH 07/14] hivex: rebuild for ocaml-5.0.0.

---
 srcpkgs/hivex/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/hivex/template b/srcpkgs/hivex/template
index e6b15e5a990e..e572186a53a9 100644
--- a/srcpkgs/hivex/template
+++ b/srcpkgs/hivex/template
@@ -1,7 +1,7 @@
 # Template file for 'hivex'
 pkgname=hivex
 version=1.3.21
-revision=7
+revision=8
 build_style=gnu-configure
 configure_args="--disable-ocaml" # currently ocaml is broken
 hostmakedepends="python3 perl ruby ocaml ocaml-findlib perl-IO-stringy"

From c03e17409bd773e97c1465ae6911d3f882ca3656 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 08/14] opam: update to 2.1.4.

---
 srcpkgs/opam/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 743c1afdd7b0..a5531ad96c4f 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,6 +1,6 @@
 # Template file for 'opam'
 pkgname=opam
-version=2.1.3
+version=2.1.4
 revision=1
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
@@ -13,8 +13,8 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=5da29e1eb565f0c65a9f1810f91820b1036e6ecc592e3ed4615dfdfcec442c60
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
+checksum=06aa6c96ccf68bb8be3864d984bd7c54329eabb4082d7c07232cd4d18c55e7c4
 nocross=yes
 disable_parallel_build=yes
 make_check=ci-skip # uses bwrap

From 369f453c6c922d984976122531a3acb09f14e821 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:35:49 +0100
Subject: [PATCH 09/14] pdfsandwich: rebuild for ocaml-5.0.0.

---
 srcpkgs/pdfsandwich/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/pdfsandwich/template b/srcpkgs/pdfsandwich/template
index 82f2f934fdc1..c03a84f10161 100644
--- a/srcpkgs/pdfsandwich/template
+++ b/srcpkgs/pdfsandwich/template
@@ -1,7 +1,7 @@
 # Template file for 'pdfsandwich'
 pkgname=pdfsandwich
 version=0.1.7
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="ocaml perl"
 makedepends="ocaml"

From 688e91edd21d0c6a27e4e172cf6569970c33c1dd Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:39:35 +0100
Subject: [PATCH 10/14] z3: rebuild for ocaml-5.0.0.

---
 srcpkgs/z3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 50f8a9c3650b..77404c8f0e23 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
 # Template file for 'z3'
 pkgname=z3
 version=4.11.2
-revision=2
+revision=3
 build_style=configure
 configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
 make_build_args="-C build all examples"

From eed1ee41c0adf1ffdf7b55193cd8f9a663990cda Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 11/14] unison: rebuild for ocaml-5.0.0.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index bedb4b9d671c..17e1921735e7 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.0
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From 9ac47b16c357b14473b6baed7f0743da65d2c523 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 12/14] dune: update to 3.6.2.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index c84daa5ba2b4..49f0bfac3ee5 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.6.1
+version=3.6.2
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -9,7 +9,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://dune.build/"
 distfiles="https://github.com/ocaml/dune/archive/refs/tags/${version}.tar.gz"
-checksum=89eb18ff7d3808812e9422b36713336cabc2bd48e875621facee1307ff082f6a
+checksum=84c29d5d1d417518a9c33e87409dd865fed4cd5ba069b43ff8e030603474e81b
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From df06714cb56fa7c23c3d6dab1e0886004371c8f4 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 13/14] ocaml-camlp-streams: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b..4b7f1bae0887 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From eb228d09d09fd9958bf57693b1f61f18d61f8e07 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 14/14] camlp5: rebuild for ocaml-5.0.0.

---
 srcpkgs/camlp5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
index 62223f806a0f..154fc80c35d7 100644
--- a/srcpkgs/camlp5/template
+++ b/srcpkgs/camlp5/template
@@ -1,7 +1,7 @@
 # Template file for 'camlp5'
 pkgname=camlp5
 version=8.00.04
-revision=1
+revision=2
 build_style=configure
 configure_args="-mandir /usr/share/man"
 hostmakedepends="ocaml perl ocaml-findlib"

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
@ 2023-03-22  1:54 ` github-actions
  2023-03-22 16:46 ` [PR PATCH] [Closed]: " leahneukirchen
                   ` (44 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: github-actions @ 2023-03-22  1:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1478812881

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Closed]: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
  2023-03-22  1:54 ` github-actions
@ 2023-03-22 16:46 ` leahneukirchen
  2023-03-22 16:46 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (43 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-03-22 16:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

There's a closed pull request on the void-packages repository

[WIP] ocaml: update to 5.0.0.
https://github.com/void-linux/void-packages/pull/41227

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [ ] coq
	- [ ] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
  2023-03-22  1:54 ` github-actions
  2023-03-22 16:46 ` [PR PATCH] [Closed]: " leahneukirchen
@ 2023-03-22 16:46 ` leahneukirchen
  2023-03-22 16:48 ` leahneukirchen
                   ` (42 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-03-22 16:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [ ] coq
	- [ ] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (2 preceding siblings ...)
  2023-03-22 16:46 ` [PR PATCH] [Updated] " leahneukirchen
@ 2023-03-22 16:48 ` leahneukirchen
  2023-06-21  1:56 ` github-actions
                   ` (41 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-03-22 16:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [ ] coq
	- [ ] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 19967 bytes --]

From 95d7d8c6e498c922fc1befac29eb33457ca43a96 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/14] ocaml: update to 5.0.0.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  17 +-
 4 files changed, 6 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab..000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf..000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e18..000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a..acef81a19055 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,21 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.0.0
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
 make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="ncurses-devel"
+short_desc="Main implementation of the Objective Caml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=72fa3d0ba19b82fcb9e6c62e0090b9d22e5905c4be0f94faf56904a9377a9e5b
 nocross=yes
 
 export ASPP="cc -c"
 
-case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
-esac
-
 post_install() {
 	vlicense LICENSE
 }

From 66620ec7aab28e7de66915430b43f707c5b237d3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/14] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b..36bb7952f1d9 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 13e85d521f63c069d525d78ab7556b889e2e0906 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/14] ocaml-num: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-num/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d07..adf35962a57e 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
 version=1.4
-revision=4
+revision=5
 build_style=gnu-makefile
 make_install_target="findlib-install"
 makedepends="ocaml ocaml-findlib"

From 983fa695515e541f1431792a9ef700aad380fd87 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/14] ocaml-zarith: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-zarith/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e69818..c8c2c5ed0c3b 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
 version=1.12
-revision=4
+revision=5
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -19,6 +19,9 @@ disable_parallel_build=yes
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From a3b48312e2da2ae92c30e3c3a136d7dd65d78bb0 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/14] ocamlbuild: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocamlbuild/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc03..558c8adbed35 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,7 +1,7 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
 version=0.14.2
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="ocaml"
 short_desc="OCaml build tool"

From ad125906ef9ef3cb517112b7bdcb2d5c43d5df6e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/14] ocaml-stdcompat: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce8..a7251039c3c0 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From f3a2c51d2231e887a08b683d829da7c5160ef574 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:22:41 +0100
Subject: [PATCH 07/14] hivex: rebuild for ocaml-5.0.0.

---
 srcpkgs/hivex/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/hivex/template b/srcpkgs/hivex/template
index 5f5591fc9230..6325c5086637 100644
--- a/srcpkgs/hivex/template
+++ b/srcpkgs/hivex/template
@@ -1,7 +1,7 @@
 # Template file for 'hivex'
 pkgname=hivex
 version=1.3.23
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--disable-ocaml" # currently ocaml is broken
 hostmakedepends="python3 perl ruby ocaml ocaml-findlib perl-IO-stringy"

From e9d416672a03c5c1fe5742862a4c9e371501dd43 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 08/14] opam: update to 2.1.4.

---
 srcpkgs/opam/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 743c1afdd7b0..a5531ad96c4f 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,6 +1,6 @@
 # Template file for 'opam'
 pkgname=opam
-version=2.1.3
+version=2.1.4
 revision=1
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
@@ -13,8 +13,8 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=5da29e1eb565f0c65a9f1810f91820b1036e6ecc592e3ed4615dfdfcec442c60
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
+checksum=06aa6c96ccf68bb8be3864d984bd7c54329eabb4082d7c07232cd4d18c55e7c4
 nocross=yes
 disable_parallel_build=yes
 make_check=ci-skip # uses bwrap

From d6c0ce2d4cb509097db02ed77e3f4923a713baf4 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:35:49 +0100
Subject: [PATCH 09/14] pdfsandwich: rebuild for ocaml-5.0.0.

---
 srcpkgs/pdfsandwich/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/pdfsandwich/template b/srcpkgs/pdfsandwich/template
index 82f2f934fdc1..c03a84f10161 100644
--- a/srcpkgs/pdfsandwich/template
+++ b/srcpkgs/pdfsandwich/template
@@ -1,7 +1,7 @@
 # Template file for 'pdfsandwich'
 pkgname=pdfsandwich
 version=0.1.7
-revision=6
+revision=7
 build_style=gnu-configure
 hostmakedepends="ocaml perl"
 makedepends="ocaml"

From e5877ffafb6c0aa189b71b7181f1d615b75f0691 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:39:35 +0100
Subject: [PATCH 10/14] z3: rebuild for ocaml-5.0.0.

---
 srcpkgs/z3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index fa2198bdb5d9..4fb9fd1e1f50 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
 # Template file for 'z3'
 pkgname=z3
 version=4.12.1
-revision=1
+revision=2
 build_style=configure
 configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
 make_build_args="-C build all examples"

From 8494d7c1c5c43afccec9a42f3c93e78006aa3e7c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 11/14] unison: rebuild for ocaml-5.0.0.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 32e036564671..2aa338e0dc05 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.2
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From c0004c84c6f6b26a26a88159b38466d3664ed3be Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 12/14] dune: update to 3.6.2.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index c84daa5ba2b4..49f0bfac3ee5 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.6.1
+version=3.6.2
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -9,7 +9,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="MIT"
 homepage="https://dune.build/"
 distfiles="https://github.com/ocaml/dune/archive/refs/tags/${version}.tar.gz"
-checksum=89eb18ff7d3808812e9422b36713336cabc2bd48e875621facee1307ff082f6a
+checksum=84c29d5d1d417518a9c33e87409dd865fed4cd5ba069b43ff8e030603474e81b
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From b661c2fa0c3f54886dbde7135bb8283118363ebd Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 13/14] ocaml-camlp-streams: rebuild for ocaml-5.0.0.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b..4b7f1bae0887 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From c46bb817b63c2ec92db04fd811b3e1f385db8e75 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 14/14] camlp5: rebuild for ocaml-5.0.0.

---
 srcpkgs/camlp5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
index 62223f806a0f..154fc80c35d7 100644
--- a/srcpkgs/camlp5/template
+++ b/srcpkgs/camlp5/template
@@ -1,7 +1,7 @@
 # Template file for 'camlp5'
 pkgname=camlp5
 version=8.00.04
-revision=1
+revision=2
 build_style=configure
 configure_args="-mandir /usr/share/man"
 hostmakedepends="ocaml perl ocaml-findlib"

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (3 preceding siblings ...)
  2023-03-22 16:48 ` leahneukirchen
@ 2023-06-21  1:56 ` github-actions
  2023-07-05  2:06 ` [PR PATCH] [Closed]: " github-actions
                   ` (40 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: github-actions @ 2023-06-21  1:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1599953411

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Closed]: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (4 preceding siblings ...)
  2023-06-21  1:56 ` github-actions
@ 2023-07-05  2:06 ` github-actions
  2023-07-05 12:24 ` leahneukirchen
                   ` (39 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: github-actions @ 2023-07-05  2:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

There's a closed pull request on the void-packages repository

[WIP] ocaml: update to 5.0.0.
https://github.com/void-linux/void-packages/pull/41227

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [ ] coq
	- [ ] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (5 preceding siblings ...)
  2023-07-05  2:06 ` [PR PATCH] [Closed]: " github-actions
@ 2023-07-05 12:24 ` leahneukirchen
  2023-09-14 18:48 ` kit-ty-kate
                   ` (38 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-07-05 12:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1621653064

Comment:
Waiting for 5.1.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (6 preceding siblings ...)
  2023-07-05 12:24 ` leahneukirchen
@ 2023-09-14 18:48 ` kit-ty-kate
  2023-09-14 19:33 ` [PR REVIEW] " kit-ty-kate
                   ` (37 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-09-14 18:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

New comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1719968844

Comment:
> Waiting for 5.1.

5.1.0 is now released: https://discuss.ocaml.org/t/ocaml-5-1-0-released/13021

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (7 preceding siblings ...)
  2023-09-14 18:48 ` kit-ty-kate
@ 2023-09-14 19:33 ` kit-ty-kate
  2023-09-15 14:32 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (36 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-09-14 19:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

New review comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1326430595

Comment:
```suggestion
makedepends="libzstd-devel"
```

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (8 preceding siblings ...)
  2023-09-14 19:33 ` [PR REVIEW] " kit-ty-kate
@ 2023-09-15 14:32 ` leahneukirchen
  2023-09-15 14:33 ` leahneukirchen
                   ` (35 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-09-15 14:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [x] coq
	- [x] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 21911 bytes --]

From 9a469acdaba204ad9509bbed4ae5e48417b6ca09 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/15] ocaml: update to 5.1.0.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  17 +-
 4 files changed, 6 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8..0000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a2..c6228d6167141 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,21 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.0
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
 make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+short_desc="Main implementation of the Objective Caml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=43a3ac7aab7f8880f2bb6221317be55319b356e517622fdc28359fe943e6a450
 nocross=yes
 
 export ASPP="cc -c"
 
-case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
-esac
-
 post_install() {
 	vlicense LICENSE
 }

From d910126c07f62533c2107237313c16cd556f44cd Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/15] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..d1d921c8061b7 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="libzstd-devel ncurses-devel ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 749c32a81f18c0034e84b1428a89a61eaaced025 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/15] caml-num: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-num/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..adf35962a57e9 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
 version=1.4
-revision=4
+revision=5
 build_style=gnu-makefile
 make_install_target="findlib-install"
 makedepends="ocaml ocaml-findlib"

From a7c145f33dbb9c00cd4d0ed1a4baef1f3dda4c30 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/15] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e698181..dfef566ae3079 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 95e5475ef753401b15bf712ce05f40f2b8828b3f Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/15] ocamlbuild: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocamlbuild/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..558c8adbed355 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,7 +1,7 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
 version=0.14.2
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="ocaml"
 short_desc="OCaml build tool"

From ed8f62f4063af3e5a8b6c0acf3cf4f669dd6e93c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/15] ocaml-stdcompat: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce84..a7251039c3c0f 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From 2731977c2c4cdf9d4f8eea4f31aee211071bc9ae Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/15] opam: rebuild for ocaml-5.1.0.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..7ecafb97295a6 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From b2ef9c1f0080b59948df9737b60afccb79bd87ae Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:39:35 +0100
Subject: [PATCH 08/15] z3: rebuild for ocaml-5.1.0.

---
 srcpkgs/z3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index b33d6522ebe0f..58983afb5f69c 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
 # Template file for 'z3'
 pkgname=z3
 version=4.12.2
-revision=1
+revision=2
 build_style=configure
 configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
 make_build_args="-C build all examples"

From c75e1ae9d8fe74fbebe5ffee48acd230577f5a1c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 09/15] unison: rebuild for ocaml-5.1.0.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f5..df4a21bea6171 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.3
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From 2ede60ed254685a2be02ea39df878694e9543ff3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 10/15] dune: rebuild for ocaml-5.1.0.

---
 srcpkgs/dune/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index 5cb619ac47a3e..f884763859201 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
 # Template file for 'dune'
 pkgname=dune
 version=3.10.0
-revision=1
+revision=2
 makedepends="ocaml"
 depends="ocaml"
 short_desc="Composable build system for OCaml"

From 05e9e806140d898719d600947833f7bcca3eb109 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 11/15] ocaml-camlp-streams: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b6..4b7f1bae08874 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From eb40556cf4e252f05ef47beface543b7f3a9a2e0 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 12/15] camlp5: rebuild for ocaml-5.1.0.

---
 srcpkgs/camlp5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
index 62223f806a0f0..154fc80c35d7a 100644
--- a/srcpkgs/camlp5/template
+++ b/srcpkgs/camlp5/template
@@ -1,7 +1,7 @@
 # Template file for 'camlp5'
 pkgname=camlp5
 version=8.00.04
-revision=1
+revision=2
 build_style=configure
 configure_args="-mandir /usr/share/man"
 hostmakedepends="ocaml perl ocaml-findlib"

From 3a379af7e851364bb28f764af7f651de90d0ddb5 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:24:04 +0200
Subject: [PATCH 13/15] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 154fc80c35d7a..0000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=2
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From 6b4aa5f4299bee180e5c73fa3d0d802015aac64f Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 14/15] coq: rebuild for ocaml-5.1.0.

---
 srcpkgs/coq/template | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..5f0feeedb0e52 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,9 @@
 # Template file for 'coq'
 pkgname=coq
 version=8.18.0
-revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+revision=2
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+makedepends="libzstd-devel"
 depends="ocaml-findlib"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -18,10 +19,6 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib

From a8729e4cd112f8d8cba8165aeeee3dd2552860f0 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 15/15] mathcomp: rebuild for coq-8.18.0_2.

---
 srcpkgs/mathcomp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..30e899ee22977 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
 version=1.17.0
-revision=3
+revision=4
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (9 preceding siblings ...)
  2023-09-15 14:32 ` [PR PATCH] [Updated] " leahneukirchen
@ 2023-09-15 14:33 ` leahneukirchen
  2023-09-15 18:28 ` [PR REVIEW] " kit-ty-kate
                   ` (34 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-09-15 14:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1721382276

Comment:
Coq now builds, other stuff is still broken. :<

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (10 preceding siblings ...)
  2023-09-15 14:33 ` leahneukirchen
@ 2023-09-15 18:28 ` kit-ty-kate
  2023-09-15 18:29 ` kit-ty-kate
                   ` (33 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-09-15 18:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

New review comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1327648168

Comment:
I don’t know void’s package system’s syntax but from the error messages it looks like the library is not kept after installation (this is currently linked dynamically so it should be installed at runtime too)

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (11 preceding siblings ...)
  2023-09-15 18:28 ` [PR REVIEW] " kit-ty-kate
@ 2023-09-15 18:29 ` kit-ty-kate
  2023-09-15 18:29 ` kit-ty-kate
                   ` (32 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-09-15 18:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

New review comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1327649001

Comment:
The language was simply renamed OCaml a long time ago
```suggestion
short_desc="Main implementation of the OCaml language"
```

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (12 preceding siblings ...)
  2023-09-15 18:29 ` kit-ty-kate
@ 2023-09-15 18:29 ` kit-ty-kate
  2023-09-15 20:50 ` leahneukirchen
                   ` (31 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-09-15 18:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

New review comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1327649292

Comment:
```suggestion
```

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (13 preceding siblings ...)
  2023-09-15 18:29 ` kit-ty-kate
@ 2023-09-15 20:50 ` leahneukirchen
  2023-09-15 20:53 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (30 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-09-15 20:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 213 bytes --]

New review comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1327777579

Comment:
The problem is that it's also needed to be linked against.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (14 preceding siblings ...)
  2023-09-15 20:50 ` leahneukirchen
@ 2023-09-15 20:53 ` leahneukirchen
  2023-09-16 10:10 ` [PR REVIEW] " kit-ty-kate
                   ` (29 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-09-15 20:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [x] coq
	- [x] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 21870 bytes --]

From ee9edaeebaf10fd64f2cace6bbda12327f97aaea Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/15] ocaml: update to 5.1.0.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  18 +-
 4 files changed, 7 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8..0000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a2..b609d59620b6a 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,22 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.0
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
 make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=43a3ac7aab7f8880f2bb6221317be55319b356e517622fdc28359fe943e6a450
 nocross=yes
 
 export ASPP="cc -c"
 
-case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
-esac
-
 post_install() {
 	vlicense LICENSE
 }

From 26a6f68da8ef59768d5399a25fd9bc2981268b23 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/15] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..25fbecf81cc54 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 16c95882a839b0726b8556616c57e6c612a932f6 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/15] caml-num: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-num/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..adf35962a57e9 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
 version=1.4
-revision=4
+revision=5
 build_style=gnu-makefile
 make_install_target="findlib-install"
 makedepends="ocaml ocaml-findlib"

From 7b7835eec0ba1b2acbd6b8ae31ab1571389182df Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/15] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e698181..dfef566ae3079 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 9d9867bd3a2d4ecb0abc6d5fde0d08d401f373c9 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/15] ocamlbuild: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocamlbuild/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..558c8adbed355 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,7 +1,7 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
 version=0.14.2
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="ocaml"
 short_desc="OCaml build tool"

From bb43d31f123f13d3c5fc3ced5c4e3ebdfd618478 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/15] ocaml-stdcompat: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce84..a7251039c3c0f 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From 35d810cff2bfc153371077bfe132c7818f9a5713 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/15] opam: rebuild for ocaml-5.1.0.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..7ecafb97295a6 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 756540521fa24785d466f21c645f5ea14cfd1559 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:39:35 +0100
Subject: [PATCH 08/15] z3: rebuild for ocaml-5.1.0.

---
 srcpkgs/z3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index b33d6522ebe0f..58983afb5f69c 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
 # Template file for 'z3'
 pkgname=z3
 version=4.12.2
-revision=1
+revision=2
 build_style=configure
 configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
 make_build_args="-C build all examples"

From f08f667325f8d5de84a5617207ef5dccce4d8bba Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 09/15] unison: rebuild for ocaml-5.1.0.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f5..df4a21bea6171 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.3
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From 1abd988e178ac0718328ea7ecd06806e9b49bd02 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 10/15] dune: rebuild for ocaml-5.1.0.

---
 srcpkgs/dune/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index 5cb619ac47a3e..f884763859201 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
 # Template file for 'dune'
 pkgname=dune
 version=3.10.0
-revision=1
+revision=2
 makedepends="ocaml"
 depends="ocaml"
 short_desc="Composable build system for OCaml"

From 7f7d06093a431571df90866868721303301959ed Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 11/15] ocaml-camlp-streams: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b6..4b7f1bae08874 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 3a70c4151187633656189e6c1ad577e5b47a64cf Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 12/15] camlp5: rebuild for ocaml-5.1.0.

---
 srcpkgs/camlp5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
index 62223f806a0f0..154fc80c35d7a 100644
--- a/srcpkgs/camlp5/template
+++ b/srcpkgs/camlp5/template
@@ -1,7 +1,7 @@
 # Template file for 'camlp5'
 pkgname=camlp5
 version=8.00.04
-revision=1
+revision=2
 build_style=configure
 configure_args="-mandir /usr/share/man"
 hostmakedepends="ocaml perl ocaml-findlib"

From 109513c93effa87facfa1337f1f773b2d8823220 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:24:04 +0200
Subject: [PATCH 13/15] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 154fc80c35d7a..0000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=2
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From 2177beaddc82aa09471463d88be1ddac901f0bb6 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 14/15] coq: rebuild for ocaml-5.1.0.

---
 srcpkgs/coq/template | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0e41741661547 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,8 @@
 # Template file for 'coq'
 pkgname=coq
 version=8.18.0
-revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+revision=2
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -18,10 +18,6 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib

From de2cfde2586b38b246ea9d70b8ee48b39ee03d96 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 15/15] mathcomp: rebuild for coq-8.18.0_2.

---
 srcpkgs/mathcomp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..30e899ee22977 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
 version=1.17.0
-revision=3
+revision=4
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (15 preceding siblings ...)
  2023-09-15 20:53 ` [PR PATCH] [Updated] " leahneukirchen
@ 2023-09-16 10:10 ` kit-ty-kate
  2023-09-16 11:30 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (28 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-09-16 10:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New review comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1327942324

Comment:
YIKES... NEVERMIND https://github.com/ocaml/ocaml/issues/12562#issuecomment-1721589602

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (16 preceding siblings ...)
  2023-09-16 10:10 ` [PR REVIEW] " kit-ty-kate
@ 2023-09-16 11:30 ` leahneukirchen
  2023-09-16 13:52 ` leahneukirchen
                   ` (27 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-09-16 11:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [x] coq
	- [x] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 22014 bytes --]

From 2b89a9242405e3035cbddc5a0d68325d48f0f13b Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/15] ocaml: update to 5.1.0.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8..0000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a2..fd494a5a3cba9 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.0
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=43a3ac7aab7f8880f2bb6221317be55319b356e517622fdc28359fe943e6a450
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From 0b0cd2fb65f54032001a33059cf91138ac9a1e49 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/15] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..25fbecf81cc54 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 955372d7f4c1af515eeaf6574123fd5324f76ee4 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/15] caml-num: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-num/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..adf35962a57e9 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
 version=1.4
-revision=4
+revision=5
 build_style=gnu-makefile
 make_install_target="findlib-install"
 makedepends="ocaml ocaml-findlib"

From c7d3c3ea29c7a8eeeb11309a17789969665724b3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/15] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e698181..dfef566ae3079 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From c4a3e897dbf4eefb4f87e175198541dd89219c05 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/15] ocamlbuild: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocamlbuild/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..558c8adbed355 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,7 +1,7 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
 version=0.14.2
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="ocaml"
 short_desc="OCaml build tool"

From d70ea8cbed5b50b7aa9c587c2d7e0d31ed3881c2 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/15] ocaml-stdcompat: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce84..a7251039c3c0f 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From 38b6ea019e45bb6a1f8c742aa9f45f9a1661ad50 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/15] opam: rebuild for ocaml-5.1.0.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..7ecafb97295a6 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 4158de5f510babaf4d34954bf056333d18cc96f1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:39:35 +0100
Subject: [PATCH 08/15] z3: rebuild for ocaml-5.1.0.

---
 srcpkgs/z3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index b33d6522ebe0f..58983afb5f69c 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
 # Template file for 'z3'
 pkgname=z3
 version=4.12.2
-revision=1
+revision=2
 build_style=configure
 configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
 make_build_args="-C build all examples"

From bedf4c8a1b3c6343d5bf46a9bb7d242e843699cc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 09/15] unison: rebuild for ocaml-5.1.0.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f5..df4a21bea6171 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.3
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From c6cd2ef801fe2a0d02c63411353477b558597538 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 10/15] dune: rebuild for ocaml-5.1.0.

---
 srcpkgs/dune/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index 5cb619ac47a3e..f884763859201 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
 # Template file for 'dune'
 pkgname=dune
 version=3.10.0
-revision=1
+revision=2
 makedepends="ocaml"
 depends="ocaml"
 short_desc="Composable build system for OCaml"

From c3f1ad71327f697f6b4c4e8d1815d2c21619fe9e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 11/15] ocaml-camlp-streams: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b6..4b7f1bae08874 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 9dfa3986e51d33cc9675f52be20c0dd80f5797a1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 12/15] camlp5: rebuild for ocaml-5.1.0.

---
 srcpkgs/camlp5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
index 62223f806a0f0..154fc80c35d7a 100644
--- a/srcpkgs/camlp5/template
+++ b/srcpkgs/camlp5/template
@@ -1,7 +1,7 @@
 # Template file for 'camlp5'
 pkgname=camlp5
 version=8.00.04
-revision=1
+revision=2
 build_style=configure
 configure_args="-mandir /usr/share/man"
 hostmakedepends="ocaml perl ocaml-findlib"

From cd6e24d58b0dda4a8c0071e6c434ed05cdab963e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:24:04 +0200
Subject: [PATCH 13/15] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 154fc80c35d7a..0000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=2
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From e1c02ca28cfd7b09e51a490ba06f1bcc9ed5361a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 14/15] coq: rebuild for ocaml-5.1.0.

---
 srcpkgs/coq/template | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0e41741661547 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,8 @@
 # Template file for 'coq'
 pkgname=coq
 version=8.18.0
-revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+revision=2
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -18,10 +18,6 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib

From 0e3749a802f7cbe40921c4ca02fd8ec02921f05a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 15/15] mathcomp: rebuild for coq-8.18.0_2.

---
 srcpkgs/mathcomp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..30e899ee22977 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
 version=1.17.0
-revision=3
+revision=4
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (17 preceding siblings ...)
  2023-09-16 11:30 ` [PR PATCH] [Updated] " leahneukirchen
@ 2023-09-16 13:52 ` leahneukirchen
  2023-12-05 13:02 ` [PR REVIEW] " kit-ty-kate
                   ` (26 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2023-09-16 13:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [ ] supermin
- [ ] coccinelle
- [x] coq
	- [x] mathcomp
- [ ] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 23969 bytes --]

From 2b89a9242405e3035cbddc5a0d68325d48f0f13b Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/17] ocaml: update to 5.1.0.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8..0000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185..0000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a2..fd494a5a3cba9 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.0
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=43a3ac7aab7f8880f2bb6221317be55319b356e517622fdc28359fe943e6a450
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From 0b0cd2fb65f54032001a33059cf91138ac9a1e49 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/17] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..25fbecf81cc54 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 955372d7f4c1af515eeaf6574123fd5324f76ee4 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/17] caml-num: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-num/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..adf35962a57e9 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
 version=1.4
-revision=4
+revision=5
 build_style=gnu-makefile
 make_install_target="findlib-install"
 makedepends="ocaml ocaml-findlib"

From c7d3c3ea29c7a8eeeb11309a17789969665724b3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/17] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e698181..dfef566ae3079 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From c4a3e897dbf4eefb4f87e175198541dd89219c05 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/17] ocamlbuild: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocamlbuild/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..558c8adbed355 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,7 +1,7 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
 version=0.14.2
-revision=1
+revision=2
 build_style=gnu-makefile
 hostmakedepends="ocaml"
 short_desc="OCaml build tool"

From d70ea8cbed5b50b7aa9c587c2d7e0d31ed3881c2 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/17] ocaml-stdcompat: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce84..a7251039c3c0f 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From 38b6ea019e45bb6a1f8c742aa9f45f9a1661ad50 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/17] opam: rebuild for ocaml-5.1.0.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..7ecafb97295a6 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 4158de5f510babaf4d34954bf056333d18cc96f1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:39:35 +0100
Subject: [PATCH 08/17] z3: rebuild for ocaml-5.1.0.

---
 srcpkgs/z3/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index b33d6522ebe0f..58983afb5f69c 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
 # Template file for 'z3'
 pkgname=z3
 version=4.12.2
-revision=1
+revision=2
 build_style=configure
 configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
 make_build_args="-C build all examples"

From bedf4c8a1b3c6343d5bf46a9bb7d242e843699cc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 09/17] unison: rebuild for ocaml-5.1.0.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f5..df4a21bea6171 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.3
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From c6cd2ef801fe2a0d02c63411353477b558597538 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 10/17] dune: rebuild for ocaml-5.1.0.

---
 srcpkgs/dune/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index 5cb619ac47a3e..f884763859201 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
 # Template file for 'dune'
 pkgname=dune
 version=3.10.0
-revision=1
+revision=2
 makedepends="ocaml"
 depends="ocaml"
 short_desc="Composable build system for OCaml"

From c3f1ad71327f697f6b4c4e8d1815d2c21619fe9e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 11/17] ocaml-camlp-streams: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b6..4b7f1bae08874 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 9dfa3986e51d33cc9675f52be20c0dd80f5797a1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 12/17] camlp5: rebuild for ocaml-5.1.0.

---
 srcpkgs/camlp5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
index 62223f806a0f0..154fc80c35d7a 100644
--- a/srcpkgs/camlp5/template
+++ b/srcpkgs/camlp5/template
@@ -1,7 +1,7 @@
 # Template file for 'camlp5'
 pkgname=camlp5
 version=8.00.04
-revision=1
+revision=2
 build_style=configure
 configure_args="-mandir /usr/share/man"
 hostmakedepends="ocaml perl ocaml-findlib"

From cd6e24d58b0dda4a8c0071e6c434ed05cdab963e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:24:04 +0200
Subject: [PATCH 13/17] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 154fc80c35d7a..0000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=2
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From e1c02ca28cfd7b09e51a490ba06f1bcc9ed5361a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 14/17] coq: rebuild for ocaml-5.1.0.

---
 srcpkgs/coq/template | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0e41741661547 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,8 @@
 # Template file for 'coq'
 pkgname=coq
 version=8.18.0
-revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+revision=2
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
@@ -18,10 +18,6 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib

From 0e3749a802f7cbe40921c4ca02fd8ec02921f05a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 15/17] mathcomp: rebuild for coq-8.18.0_2.

---
 srcpkgs/mathcomp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..30e899ee22977 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
 version=1.17.0
-revision=3
+revision=4
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"

From 6764b52b8e50ef664682f436110ff8d076f46308 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:51:57 +0200
Subject: [PATCH 16/17] ocamlbuild: support bytecode-only.

---
 srcpkgs/ocamlbuild/template | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 558c8adbed355..3aa82504b3656 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -13,3 +13,7 @@ checksum=62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1
 nocross=yes
 
 export CHECK_IF_PREINSTALLED=false
+
+pre_build() {
+	command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}

From f9d248be8d87997c5855a054ef9cf7554f1f4682 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:52:06 +0200
Subject: [PATCH 17/17] ocaml-findlib: support bytecode-only.

---
 srcpkgs/ocaml-findlib/template | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index 25fbecf81cc54..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -4,7 +4,6 @@ version=1.9.6
 revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
-make_build_args="all opt"
 makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -16,9 +15,18 @@ nocross=yes
 nopie=yes
 disable_parallel_build=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+	*) make_build_target="all";;
+esac
+
+
 do_install() {
 	make prefix="$DESTDIR" install
-	vbin src/findlib/ocamlfind_opt
+	if [ -f src/findlib/ocamlfind_opt ]; then
+		vbin src/findlib/ocamlfind_opt
+	fi
 	vlicense LICENSE
 
 	rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (19 preceding siblings ...)
  2023-12-05 13:02 ` [PR REVIEW] " kit-ty-kate
@ 2023-12-05 13:02 ` kit-ty-kate
  2024-01-30  8:17 ` MIvanchev
                   ` (24 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-12-05 13:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]

New review comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1415571112

Comment:
```suggestion
version=5.1.1_rc1
```

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR REVIEW] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (18 preceding siblings ...)
  2023-09-16 13:52 ` leahneukirchen
@ 2023-12-05 13:02 ` kit-ty-kate
  2023-12-05 13:02 ` kit-ty-kate
                   ` (25 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2023-12-05 13:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

New review comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#discussion_r1415572224

Comment:
```suggestion
distfiles="https://github.com/ocaml/ocaml/archive/${version/_/-}.tar.gz"
```

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (20 preceding siblings ...)
  2023-12-05 13:02 ` kit-ty-kate
@ 2024-01-30  8:17 ` MIvanchev
  2024-01-30  8:18 ` MIvanchev
                   ` (23 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-01-30  8:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1916293860

Comment:
Hey, I was working on this in parallel because I wasn't aware of this MR, why did the i686 job fail? I got it to run OK with `make world`. I was trying to get Haxe to build (would be a long process) and noticed other distros provide 2 packages: ocaml and ocaml-compiler-libs (see https://gitlab.archlinux.org/archlinux/packaging/packages/ocaml/-/blob/main/PKGBUILD?ref_type=heads for Arch). Maybe we should do the same?

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (21 preceding siblings ...)
  2024-01-30  8:17 ` MIvanchev
@ 2024-01-30  8:18 ` MIvanchev
  2024-01-30 13:05 ` kit-ty-kate
                   ` (22 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-01-30  8:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1916293860

Comment:
Hey, I was working on this in parallel because I wasn't aware of this MR, why did the i686 job fail? I got it to run OK with `make world`. I was trying to get Haxe to build (would be a long process) and noticed other distros provide 2 packages: ocaml and ocaml-compiler-libs (see https://gitlab.archlinux.org/archlinux/packaging/packages/ocaml/-/blob/main/PKGBUILD?ref_type=heads for Arch). Maybe we should do the same? This is relevant because I got an error about missing compiler libs while trying stuff out.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (22 preceding siblings ...)
  2024-01-30  8:18 ` MIvanchev
@ 2024-01-30 13:05 ` kit-ty-kate
  2024-01-30 13:12 ` MIvanchev
                   ` (21 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2024-01-30 13:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

New comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1916804469

Comment:
> why did the i686 job fail?

I don't remember the exact error but based on experience this is surely linked to the fact that OCaml >= 5.0 dropped support for native (bytecode still works) compilation on x86_32 and arm32 (ocamlc is still present, but ocamlopt is not)

> This is relevant because I got an error about missing compiler libs while trying stuff out.

Which architecture was this on? This is pretty weird because `make install` is supposed to install compiler-libs unconditionally.



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (23 preceding siblings ...)
  2024-01-30 13:05 ` kit-ty-kate
@ 2024-01-30 13:12 ` MIvanchev
  2024-01-30 13:19 ` kit-ty-kate
                   ` (20 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-01-30 13:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 953 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1916818372

Comment:
> I don't remember the exact error but based on experience this is surely linked to the fact that OCaml >= 5.0 dropped support for native (bytecode still works) compilation on x86_32 and arm32 (ocamlc is still present, but ocamlopt is not)

No, maybe it was something transient, the job should work now: https://github.com/void-linux/void-packages/actions/runs/7703464808/job/20993902940?pr=48430, maybe just re-run it.

> Which architecture was this on? This is pretty weird because `make install` is supposed to install compiler-libs unconditionally.

Hmm yeah, you are right, my job generated them:
https://github.com/void-linux/void-packages/actions/runs/7703464808/job/20993902799?pr=48430

I guess it wasn't the case previously or other distros just prefer separate packages for easier updates.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (24 preceding siblings ...)
  2024-01-30 13:12 ` MIvanchev
@ 2024-01-30 13:19 ` kit-ty-kate
  2024-01-30 13:29 ` leahneukirchen
                   ` (19 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2024-01-30 13:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

New comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1916833083

Comment:
> I guess it wasn't the case previously or other distros just prefer separate packages for easier updates.

This is the case since OCaml 4.00.0 apparently (released in 2012) so I'm guessing this is from a time before that.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (25 preceding siblings ...)
  2024-01-30 13:19 ` kit-ty-kate
@ 2024-01-30 13:29 ` leahneukirchen
  2024-01-30 16:50 ` MIvanchev
                   ` (18 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-01-30 13:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 285 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1916852100

Comment:
The main blocker for this are packages which don't build on Ocaml 5.  You could help check the list and see if there are upstream fixes.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (26 preceding siblings ...)
  2024-01-30 13:29 ` leahneukirchen
@ 2024-01-30 16:50 ` MIvanchev
  2024-01-31 19:02 ` MIvanchev
                   ` (17 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-01-30 16:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1917472234

Comment:
> The main blocker for this are packages which don't build on Ocaml 5. You could help check the list and see if there are upstream fixes.

Good idea, let me just reopen my MR because of the convenience of CI :))

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (27 preceding siblings ...)
  2024-01-30 16:50 ` MIvanchev
@ 2024-01-31 19:02 ` MIvanchev
  2024-02-06 12:02 ` MIvanchev
                   ` (16 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-01-31 19:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1919746818

Comment:
Something bizarre is happening: when installed as dependency, `ocamlfind query <something>` reports `cannot find file 'query'` on i686. Prior to the installation it works if invoked through `${DESTDIR}/usr/bin/ocamlfind query <something>`. Investigating...

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (28 preceding siblings ...)
  2024-01-31 19:02 ` MIvanchev
@ 2024-02-06 12:02 ` MIvanchev
  2024-02-06 12:03 ` MIvanchev
                   ` (15 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-02-06 12:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1929374972

Comment:
Just want to report I managed to get everything to build so you might copy the changes from my branch and inspect the results. Some info:

* OCaml 5 doesn't have a native code compiler for 32 bit systems, the patches mainly deal with that
* Our COQ checks are not testing according to the devs, see https://github.com/coq/coq/issues/18613. If we do the real unit tests, we might not need the patch I provided to disable coqide builds
* Z3 installs a SO file in /usr/lib/stubfiles, might need to be moved

Maybe someone else can address these because I'm a  bit exhausted :smile: 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (29 preceding siblings ...)
  2024-02-06 12:02 ` MIvanchev
@ 2024-02-06 12:03 ` MIvanchev
  2024-02-06 12:05 ` MIvanchev
                   ` (14 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-02-06 12:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1929374972

Comment:
Just want to report I managed to get everything to build so you might copy the changes from my branch and inspect the results. Some info:

* OCaml 5 doesn't have a native code compiler for 32 bit systems, the patches mainly deal with that
* Our COQ checks are not testing according to the devs, see https://github.com/coq/coq/issues/18613. If we do the real unit tests, we might not need the patch I provided to disable coqide builds
* Z3 installs a SO file in /usr/lib/stubfiles, might need to be moved

Maybe someone else can address the remaining tasks because I'm a  bit exhausted :smile: 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (30 preceding siblings ...)
  2024-02-06 12:03 ` MIvanchev
@ 2024-02-06 12:05 ` MIvanchev
  2024-02-22 22:22 ` leahneukirchen
                   ` (13 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-02-06 12:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1929374972

Comment:
Just want to report I managed to get everything to build so you might copy the changes from [my branch](https://github.com/void-linux/void-packages/pull/48430) and inspect the results. Some info:

* OCaml 5 doesn't have a native code compiler for 32 bit systems, the patches mainly deal with that
* Our COQ checks are not testing according to the devs, see https://github.com/coq/coq/issues/18613. If we do the real unit tests, we might not need the patch I provided to disable coqide builds
* Z3 installs a SO file in /usr/lib/stubfiles, might need to be moved

Maybe someone else can address the remaining tasks because I'm a  bit exhausted :smile: 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (31 preceding siblings ...)
  2024-02-06 12:05 ` MIvanchev
@ 2024-02-22 22:22 ` leahneukirchen
  2024-02-22 22:26 ` kit-ty-kate
                   ` (12 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-22 22:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1960426067

Comment:
Note to self: supermin 5.3.4 should work, xen should work, coccinelle can
be updated to a snapshot, 0install I'd remove unless someone finds a patch
(cc @mobinmob).


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (32 preceding siblings ...)
  2024-02-22 22:22 ` leahneukirchen
@ 2024-02-22 22:26 ` kit-ty-kate
  2024-02-24  0:21 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (11 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: kit-ty-kate @ 2024-02-22 22:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 273 bytes --]

New comment by kit-ty-kate on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1960430433

Comment:
> 0install I'd remove unless someone finds a patch

what is the failure with 0install? It works in opam (even with OCaml 5.2)

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.0.0.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (33 preceding siblings ...)
  2024-02-22 22:26 ` kit-ty-kate
@ 2024-02-24  0:21 ` leahneukirchen
  2024-02-24  0:32 ` [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1 leahneukirchen
                   ` (10 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-24  0:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.0.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [x] supermin
- [x] coccinelle
- [x] coq
	- [x] mathcomp
- [x] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 31759 bytes --]

From 32c3df4164fa36d1a438dc36d93a1ebfd4a99806 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/20] ocaml: update to 5.1.0.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8c..00000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a22..585bca3f1cae35 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.1
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From c3b935f72e7cca4ceaf583ca0cd8c61e832d9e50 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/20] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..25fbecf81cc54a 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 281ea43ba6d9e8da0db2dfb1c574c1707e9d53b1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/20] ocaml-num: update to 1.5.

---
 srcpkgs/ocaml-num/template | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..a5cc9d4062c0a0 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,23 +1,21 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
-version=1.4
-revision=4
-build_style=gnu-makefile
-make_install_target="findlib-install"
-makedepends="ocaml ocaml-findlib"
+version=1.5
+revision=1
+makedepends="ocaml dune"
 short_desc="OCaml legacy Num library for arbitrary-precision integers"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="custom: LGPL-2.1-only with OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/num"
 distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
-checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
+checksum=7ae07c8f5601e2dfc5008a62dcaf2719912ae596a19365c5d7bdf2230515959a
 nocross=yes
 
-pre_install() {
-	export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
-	vmkdir /usr/lib/ocaml/stublibs
+do_build() {    
+	dune build --display=short
 }
-
-post_install() {
+do_install() {
+	dune install --prefix=/usr --destdir="$DESTDIR" \
+		--libdir=/usr/lib/ocaml --docdir=/usr/share/doc
 	vlicense LICENSE
 }

From a02a6f98c5dc9e27b7845ee98e8adcaab774641d Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/20] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e6981810..dfef566ae3079a 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 48d00197065ef17ea87219cc1d89bc3582738c55 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/20] ocamlbuild: update to 0.14.3.

Support bytecode-only.
---
 srcpkgs/ocamlbuild/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..2cb928255b9c7a 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,6 +1,6 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
-version=0.14.2
+version=0.14.3
 revision=1
 build_style=gnu-makefile
 hostmakedepends="ocaml"
@@ -9,7 +9,11 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only"
 homepage="https://github.com/ocaml/ocamlbuild"
 distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1
+checksum=ce151bfd2141abc6ee0b3f25ba609e989ff564a48bf795d6fa7138a4db0fc2e1
 nocross=yes
 
 export CHECK_IF_PREINSTALLED=false
+
+pre_build() {
+	command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}

From 46006b461445c821c55298ca4370a08bc201a118 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/20] ocaml-stdcompat: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..a7251039c3c0fb 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From c8cd7a7045b8cbd254a04f89149234bd94607b6e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/20] opam: rebuild for ocaml-5.1.0.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..7ecafb97295a6d 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 4cabc63ecb046af7749cb1d5f6f0578a7ff2a431 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 08/20] unison: rebuild for ocaml-5.1.0.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..2172ee262a4dd2 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.4
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From 96d0ae3b0a9f178b33853a5f392b1a80d38a94fa Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 09/20] dune: update to 3.14.0.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..86b4943fc66720 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.13.0
+version=3.14.0
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -10,7 +10,7 @@ license="MIT"
 homepage="https://dune.build/"
 changelog="https://raw.githubusercontent.com/ocaml/dune/main/CHANGES.md"
 distfiles="https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz"
-checksum=f1801257e01c846bd71017ec5d4b2b75fd31b20a0d5979b933b37cc8453678de
+checksum=f4d09d89162621fdff424c253fa50c4920d2179fb5b3d1debab7bbe97c68b2fc
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From 1853376cf3165e98107fa3ca3d6f41d0ef6be7db Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 10/20] ocaml-camlp-streams: rebuild for ocaml-5.1.0.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b69..4b7f1bae08874a 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From cc3a1eebe863c3e4dc730f95e79e873aa46b85b1 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 11/20] camlp5: rebuild for ocaml-5.1.0.

---
 srcpkgs/camlp5/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
index 62223f806a0f02..154fc80c35d7a5 100644
--- a/srcpkgs/camlp5/template
+++ b/srcpkgs/camlp5/template
@@ -1,7 +1,7 @@
 # Template file for 'camlp5'
 pkgname=camlp5
 version=8.00.04
-revision=1
+revision=2
 build_style=configure
 configure_args="-mandir /usr/share/man"
 hostmakedepends="ocaml perl ocaml-findlib"

From 370fd3bd3204fa57f5c8f1094e6080afa4b0b74f Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:24:04 +0200
Subject: [PATCH 12/20] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 154fc80c35d7a5..00000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=2
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307ba..00000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From 4d76866ffb050aef340ebd4c8994ab2ec9dca999 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 13/20] coq: update to 8.19.0.

---
 srcpkgs/coq/template | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..9ceb3b7d20df00 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,35 @@
 # Template file for 'coq'
 pkgname=coq
-version=8.18.0
+version=8.19.0
 revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
+checkdepends="python3 rsync time"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.1-only"
 homepage="https://coq.inria.fr"
 distfiles="https://github.com/coq/coq/archive/V${version}.tar.gz"
-checksum=00a18c796a6e154a1f1bac7e1aef9e14107e0295fa4e0a18f10cdea6fc2e840b
+checksum=17e5c10fadcd3cda7509d822099a892fcd003485272b56a45abd30390f6a426f
 nopie=yes
 nocross=yes
+make_check=ci-skip  # takes long and has some faults
 
 case "$XBPS_TARGET_MACHINE" in
 	ppc64*) ;;
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
-	dune build --display=short -p coq-core,coq-stdlib
+	dune build --display=short -p coq-core,coq-stdlib,coqide-server
 }
 
 do_install() {
 	dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
 		--mandir=/usr/share/man --docdir=/usr/share/doc
 }
+
+do_check() {
+	make -C test-suite UNIT_TESTS= || make -C test-suite report PRINT_LOGS=1
+}

From c0e53d5260e84b9ff9634f1837d6995796090d6b Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 14/20] mathcomp: update to 1.19.0.

---
 srcpkgs/mathcomp/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..a3dd0e98b55d48 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
-version=1.17.0
-revision=3
+version=1.19.0
+revision=1
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CECILL-B"
 homepage="https://github.com/math-comp/math-comp"
 distfiles="https://github.com/math-comp/math-comp/archive/${pkgname}-${version}.tar.gz"
-checksum=1779bcdac5d23d90997627364a5943ef4883c6eb54d67ddbb1dfbe6b7795a188
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
 nocross="ocaml"
 
 post_patch() {

From 1650026fc2da961cfcb8b2f448dd8aee44df3cbd Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:52:06 +0200
Subject: [PATCH 15/20] ocaml-findlib: support bytecode-only.

---
 srcpkgs/ocaml-findlib/template | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index 25fbecf81cc54a..b1bf955df669eb 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -4,7 +4,6 @@ version=1.9.6
 revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
-make_build_args="all opt"
 makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -16,9 +15,18 @@ nocross=yes
 nopie=yes
 disable_parallel_build=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+	*) make_build_target="all";;
+esac
+
+
 do_install() {
 	make prefix="$DESTDIR" install
-	vbin src/findlib/ocamlfind_opt
+	if [ -f src/findlib/ocamlfind_opt ]; then
+		vbin src/findlib/ocamlfind_opt
+	fi
 	vlicense LICENSE
 
 	rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild

From 8873db54bcfb65522caca3f8aa1a0218bc622c5b Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:41:42 +0100
Subject: [PATCH 16/20] supermin: update to 5.3.4.

---
 srcpkgs/supermin/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..f22f477dacf7e3 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,8 +1,8 @@
 # Template file for 'supermin'
 pkgname=supermin
-version=5.2.2
-revision=2
-_release_series=5.2-stable
+version=5.3.4
+revision=1
+_release_series=5.3-development
 build_style=gnu-configure
 hostmakedepends="ocaml ocaml-findlib pkg-config e2fsprogs cpio perl"
 makedepends="e2fsprogs-devel"
@@ -12,5 +12,5 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-2.0-or-later"
 homepage="http://people.redhat.com/~rjones/supermin/"
 distfiles="http://download.libguestfs.org/supermin/${_release_series}/supermin-${version}.tar.gz"
-checksum=ce3921d3635c8168cfb7ca0c5a82b9d5cef5b2b271f84b776d63b8bbbeec358e
+checksum=cc0322991bea1fcc6355518474b39e2d4a341f1e2c36fd98f14c3446ef79ff70
 nocross=yes

From d83ea51cee9239be27dbf71246559630c501d438 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:45:41 +0100
Subject: [PATCH 17/20] coccinelle: update to 1.1.1p20240218.

No upstream release in over two years, needed for OCaml 5 support.
---
 srcpkgs/coccinelle/template | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/coccinelle/template b/srcpkgs/coccinelle/template
index 20faebd1e0a4f7..82a2e25868e737 100644
--- a/srcpkgs/coccinelle/template
+++ b/srcpkgs/coccinelle/template
@@ -1,7 +1,8 @@
 # Template file for 'coccinelle'
 pkgname=coccinelle
-version=1.1.1
+version=1.1.1p20240218
 revision=1
+_gitrev=68c580f1f1abf9979d591371e5b2e474f97dac90
 build_style=gnu-configure
 configure_args="--without-pdflatex --enable-release --enable-opt
  --with-python=/usr/bin/python3"
@@ -12,8 +13,8 @@ short_desc="Program matching and transformation engine"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-only"
 homepage="https://coccinelle.gitlabpages.inria.fr/website/"
-distfiles="https://github.com/coccinelle/coccinelle/archive/refs/tags/$version.tar.gz"
-checksum=095919e129ac563586d880ebbc5aac829fec224177090aebe34dc34ed5f142bf
+distfiles="https://github.com/coccinelle/coccinelle/archive/${_gitrev}.tar.gz"
+checksum=bdda73a6827d1c2e5f85bafa25a0d03810298c0653ebd40a1eceaf6ca2cd72c0
 disable_parallel_build=yes
 nocross=yes
 

From 5eaa233370d867e027d0db4895516bed3fc1bda3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 16:25:59 +0100
Subject: [PATCH 18/20] xen: rebuild for ocaml-5.1.1.

---
 srcpkgs/xen/patches/ocaml-5.patch | 28 ++++++++++++++++++++++++++++
 srcpkgs/xen/template              |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xen/patches/ocaml-5.patch

diff --git a/srcpkgs/xen/patches/ocaml-5.patch b/srcpkgs/xen/patches/ocaml-5.patch
new file mode 100644
index 00000000000000..9b590de12286b2
--- /dev/null
+++ b/srcpkgs/xen/patches/ocaml-5.patch
@@ -0,0 +1,28 @@
+X-Git-Url: https://xenbits.xen.org/gitweb/?p=xen.git;a=blobdiff_plain;f=tools%2Focaml%2Flibs%2FMakefile;h=89350aa12fdc6dbf0fe461bf7e4644cbb16b8462;hp=5146c524846083f343b5d4c5c2ccbb060dc94a67;hb=e51d31f79edc10f8d622e7f5bf4b935af6d4618f;hpb=bf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
+
+Remove broken libs (like upstream later).
+
+--- xen-4.14.1/tools/ocaml/libs/Makefile
++++ xen-4.14.1/tools/ocaml/libs/Makefile
+@@ -3,9 +3,8 @@
+ 
+ SUBDIRS= \
+ 	mmap \
+-	xentoollog \
+ 	xc eventchn \
+-	xb xs xl
++	xb xs
+ 
+ .PHONY: all
+ all: subdirs-all
+--- xen-4.14.1/tools/ocaml/xenstored/disk.ml
++++ xen-4.14.1/tools/ocaml/xenstored/disk.ml
+@@ -30,7 +30,7 @@
+ 	| _          -> raise (Failure "undecify")
+ 
+ let unhex c =
+-	let c = Char.lowercase c in
++	let c = Char.lowercase_ascii c in
+ 	match c with
+ 	| '0' .. '9' -> (Char.code c) - (Char.code '0')
+ 	| 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10
diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template
index 011d1704fcd8cb..52ae2f85c33e33 100644
--- a/srcpkgs/xen/template
+++ b/srcpkgs/xen/template
@@ -1,7 +1,7 @@
 # Template file for 'xen'
 pkgname=xen
 version=4.14.1
-revision=10
+revision=11
 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
 _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
 # TODO: arm / aarch64

From 002aa4e4f6b53aef38931a5f61732d9caf6ad935 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:20:46 +0100
Subject: [PATCH 19/20] ocaml-findlib: don't strip bytecode.

---
 srcpkgs/ocaml-findlib/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index b1bf955df669eb..e57252cac779a8 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -16,9 +16,12 @@ nopie=yes
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	# native code platforms
-	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
-	*) make_build_target="all";;
+# native code platforms
+x86_64*|aarch64*|riscv64*)
+	make_build_args="all opt";;
+*)
+	nostrip=yes  # breaks bytecode!
+	make_build_target="all";;
 esac
 
 

From 03a7829f95717e229c3e2ad6f7a8ca61b0536c4a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:21:05 +0100
Subject: [PATCH 20/20] coq: fix build with bytecode.

---
 srcpkgs/coq/template | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 9ceb3b7d20df00..c47b173155eaa6 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -20,6 +20,13 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
+do_patch() {
+	if ! command -v ocamlc.opt >/dev/null/; then
+		# see coq/coq#18609
+		vsed -i -e 's/dep ^ ".cmxs"/dep ^ ".cma"/' tools/dune_rule_gen/coq_rules.ml
+	fi
+}
+
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib,coqide-server

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (34 preceding siblings ...)
  2024-02-24  0:21 ` [PR PATCH] [Updated] " leahneukirchen
@ 2024-02-24  0:32 ` leahneukirchen
  2024-02-24  8:20 ` MIvanchev
                   ` (9 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-24  0:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.1.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [x] supermin
- [x] coccinelle
- [x] coq
	- [x] mathcomp
- [x] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 31091 bytes --]

From 2edc81d825867466d8d0803d64aa9e9b0ed5823c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/19] ocaml: update to 5.1.1.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8c..00000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a22..585bca3f1cae35 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.1
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From 659bb61eb12a54b79a68737a9f867315f531373f Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/19] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..25fbecf81cc54a 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 679b14a4d3cc2ce79a54b2cae31b1e755b6acf6a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/19] ocaml-num: update to 1.5.

---
 srcpkgs/ocaml-num/template | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..a5cc9d4062c0a0 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,23 +1,21 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
-version=1.4
-revision=4
-build_style=gnu-makefile
-make_install_target="findlib-install"
-makedepends="ocaml ocaml-findlib"
+version=1.5
+revision=1
+makedepends="ocaml dune"
 short_desc="OCaml legacy Num library for arbitrary-precision integers"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="custom: LGPL-2.1-only with OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/num"
 distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
-checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
+checksum=7ae07c8f5601e2dfc5008a62dcaf2719912ae596a19365c5d7bdf2230515959a
 nocross=yes
 
-pre_install() {
-	export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
-	vmkdir /usr/lib/ocaml/stublibs
+do_build() {    
+	dune build --display=short
 }
-
-post_install() {
+do_install() {
+	dune install --prefix=/usr --destdir="$DESTDIR" \
+		--libdir=/usr/lib/ocaml --docdir=/usr/share/doc
 	vlicense LICENSE
 }

From 2d91a855624beabf798e1008b6b47fefcce95d54 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/19] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e6981810..dfef566ae3079a 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 8d77e3ee443d9868132b952418c1c0766c8d45a6 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/19] ocamlbuild: update to 0.14.3.

Support bytecode-only.
---
 srcpkgs/ocamlbuild/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..2cb928255b9c7a 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,6 +1,6 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
-version=0.14.2
+version=0.14.3
 revision=1
 build_style=gnu-makefile
 hostmakedepends="ocaml"
@@ -9,7 +9,11 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only"
 homepage="https://github.com/ocaml/ocamlbuild"
 distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1
+checksum=ce151bfd2141abc6ee0b3f25ba609e989ff564a48bf795d6fa7138a4db0fc2e1
 nocross=yes
 
 export CHECK_IF_PREINSTALLED=false
+
+pre_build() {
+	command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}

From 4c262250ed5f95a82b512e12ca592f3b7a734737 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/19] ocaml-stdcompat: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-stdcompat/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..a7251039c3c0fb 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"

From f7b75b59a2b36f4ddc16737ac9283763c6f4492f Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/19] opam: rebuild for ocaml-5.1.1.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..7ecafb97295a6d 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From f128b4fe3ce26f25f629b555f24f7c4c164be852 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 08/19] unison: rebuild for ocaml-5.1.1.

---
 srcpkgs/unison/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..2172ee262a4dd2 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.4
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"

From 1182d62732bde156d1694de33f5c6a21fb6e043c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 09/19] dune: update to 3.14.0.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..86b4943fc66720 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.13.0
+version=3.14.0
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -10,7 +10,7 @@ license="MIT"
 homepage="https://dune.build/"
 changelog="https://raw.githubusercontent.com/ocaml/dune/main/CHANGES.md"
 distfiles="https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz"
-checksum=f1801257e01c846bd71017ec5d4b2b75fd31b20a0d5979b933b37cc8453678de
+checksum=f4d09d89162621fdff424c253fa50c4920d2179fb5b3d1debab7bbe97c68b2fc
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From f442707279ed1626a6bd9fdb0aee0facd1cf43df Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 10/19] ocaml-camlp-streams: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b69..4b7f1bae08874a 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 1aab9a38ed029e30b5a181a853fef608f479d839 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 11/19] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f02..00000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=1
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307ba..00000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From 29f2b816cddb77624ddecc5a885a15343f3d0b18 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 12/19] coq: update to 8.19.0.

---
 srcpkgs/coq/template | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..9ceb3b7d20df00 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,35 @@
 # Template file for 'coq'
 pkgname=coq
-version=8.18.0
+version=8.19.0
 revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
+checkdepends="python3 rsync time"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.1-only"
 homepage="https://coq.inria.fr"
 distfiles="https://github.com/coq/coq/archive/V${version}.tar.gz"
-checksum=00a18c796a6e154a1f1bac7e1aef9e14107e0295fa4e0a18f10cdea6fc2e840b
+checksum=17e5c10fadcd3cda7509d822099a892fcd003485272b56a45abd30390f6a426f
 nopie=yes
 nocross=yes
+make_check=ci-skip  # takes long and has some faults
 
 case "$XBPS_TARGET_MACHINE" in
 	ppc64*) ;;
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
-	dune build --display=short -p coq-core,coq-stdlib
+	dune build --display=short -p coq-core,coq-stdlib,coqide-server
 }
 
 do_install() {
 	dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
 		--mandir=/usr/share/man --docdir=/usr/share/doc
 }
+
+do_check() {
+	make -C test-suite UNIT_TESTS= || make -C test-suite report PRINT_LOGS=1
+}

From e428133171188ce608a5e2231c7079bd579dd821 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 13/19] mathcomp: update to 1.19.0.

---
 srcpkgs/mathcomp/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..a3dd0e98b55d48 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
-version=1.17.0
-revision=3
+version=1.19.0
+revision=1
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CECILL-B"
 homepage="https://github.com/math-comp/math-comp"
 distfiles="https://github.com/math-comp/math-comp/archive/${pkgname}-${version}.tar.gz"
-checksum=1779bcdac5d23d90997627364a5943ef4883c6eb54d67ddbb1dfbe6b7795a188
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
 nocross="ocaml"
 
 post_patch() {

From e1629105b4b89f319d5ee85ccc01a17f3dfff3cf Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:52:06 +0200
Subject: [PATCH 14/19] ocaml-findlib: support bytecode-only.

---
 srcpkgs/ocaml-findlib/template | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index 25fbecf81cc54a..b1bf955df669eb 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -4,7 +4,6 @@ version=1.9.6
 revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
-make_build_args="all opt"
 makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -16,9 +15,18 @@ nocross=yes
 nopie=yes
 disable_parallel_build=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+	*) make_build_target="all";;
+esac
+
+
 do_install() {
 	make prefix="$DESTDIR" install
-	vbin src/findlib/ocamlfind_opt
+	if [ -f src/findlib/ocamlfind_opt ]; then
+		vbin src/findlib/ocamlfind_opt
+	fi
 	vlicense LICENSE
 
 	rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild

From 16b7be5ae7e86014e7b565e2264cc3a7a4ecd918 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:41:42 +0100
Subject: [PATCH 15/19] supermin: update to 5.3.4.

---
 srcpkgs/supermin/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..f22f477dacf7e3 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,8 +1,8 @@
 # Template file for 'supermin'
 pkgname=supermin
-version=5.2.2
-revision=2
-_release_series=5.2-stable
+version=5.3.4
+revision=1
+_release_series=5.3-development
 build_style=gnu-configure
 hostmakedepends="ocaml ocaml-findlib pkg-config e2fsprogs cpio perl"
 makedepends="e2fsprogs-devel"
@@ -12,5 +12,5 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-2.0-or-later"
 homepage="http://people.redhat.com/~rjones/supermin/"
 distfiles="http://download.libguestfs.org/supermin/${_release_series}/supermin-${version}.tar.gz"
-checksum=ce3921d3635c8168cfb7ca0c5a82b9d5cef5b2b271f84b776d63b8bbbeec358e
+checksum=cc0322991bea1fcc6355518474b39e2d4a341f1e2c36fd98f14c3446ef79ff70
 nocross=yes

From b66b118290f0d5653bbd9ae098fc816c4456077e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:45:41 +0100
Subject: [PATCH 16/19] coccinelle: update to 1.1.1p20240218.

No upstream release in over two years, needed for OCaml 5 support.
---
 srcpkgs/coccinelle/template | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/coccinelle/template b/srcpkgs/coccinelle/template
index 20faebd1e0a4f7..82a2e25868e737 100644
--- a/srcpkgs/coccinelle/template
+++ b/srcpkgs/coccinelle/template
@@ -1,7 +1,8 @@
 # Template file for 'coccinelle'
 pkgname=coccinelle
-version=1.1.1
+version=1.1.1p20240218
 revision=1
+_gitrev=68c580f1f1abf9979d591371e5b2e474f97dac90
 build_style=gnu-configure
 configure_args="--without-pdflatex --enable-release --enable-opt
  --with-python=/usr/bin/python3"
@@ -12,8 +13,8 @@ short_desc="Program matching and transformation engine"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-only"
 homepage="https://coccinelle.gitlabpages.inria.fr/website/"
-distfiles="https://github.com/coccinelle/coccinelle/archive/refs/tags/$version.tar.gz"
-checksum=095919e129ac563586d880ebbc5aac829fec224177090aebe34dc34ed5f142bf
+distfiles="https://github.com/coccinelle/coccinelle/archive/${_gitrev}.tar.gz"
+checksum=bdda73a6827d1c2e5f85bafa25a0d03810298c0653ebd40a1eceaf6ca2cd72c0
 disable_parallel_build=yes
 nocross=yes
 

From 66a06eed4b6bec41cebb78d31883da1090937031 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 16:25:59 +0100
Subject: [PATCH 17/19] xen: rebuild for ocaml-5.1.1.

---
 srcpkgs/xen/patches/ocaml-5.patch | 28 ++++++++++++++++++++++++++++
 srcpkgs/xen/template              |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xen/patches/ocaml-5.patch

diff --git a/srcpkgs/xen/patches/ocaml-5.patch b/srcpkgs/xen/patches/ocaml-5.patch
new file mode 100644
index 00000000000000..9b590de12286b2
--- /dev/null
+++ b/srcpkgs/xen/patches/ocaml-5.patch
@@ -0,0 +1,28 @@
+X-Git-Url: https://xenbits.xen.org/gitweb/?p=xen.git;a=blobdiff_plain;f=tools%2Focaml%2Flibs%2FMakefile;h=89350aa12fdc6dbf0fe461bf7e4644cbb16b8462;hp=5146c524846083f343b5d4c5c2ccbb060dc94a67;hb=e51d31f79edc10f8d622e7f5bf4b935af6d4618f;hpb=bf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
+
+Remove broken libs (like upstream later).
+
+--- xen-4.14.1/tools/ocaml/libs/Makefile
++++ xen-4.14.1/tools/ocaml/libs/Makefile
+@@ -3,9 +3,8 @@
+ 
+ SUBDIRS= \
+ 	mmap \
+-	xentoollog \
+ 	xc eventchn \
+-	xb xs xl
++	xb xs
+ 
+ .PHONY: all
+ all: subdirs-all
+--- xen-4.14.1/tools/ocaml/xenstored/disk.ml
++++ xen-4.14.1/tools/ocaml/xenstored/disk.ml
+@@ -30,7 +30,7 @@
+ 	| _          -> raise (Failure "undecify")
+ 
+ let unhex c =
+-	let c = Char.lowercase c in
++	let c = Char.lowercase_ascii c in
+ 	match c with
+ 	| '0' .. '9' -> (Char.code c) - (Char.code '0')
+ 	| 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10
diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template
index 011d1704fcd8cb..52ae2f85c33e33 100644
--- a/srcpkgs/xen/template
+++ b/srcpkgs/xen/template
@@ -1,7 +1,7 @@
 # Template file for 'xen'
 pkgname=xen
 version=4.14.1
-revision=10
+revision=11
 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
 _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
 # TODO: arm / aarch64

From 446f75b4554e91103d62faca2ff540bacd80e1d7 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:20:46 +0100
Subject: [PATCH 18/19] ocaml-findlib: don't strip bytecode.

---
 srcpkgs/ocaml-findlib/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index b1bf955df669eb..e57252cac779a8 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -16,9 +16,12 @@ nopie=yes
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	# native code platforms
-	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
-	*) make_build_target="all";;
+# native code platforms
+x86_64*|aarch64*|riscv64*)
+	make_build_args="all opt";;
+*)
+	nostrip=yes  # breaks bytecode!
+	make_build_target="all";;
 esac
 
 

From 6b43143cb37888a8e75fd6088f5534be04d92b36 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:21:05 +0100
Subject: [PATCH 19/19] coq: fix build with bytecode.

---
 srcpkgs/coq/template | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 9ceb3b7d20df00..0af19896f01be2 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -20,6 +20,13 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
+do_patch() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		# see coq/coq#18609
+		vsed -i -e 's/dep ^ ".cmxs"/dep ^ ".cma"/' tools/dune_rule_gen/coq_rules.ml
+	fi
+}
+
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib,coqide-server

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (35 preceding siblings ...)
  2024-02-24  0:32 ` [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1 leahneukirchen
@ 2024-02-24  8:20 ` MIvanchev
  2024-02-24 11:04 ` MIvanchev
                   ` (8 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-02-24  8:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1962295836

Comment:
@leahneukirchen For zarith's tests you need this patch https://github.com/void-linux/void-packages/pull/48430/files#diff-feea406ffaa4a15a6e2746703c8e136944024361624b6dc7710a9961fc9ea4f4

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (36 preceding siblings ...)
  2024-02-24  8:20 ` MIvanchev
@ 2024-02-24 11:04 ` MIvanchev
  2024-02-24 12:23 ` MIvanchev
                   ` (7 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-02-24 11:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1962329039

Comment:
@leahneukirchen You can fix the supermin musl build with

```
if [ "$XBPS_TARGET_LIBC" = musl ]; then
	makedepends+=" musl-fts-devel"
	LDFLAGS="-lfts"
fi
```
But I still have no clue why the tests are failing.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (37 preceding siblings ...)
  2024-02-24 11:04 ` MIvanchev
@ 2024-02-24 12:23 ` MIvanchev
  2024-02-24 17:26 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (6 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: MIvanchev @ 2024-02-24 12:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

New comment by MIvanchev on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1962347211

Comment:
OK so from what I see here the tests expect specific distributions and package managers so IHMO we have to skip some and patch the others.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (38 preceding siblings ...)
  2024-02-24 12:23 ` MIvanchev
@ 2024-02-24 17:26 ` leahneukirchen
  2024-02-24 17:27 ` leahneukirchen
                   ` (5 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-24 17:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.1.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [x] supermin
- [x] coccinelle
- [x] coq
	- [x] mathcomp
- [x] xen
- [ ] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 34506 bytes --]

From 6a1e0585e861dfda7f3f4df9584111a8ddc488ec Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/21] ocaml: update to 5.1.1.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8c..00000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a22..585bca3f1cae35 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.1
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From ba6f113c0351028650043cff09a5fa18e4d64da9 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/21] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..25fbecf81cc54a 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From 98f5ef3356e9d182e954bcd2443fb8b002236e26 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/21] ocaml-num: update to 1.5.

---
 srcpkgs/ocaml-num/template | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..a5cc9d4062c0a0 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,23 +1,21 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
-version=1.4
-revision=4
-build_style=gnu-makefile
-make_install_target="findlib-install"
-makedepends="ocaml ocaml-findlib"
+version=1.5
+revision=1
+makedepends="ocaml dune"
 short_desc="OCaml legacy Num library for arbitrary-precision integers"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="custom: LGPL-2.1-only with OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/num"
 distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
-checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
+checksum=7ae07c8f5601e2dfc5008a62dcaf2719912ae596a19365c5d7bdf2230515959a
 nocross=yes
 
-pre_install() {
-	export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
-	vmkdir /usr/lib/ocaml/stublibs
+do_build() {    
+	dune build --display=short
 }
-
-post_install() {
+do_install() {
+	dune install --prefix=/usr --destdir="$DESTDIR" \
+		--libdir=/usr/lib/ocaml --docdir=/usr/share/doc
 	vlicense LICENSE
 }

From 7047b671c7e040e1e421f8ea6acd070b6f10bfcc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/21] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e6981810..dfef566ae3079a 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 98ef7999d2feab56754f9137368d796618b5d8cb Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/21] ocamlbuild: update to 0.14.3.

Support bytecode-only.
---
 srcpkgs/ocamlbuild/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..2cb928255b9c7a 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,6 +1,6 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
-version=0.14.2
+version=0.14.3
 revision=1
 build_style=gnu-makefile
 hostmakedepends="ocaml"
@@ -9,7 +9,11 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only"
 homepage="https://github.com/ocaml/ocamlbuild"
 distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1
+checksum=ce151bfd2141abc6ee0b3f25ba609e989ff564a48bf795d6fa7138a4db0fc2e1
 nocross=yes
 
 export CHECK_IF_PREINSTALLED=false
+
+pre_build() {
+	command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}

From b20668527cfa729b514811f45c44c655c5c0908e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/21] ocaml-stdcompat: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-stdcompat/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..4bdd6cbbfb7ad8 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"
@@ -15,6 +15,14 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
 nocross=yes
 disable_parallel_build=yes
 
+disable_parallel_build=yes
+
+pre_configure() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		sed -i 's/AC_SUBST(\[OCAMLOPT\], \[\["$OCAMLFIND ocamlopt"\]\])//' configure.ac
+	fi
+}
+
 post_install() {
 	vlicense COPYING LICENSE
 }

From ff8f0e3ad9e1476fb4ff9e3d6385ace7047e7508 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/21] opam: rebuild for ocaml-5.1.1.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..7ecafb97295a6d 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 56aea43646129fb8fa29f4ed4719b914af1b9581 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 08/21] unison: rebuild for ocaml-5.1.1.

---
 srcpkgs/unison/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..6f9daf259f27b5 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.4
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"
@@ -12,7 +12,8 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
 nocross="OCaml does not cross compile"
 
 do_build() {
-	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+	command -v ocamlc.opt >/dev/null && NATIVE=true || NATIVE=false
+	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$native
 	CFLAGS= make ${makejobs} -C man
 }
 

From 6201198de882fd25f75deec78c5635b95325c943 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 09/21] dune: update to 3.14.0.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..86b4943fc66720 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.13.0
+version=3.14.0
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -10,7 +10,7 @@ license="MIT"
 homepage="https://dune.build/"
 changelog="https://raw.githubusercontent.com/ocaml/dune/main/CHANGES.md"
 distfiles="https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz"
-checksum=f1801257e01c846bd71017ec5d4b2b75fd31b20a0d5979b933b37cc8453678de
+checksum=f4d09d89162621fdff424c253fa50c4920d2179fb5b3d1debab7bbe97c68b2fc
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From 7c2ca40e5dc42520dec3a0a482e02183e2a78e1c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 10/21] ocaml-camlp-streams: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b69..4b7f1bae08874a 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From c45f0e019bd18f82251f18603da1af2fb4661c46 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 11/21] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f02..00000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=1
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307ba..00000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From cdc5bfbe9100850147d3f3d12c7eb95201176317 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 12/21] coq: update to 8.19.0.

---
 srcpkgs/coq/template | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..9ceb3b7d20df00 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,35 @@
 # Template file for 'coq'
 pkgname=coq
-version=8.18.0
+version=8.19.0
 revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
+checkdepends="python3 rsync time"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.1-only"
 homepage="https://coq.inria.fr"
 distfiles="https://github.com/coq/coq/archive/V${version}.tar.gz"
-checksum=00a18c796a6e154a1f1bac7e1aef9e14107e0295fa4e0a18f10cdea6fc2e840b
+checksum=17e5c10fadcd3cda7509d822099a892fcd003485272b56a45abd30390f6a426f
 nopie=yes
 nocross=yes
+make_check=ci-skip  # takes long and has some faults
 
 case "$XBPS_TARGET_MACHINE" in
 	ppc64*) ;;
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
-	dune build --display=short -p coq-core,coq-stdlib
+	dune build --display=short -p coq-core,coq-stdlib,coqide-server
 }
 
 do_install() {
 	dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
 		--mandir=/usr/share/man --docdir=/usr/share/doc
 }
+
+do_check() {
+	make -C test-suite UNIT_TESTS= || make -C test-suite report PRINT_LOGS=1
+}

From 815182dcd47e66a3260e6dda1d0acd46e57a6ec8 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 13/21] mathcomp: update to 1.19.0.

---
 srcpkgs/mathcomp/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..a3dd0e98b55d48 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
-version=1.17.0
-revision=3
+version=1.19.0
+revision=1
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CECILL-B"
 homepage="https://github.com/math-comp/math-comp"
 distfiles="https://github.com/math-comp/math-comp/archive/${pkgname}-${version}.tar.gz"
-checksum=1779bcdac5d23d90997627364a5943ef4883c6eb54d67ddbb1dfbe6b7795a188
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
 nocross="ocaml"
 
 post_patch() {

From 3d261ab0c89128e1e146785dfd0bd2c8555fcaa2 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:52:06 +0200
Subject: [PATCH 14/21] ocaml-findlib: support bytecode-only.

---
 srcpkgs/ocaml-findlib/template | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index 25fbecf81cc54a..b1bf955df669eb 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -4,7 +4,6 @@ version=1.9.6
 revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
-make_build_args="all opt"
 makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -16,9 +15,18 @@ nocross=yes
 nopie=yes
 disable_parallel_build=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+	*) make_build_target="all";;
+esac
+
+
 do_install() {
 	make prefix="$DESTDIR" install
-	vbin src/findlib/ocamlfind_opt
+	if [ -f src/findlib/ocamlfind_opt ]; then
+		vbin src/findlib/ocamlfind_opt
+	fi
 	vlicense LICENSE
 
 	rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild

From 843142da7b5a719c6173c78069ca8143bd8c6b27 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:41:42 +0100
Subject: [PATCH 15/21] supermin: update to 5.3.4.

---
 srcpkgs/supermin/template | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..934990db49c72a 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,8 +1,8 @@
 # Template file for 'supermin'
 pkgname=supermin
-version=5.2.2
-revision=2
-_release_series=5.2-stable
+version=5.3.4
+revision=1
+_release_series=5.3-development
 build_style=gnu-configure
 hostmakedepends="ocaml ocaml-findlib pkg-config e2fsprogs cpio perl"
 makedepends="e2fsprogs-devel"
@@ -12,5 +12,10 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-2.0-or-later"
 homepage="http://people.redhat.com/~rjones/supermin/"
 distfiles="http://download.libguestfs.org/supermin/${_release_series}/supermin-${version}.tar.gz"
-checksum=ce3921d3635c8168cfb7ca0c5a82b9d5cef5b2b271f84b776d63b8bbbeec358e
+checksum=cc0322991bea1fcc6355518474b39e2d4a341f1e2c36fd98f14c3446ef79ff70
 nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" musl-fts-devel"
+	LDFLAGS="-lfts"
+fi

From 75b086d067720cbf688418f2ecb923596cd390a4 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:45:41 +0100
Subject: [PATCH 16/21] coccinelle: update to 1.1.1p20240218.

No upstream release in over two years, needed for OCaml 5 support.
---
 srcpkgs/coccinelle/template | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/coccinelle/template b/srcpkgs/coccinelle/template
index 20faebd1e0a4f7..e1185a6e3c24dc 100644
--- a/srcpkgs/coccinelle/template
+++ b/srcpkgs/coccinelle/template
@@ -1,9 +1,10 @@
 # Template file for 'coccinelle'
 pkgname=coccinelle
-version=1.1.1
+version=1.1.1p20240218
 revision=1
+_gitrev=68c580f1f1abf9979d591371e5b2e474f97dac90
 build_style=gnu-configure
-configure_args="--without-pdflatex --enable-release --enable-opt
+configure_args="--without-pdflatex --enable-release
  --with-python=/usr/bin/python3"
 hostmakedepends="python3 automake libtool ocaml"
 makedepends="ocaml ocaml-findlib ocaml-num ocaml-stdcompat
@@ -12,11 +13,16 @@ short_desc="Program matching and transformation engine"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-only"
 homepage="https://coccinelle.gitlabpages.inria.fr/website/"
-distfiles="https://github.com/coccinelle/coccinelle/archive/refs/tags/$version.tar.gz"
-checksum=095919e129ac563586d880ebbc5aac829fec224177090aebe34dc34ed5f142bf
+distfiles="https://github.com/coccinelle/coccinelle/archive/${_gitrev}.tar.gz"
+checksum=bdda73a6827d1c2e5f85bafa25a0d03810298c0653ebd40a1eceaf6ca2cd72c0
 disable_parallel_build=yes
 nocross=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|aarch64*|riscv64*) ;;
+	*) broken="bundled mehir wants ocamlopt";;
+esac
+
 pre_configure() {
 	autoreconf -fi
 }

From 034e3452e3d2ad0f3b5be00e3bb7a1c980ed820d Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 16:25:59 +0100
Subject: [PATCH 17/21] xen: rebuild for ocaml-5.1.1.

---
 srcpkgs/xen/patches/ocaml-5.patch | 28 ++++++++++++++++++++++++++++
 srcpkgs/xen/template              |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xen/patches/ocaml-5.patch

diff --git a/srcpkgs/xen/patches/ocaml-5.patch b/srcpkgs/xen/patches/ocaml-5.patch
new file mode 100644
index 00000000000000..9b590de12286b2
--- /dev/null
+++ b/srcpkgs/xen/patches/ocaml-5.patch
@@ -0,0 +1,28 @@
+X-Git-Url: https://xenbits.xen.org/gitweb/?p=xen.git;a=blobdiff_plain;f=tools%2Focaml%2Flibs%2FMakefile;h=89350aa12fdc6dbf0fe461bf7e4644cbb16b8462;hp=5146c524846083f343b5d4c5c2ccbb060dc94a67;hb=e51d31f79edc10f8d622e7f5bf4b935af6d4618f;hpb=bf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
+
+Remove broken libs (like upstream later).
+
+--- xen-4.14.1/tools/ocaml/libs/Makefile
++++ xen-4.14.1/tools/ocaml/libs/Makefile
+@@ -3,9 +3,8 @@
+ 
+ SUBDIRS= \
+ 	mmap \
+-	xentoollog \
+ 	xc eventchn \
+-	xb xs xl
++	xb xs
+ 
+ .PHONY: all
+ all: subdirs-all
+--- xen-4.14.1/tools/ocaml/xenstored/disk.ml
++++ xen-4.14.1/tools/ocaml/xenstored/disk.ml
+@@ -30,7 +30,7 @@
+ 	| _          -> raise (Failure "undecify")
+ 
+ let unhex c =
+-	let c = Char.lowercase c in
++	let c = Char.lowercase_ascii c in
+ 	match c with
+ 	| '0' .. '9' -> (Char.code c) - (Char.code '0')
+ 	| 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10
diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template
index 011d1704fcd8cb..52ae2f85c33e33 100644
--- a/srcpkgs/xen/template
+++ b/srcpkgs/xen/template
@@ -1,7 +1,7 @@
 # Template file for 'xen'
 pkgname=xen
 version=4.14.1
-revision=10
+revision=11
 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
 _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
 # TODO: arm / aarch64

From 950dde83fba27d7766c222a3769a481e4c5f9fc8 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:20:46 +0100
Subject: [PATCH 18/21] ocaml-findlib: don't strip bytecode.

---
 srcpkgs/ocaml-findlib/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index b1bf955df669eb..e57252cac779a8 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -16,9 +16,12 @@ nopie=yes
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	# native code platforms
-	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
-	*) make_build_target="all";;
+# native code platforms
+x86_64*|aarch64*|riscv64*)
+	make_build_args="all opt";;
+*)
+	nostrip=yes  # breaks bytecode!
+	make_build_target="all";;
 esac
 
 

From 9403babca52df91c59e82727dfe2fc2df9e33f0e Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:21:05 +0100
Subject: [PATCH 19/21] coq: fix build with bytecode.

---
 srcpkgs/coq/template | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 9ceb3b7d20df00..0af19896f01be2 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -20,6 +20,13 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
+do_patch() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		# see coq/coq#18609
+		vsed -i -e 's/dep ^ ".cmxs"/dep ^ ".cma"/' tools/dune_rule_gen/coq_rules.ml
+	fi
+}
+
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib,coqide-server

From 1ed78c201872f045921e4181856edc010c12eb45 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:49:24 +0100
Subject: [PATCH 20/21] ocaml-zarith: skip tests when bytecode only.

---
 srcpkgs/ocaml-zarith/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index dfef566ae3079a..613079976ff143 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -3,7 +3,6 @@ pkgname=ocaml-zarith
 version=1.13
 revision=1
 build_style=configure
-make_check_target="tests"
 hostmakedepends="perl"
 makedepends="gmp-devel ocaml"
 depends="gmp-devel"
@@ -25,3 +24,7 @@ pre_install() {
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }
+do_check() {
+	command -v ocamlc.opt >/dev/null || return 0
+	make tests
+}

From 0501cf1e6c5adc52c1da9d8e4a33d9e8d81277f2 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 17:28:12 +0100
Subject: [PATCH 21/21] zeroinstall: rebuild and fix for ocaml-5.1.1.

---
 srcpkgs/zeroinstall/template | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/zeroinstall/template b/srcpkgs/zeroinstall/template
index fedca44abc9fb7..d849c58c6a985c 100644
--- a/srcpkgs/zeroinstall/template
+++ b/srcpkgs/zeroinstall/template
@@ -1,10 +1,10 @@
 # Template file for 'zeroinstall'
 pkgname=zeroinstall
 version=2.18
-revision=1
+revision=2
 build_style=gnu-makefile
 make_install_target="install_system"
-hostmakedepends="gettext ocaml opam m4 tar pkg-config which"
+hostmakedepends="gettext ocaml opam m4 tar pkg-config which git"
 makedepends="openssl-devel libcurl-devel gnupg glib-devel gtk+3-devel"
 depends="gnupg desktop-file-utils hicolor-icon-theme xdg-utils"
 short_desc="Cross-distribution software installation system"
@@ -25,6 +25,8 @@ esac
 pre_build() {
 	opam init -y --compiler=ocaml-system --disable-sandboxing
 	eval $(opam env)
+	# thx @kit-ty-kate for ocaml 5 fix.
+	opam pin add -yn git+https://github.com/ocaml-community/obus#03129dac072e7a7370c2c92b9d447e47f784b7c7
 	opam install -y yojson xmlm ounit lwt lwt_react obus ocurl sha dune lablgtk3 lwt_glib
 }
 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (39 preceding siblings ...)
  2024-02-24 17:26 ` [PR PATCH] [Updated] " leahneukirchen
@ 2024-02-24 17:27 ` leahneukirchen
  2024-02-24 19:55 ` [PR PATCH] [Updated] " leahneukirchen
                   ` (4 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-24 17:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 174 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1962429447

Comment:
@MIvanchev thanks, added.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (40 preceding siblings ...)
  2024-02-24 17:27 ` leahneukirchen
@ 2024-02-24 19:55 ` leahneukirchen
  2024-02-24 21:06 ` leahneukirchen
                   ` (3 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-24 19:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.1.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [x] supermin
- [x] coccinelle
- [x] coq
	- [x] mathcomp
- [x] xen
- [x] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 34737 bytes --]

From d150713cebd943b0ef39a1cf9a4661de842a805a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/21] ocaml: update to 5.1.1.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8c..00000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a22..585bca3f1cae35 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.1
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From ac7de3595946bb03f0bd62cce7f03a169c77b6ea Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/21] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..25fbecf81cc54a 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From ec97d2ee05f0de2dd6969ea11aac2c70c257b602 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/21] ocaml-num: update to 1.5.

---
 srcpkgs/ocaml-num/template | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..f2e6c90c3d6eed 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,23 +1,21 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
-version=1.4
-revision=4
-build_style=gnu-makefile
-make_install_target="findlib-install"
-makedepends="ocaml ocaml-findlib"
+version=1.5
+revision=1
+makedepends="ocaml dune"
 short_desc="OCaml legacy Num library for arbitrary-precision integers"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="custom: LGPL-2.1-only with OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/num"
 distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
-checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
+checksum=7ae07c8f5601e2dfc5008a62dcaf2719912ae596a19365c5d7bdf2230515959a
 nocross=yes
 
-pre_install() {
-	export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
-	vmkdir /usr/lib/ocaml/stublibs
+do_build() {
+	dune build --display=short
 }
-
-post_install() {
+do_install() {
+	dune install --prefix=/usr --destdir="$DESTDIR" \
+		--libdir=/usr/lib/ocaml --docdir=/usr/share/doc
 	vlicense LICENSE
 }

From ef47b140be59cb72dc6bb157ba3b782a21ca9cbc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/21] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e6981810..dfef566ae3079a 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 1a3868718ee45ba5517848f881bf2e8868a47774 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/21] ocamlbuild: update to 0.14.3.

Support bytecode-only.
---
 srcpkgs/ocamlbuild/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..2cb928255b9c7a 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,6 +1,6 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
-version=0.14.2
+version=0.14.3
 revision=1
 build_style=gnu-makefile
 hostmakedepends="ocaml"
@@ -9,7 +9,11 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only"
 homepage="https://github.com/ocaml/ocamlbuild"
 distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1
+checksum=ce151bfd2141abc6ee0b3f25ba609e989ff564a48bf795d6fa7138a4db0fc2e1
 nocross=yes
 
 export CHECK_IF_PREINSTALLED=false
+
+pre_build() {
+	command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}

From 09ab4fdd81613b6f3518a596eec98d734c74d608 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/21] ocaml-stdcompat: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-stdcompat/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..4bdd6cbbfb7ad8 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"
@@ -15,6 +15,14 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
 nocross=yes
 disable_parallel_build=yes
 
+disable_parallel_build=yes
+
+pre_configure() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		sed -i 's/AC_SUBST(\[OCAMLOPT\], \[\["$OCAMLFIND ocamlopt"\]\])//' configure.ac
+	fi
+}
+
 post_install() {
 	vlicense COPYING LICENSE
 }

From 656f8fd66efa760e8d4dcb3cd4db17d717010245 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/21] opam: rebuild for ocaml-5.1.1.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..7ecafb97295a6d 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 171a2218275046daf21d5be668530dfee90aba72 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 08/21] unison: rebuild for ocaml-5.1.1.

---
 srcpkgs/unison/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..6f9daf259f27b5 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.4
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"
@@ -12,7 +12,8 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
 nocross="OCaml does not cross compile"
 
 do_build() {
-	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+	command -v ocamlc.opt >/dev/null && NATIVE=true || NATIVE=false
+	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$native
 	CFLAGS= make ${makejobs} -C man
 }
 

From 8e14a0591de7ac1bea511eba4b69b2c40f3b0657 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 09/21] dune: update to 3.14.0.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..86b4943fc66720 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.13.0
+version=3.14.0
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -10,7 +10,7 @@ license="MIT"
 homepage="https://dune.build/"
 changelog="https://raw.githubusercontent.com/ocaml/dune/main/CHANGES.md"
 distfiles="https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz"
-checksum=f1801257e01c846bd71017ec5d4b2b75fd31b20a0d5979b933b37cc8453678de
+checksum=f4d09d89162621fdff424c253fa50c4920d2179fb5b3d1debab7bbe97c68b2fc
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From d0638f20fffbac1c8ffcc003b3403ed8c2086323 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 10/21] ocaml-camlp-streams: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b69..4b7f1bae08874a 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 5b047c904a2d86df7665e779880355f20133a6eb Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 11/21] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f02..00000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=1
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307ba..00000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From 817e70e6d6f2462b77ab0844913bb3c9e0b56e80 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 12/21] coq: update to 8.19.0.

---
 srcpkgs/coq/template | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..9ceb3b7d20df00 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,35 @@
 # Template file for 'coq'
 pkgname=coq
-version=8.18.0
+version=8.19.0
 revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
+checkdepends="python3 rsync time"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.1-only"
 homepage="https://coq.inria.fr"
 distfiles="https://github.com/coq/coq/archive/V${version}.tar.gz"
-checksum=00a18c796a6e154a1f1bac7e1aef9e14107e0295fa4e0a18f10cdea6fc2e840b
+checksum=17e5c10fadcd3cda7509d822099a892fcd003485272b56a45abd30390f6a426f
 nopie=yes
 nocross=yes
+make_check=ci-skip  # takes long and has some faults
 
 case "$XBPS_TARGET_MACHINE" in
 	ppc64*) ;;
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
-	dune build --display=short -p coq-core,coq-stdlib
+	dune build --display=short -p coq-core,coq-stdlib,coqide-server
 }
 
 do_install() {
 	dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
 		--mandir=/usr/share/man --docdir=/usr/share/doc
 }
+
+do_check() {
+	make -C test-suite UNIT_TESTS= || make -C test-suite report PRINT_LOGS=1
+}

From ec28ce10e5567ced513a38d9d8a06d4e19ab9db3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 13/21] mathcomp: update to 1.19.0.

---
 srcpkgs/mathcomp/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..a3dd0e98b55d48 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
-version=1.17.0
-revision=3
+version=1.19.0
+revision=1
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CECILL-B"
 homepage="https://github.com/math-comp/math-comp"
 distfiles="https://github.com/math-comp/math-comp/archive/${pkgname}-${version}.tar.gz"
-checksum=1779bcdac5d23d90997627364a5943ef4883c6eb54d67ddbb1dfbe6b7795a188
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
 nocross="ocaml"
 
 post_patch() {

From ba9facb18db6db8a5fdc4938ba517b1b0380ffae Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:52:06 +0200
Subject: [PATCH 14/21] ocaml-findlib: support bytecode-only.

---
 srcpkgs/ocaml-findlib/template | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index 25fbecf81cc54a..b1bf955df669eb 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -4,7 +4,6 @@ version=1.9.6
 revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
-make_build_args="all opt"
 makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -16,9 +15,18 @@ nocross=yes
 nopie=yes
 disable_parallel_build=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+	*) make_build_target="all";;
+esac
+
+
 do_install() {
 	make prefix="$DESTDIR" install
-	vbin src/findlib/ocamlfind_opt
+	if [ -f src/findlib/ocamlfind_opt ]; then
+		vbin src/findlib/ocamlfind_opt
+	fi
 	vlicense LICENSE
 
 	rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild

From e9ba009ade59762342209a869592e70ca29a6b46 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:41:42 +0100
Subject: [PATCH 15/21] supermin: update to 5.3.4.

---
 srcpkgs/supermin/template | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..934990db49c72a 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,8 +1,8 @@
 # Template file for 'supermin'
 pkgname=supermin
-version=5.2.2
-revision=2
-_release_series=5.2-stable
+version=5.3.4
+revision=1
+_release_series=5.3-development
 build_style=gnu-configure
 hostmakedepends="ocaml ocaml-findlib pkg-config e2fsprogs cpio perl"
 makedepends="e2fsprogs-devel"
@@ -12,5 +12,10 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-2.0-or-later"
 homepage="http://people.redhat.com/~rjones/supermin/"
 distfiles="http://download.libguestfs.org/supermin/${_release_series}/supermin-${version}.tar.gz"
-checksum=ce3921d3635c8168cfb7ca0c5a82b9d5cef5b2b271f84b776d63b8bbbeec358e
+checksum=cc0322991bea1fcc6355518474b39e2d4a341f1e2c36fd98f14c3446ef79ff70
 nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" musl-fts-devel"
+	LDFLAGS="-lfts"
+fi

From 1a753450e23edec1fe058eb9f0c2df6a702b7b75 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:45:41 +0100
Subject: [PATCH 16/21] coccinelle: update to 1.1.1p20240218.

No upstream release in over two years, needed for OCaml 5 support.
---
 srcpkgs/coccinelle/template | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/coccinelle/template b/srcpkgs/coccinelle/template
index 20faebd1e0a4f7..e1185a6e3c24dc 100644
--- a/srcpkgs/coccinelle/template
+++ b/srcpkgs/coccinelle/template
@@ -1,9 +1,10 @@
 # Template file for 'coccinelle'
 pkgname=coccinelle
-version=1.1.1
+version=1.1.1p20240218
 revision=1
+_gitrev=68c580f1f1abf9979d591371e5b2e474f97dac90
 build_style=gnu-configure
-configure_args="--without-pdflatex --enable-release --enable-opt
+configure_args="--without-pdflatex --enable-release
  --with-python=/usr/bin/python3"
 hostmakedepends="python3 automake libtool ocaml"
 makedepends="ocaml ocaml-findlib ocaml-num ocaml-stdcompat
@@ -12,11 +13,16 @@ short_desc="Program matching and transformation engine"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-only"
 homepage="https://coccinelle.gitlabpages.inria.fr/website/"
-distfiles="https://github.com/coccinelle/coccinelle/archive/refs/tags/$version.tar.gz"
-checksum=095919e129ac563586d880ebbc5aac829fec224177090aebe34dc34ed5f142bf
+distfiles="https://github.com/coccinelle/coccinelle/archive/${_gitrev}.tar.gz"
+checksum=bdda73a6827d1c2e5f85bafa25a0d03810298c0653ebd40a1eceaf6ca2cd72c0
 disable_parallel_build=yes
 nocross=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|aarch64*|riscv64*) ;;
+	*) broken="bundled mehir wants ocamlopt";;
+esac
+
 pre_configure() {
 	autoreconf -fi
 }

From e4502d6b0db5845131697e30d25286bf6ae8c4af Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 16:25:59 +0100
Subject: [PATCH 17/21] xen: rebuild for ocaml-5.1.1.

---
 srcpkgs/xen/patches/ocaml-5.patch | 28 ++++++++++++++++++++++++++++
 srcpkgs/xen/template              |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xen/patches/ocaml-5.patch

diff --git a/srcpkgs/xen/patches/ocaml-5.patch b/srcpkgs/xen/patches/ocaml-5.patch
new file mode 100644
index 00000000000000..9b590de12286b2
--- /dev/null
+++ b/srcpkgs/xen/patches/ocaml-5.patch
@@ -0,0 +1,28 @@
+X-Git-Url: https://xenbits.xen.org/gitweb/?p=xen.git;a=blobdiff_plain;f=tools%2Focaml%2Flibs%2FMakefile;h=89350aa12fdc6dbf0fe461bf7e4644cbb16b8462;hp=5146c524846083f343b5d4c5c2ccbb060dc94a67;hb=e51d31f79edc10f8d622e7f5bf4b935af6d4618f;hpb=bf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
+
+Remove broken libs (like upstream later).
+
+--- xen-4.14.1/tools/ocaml/libs/Makefile
++++ xen-4.14.1/tools/ocaml/libs/Makefile
+@@ -3,9 +3,8 @@
+ 
+ SUBDIRS= \
+ 	mmap \
+-	xentoollog \
+ 	xc eventchn \
+-	xb xs xl
++	xb xs
+ 
+ .PHONY: all
+ all: subdirs-all
+--- xen-4.14.1/tools/ocaml/xenstored/disk.ml
++++ xen-4.14.1/tools/ocaml/xenstored/disk.ml
+@@ -30,7 +30,7 @@
+ 	| _          -> raise (Failure "undecify")
+ 
+ let unhex c =
+-	let c = Char.lowercase c in
++	let c = Char.lowercase_ascii c in
+ 	match c with
+ 	| '0' .. '9' -> (Char.code c) - (Char.code '0')
+ 	| 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10
diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template
index 011d1704fcd8cb..52ae2f85c33e33 100644
--- a/srcpkgs/xen/template
+++ b/srcpkgs/xen/template
@@ -1,7 +1,7 @@
 # Template file for 'xen'
 pkgname=xen
 version=4.14.1
-revision=10
+revision=11
 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
 _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
 # TODO: arm / aarch64

From 3427b214834a5684e2bdf2a5d7eb64e72ddadbbe Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:20:46 +0100
Subject: [PATCH 18/21] ocaml-findlib: don't strip bytecode.

---
 srcpkgs/ocaml-findlib/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index b1bf955df669eb..e57252cac779a8 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -16,9 +16,12 @@ nopie=yes
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	# native code platforms
-	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
-	*) make_build_target="all";;
+# native code platforms
+x86_64*|aarch64*|riscv64*)
+	make_build_args="all opt";;
+*)
+	nostrip=yes  # breaks bytecode!
+	make_build_target="all";;
 esac
 
 

From f193dcab12f8daca5a1595790cafe2ef917f4cb2 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:21:05 +0100
Subject: [PATCH 19/21] coq: fix build with bytecode.

---
 srcpkgs/coq/template | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 9ceb3b7d20df00..0af19896f01be2 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -20,6 +20,13 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
+do_patch() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		# see coq/coq#18609
+		vsed -i -e 's/dep ^ ".cmxs"/dep ^ ".cma"/' tools/dune_rule_gen/coq_rules.ml
+	fi
+}
+
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib,coqide-server

From 21fb790e002ba8612f94b661b01f66d3c75f69e8 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:49:24 +0100
Subject: [PATCH 20/21] ocaml-zarith: skip tests when bytecode only.

---
 srcpkgs/ocaml-zarith/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index dfef566ae3079a..613079976ff143 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -3,7 +3,6 @@ pkgname=ocaml-zarith
 version=1.13
 revision=1
 build_style=configure
-make_check_target="tests"
 hostmakedepends="perl"
 makedepends="gmp-devel ocaml"
 depends="gmp-devel"
@@ -25,3 +24,7 @@ pre_install() {
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }
+do_check() {
+	command -v ocamlc.opt >/dev/null || return 0
+	make tests
+}

From 8adb1b80184bf8fa5208d553e4225138db576c65 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 17:28:12 +0100
Subject: [PATCH 21/21] zeroinstall: rebuild and fix for ocaml-5.1.1.

---
 srcpkgs/zeroinstall/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/zeroinstall/template b/srcpkgs/zeroinstall/template
index fedca44abc9fb7..2c4ed76183080c 100644
--- a/srcpkgs/zeroinstall/template
+++ b/srcpkgs/zeroinstall/template
@@ -1,10 +1,10 @@
 # Template file for 'zeroinstall'
 pkgname=zeroinstall
 version=2.18
-revision=1
+revision=2
 build_style=gnu-makefile
 make_install_target="install_system"
-hostmakedepends="gettext ocaml opam m4 tar pkg-config which"
+hostmakedepends="gettext ocaml opam m4 tar pkg-config which git"
 makedepends="openssl-devel libcurl-devel gnupg glib-devel gtk+3-devel"
 depends="gnupg desktop-file-utils hicolor-icon-theme xdg-utils"
 short_desc="Cross-distribution software installation system"
@@ -18,13 +18,15 @@ nocross="opam is nocross"
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	ppc64*) ;;
-	ppc*) broken="relocation out of range";;
+	x86_64*|aarch64*|riscv64*) ;;
+	*) broken="needs ocurl which wants ocamlopt";;
 esac
 
 pre_build() {
 	opam init -y --compiler=ocaml-system --disable-sandboxing
 	eval $(opam env)
+	# thx @kit-ty-kate for ocaml 5 fix.
+	opam pin add -yn git+https://github.com/ocaml-community/obus#03129dac072e7a7370c2c92b9d447e47f784b7c7
 	opam install -y yojson xmlm ounit lwt lwt_react obus ocurl sha dune lablgtk3 lwt_glib
 }
 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (41 preceding siblings ...)
  2024-02-24 19:55 ` [PR PATCH] [Updated] " leahneukirchen
@ 2024-02-24 21:06 ` leahneukirchen
  2024-02-24 22:54 ` leahneukirchen
                   ` (2 subsequent siblings)
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-24 21:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.1.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [x] supermin
- [x] coccinelle
- [x] coq
	- [x] mathcomp
- [x] xen
- [x] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 34785 bytes --]

From d150713cebd943b0ef39a1cf9a4661de842a805a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/21] ocaml: update to 5.1.1.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8c..00000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a22..585bca3f1cae35 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.1
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From ac7de3595946bb03f0bd62cce7f03a169c77b6ea Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/21] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..25fbecf81cc54a 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From ec97d2ee05f0de2dd6969ea11aac2c70c257b602 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/21] ocaml-num: update to 1.5.

---
 srcpkgs/ocaml-num/template | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..f2e6c90c3d6eed 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,23 +1,21 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
-version=1.4
-revision=4
-build_style=gnu-makefile
-make_install_target="findlib-install"
-makedepends="ocaml ocaml-findlib"
+version=1.5
+revision=1
+makedepends="ocaml dune"
 short_desc="OCaml legacy Num library for arbitrary-precision integers"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="custom: LGPL-2.1-only with OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/num"
 distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
-checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
+checksum=7ae07c8f5601e2dfc5008a62dcaf2719912ae596a19365c5d7bdf2230515959a
 nocross=yes
 
-pre_install() {
-	export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
-	vmkdir /usr/lib/ocaml/stublibs
+do_build() {
+	dune build --display=short
 }
-
-post_install() {
+do_install() {
+	dune install --prefix=/usr --destdir="$DESTDIR" \
+		--libdir=/usr/lib/ocaml --docdir=/usr/share/doc
 	vlicense LICENSE
 }

From ef47b140be59cb72dc6bb157ba3b782a21ca9cbc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/21] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e6981810..dfef566ae3079a 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 1a3868718ee45ba5517848f881bf2e8868a47774 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/21] ocamlbuild: update to 0.14.3.

Support bytecode-only.
---
 srcpkgs/ocamlbuild/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..2cb928255b9c7a 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,6 +1,6 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
-version=0.14.2
+version=0.14.3
 revision=1
 build_style=gnu-makefile
 hostmakedepends="ocaml"
@@ -9,7 +9,11 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only"
 homepage="https://github.com/ocaml/ocamlbuild"
 distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1
+checksum=ce151bfd2141abc6ee0b3f25ba609e989ff564a48bf795d6fa7138a4db0fc2e1
 nocross=yes
 
 export CHECK_IF_PREINSTALLED=false
+
+pre_build() {
+	command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}

From 09ab4fdd81613b6f3518a596eec98d734c74d608 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/21] ocaml-stdcompat: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-stdcompat/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..4bdd6cbbfb7ad8 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"
@@ -15,6 +15,14 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
 nocross=yes
 disable_parallel_build=yes
 
+disable_parallel_build=yes
+
+pre_configure() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		sed -i 's/AC_SUBST(\[OCAMLOPT\], \[\["$OCAMLFIND ocamlopt"\]\])//' configure.ac
+	fi
+}
+
 post_install() {
 	vlicense COPYING LICENSE
 }

From 656f8fd66efa760e8d4dcb3cd4db17d717010245 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/21] opam: rebuild for ocaml-5.1.1.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..7ecafb97295a6d 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 171a2218275046daf21d5be668530dfee90aba72 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 08/21] unison: rebuild for ocaml-5.1.1.

---
 srcpkgs/unison/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..6f9daf259f27b5 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.4
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"
@@ -12,7 +12,8 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
 nocross="OCaml does not cross compile"
 
 do_build() {
-	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+	command -v ocamlc.opt >/dev/null && NATIVE=true || NATIVE=false
+	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$native
 	CFLAGS= make ${makejobs} -C man
 }
 

From 8e14a0591de7ac1bea511eba4b69b2c40f3b0657 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 09/21] dune: update to 3.14.0.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..86b4943fc66720 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.13.0
+version=3.14.0
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -10,7 +10,7 @@ license="MIT"
 homepage="https://dune.build/"
 changelog="https://raw.githubusercontent.com/ocaml/dune/main/CHANGES.md"
 distfiles="https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz"
-checksum=f1801257e01c846bd71017ec5d4b2b75fd31b20a0d5979b933b37cc8453678de
+checksum=f4d09d89162621fdff424c253fa50c4920d2179fb5b3d1debab7bbe97c68b2fc
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From d0638f20fffbac1c8ffcc003b3403ed8c2086323 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 10/21] ocaml-camlp-streams: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b69..4b7f1bae08874a 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 5b047c904a2d86df7665e779880355f20133a6eb Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 11/21] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f02..00000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=1
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307ba..00000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From 817e70e6d6f2462b77ab0844913bb3c9e0b56e80 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 12/21] coq: update to 8.19.0.

---
 srcpkgs/coq/template | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..9ceb3b7d20df00 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,35 @@
 # Template file for 'coq'
 pkgname=coq
-version=8.18.0
+version=8.19.0
 revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
+checkdepends="python3 rsync time"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.1-only"
 homepage="https://coq.inria.fr"
 distfiles="https://github.com/coq/coq/archive/V${version}.tar.gz"
-checksum=00a18c796a6e154a1f1bac7e1aef9e14107e0295fa4e0a18f10cdea6fc2e840b
+checksum=17e5c10fadcd3cda7509d822099a892fcd003485272b56a45abd30390f6a426f
 nopie=yes
 nocross=yes
+make_check=ci-skip  # takes long and has some faults
 
 case "$XBPS_TARGET_MACHINE" in
 	ppc64*) ;;
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
-	dune build --display=short -p coq-core,coq-stdlib
+	dune build --display=short -p coq-core,coq-stdlib,coqide-server
 }
 
 do_install() {
 	dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
 		--mandir=/usr/share/man --docdir=/usr/share/doc
 }
+
+do_check() {
+	make -C test-suite UNIT_TESTS= || make -C test-suite report PRINT_LOGS=1
+}

From ec28ce10e5567ced513a38d9d8a06d4e19ab9db3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 13/21] mathcomp: update to 1.19.0.

---
 srcpkgs/mathcomp/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..a3dd0e98b55d48 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
-version=1.17.0
-revision=3
+version=1.19.0
+revision=1
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CECILL-B"
 homepage="https://github.com/math-comp/math-comp"
 distfiles="https://github.com/math-comp/math-comp/archive/${pkgname}-${version}.tar.gz"
-checksum=1779bcdac5d23d90997627364a5943ef4883c6eb54d67ddbb1dfbe6b7795a188
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
 nocross="ocaml"
 
 post_patch() {

From ba9facb18db6db8a5fdc4938ba517b1b0380ffae Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:52:06 +0200
Subject: [PATCH 14/21] ocaml-findlib: support bytecode-only.

---
 srcpkgs/ocaml-findlib/template | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index 25fbecf81cc54a..b1bf955df669eb 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -4,7 +4,6 @@ version=1.9.6
 revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
-make_build_args="all opt"
 makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -16,9 +15,18 @@ nocross=yes
 nopie=yes
 disable_parallel_build=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+	*) make_build_target="all";;
+esac
+
+
 do_install() {
 	make prefix="$DESTDIR" install
-	vbin src/findlib/ocamlfind_opt
+	if [ -f src/findlib/ocamlfind_opt ]; then
+		vbin src/findlib/ocamlfind_opt
+	fi
 	vlicense LICENSE
 
 	rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild

From 8d3879e91719455eaf724e7767c58fc4ebe7369b Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:41:42 +0100
Subject: [PATCH 15/21] supermin: update to 5.3.4.

---
 srcpkgs/supermin/template | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..954c342d1f167b 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,8 +1,8 @@
 # Template file for 'supermin'
 pkgname=supermin
-version=5.2.2
-revision=2
-_release_series=5.2-stable
+version=5.3.4
+revision=1
+_release_series=5.3-development
 build_style=gnu-configure
 hostmakedepends="ocaml ocaml-findlib pkg-config e2fsprogs cpio perl"
 makedepends="e2fsprogs-devel"
@@ -12,5 +12,11 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-2.0-or-later"
 homepage="http://people.redhat.com/~rjones/supermin/"
 distfiles="http://download.libguestfs.org/supermin/${_release_series}/supermin-${version}.tar.gz"
-checksum=ce3921d3635c8168cfb7ca0c5a82b9d5cef5b2b271f84b776d63b8bbbeec358e
+checksum=cc0322991bea1fcc6355518474b39e2d4a341f1e2c36fd98f14c3446ef79ff70
 nocross=yes
+make_check=no # distro dependent assumptions
+
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" musl-fts-devel"
+	LDFLAGS="-lfts"
+fi

From ded138bfc29c20a549a5b072c76a88c40a76a9c9 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:45:41 +0100
Subject: [PATCH 16/21] coccinelle: update to 1.1.1p20240218.

No upstream release in over two years, needed for OCaml 5 support.
---
 srcpkgs/coccinelle/template | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/coccinelle/template b/srcpkgs/coccinelle/template
index 20faebd1e0a4f7..e1185a6e3c24dc 100644
--- a/srcpkgs/coccinelle/template
+++ b/srcpkgs/coccinelle/template
@@ -1,9 +1,10 @@
 # Template file for 'coccinelle'
 pkgname=coccinelle
-version=1.1.1
+version=1.1.1p20240218
 revision=1
+_gitrev=68c580f1f1abf9979d591371e5b2e474f97dac90
 build_style=gnu-configure
-configure_args="--without-pdflatex --enable-release --enable-opt
+configure_args="--without-pdflatex --enable-release
  --with-python=/usr/bin/python3"
 hostmakedepends="python3 automake libtool ocaml"
 makedepends="ocaml ocaml-findlib ocaml-num ocaml-stdcompat
@@ -12,11 +13,16 @@ short_desc="Program matching and transformation engine"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-only"
 homepage="https://coccinelle.gitlabpages.inria.fr/website/"
-distfiles="https://github.com/coccinelle/coccinelle/archive/refs/tags/$version.tar.gz"
-checksum=095919e129ac563586d880ebbc5aac829fec224177090aebe34dc34ed5f142bf
+distfiles="https://github.com/coccinelle/coccinelle/archive/${_gitrev}.tar.gz"
+checksum=bdda73a6827d1c2e5f85bafa25a0d03810298c0653ebd40a1eceaf6ca2cd72c0
 disable_parallel_build=yes
 nocross=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|aarch64*|riscv64*) ;;
+	*) broken="bundled mehir wants ocamlopt";;
+esac
+
 pre_configure() {
 	autoreconf -fi
 }

From 0db96e0af76cd5575c1a35fc34191446b4a1d58a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 16:25:59 +0100
Subject: [PATCH 17/21] xen: rebuild for ocaml-5.1.1.

---
 srcpkgs/xen/patches/ocaml-5.patch | 28 ++++++++++++++++++++++++++++
 srcpkgs/xen/template              |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xen/patches/ocaml-5.patch

diff --git a/srcpkgs/xen/patches/ocaml-5.patch b/srcpkgs/xen/patches/ocaml-5.patch
new file mode 100644
index 00000000000000..9b590de12286b2
--- /dev/null
+++ b/srcpkgs/xen/patches/ocaml-5.patch
@@ -0,0 +1,28 @@
+X-Git-Url: https://xenbits.xen.org/gitweb/?p=xen.git;a=blobdiff_plain;f=tools%2Focaml%2Flibs%2FMakefile;h=89350aa12fdc6dbf0fe461bf7e4644cbb16b8462;hp=5146c524846083f343b5d4c5c2ccbb060dc94a67;hb=e51d31f79edc10f8d622e7f5bf4b935af6d4618f;hpb=bf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
+
+Remove broken libs (like upstream later).
+
+--- xen-4.14.1/tools/ocaml/libs/Makefile
++++ xen-4.14.1/tools/ocaml/libs/Makefile
+@@ -3,9 +3,8 @@
+ 
+ SUBDIRS= \
+ 	mmap \
+-	xentoollog \
+ 	xc eventchn \
+-	xb xs xl
++	xb xs
+ 
+ .PHONY: all
+ all: subdirs-all
+--- xen-4.14.1/tools/ocaml/xenstored/disk.ml
++++ xen-4.14.1/tools/ocaml/xenstored/disk.ml
+@@ -30,7 +30,7 @@
+ 	| _          -> raise (Failure "undecify")
+ 
+ let unhex c =
+-	let c = Char.lowercase c in
++	let c = Char.lowercase_ascii c in
+ 	match c with
+ 	| '0' .. '9' -> (Char.code c) - (Char.code '0')
+ 	| 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10
diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template
index 011d1704fcd8cb..52ae2f85c33e33 100644
--- a/srcpkgs/xen/template
+++ b/srcpkgs/xen/template
@@ -1,7 +1,7 @@
 # Template file for 'xen'
 pkgname=xen
 version=4.14.1
-revision=10
+revision=11
 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
 _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
 # TODO: arm / aarch64

From e4b4b707b90709db28a36b5129a21ab06b7fbac5 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:20:46 +0100
Subject: [PATCH 18/21] ocaml-findlib: don't strip bytecode.

---
 srcpkgs/ocaml-findlib/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index b1bf955df669eb..e57252cac779a8 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -16,9 +16,12 @@ nopie=yes
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	# native code platforms
-	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
-	*) make_build_target="all";;
+# native code platforms
+x86_64*|aarch64*|riscv64*)
+	make_build_args="all opt";;
+*)
+	nostrip=yes  # breaks bytecode!
+	make_build_target="all";;
 esac
 
 

From 9e0a07a724135407133916d2ed3533830e7b63fc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:21:05 +0100
Subject: [PATCH 19/21] coq: fix build with bytecode.

---
 srcpkgs/coq/template | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 9ceb3b7d20df00..0af19896f01be2 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -20,6 +20,13 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
+do_patch() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		# see coq/coq#18609
+		vsed -i -e 's/dep ^ ".cmxs"/dep ^ ".cma"/' tools/dune_rule_gen/coq_rules.ml
+	fi
+}
+
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib,coqide-server

From b2a791cd937eb0791295fb83bd2b949e6631ea9f Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:49:24 +0100
Subject: [PATCH 20/21] ocaml-zarith: skip tests when bytecode only.

---
 srcpkgs/ocaml-zarith/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index dfef566ae3079a..613079976ff143 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -3,7 +3,6 @@ pkgname=ocaml-zarith
 version=1.13
 revision=1
 build_style=configure
-make_check_target="tests"
 hostmakedepends="perl"
 makedepends="gmp-devel ocaml"
 depends="gmp-devel"
@@ -25,3 +24,7 @@ pre_install() {
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }
+do_check() {
+	command -v ocamlc.opt >/dev/null || return 0
+	make tests
+}

From c313606fa2b63c862294b8a5a36aabb871c9411c Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 17:28:12 +0100
Subject: [PATCH 21/21] zeroinstall: rebuild and fix for ocaml-5.1.1.

---
 srcpkgs/zeroinstall/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/zeroinstall/template b/srcpkgs/zeroinstall/template
index fedca44abc9fb7..2c4ed76183080c 100644
--- a/srcpkgs/zeroinstall/template
+++ b/srcpkgs/zeroinstall/template
@@ -1,10 +1,10 @@
 # Template file for 'zeroinstall'
 pkgname=zeroinstall
 version=2.18
-revision=1
+revision=2
 build_style=gnu-makefile
 make_install_target="install_system"
-hostmakedepends="gettext ocaml opam m4 tar pkg-config which"
+hostmakedepends="gettext ocaml opam m4 tar pkg-config which git"
 makedepends="openssl-devel libcurl-devel gnupg glib-devel gtk+3-devel"
 depends="gnupg desktop-file-utils hicolor-icon-theme xdg-utils"
 short_desc="Cross-distribution software installation system"
@@ -18,13 +18,15 @@ nocross="opam is nocross"
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	ppc64*) ;;
-	ppc*) broken="relocation out of range";;
+	x86_64*|aarch64*|riscv64*) ;;
+	*) broken="needs ocurl which wants ocamlopt";;
 esac
 
 pre_build() {
 	opam init -y --compiler=ocaml-system --disable-sandboxing
 	eval $(opam env)
+	# thx @kit-ty-kate for ocaml 5 fix.
+	opam pin add -yn git+https://github.com/ocaml-community/obus#03129dac072e7a7370c2c92b9d447e47f784b7c7
 	opam install -y yojson xmlm ounit lwt lwt_react obus ocurl sha dune lablgtk3 lwt_glib
 }
 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (42 preceding siblings ...)
  2024-02-24 21:06 ` leahneukirchen
@ 2024-02-24 22:54 ` leahneukirchen
  2024-02-25 14:16 ` mobinmob
  2024-02-25 16:41 ` [PR PATCH] [Merged]: " leahneukirchen
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-24 22:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 602 bytes --]

There is an updated pull request by leahneukirchen against master on the void-packages repository

https://github.com/leahneukirchen/void-packages ocaml5
https://github.com/void-linux/void-packages/pull/41227

[WIP] ocaml: update to 5.1.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [x] supermin
- [x] coccinelle
- [x] coq
	- [x] mathcomp
- [x] xen
- [x] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


A patch file from https://github.com/void-linux/void-packages/pull/41227.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml5-41227.patch --]
[-- Type: text/x-diff, Size: 34827 bytes --]

From d150713cebd943b0ef39a1cf9a4661de842a805a Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:43 +0100
Subject: [PATCH 01/21] ocaml: update to 5.1.1.

---
 srcpkgs/ocaml/patches/musl-ppc.patch          |  11 -
 .../patches/ocaml-4.08.0-elfv2-ppc64.patch    | 198 ------------------
 .../ocaml/patches/ocaml-4.08.0-ppc-pie.patch  |  42 ----
 srcpkgs/ocaml/template                        |  23 +-
 4 files changed, 12 insertions(+), 262 deletions(-)
 delete mode 100644 srcpkgs/ocaml/patches/musl-ppc.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
 delete mode 100644 srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch

diff --git a/srcpkgs/ocaml/patches/musl-ppc.patch b/srcpkgs/ocaml/patches/musl-ppc.patch
deleted file mode 100644
index bc2c10fd43ab8c..00000000000000
--- a/srcpkgs/ocaml/patches/musl-ppc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/runtime/signals_osdep.h
-+++ b/runtime/signals_osdep.h
-@@ -309,6 +309,8 @@
- 
- #elif defined(TARGET_power) && defined(SYS_elf)
- 
-+  #include <asm/ptrace.h>
-+
-   #define DECLARE_SIGNAL_HANDLER(name) \
-     static void name(int sig, struct sigcontext * context)
- 
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
deleted file mode 100644
index 65a6cea92adf4b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-elfv2-ppc64.patch
+++ /dev/null
@@ -1,198 +0,0 @@
---- ocaml-4.08.0/asmcomp/power/arch.ml
-+++ ocaml-4.08.0/asmcomp/power/arch.ml
-@@ -28,7 +28,7 @@ type abi = ELF32 | ELF64v1 | ELF64v2
- let abi =
-   match Config.model with
-   | "ppc" -> ELF32
--  | "ppc64" -> ELF64v1
-+  | "ppc64" -> ELF64v2
-   | "ppc64le" -> ELF64v2
-   | _ -> assert false
- 
---- ocaml-4.10.0/runtime/power.S
-+++ ocaml-4.10.0/runtime/power.S
-@@ -13,7 +13,7 @@
- /*                                                                        */
- /**************************************************************************/
- 
--#if defined(MODEL_ppc64le)
-+#if _CALL_ELF == 2
-         .abiversion 2
- #endif
- 
-@@ -52,8 +52,7 @@
- #define TRAP_PREVIOUS_OFFSET 4
- #define CALLBACK_LINK_SIZE 16
- #define CALLBACK_LINK_OFFSET 0
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define PARAM_SAVE_AREA (8*8)
- #define LR_SAVE 16
-@@ -64,8 +63,7 @@
- #define TRAP_PREVIOUS_OFFSET 64
- #define CALLBACK_LINK_SIZE 32
- #define CALLBACK_LINK_OFFSET 48
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define PARAM_SAVE_AREA 0
- #define LR_SAVE 16
-@@ -91,9 +89,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - name
- 
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -107,9 +104,8 @@
- #define ENDFUNCTION(name) \
-   .size name, . - .L.name
- 
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -151,7 +147,7 @@
- 
- #define Caml_state(var) 8*domain_field_caml_##var(28)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
-@@ -332,14 +328,14 @@
- #if defined(MODEL_ppc)
-         mtctr   C_CALL_FUN
-         bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(C_CALL_FUN)
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-         mtctr   0
-         ld      2, 8(C_CALL_FUN)
-         bctrl
-         mr      2, C_CALL_TOC   /* restore current TOC */
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   C_CALL_FUN
-         mr      12, C_CALL_FUN
-         mr      C_CALL_TOC, 2   /* save current TOC in a callee-save register */
-@@ -515,14 +511,14 @@
- #if defined(MODEL_ppc)
-         mtctr   12
- .L105:  bctrl
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(12)
-         mtctr   0
-         std     2, TOC_SAVE(1)
-         ld      2, 8(12)
- .L105:  bctrl
-         ld      2, TOC_SAVE(1)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   12
-         std     2, TOC_SAVE(1)
- .L105:  bctrl
-@@ -641,7 +637,7 @@
-         b       .L102
- ENDFUNCTION(caml_callback3_asm)
- 
--#if defined(MODEL_ppc64)
-+#if _CALL_ELF == 1
-         .section ".opd","aw"
- #else
-         .section ".text"
---- ocaml-4.08.0/testsuite/tools/asmgen_power.S
-+++ ocaml-4.08.0/testsuite/tools/asmgen_power.S
-@@ -25,12 +25,10 @@
- #if defined(MODEL_ppc)
- #define RESERVED_STACK 16
- #define LR_SAVE_AREA 4
--#endif
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define RESERVED_STACK 48
- #define LR_SAVE_AREA 16
--#endif
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define RESERVED_STACK 32
- #define LR_SAVE_AREA 16
- #endif
-@@ -44,9 +42,8 @@
-   .type name, @function; \
-   .align 2; \
-   name:
--#endif
- 
--#if defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define FUNCTION(name) \
-   .section ".opd","aw"; \
-   .align 3; \
-@@ -56,9 +53,8 @@
-   .text; \
-   .align 2; \
-   .L.name:
--#endif
- 
--#if defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define FUNCTION(name) \
-   .section ".text"; \
-   .globl name; \
-@@ -118,11 +114,11 @@ FUNCTION(call_gen_code)
-     /* Get function pointer in CTR */
- #if defined(MODEL_ppc)
-         mtctr   3
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(3)
-         mtctr   0
-         ld      2, 8(3)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   3
-         mr      12, 3
- #else
-@@ -184,11 +180,11 @@ FUNCTION(caml_c_call)
-     /* Jump to C function (address in r28) */
- #if defined(MODEL_ppc)
-         mtctr   28
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
-         ld      0, 0(28)
-         mtctr   0
-         ld      2, 8(28)
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
-         mtctr   28
-         mr      12, 28
- #else
---- ocaml-4.08.0/runtime/caml/stack.h
-+++ ocaml-4.08.0/runtime/caml/stack.h
-@@ -35,10 +35,10 @@
- #if defined(MODEL_ppc)
- #define Saved_return_address(sp) *((intnat *)((sp) - 4))
- #define Callback_link(sp) ((struct caml_context *)((sp) + 16))
--#elif defined(MODEL_ppc64)
-+#elif _CALL_ELF == 1
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (48 + 32)))
--#elif defined(MODEL_ppc64le)
-+#elif _CALL_ELF == 2
- #define Saved_return_address(sp) *((intnat *)((sp) + 16))
- #define Callback_link(sp) ((struct caml_context *)((sp) + (32 + 32)))
- #else
diff --git a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch b/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
deleted file mode 100644
index a26f6a639e185b..00000000000000
--- a/srcpkgs/ocaml/patches/ocaml-4.08.0-ppc-pie.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ocaml-4.11.0/asmcomp/emitaux.ml
-+++ ocaml-4.11.0/asmcomp/emitaux.ml
-@@ -268,6 +268,7 @@
-     match rdbg with
-     | [] -> assert false
-     | d :: rest -> emit rs d rest in
-+  a.efa_align Arch.size_addr;
-   a.efa_word (List.length !frame_descriptors);
-   List.iter emit_frame !frame_descriptors;
-   Label_table.iter emit_debuginfo debuginfos;
---- ocaml-4.08.0/runtime/power.S
-+++ ocaml-4.08.0/runtime/power.S
-@@ -642,6 +642,7 @@ caml_system__code_end:
- /* Frame table */
- 
-         .section ".data"
-+        .align  wordalign
-         .globl  caml_system__frametable
-         .type   caml_system__frametable, @object
- caml_system__frametable:
---- ocaml-4.14.0/configure.ac
-+++ ocaml-4.14.0/configure.ac
-@@ -1006,7 +1006,7 @@ AS_IF([test $arch != "none" && $arch64 ],
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- AS_CASE([$arch],
--  [amd64|arm64|s390x|none],
-+  [amd64|arm64|s390x|power|none],
-     # ocamlopt generates PIC code or doesn't generate code at all
-     [],
-   [AS_CASE([$host],
---- ocaml-4.14.0/configure
-+++ ocaml-4.14.0/configure
-@@ -13886,7 +13886,7 @@
- # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
- 
- case $arch in #(
--  amd64|arm64|s390x|none) :
-+  amd64|arm64|s390x|power|none) :
-     # ocamlopt generates PIC code or doesn't generate code at all
-      ;; #(
-   *) :
diff --git a/srcpkgs/ocaml/template b/srcpkgs/ocaml/template
index f44b0b83941a22..585bca3f1cae35 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,27 @@
 # Template file for 'ocaml'
 pkgname=ocaml
-version=4.14.0
-revision=2
+version=5.1.1
+revision=1
 build_style="gnu-configure"
 configure_args="--with-pic --libdir=/usr/lib/ocaml"
-make_build_target="world.opt"
-makedepends="ncurses-devel libX11-devel"
-short_desc="Main implementation of the Caml language"
+makedepends="libzstd-devel"
+depends="${makedepends}"
+short_desc="Main implementation of the OCaml language"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="QPL-1.0, LGPL-2.1-only"
 homepage="http://ocaml.org/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
-checksum=39f44260382f28d1054c5f9d8bf4753cb7ad64027da792f7938344544da155e8
+distfiles="https://github.com/ocaml/ocaml/archive/${version}.tar.gz"
+checksum=57f7b382b3d71198413ede405d95ef3506f1cdc480cda1dca1e26b37cb090e17
 nocross=yes
 
-export ASPP="cc -c"
-
 case "$XBPS_TARGET_MACHINE" in
-	# also just segfaults when compiled without PIE (BSS-PLT?)
-	ppc-musl) broken="/usr/bin/ocamlc: unsupported relocation type 6";;
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_target="world.opt";;
+	*) make_build_target="world";;
 esac
 
+export ASPP="cc -c"
+
 post_install() {
 	vlicense LICENSE
 }

From ac7de3595946bb03f0bd62cce7f03a169c77b6ea Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:16:57 +0100
Subject: [PATCH 02/21] ocaml-findlib: update to 1.9.6.

---
 srcpkgs/ocaml-findlib/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..25fbecf81cc54a 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,17 +1,17 @@
 # Template file for 'ocaml-findlib'
 pkgname=ocaml-findlib
-version=1.9.3
-revision=2
+version=1.9.6
+revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
 make_build_args="all opt"
-makedepends="ncurses-devel ocaml ocamlbuild"
+makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="http://projects.camlcity.org/projects/findlib.html"
 distfiles="http://download.camlcity.org/download/findlib-${version}.tar.gz"
-checksum=c310fcb62838d9e50f0b6d6c5ceefcbe4fe056f72496950ae7d5c6cdaae2cc41
+checksum=2df996279ae16b606db5ff5879f93dbfade0898db9f1a3e82f7f845faa2930a2
 nocross=yes
 nopie=yes
 disable_parallel_build=yes

From ec97d2ee05f0de2dd6969ea11aac2c70c257b602 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:25 +0100
Subject: [PATCH 03/21] ocaml-num: update to 1.5.

---
 srcpkgs/ocaml-num/template | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..f2e6c90c3d6eed 100644
--- a/srcpkgs/ocaml-num/template
+++ b/srcpkgs/ocaml-num/template
@@ -1,23 +1,21 @@
 # Template file for 'ocaml-num'
 pkgname=ocaml-num
-version=1.4
-revision=4
-build_style=gnu-makefile
-make_install_target="findlib-install"
-makedepends="ocaml ocaml-findlib"
+version=1.5
+revision=1
+makedepends="ocaml dune"
 short_desc="OCaml legacy Num library for arbitrary-precision integers"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="custom: LGPL-2.1-only with OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/num"
 distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
-checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
+checksum=7ae07c8f5601e2dfc5008a62dcaf2719912ae596a19365c5d7bdf2230515959a
 nocross=yes
 
-pre_install() {
-	export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
-	vmkdir /usr/lib/ocaml/stublibs
+do_build() {
+	dune build --display=short
 }
-
-post_install() {
+do_install() {
+	dune install --prefix=/usr --destdir="$DESTDIR" \
+		--libdir=/usr/lib/ocaml --docdir=/usr/share/doc
 	vlicense LICENSE
 }

From ef47b140be59cb72dc6bb157ba3b782a21ca9cbc Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:18:59 +0100
Subject: [PATCH 04/21] ocaml-zarith: update to 1.13.

---
 srcpkgs/ocaml-zarith/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index 8c5485e6981810..dfef566ae3079a 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-zarith'
 pkgname=ocaml-zarith
-version=1.12
-revision=4
+version=1.13
+revision=1
 build_style=configure
 make_check_target="tests"
 hostmakedepends="perl"
@@ -12,13 +12,16 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only,OCaml-LGPL-linking-exception"
 homepage="https://github.com/ocaml/zarith"
 distfiles="https://github.com/ocaml/zarith/archive/release-${version}.tar.gz"
-checksum=cc32563c3845c86d0f609c86d83bf8607ef12354863d31d3bffc0dacf1ed2881
+checksum=a5826d33fea0103ad6e66f92583d8e075fb77976de893ffdd73ada0409b3f83b
 nocross=yes
 disable_parallel_build=yes
 
 post_configure() {
 	sed -i 's/INSTALLDIR=/&$(DESTDIR)/' Makefile
 }
+pre_install() {
+	mkdir -p ${DESTDIR}/usr/lib/ocaml/stublibs
+}
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }

From 1a3868718ee45ba5517848f881bf2e8868a47774 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:20:43 +0100
Subject: [PATCH 05/21] ocamlbuild: update to 0.14.3.

Support bytecode-only.
---
 srcpkgs/ocamlbuild/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..2cb928255b9c7a 100644
--- a/srcpkgs/ocamlbuild/template
+++ b/srcpkgs/ocamlbuild/template
@@ -1,6 +1,6 @@
 # Template file for 'ocamlbuild'
 pkgname=ocamlbuild
-version=0.14.2
+version=0.14.3
 revision=1
 build_style=gnu-makefile
 hostmakedepends="ocaml"
@@ -9,7 +9,11 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.0-only"
 homepage="https://github.com/ocaml/ocamlbuild"
 distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
-checksum=62d2dab6037794c702a83ac584a7066d018cf1645370d1f3d5764c2b458791b1
+checksum=ce151bfd2141abc6ee0b3f25ba609e989ff564a48bf795d6fa7138a4db0fc2e1
 nocross=yes
 
 export CHECK_IF_PREINSTALLED=false
+
+pre_build() {
+	command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}

From 09ab4fdd81613b6f3518a596eec98d734c74d608 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:21:38 +0100
Subject: [PATCH 06/21] ocaml-stdcompat: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-stdcompat/template | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..4bdd6cbbfb7ad8 100644
--- a/srcpkgs/ocaml-stdcompat/template
+++ b/srcpkgs/ocaml-stdcompat/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-stdcompat'
 pkgname=ocaml-stdcompat
 version=19
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--libdir=/usr/lib/ocaml"
 hostmakedepends="automake"
@@ -15,6 +15,14 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
 nocross=yes
 disable_parallel_build=yes
 
+disable_parallel_build=yes
+
+pre_configure() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		sed -i 's/AC_SUBST(\[OCAMLOPT\], \[\["$OCAMLFIND ocamlopt"\]\])//' configure.ac
+	fi
+}
+
 post_install() {
 	vlicense COPYING LICENSE
 }

From 656f8fd66efa760e8d4dcb3cd4db17d717010245 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 22:26:09 +0100
Subject: [PATCH 07/21] opam: rebuild for ocaml-5.1.1.

---
 srcpkgs/opam/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..7ecafb97295a6d 100644
--- a/srcpkgs/opam/template
+++ b/srcpkgs/opam/template
@@ -1,7 +1,7 @@
 # Template file for 'opam'
 pkgname=opam
 version=2.1.5
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--docdir=/usr/share/doc/${pkgname}"
 make_build_args="lib-ext all"
@@ -13,7 +13,7 @@ short_desc="OCaml package manager"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-3.0-only"
 homepage="https://opam.ocaml.org/"
-distfiles="https://github.com/ocaml/${pkgname}/archive/${version}.tar.gz"
+distfiles="https://github.com/ocaml/opam/archive/${version}.tar.gz"
 checksum=2eb2a21f4d64d1eb2eece2e8d28678be823d3f6846c28fc0fbd5645738fe0f81
 nocross=yes
 disable_parallel_build=yes

From 171a2218275046daf21d5be668530dfee90aba72 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:03:11 +0100
Subject: [PATCH 08/21] unison: rebuild for ocaml-5.1.1.

---
 srcpkgs/unison/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..6f9daf259f27b5 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -1,7 +1,7 @@
 # Template file for 'unison'
 pkgname=unison
 version=2.53.4
-revision=1
+revision=2
 hostmakedepends="ocaml"
 short_desc="File-synchronization tool"
 maintainer="Andrew J. Hesford <ajh@sideband.org>"
@@ -12,7 +12,8 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
 nocross="OCaml does not cross compile"
 
 do_build() {
-	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+	command -v ocamlc.opt >/dev/null && NATIVE=true || NATIVE=false
+	CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$native
 	CFLAGS= make ${makejobs} -C man
 }
 

From 8e14a0591de7ac1bea511eba4b69b2c40f3b0657 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:05:52 +0100
Subject: [PATCH 09/21] dune: update to 3.14.0.

---
 srcpkgs/dune/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..86b4943fc66720 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,6 +1,6 @@
 # Template file for 'dune'
 pkgname=dune
-version=3.13.0
+version=3.14.0
 revision=1
 makedepends="ocaml"
 depends="ocaml"
@@ -10,7 +10,7 @@ license="MIT"
 homepage="https://dune.build/"
 changelog="https://raw.githubusercontent.com/ocaml/dune/main/CHANGES.md"
 distfiles="https://github.com/ocaml/dune/releases/download/${version}/dune-${version}.tbz"
-checksum=f1801257e01c846bd71017ec5d4b2b75fd31b20a0d5979b933b37cc8453678de
+checksum=f4d09d89162621fdff424c253fa50c4920d2179fb5b3d1debab7bbe97c68b2fc
 nocross="ocaml"
 
 _dune_release_pkgs="dune dune-build-info dune-configurator

From d0638f20fffbac1c8ffcc003b3403ed8c2086323 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:57 +0100
Subject: [PATCH 10/21] ocaml-camlp-streams: rebuild for ocaml-5.1.1.

---
 srcpkgs/ocaml-camlp-streams/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-camlp-streams/template b/srcpkgs/ocaml-camlp-streams/template
index e32f04aae51b69..4b7f1bae08874a 100644
--- a/srcpkgs/ocaml-camlp-streams/template
+++ b/srcpkgs/ocaml-camlp-streams/template
@@ -1,7 +1,7 @@
 # Template file for 'ocaml-camlp-streams'
 pkgname=ocaml-camlp-streams
 version=5.0.1
-revision=1
+revision=2
 makedepends="ocaml dune"
 short_desc="Stream and Genlex libraries for use with Camlp4 and Camlp5"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 5b047c904a2d86df7665e779880355f20133a6eb Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Wed, 21 Dec 2022 23:04:16 +0100
Subject: [PATCH 11/21] camlp5: remove, unneeded.

---
 srcpkgs/camlp5/template | 20 --------------------
 srcpkgs/camlp5/update   |  2 --
 2 files changed, 22 deletions(-)
 delete mode 100644 srcpkgs/camlp5/template
 delete mode 100644 srcpkgs/camlp5/update

diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f02..00000000000000
--- a/srcpkgs/camlp5/template
+++ /dev/null
@@ -1,20 +0,0 @@
-# Template file for 'camlp5'
-pkgname=camlp5
-version=8.00.04
-revision=1
-build_style=configure
-configure_args="-mandir /usr/share/man"
-hostmakedepends="ocaml perl ocaml-findlib"
-makedepends="ocaml-camlp-streams"
-short_desc="OCaml preprocessor and pretty-printer"
-maintainer="Leah Neukirchen <leah@vuxu.org>"
-license="BSD-3-Clause"
-homepage="https://camlp5.github.io/"
-distfiles="https://github.com/${pkgname}/${pkgname}/archive/rel${version}.tar.gz"
-checksum=bddbcb5c3c2d410c9a61c4dfb6e46e3bbe984d25ac68221a7a65c82a29956b1d
-nocross=yes
-nopie=yes
-
-post_install() {
-	vlicense LICENSE
-}
diff --git a/srcpkgs/camlp5/update b/srcpkgs/camlp5/update
deleted file mode 100644
index d3695ee92307ba..00000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'

From 817e70e6d6f2462b77ab0844913bb3c9e0b56e80 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:47:47 +0200
Subject: [PATCH 12/21] coq: update to 8.19.0.

---
 srcpkgs/coq/template | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..9ceb3b7d20df00 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,35 @@
 # Template file for 'coq'
 pkgname=coq
-version=8.18.0
+version=8.19.0
 revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+hostmakedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
 depends="ocaml-findlib"
+checkdepends="python3 rsync time"
 short_desc="Proof assistant written in OCaml"
 maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="LGPL-2.1-only"
 homepage="https://coq.inria.fr"
 distfiles="https://github.com/coq/coq/archive/V${version}.tar.gz"
-checksum=00a18c796a6e154a1f1bac7e1aef9e14107e0295fa4e0a18f10cdea6fc2e840b
+checksum=17e5c10fadcd3cda7509d822099a892fcd003485272b56a45abd30390f6a426f
 nopie=yes
 nocross=yes
+make_check=ci-skip  # takes long and has some faults
 
 case "$XBPS_TARGET_MACHINE" in
 	ppc64*) ;;
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
-post_patch() {
-	vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
 do_build() {
 	make dunestrap
-	dune build --display=short -p coq-core,coq-stdlib
+	dune build --display=short -p coq-core,coq-stdlib,coqide-server
 }
 
 do_install() {
 	dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
 		--mandir=/usr/share/man --docdir=/usr/share/doc
 }
+
+do_check() {
+	make -C test-suite UNIT_TESTS= || make -C test-suite report PRINT_LOGS=1
+}

From ec28ce10e5567ced513a38d9d8a06d4e19ab9db3 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 15 Sep 2023 15:48:06 +0200
Subject: [PATCH 13/21] mathcomp: update to 1.19.0.

---
 srcpkgs/mathcomp/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..a3dd0e98b55d48 100644
--- a/srcpkgs/mathcomp/template
+++ b/srcpkgs/mathcomp/template
@@ -1,7 +1,7 @@
 # Template file for 'mathcomp'
 pkgname=mathcomp
-version=1.17.0
-revision=3
+version=1.19.0
+revision=1
 build_wrksrc="mathcomp"
 build_style=gnu-makefile
 hostmakedepends="coq ocaml-findlib"
@@ -10,7 +10,7 @@ maintainer="Leah Neukirchen <leah@vuxu.org>"
 license="CECILL-B"
 homepage="https://github.com/math-comp/math-comp"
 distfiles="https://github.com/math-comp/math-comp/archive/${pkgname}-${version}.tar.gz"
-checksum=1779bcdac5d23d90997627364a5943ef4883c6eb54d67ddbb1dfbe6b7795a188
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
 nocross="ocaml"
 
 post_patch() {

From ba9facb18db6db8a5fdc4938ba517b1b0380ffae Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 16 Sep 2023 15:52:06 +0200
Subject: [PATCH 14/21] ocaml-findlib: support bytecode-only.

---
 srcpkgs/ocaml-findlib/template | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index 25fbecf81cc54a..b1bf955df669eb 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -4,7 +4,6 @@ version=1.9.6
 revision=1
 build_style=configure
 configure_args="-config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
-make_build_args="all opt"
 makedepends="ocaml ocamlbuild"
 short_desc="OCaml package manager"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -16,9 +15,18 @@ nocross=yes
 nopie=yes
 disable_parallel_build=yes
 
+case "$XBPS_TARGET_MACHINE" in
+	# native code platforms
+	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+	*) make_build_target="all";;
+esac
+
+
 do_install() {
 	make prefix="$DESTDIR" install
-	vbin src/findlib/ocamlfind_opt
+	if [ -f src/findlib/ocamlfind_opt ]; then
+		vbin src/findlib/ocamlfind_opt
+	fi
 	vlicense LICENSE
 
 	rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild

From 8d3879e91719455eaf724e7767c58fc4ebe7369b Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:41:42 +0100
Subject: [PATCH 15/21] supermin: update to 5.3.4.

---
 srcpkgs/supermin/template | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..954c342d1f167b 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,8 +1,8 @@
 # Template file for 'supermin'
 pkgname=supermin
-version=5.2.2
-revision=2
-_release_series=5.2-stable
+version=5.3.4
+revision=1
+_release_series=5.3-development
 build_style=gnu-configure
 hostmakedepends="ocaml ocaml-findlib pkg-config e2fsprogs cpio perl"
 makedepends="e2fsprogs-devel"
@@ -12,5 +12,11 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
 license="GPL-2.0-or-later"
 homepage="http://people.redhat.com/~rjones/supermin/"
 distfiles="http://download.libguestfs.org/supermin/${_release_series}/supermin-${version}.tar.gz"
-checksum=ce3921d3635c8168cfb7ca0c5a82b9d5cef5b2b271f84b776d63b8bbbeec358e
+checksum=cc0322991bea1fcc6355518474b39e2d4a341f1e2c36fd98f14c3446ef79ff70
 nocross=yes
+make_check=no # distro dependent assumptions
+
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+	makedepends+=" musl-fts-devel"
+	LDFLAGS="-lfts"
+fi

From 0185c528014b252d4141719d71be4f71db07b471 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 15:45:41 +0100
Subject: [PATCH 16/21] coccinelle: update to 1.1.1p20240218.

No upstream release in over two years, needed for OCaml 5 support.
---
 srcpkgs/coccinelle/template | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/coccinelle/template b/srcpkgs/coccinelle/template
index 20faebd1e0a4f7..c63fa20be18528 100644
--- a/srcpkgs/coccinelle/template
+++ b/srcpkgs/coccinelle/template
@@ -1,9 +1,10 @@
 # Template file for 'coccinelle'
 pkgname=coccinelle
-version=1.1.1
+version=1.1.1p20240218
 revision=1
+_gitrev=68c580f1f1abf9979d591371e5b2e474f97dac90
 build_style=gnu-configure
-configure_args="--without-pdflatex --enable-release --enable-opt
+configure_args="--without-pdflatex --enable-release
  --with-python=/usr/bin/python3"
 hostmakedepends="python3 automake libtool ocaml"
 makedepends="ocaml ocaml-findlib ocaml-num ocaml-stdcompat
@@ -12,10 +13,16 @@ short_desc="Program matching and transformation engine"
 maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-only"
 homepage="https://coccinelle.gitlabpages.inria.fr/website/"
-distfiles="https://github.com/coccinelle/coccinelle/archive/refs/tags/$version.tar.gz"
-checksum=095919e129ac563586d880ebbc5aac829fec224177090aebe34dc34ed5f142bf
+distfiles="https://github.com/coccinelle/coccinelle/archive/${_gitrev}.tar.gz"
+checksum=bdda73a6827d1c2e5f85bafa25a0d03810298c0653ebd40a1eceaf6ca2cd72c0
 disable_parallel_build=yes
 nocross=yes
+make_check=ci-skip # broken out of the box
+
+case "$XBPS_TARGET_MACHINE" in
+	x86_64*|aarch64*|riscv64*) ;;
+	*) broken="bundled mehir wants ocamlopt";;
+esac
 
 pre_configure() {
 	autoreconf -fi

From de831ebc6c51098dab0d54fecda78929994e1d68 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Fri, 23 Feb 2024 16:25:59 +0100
Subject: [PATCH 17/21] xen: rebuild for ocaml-5.1.1.

---
 srcpkgs/xen/patches/ocaml-5.patch | 28 ++++++++++++++++++++++++++++
 srcpkgs/xen/template              |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/xen/patches/ocaml-5.patch

diff --git a/srcpkgs/xen/patches/ocaml-5.patch b/srcpkgs/xen/patches/ocaml-5.patch
new file mode 100644
index 00000000000000..9b590de12286b2
--- /dev/null
+++ b/srcpkgs/xen/patches/ocaml-5.patch
@@ -0,0 +1,28 @@
+X-Git-Url: https://xenbits.xen.org/gitweb/?p=xen.git;a=blobdiff_plain;f=tools%2Focaml%2Flibs%2FMakefile;h=89350aa12fdc6dbf0fe461bf7e4644cbb16b8462;hp=5146c524846083f343b5d4c5c2ccbb060dc94a67;hb=e51d31f79edc10f8d622e7f5bf4b935af6d4618f;hpb=bf652a50fb3bb3b1b3d93db6fb79bc28f978fe75
+
+Remove broken libs (like upstream later).
+
+--- xen-4.14.1/tools/ocaml/libs/Makefile
++++ xen-4.14.1/tools/ocaml/libs/Makefile
+@@ -3,9 +3,8 @@
+ 
+ SUBDIRS= \
+ 	mmap \
+-	xentoollog \
+ 	xc eventchn \
+-	xb xs xl
++	xb xs
+ 
+ .PHONY: all
+ all: subdirs-all
+--- xen-4.14.1/tools/ocaml/xenstored/disk.ml
++++ xen-4.14.1/tools/ocaml/xenstored/disk.ml
+@@ -30,7 +30,7 @@
+ 	| _          -> raise (Failure "undecify")
+ 
+ let unhex c =
+-	let c = Char.lowercase c in
++	let c = Char.lowercase_ascii c in
+ 	match c with
+ 	| '0' .. '9' -> (Char.code c) - (Char.code '0')
+ 	| 'a' .. 'f' -> (Char.code c) - (Char.code 'a') + 10
diff --git a/srcpkgs/xen/template b/srcpkgs/xen/template
index 011d1704fcd8cb..52ae2f85c33e33 100644
--- a/srcpkgs/xen/template
+++ b/srcpkgs/xen/template
@@ -1,7 +1,7 @@
 # Template file for 'xen'
 pkgname=xen
 version=4.14.1
-revision=10
+revision=11
 # grep -R IPXE_GIT_TAG src/xen-*/tools/firmware/etherboot
 _git_tag_ipxe=4bd064de239dab2426b31c9789a1f4d78087dc63
 # TODO: arm / aarch64

From f211a24b4897a750ef2e56e62b743904d36d6c08 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:20:46 +0100
Subject: [PATCH 18/21] ocaml-findlib: don't strip bytecode.

---
 srcpkgs/ocaml-findlib/template | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index b1bf955df669eb..e57252cac779a8 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -16,9 +16,12 @@ nopie=yes
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	# native code platforms
-	x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
-	*) make_build_target="all";;
+# native code platforms
+x86_64*|aarch64*|riscv64*)
+	make_build_args="all opt";;
+*)
+	nostrip=yes  # breaks bytecode!
+	make_build_target="all";;
 esac
 
 

From 0ec28d2377f8f6c008e5b572fcc51c5a4d80b9e7 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:21:05 +0100
Subject: [PATCH 19/21] coq: fix build with bytecode.

---
 srcpkgs/coq/template | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 9ceb3b7d20df00..0af19896f01be2 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -20,6 +20,13 @@ case "$XBPS_TARGET_MACHINE" in
 	ppc*) broken="R_PPC_REL24 relocation out of range";;
 esac
 
+do_patch() {
+	if ! command -v ocamlc.opt >/dev/null; then
+		# see coq/coq#18609
+		vsed -i -e 's/dep ^ ".cmxs"/dep ^ ".cma"/' tools/dune_rule_gen/coq_rules.ml
+	fi
+}
+
 do_build() {
 	make dunestrap
 	dune build --display=short -p coq-core,coq-stdlib,coqide-server

From 9110982477a0a1b8878370f8152e47fe1cce297d Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 01:49:24 +0100
Subject: [PATCH 20/21] ocaml-zarith: skip tests when bytecode only.

---
 srcpkgs/ocaml-zarith/template | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/ocaml-zarith/template b/srcpkgs/ocaml-zarith/template
index dfef566ae3079a..613079976ff143 100644
--- a/srcpkgs/ocaml-zarith/template
+++ b/srcpkgs/ocaml-zarith/template
@@ -3,7 +3,6 @@ pkgname=ocaml-zarith
 version=1.13
 revision=1
 build_style=configure
-make_check_target="tests"
 hostmakedepends="perl"
 makedepends="gmp-devel ocaml"
 depends="gmp-devel"
@@ -25,3 +24,7 @@ pre_install() {
 post_install() {
 	vcopy META usr/lib/ocaml/zarith
 }
+do_check() {
+	command -v ocamlc.opt >/dev/null || return 0
+	make tests
+}

From f13ecd5f75f238a63305275de20d8041b3e4e417 Mon Sep 17 00:00:00 2001
From: Leah Neukirchen <leah@vuxu.org>
Date: Sat, 24 Feb 2024 17:28:12 +0100
Subject: [PATCH 21/21] zeroinstall: rebuild and fix for ocaml-5.1.1.

---
 srcpkgs/zeroinstall/template | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/zeroinstall/template b/srcpkgs/zeroinstall/template
index fedca44abc9fb7..2c4ed76183080c 100644
--- a/srcpkgs/zeroinstall/template
+++ b/srcpkgs/zeroinstall/template
@@ -1,10 +1,10 @@
 # Template file for 'zeroinstall'
 pkgname=zeroinstall
 version=2.18
-revision=1
+revision=2
 build_style=gnu-makefile
 make_install_target="install_system"
-hostmakedepends="gettext ocaml opam m4 tar pkg-config which"
+hostmakedepends="gettext ocaml opam m4 tar pkg-config which git"
 makedepends="openssl-devel libcurl-devel gnupg glib-devel gtk+3-devel"
 depends="gnupg desktop-file-utils hicolor-icon-theme xdg-utils"
 short_desc="Cross-distribution software installation system"
@@ -18,13 +18,15 @@ nocross="opam is nocross"
 disable_parallel_build=yes
 
 case "$XBPS_TARGET_MACHINE" in
-	ppc64*) ;;
-	ppc*) broken="relocation out of range";;
+	x86_64*|aarch64*|riscv64*) ;;
+	*) broken="needs ocurl which wants ocamlopt";;
 esac
 
 pre_build() {
 	opam init -y --compiler=ocaml-system --disable-sandboxing
 	eval $(opam env)
+	# thx @kit-ty-kate for ocaml 5 fix.
+	opam pin add -yn git+https://github.com/ocaml-community/obus#03129dac072e7a7370c2c92b9d447e47f784b7c7
 	opam install -y yojson xmlm ounit lwt lwt_react obus ocurl sha dune lablgtk3 lwt_glib
 }
 

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (43 preceding siblings ...)
  2024-02-24 22:54 ` leahneukirchen
@ 2024-02-25 14:16 ` mobinmob
  2024-02-25 16:41 ` [PR PATCH] [Merged]: " leahneukirchen
  45 siblings, 0 replies; 47+ messages in thread
From: mobinmob @ 2024-02-25 14:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

New comment by mobinmob on void-packages repository

https://github.com/void-linux/void-packages/pull/41227#issuecomment-1962955031

Comment:
@leahneukirchen Thanks for the mention and the fix.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PR PATCH] [Merged]: [WIP] ocaml: update to 5.1.1.
  2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
                   ` (44 preceding siblings ...)
  2024-02-25 14:16 ` mobinmob
@ 2024-02-25 16:41 ` leahneukirchen
  45 siblings, 0 replies; 47+ messages in thread
From: leahneukirchen @ 2024-02-25 16:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

There's a merged pull request on the void-packages repository

[WIP] ocaml: update to 5.1.1.
https://github.com/void-linux/void-packages/pull/41227

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

Broken packages:
- [x] supermin
- [x] coccinelle
- [x] coq
	- [x] mathcomp
- [x] xen
- [x] zeroinstall

#### Testing the changes
- I tested the changes in this PR: **briefly**


^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2024-02-25 16:41 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21 22:30 [PR PATCH] [WIP] ocaml: update to 5.0.0 leahneukirchen
2023-03-22  1:54 ` github-actions
2023-03-22 16:46 ` [PR PATCH] [Closed]: " leahneukirchen
2023-03-22 16:46 ` [PR PATCH] [Updated] " leahneukirchen
2023-03-22 16:48 ` leahneukirchen
2023-06-21  1:56 ` github-actions
2023-07-05  2:06 ` [PR PATCH] [Closed]: " github-actions
2023-07-05 12:24 ` leahneukirchen
2023-09-14 18:48 ` kit-ty-kate
2023-09-14 19:33 ` [PR REVIEW] " kit-ty-kate
2023-09-15 14:32 ` [PR PATCH] [Updated] " leahneukirchen
2023-09-15 14:33 ` leahneukirchen
2023-09-15 18:28 ` [PR REVIEW] " kit-ty-kate
2023-09-15 18:29 ` kit-ty-kate
2023-09-15 18:29 ` kit-ty-kate
2023-09-15 20:50 ` leahneukirchen
2023-09-15 20:53 ` [PR PATCH] [Updated] " leahneukirchen
2023-09-16 10:10 ` [PR REVIEW] " kit-ty-kate
2023-09-16 11:30 ` [PR PATCH] [Updated] " leahneukirchen
2023-09-16 13:52 ` leahneukirchen
2023-12-05 13:02 ` [PR REVIEW] " kit-ty-kate
2023-12-05 13:02 ` kit-ty-kate
2024-01-30  8:17 ` MIvanchev
2024-01-30  8:18 ` MIvanchev
2024-01-30 13:05 ` kit-ty-kate
2024-01-30 13:12 ` MIvanchev
2024-01-30 13:19 ` kit-ty-kate
2024-01-30 13:29 ` leahneukirchen
2024-01-30 16:50 ` MIvanchev
2024-01-31 19:02 ` MIvanchev
2024-02-06 12:02 ` MIvanchev
2024-02-06 12:03 ` MIvanchev
2024-02-06 12:05 ` MIvanchev
2024-02-22 22:22 ` leahneukirchen
2024-02-22 22:26 ` kit-ty-kate
2024-02-24  0:21 ` [PR PATCH] [Updated] " leahneukirchen
2024-02-24  0:32 ` [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1 leahneukirchen
2024-02-24  8:20 ` MIvanchev
2024-02-24 11:04 ` MIvanchev
2024-02-24 12:23 ` MIvanchev
2024-02-24 17:26 ` [PR PATCH] [Updated] " leahneukirchen
2024-02-24 17:27 ` leahneukirchen
2024-02-24 19:55 ` [PR PATCH] [Updated] " leahneukirchen
2024-02-24 21:06 ` leahneukirchen
2024-02-24 22:54 ` leahneukirchen
2024-02-25 14:16 ` mobinmob
2024-02-25 16:41 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).