From 32c3df4164fa36d1a438dc36d93a1ebfd4a99806 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen 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 -+ - #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 " 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 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 " 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 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 " 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 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 " 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 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 " 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 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 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 " 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 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 " From 96d0ae3b0a9f178b33853a5f392b1a80d38a94fa Mon Sep 17 00:00:00 2001 From: Leah Neukirchen 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 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 " From cc3a1eebe863c3e4dc730f95e79e873aa46b85b1 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen 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 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 " -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 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 " 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 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 " 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 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 " @@ -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 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 " 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 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 " 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 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 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 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