* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
@ 2024-01-30 17:06 ` MIvanchev
2024-01-30 17:16 ` MIvanchev
` (112 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 17:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 14595 bytes --]
From 421e9278987f246cb999e6db4ba065eae162929a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
11 files changed, 33 insertions(+), 299 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
2024-01-30 17:06 ` [PR PATCH] [Updated] [WIP] " MIvanchev
@ 2024-01-30 17:16 ` MIvanchev
2024-01-30 17:36 ` MIvanchev
` (111 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 17:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 15665 bytes --]
From 9e46e72808fca389b424810fcf37718973de3cff Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
12 files changed, 39 insertions(+), 302 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
2024-01-30 17:06 ` [PR PATCH] [Updated] [WIP] " MIvanchev
2024-01-30 17:16 ` MIvanchev
@ 2024-01-30 17:36 ` MIvanchev
2024-01-30 17:48 ` MIvanchev
` (110 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 17:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17042 bytes --]
From d10e1c4f856de0b36d426ca7f7186a8dab9f8357 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 69 insertions(+), 302 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (2 preceding siblings ...)
2024-01-30 17:36 ` MIvanchev
@ 2024-01-30 17:48 ` MIvanchev
2024-01-30 17:55 ` MIvanchev
` (109 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 17:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17046 bytes --]
From 47f36de7de826d51f946c79967a6b9a45bd5b148 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 69 insertions(+), 302 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..9edb1e0cabcc6 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,8 @@
# 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"
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (3 preceding siblings ...)
2024-01-30 17:48 ` MIvanchev
@ 2024-01-30 17:55 ` MIvanchev
2024-01-30 18:07 ` MIvanchev
` (108 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 17:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17349 bytes --]
From 9eeccb38e4429b9812eb2e66caa838869d70598b Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 10 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 70 insertions(+), 303 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..697c64c3411e6 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,15 +1,15 @@
# 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"
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
@@ -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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (4 preceding siblings ...)
2024-01-30 17:55 ` MIvanchev
@ 2024-01-30 18:07 ` MIvanchev
2024-01-30 20:24 ` MIvanchev
` (107 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 18:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18382 bytes --]
From eb43a0d4afce25104fbdd32d7da91f6483afb9db Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/findlib.patch | 13 ++
srcpkgs/coq/template | 10 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 83 insertions(+), 303 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/findlib.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/findlib.patch b/srcpkgs/coq/patches/findlib.patch
new file mode 100644
index 0000000000000..7d298b05db402
--- /dev/null
+++ b/srcpkgs/coq/patches/findlib.patch
@@ -0,0 +1,13 @@
+diff --git a/tools/configure/configure.ml b/tools/configure/configure.ml
+index 02f9e49e9e..b583b7b23c 100644
+--- a/tools/configure/configure.ml
++++ b/tools/configure/configure.ml
+@@ -89,7 +89,7 @@ let resolve_caml () =
+ if not (is_executable camlexec.find)
+ then die ("Error: cannot find the executable '"^camlexec.find^"'.")
+ else
+- let findlib_version, _ = run camlexec.find ["query"; "findlib"; "-format"; "%v"] in
++ let findlib_version, _ = run camlexec.find ["query"; "-format"; "%v"; "findlib"] in
+ let caml_version, _ = run camlexec.find ["ocamlc";"-version"] in
+ let camllib, _ = run camlexec.find ["printconf";"stdlib"] in
+ let camlbin = (* TODO beurk beurk beurk *)
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..697c64c3411e6 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,15 +1,15 @@
# 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"
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
@@ -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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (5 preceding siblings ...)
2024-01-30 18:07 ` MIvanchev
@ 2024-01-30 20:24 ` MIvanchev
2024-01-30 20:25 ` MIvanchev
` (106 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 20:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18656 bytes --]
From e2236b3371f0b3d559f7a76c6964b78bf2316926 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/findlib.patch | 13 ++
srcpkgs/coq/template | 19 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 85 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/findlib.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/findlib.patch b/srcpkgs/coq/patches/findlib.patch
new file mode 100644
index 0000000000000..7d298b05db402
--- /dev/null
+++ b/srcpkgs/coq/patches/findlib.patch
@@ -0,0 +1,13 @@
+diff --git a/tools/configure/configure.ml b/tools/configure/configure.ml
+index 02f9e49e9e..b583b7b23c 100644
+--- a/tools/configure/configure.ml
++++ b/tools/configure/configure.ml
+@@ -89,7 +89,7 @@ let resolve_caml () =
+ if not (is_executable camlexec.find)
+ then die ("Error: cannot find the executable '"^camlexec.find^"'.")
+ else
+- let findlib_version, _ = run camlexec.find ["query"; "findlib"; "-format"; "%v"] in
++ let findlib_version, _ = run camlexec.find ["query"; "-format"; "%v"; "findlib"] in
+ let caml_version, _ = run camlexec.find ["ocamlc";"-version"] in
+ let camllib, _ = run camlexec.find ["printconf";"stdlib"] in
+ let camlbin = (* TODO beurk beurk beurk *)
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..83e6078bd5205 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,24 @@
# 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"
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
-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,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (6 preceding siblings ...)
2024-01-30 20:24 ` MIvanchev
@ 2024-01-30 20:25 ` MIvanchev
2024-01-30 21:34 ` MIvanchev
` (105 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 20:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17623 bytes --]
From d90f2452df0870eabaff6d52905f2ab38740c457 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 19 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 20 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 72 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..83e6078bd5205 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,24 @@
# 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"
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
-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,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..b1bf955df669e 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (7 preceding siblings ...)
2024-01-30 20:25 ` MIvanchev
@ 2024-01-30 21:34 ` MIvanchev
2024-01-30 21:54 ` MIvanchev
` (104 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 21:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17731 bytes --]
From 2e0bb7ced97d2cfaaf24af0b41883720b1e79b05 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 19 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 73 insertions(+), 311 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..83e6078bd5205 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,24 @@
# 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"
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
-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,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..717767e04f322 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (8 preceding siblings ...)
2024-01-30 21:34 ` MIvanchev
@ 2024-01-30 21:54 ` MIvanchev
2024-01-31 8:27 ` MIvanchev
` (103 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-30 21:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17810 bytes --]
From 377e64e6c45e5b61c4bd1f0606332ec69f7731e2 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 19 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 75 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..192e89b02631b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,28 @@
# 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"
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
-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
+pre_build() {
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..717767e04f322 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (9 preceding siblings ...)
2024-01-30 21:54 ` MIvanchev
@ 2024-01-31 8:27 ` MIvanchev
2024-01-31 8:41 ` MIvanchev
` (102 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 8:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17883 bytes --]
From 14df48f36d6de401073c8701655177c5e35e8da8 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 19 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 26 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 79 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..192e89b02631b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,28 @@
# 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"
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
-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
+pre_build() {
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..bb534f494c6dc 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,37 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+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
}
+
+post_install() {
+ /usr/bin/ocamlfind query -format %v findlib
+}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (10 preceding siblings ...)
2024-01-31 8:27 ` MIvanchev
@ 2024-01-31 8:41 ` MIvanchev
2024-01-31 8:54 ` MIvanchev
` (101 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 8:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17865 bytes --]
From 71679aa0fd0b145113b53a243f24a58e1d413e51 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 77 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..3087fe03da7c1 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,30 @@
# 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"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind query -format %v findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..717767e04f322 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (11 preceding siblings ...)
2024-01-31 8:41 ` MIvanchev
@ 2024-01-31 8:54 ` MIvanchev
2024-01-31 11:37 ` MIvanchev
` (100 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 8:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17908 bytes --]
From eef193d56a89a40a2810b161c2d6fa60e9927af0 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 22 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 78 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..d0a6316222a5b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,31 @@
# 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"
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
-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
+pre_build() {
+ #/usr/bin/ocamlfind query -help
+ /usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..717767e04f322 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (12 preceding siblings ...)
2024-01-31 8:54 ` MIvanchev
@ 2024-01-31 11:37 ` MIvanchev
2024-01-31 11:53 ` MIvanchev
` (99 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 11:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17907 bytes --]
From 1d647991ba5c1a56a3842fd14b231603dda79d90 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 22 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 78 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..2530719d8a13a 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,31 @@
# 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"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind query -help
+ /usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..717767e04f322 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (13 preceding siblings ...)
2024-01-31 11:37 ` MIvanchev
@ 2024-01-31 11:53 ` MIvanchev
2024-01-31 13:25 ` MIvanchev
` (98 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 11:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17940 bytes --]
From f9052d9c5cfa026fa685fc306dac64c79226fe59 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 23 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 79 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..effb7e1061053 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,32 @@
# 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"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind help
+ /usr/bin/ocamlfind query -help
+ /usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..717767e04f322 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,32 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (14 preceding siblings ...)
2024-01-31 11:53 ` MIvanchev
@ 2024-01-31 13:25 ` MIvanchev
2024-01-31 13:38 ` MIvanchev
` (97 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 13:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18095 bytes --]
From d1ce17f91c8b948c99922df50d297a921412064c Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 22 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 27 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 83 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..2530719d8a13a 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,31 @@
# 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"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind query -help
+ /usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..de0d681ce8afd 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,37 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ /usr/bin/ocamlfind query -help
+ /usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (15 preceding siblings ...)
2024-01-31 13:25 ` MIvanchev
@ 2024-01-31 13:38 ` MIvanchev
2024-01-31 18:32 ` MIvanchev
` (96 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 13:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18115 bytes --]
From 854ce4bedd1efbf77847599387daf7197c45421f Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 22 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 27 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 83 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..2530719d8a13a 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,31 @@
# 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"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind query -help
+ /usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..7d97ae5154611 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,37 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+ ${DESTDIR}/usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (16 preceding siblings ...)
2024-01-31 13:38 ` MIvanchev
@ 2024-01-31 18:32 ` MIvanchev
2024-01-31 18:38 ` MIvanchev
` (95 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 18:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18113 bytes --]
From 7acd32306e44baf65b5901a0739af0be10d4fc64 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 22 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 27 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 83 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..2530719d8a13a 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,31 @@
# 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"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind query -help
+ /usr/bin/ocamlfind query -format "%v" findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..9e6f9b0c1e519 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,37 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+ ${DESTDIR}/usr/bin/ocamlfind query -format %v findlib
+ command -v ocamlc.opt >/dev/null || export OCAML_NATIVE=false
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (17 preceding siblings ...)
2024-01-31 18:32 ` MIvanchev
@ 2024-01-31 18:38 ` MIvanchev
2024-01-31 19:05 ` MIvanchev
` (94 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17860 bytes --]
From 4b4de50062042e8e93322a717f2160250133f970 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 20 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 25 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 79 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..d3ea83f518a63 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,29 @@
# 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"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind query -help
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..d8aa43befa069 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,35 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (18 preceding siblings ...)
2024-01-31 18:38 ` MIvanchev
@ 2024-01-31 19:05 ` MIvanchev
2024-01-31 19:12 ` MIvanchev
` (93 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 19:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17856 bytes --]
From e6e8ded39ff3c246b631a83976785e4754e92b70 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 25 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 79 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..e63c7b122ebed 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,28 @@
# 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"
-depends="ocaml-findlib"
+makedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
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
-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
+pre_build() {
+ /usr/bin/ocamlfind query -help
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
+
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..d8aa43befa069 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,35 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (19 preceding siblings ...)
2024-01-31 19:05 ` MIvanchev
@ 2024-01-31 19:12 ` MIvanchev
2024-01-31 19:13 ` MIvanchev
` (92 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 19:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17149 bytes --]
From c73d9dff978f72bf557e5c83776aaca354dd3d53 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 4 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 25 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 73 insertions(+), 299 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..1c2f7c81e34a1 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -2,8 +2,7 @@
pkgname=coq
version=8.18.0
revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
-depends="ocaml-findlib"
+makedepends="dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
short_desc="Proof assistant written in OCaml"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="LGPL-2.1-only"
@@ -27,6 +26,7 @@ do_build() {
dune build --display=short -p coq-core,coq-stdlib
}
+
do_install() {
dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..d8aa43befa069 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,35 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (20 preceding siblings ...)
2024-01-31 19:12 ` MIvanchev
@ 2024-01-31 19:13 ` MIvanchev
2024-01-31 19:21 ` MIvanchev
` (91 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 19:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 16938 bytes --]
From 6c07ba52b61682df841a50a57101bedf93ab29d5 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 4 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 25 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 73 insertions(+), 299 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..9dc02663e88f7 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>"
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..d8aa43befa069 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,35 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (21 preceding siblings ...)
2024-01-31 19:13 ` MIvanchev
@ 2024-01-31 19:21 ` MIvanchev
2024-01-31 19:30 ` MIvanchev
` (90 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 19:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17222 bytes --]
From 04392803dd909f5f9ba2a655760ea57f05d97990 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 25 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 73 insertions(+), 303 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..d8aa43befa069 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,24 +1,35 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (22 preceding siblings ...)
2024-01-31 19:21 ` MIvanchev
@ 2024-01-31 19:30 ` MIvanchev
2024-01-31 19:41 ` MIvanchev
` (89 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 19:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17289 bytes --]
From abd81622737e1f224df304fb4d29a87a4c87343e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 29 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 75 insertions(+), 305 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..e1d3249f95030 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,36 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
do_install() {
- make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
+ make install
+ #if [ -f src/findlib/ocamlfind_opt ]; then
+ # vbin src/findlib/ocamlfind_opt
+ #fi
vlicense LICENSE
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
+ #rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (23 preceding siblings ...)
2024-01-31 19:30 ` MIvanchev
@ 2024-01-31 19:41 ` MIvanchev
2024-01-31 20:19 ` MIvanchev
` (88 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 19:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17274 bytes --]
From e0f800dd712d9df184ea2bc289e65d36e3888b6e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 27 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 74 insertions(+), 304 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..e9e69ce0ae0bb 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,36 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
+ #rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (24 preceding siblings ...)
2024-01-31 19:41 ` MIvanchev
@ 2024-01-31 20:19 ` MIvanchev
2024-01-31 20:38 ` MIvanchev
` (87 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17258 bytes --]
From 7509bb176135b0a73d648e4f840b02285e07646d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 9 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 27 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 77 insertions(+), 302 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..cab2244e36f47 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,8 +18,9 @@ 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
+pre_build() {
+ cat /usr/bin/ocamlfind
+ /usr/bin/ocamlfind
}
do_build() {
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..e84d0bacf0c78 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,36 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*) make_build_args="all opt";;
+ *) make_build_target="all";;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
+ #rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (25 preceding siblings ...)
2024-01-31 20:19 ` MIvanchev
@ 2024-01-31 20:38 ` MIvanchev
2024-01-31 20:49 ` MIvanchev
` (86 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 20:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17305 bytes --]
From 968a8b6ae6a8459db5cdee3801e0b36aee780273 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 9 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 30 ++-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 80 insertions(+), 302 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..cab2244e36f47 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,8 +18,9 @@ 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
+pre_build() {
+ cat /usr/bin/ocamlfind
+ /usr/bin/ocamlfind
}
do_build() {
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..0ade61cf5f63c 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,39 @@
# 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"
+configure_args="-bindir /usr/bin -config /etc/findlib.conf -sitelib /usr/lib/ocaml -mandir /usr/share/man"
+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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
+post_install() {
+ ${DESTDIR}/usr/bin/ocamlfind query -help
+}
+
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
+ #rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (26 preceding siblings ...)
2024-01-31 20:38 ` MIvanchev
@ 2024-01-31 20:49 ` MIvanchev
2024-01-31 20:55 ` MIvanchev
` (85 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 20:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17035 bytes --]
From a7388656e38afe8ef57b8120fa3077c9067ccd3d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 9 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 72 insertions(+), 302 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..cab2244e36f47 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,8 +18,9 @@ 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
+pre_build() {
+ cat /usr/bin/ocamlfind
+ /usr/bin/ocamlfind
}
do_build() {
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (27 preceding siblings ...)
2024-01-31 20:49 ` MIvanchev
@ 2024-01-31 20:55 ` MIvanchev
2024-01-31 21:05 ` MIvanchev
` (84 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 20:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17044 bytes --]
From f0b7cdf1f9ea8f818f3da3110a53c29c5199073a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 8 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 69 insertions(+), 304 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (28 preceding siblings ...)
2024-01-31 20:55 ` MIvanchev
@ 2024-01-31 21:05 ` MIvanchev
2024-01-31 21:46 ` MIvanchev
` (83 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 21:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17324 bytes --]
From 55a1cb638e66f7f4fa15f92f2fbaccd80e48821d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 12 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 71 insertions(+), 306 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..d652ea2972f94 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,16 +18,12 @@ 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
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (29 preceding siblings ...)
2024-01-31 21:05 ` MIvanchev
@ 2024-01-31 21:46 ` MIvanchev
2024-01-31 21:50 ` MIvanchev
` (82 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 21:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17472 bytes --]
From 3fa78e3aad3bc0ffd42429842b3cec124ed32e89 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 18 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 75 insertions(+), 308 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..af71970e14371 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,10 @@
# Template file for 'coq'
pkgname=coq
version=8.18.0
-revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+revision=2
+build_style="configure"
+build_args="-prefix /usr"
+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>"
@@ -14,20 +16,16 @@ nopie=yes
nocross=yes
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) build_args+=" -native-compiler off";;
+ *) ;;
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,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (30 preceding siblings ...)
2024-01-31 21:46 ` MIvanchev
@ 2024-01-31 21:50 ` MIvanchev
2024-01-31 22:03 ` MIvanchev
` (81 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 21:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17476 bytes --]
From 1375bb61e84aa985c54879d9a55c285f08c0521d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 18 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 75 insertions(+), 308 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..d17c32ef7d5c5 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,10 @@
# Template file for 'coq'
pkgname=coq
version=8.18.0
-revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+revision=2
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
@@ -14,20 +16,16 @@ nopie=yes
nocross=yes
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) build_args+=" -native-compiler off";;
+ *) ;;
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,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (31 preceding siblings ...)
2024-01-31 21:50 ` MIvanchev
@ 2024-01-31 22:03 ` MIvanchev
2024-02-01 15:58 ` MIvanchev
` (80 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-01-31 22:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17197 bytes --]
From 229330f967a10200ea8da30c94c63ed9a030d43a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 14 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 73 insertions(+), 306 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..6daaf27ba4b8b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,8 +1,10 @@
# Template file for 'coq'
pkgname=coq
version=8.18.0
-revision=1
-hostmakedepends="camlp5 dune ocaml ocaml-findlib ocaml-num ocaml-zarith"
+revision=2
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
@@ -14,14 +16,10 @@ nopie=yes
nocross=yes
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) build_args+=" -native-compiler off";;
+ *) ;;
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (32 preceding siblings ...)
2024-01-31 22:03 ` MIvanchev
@ 2024-02-01 15:58 ` MIvanchev
2024-02-01 16:12 ` MIvanchev
` (79 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 15:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17458 bytes --]
From 3d45a68280f347f15d349b1e550287c2708a50f7 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 16 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 74 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..041da1b9d8b80 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,27 +1,25 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) build_args+=" -native-compiler off";;
+ *) ;;
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (33 preceding siblings ...)
2024-02-01 15:58 ` MIvanchev
@ 2024-02-01 16:12 ` MIvanchev
2024-02-01 16:32 ` MIvanchev
` (78 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 16:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17479 bytes --]
From b52991dc55a0fbad8b070b5239e9039257ce2e96 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 16 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 74 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..c402bd32c329b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,27 +1,25 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -native-compiler off"
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) build_args+=" -native-compiler off";;
+ *) ;;
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (34 preceding siblings ...)
2024-02-01 16:12 ` MIvanchev
@ 2024-02-01 16:32 ` MIvanchev
2024-02-01 16:39 ` MIvanchev
` (77 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 16:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17456 bytes --]
From 8c2cc1fe850517a9823f2410d8773939c62d39cf Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 16 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 74 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..70da608155d1d 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,27 +1,25 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) build_args+=" -native-compiler no";;
+ *) ;;
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (35 preceding siblings ...)
2024-02-01 16:32 ` MIvanchev
@ 2024-02-01 16:39 ` MIvanchev
2024-02-01 16:48 ` MIvanchev
` (76 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 16:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17461 bytes --]
From 9e0d02fb9b2238585b1a3178fdf1c7e77075eb3a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 16 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 74 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..c40936887ec9e 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,27 +1,25 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) configure_args+=" -native-compiler no" ;;
+ *) ;;
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (36 preceding siblings ...)
2024-02-01 16:39 ` MIvanchev
@ 2024-02-01 16:48 ` MIvanchev
2024-02-01 21:11 ` MIvanchev
` (75 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 16:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17508 bytes --]
From 6b7ecbe9045cf2992c86a8c5943db631743516fd Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 17 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 75 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..e5fe3b9539545 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,28 +1,27 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -native-compiler no"
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*) configure_args+=" -native-compiler no" ;;
+ *) ;;
esac
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
-
do_build() {
+ echo $connfigure_args
make dunestrap
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (37 preceding siblings ...)
2024-02-01 16:48 ` MIvanchev
@ 2024-02-01 21:11 ` MIvanchev
2024-02-01 21:25 ` MIvanchev
` (74 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 21:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17593 bytes --]
From 33e8a653d38e3f37cec88d6fcdaedae7e17b561c Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 19 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 77 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..883402bca4ef2 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,27 +1,28 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
+ i686*)
+ sed -i 's/"\.cmxs"/".cmo"/' tools/dune_rule_gen/coq_module.ml
+ sed -i 's/"\.cmxs"/".cmo"/' tools/dune_rule_gen/coq_rules.ml
+ configure_args+=" -native-compiler no" ;;
+ *) ;;
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
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (38 preceding siblings ...)
2024-02-01 21:11 ` MIvanchev
@ 2024-02-01 21:25 ` MIvanchev
2024-02-01 21:38 ` MIvanchev
` (73 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 21:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17749 bytes --]
From 962a77f106b178c5c207c2749a3cc893a3f78a35 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 25 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 83 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..7ac98f31138ee 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,26 +1,33 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+ i686*)
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+ sed -i 's/\.cmxs/.cmo/' tools/dune_rule_gen/coq_module.ml
+ sed -i 's/\.cmxs/.cmo/' tools/dune_rule_gen/coq_rules.ml
+ sed -i 's/\.cmxs/.cmo/' coq/tools/CoqMakefile.in
+ sed -i 's/\.cmxs/.cmo/' tools/coqdep/lib/makefile.ml
+ sed -i 's/\.cmxs/.cmo/' vernac/mltop.ml
+ sed -i 's/\.cmxs/.cmo/' tools/coqdep/lib/loadpath.ml
+
+ configure_args+=" -native-compiler no" ;;
+ *) ;;
+esac
do_build() {
make dunestrap
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (39 preceding siblings ...)
2024-02-01 21:25 ` MIvanchev
@ 2024-02-01 21:38 ` MIvanchev
2024-02-02 8:54 ` MIvanchev
` (72 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-01 21:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17834 bytes --]
From e2d27457a27d082a4dc660c72f3da905411ce185 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 27 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 85 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..cf868f57eaa62 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,26 +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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+ i686*)
+ echo FOOBAR
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+ sed -i 's/\.cmxs/.cmo/g' coq/tools/CoqMakefile.in
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+ sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+
+ configure_args+=" -native-compiler no" ;;
+ *) ;;
+esac
do_build() {
make dunestrap
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (40 preceding siblings ...)
2024-02-01 21:38 ` MIvanchev
@ 2024-02-02 8:54 ` MIvanchev
2024-02-02 9:00 ` MIvanchev
` (71 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 8:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17925 bytes --]
From 75c8c68ed3b88cdc456cb8174c8d2eb04c09dc81 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 29 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 87 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..8ecff5c8d5bec 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,25 +1,36 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+if [ ${XBPS_TARGET_MACHINE%-musl} = "i686" ]; then
+ echo FOOBAR
+ configure_args+=" -native-compiler no" ;;
+fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+pre_configure() {
+ if [ ${XBPS_TARGET_MACHINE%-musl} = "i686" ]; then
+ echo FOOBAR2
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+ sed -i 's/\.cmxs/.cmo/g' coq/tools/CoqMakefile.in
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+ sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+ fi
}
do_build() {
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (41 preceding siblings ...)
2024-02-02 8:54 ` MIvanchev
@ 2024-02-02 9:00 ` MIvanchev
2024-02-02 9:15 ` MIvanchev
` (70 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 9:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17926 bytes --]
From 4ef3b2947fe4b19350f3fdd6275d80f369bc6c16 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 29 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 87 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..e7e9c1c15dd94 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,25 +1,36 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ echo FOOBAR
+ configure_args+=" -native-compiler no"
+fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+pre_configure() {
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ echo FOOBAR2
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+ sed -i 's/\.cmxs/.cmo/g' coq/tools/CoqMakefile.in
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+ sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+ fi
}
do_build() {
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (42 preceding siblings ...)
2024-02-02 9:00 ` MIvanchev
@ 2024-02-02 9:15 ` MIvanchev
2024-02-02 9:26 ` MIvanchev
` (69 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 9:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17922 bytes --]
From b3a3c2eb6e6dee2c81f91ae56fa62817cc7e686a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 29 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 87 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..3897b8f7abd9a 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,25 +1,36 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ echo FOOBAR
+ configure_args+=" -native-compiler no"
+fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+pre_configure() {
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ echo FOOBAR2
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+ sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+ fi
}
do_build() {
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (43 preceding siblings ...)
2024-02-02 9:15 ` MIvanchev
@ 2024-02-02 9:26 ` MIvanchev
2024-02-02 9:47 ` MIvanchev
` (68 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 9:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17622 bytes --]
From 366c0a2d26349b4bf32e0a5c73df89cc70a09d9d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 23 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 79 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0b2a4b4a1a225 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,30 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
-}
+if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ echo FOOBAR
+ configure_args+=" -native-compiler no"
+fi
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cmo/g' theories/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (44 preceding siblings ...)
2024-02-02 9:26 ` MIvanchev
@ 2024-02-02 9:47 ` MIvanchev
2024-02-02 9:51 ` MIvanchev
` (67 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 9:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 17892 bytes --]
From 67a0d92c42d43d64dd4825e00e43667126644fbc Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 27 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 85 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..621cd7a2cabee 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,25 +1,34 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ configure_args+=" -native-compiler no"
+fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+pre_configure() {
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+ sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+ sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+ fi
}
do_build() {
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (45 preceding siblings ...)
2024-02-02 9:47 ` MIvanchev
@ 2024-02-02 9:51 ` MIvanchev
2024-02-02 9:56 ` MIvanchev
` (66 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 9:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18075 bytes --]
From 6978ecd467889715184671321dde4be88701d9ca Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 30 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 88 insertions(+), 307 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..51a9694197a6a 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,41 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ configure_args+=" -native-compiler no"
+fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+pre_configure() {
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+ fi
}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (46 preceding siblings ...)
2024-02-02 9:51 ` MIvanchev
@ 2024-02-02 9:56 ` MIvanchev
2024-02-02 10:29 ` MIvanchev
` (65 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 9:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18082 bytes --]
From c99004973012070aabe8d33c292430722a79dcb7 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 32 ++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 89 insertions(+), 308 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..ae5b4560dfafe 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,41 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ configure_args+=" -native-compiler no"
+fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (47 preceding siblings ...)
2024-02-02 9:56 ` MIvanchev
@ 2024-02-02 10:29 ` MIvanchev
2024-02-02 10:51 ` MIvanchev
` (64 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 10:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18414 bytes --]
From 38db7dee0c39af2cb10f100267b5b11af6d32246 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 37 ++--
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 92 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..85de145d73c83 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,46 @@
# 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"
+#build_style="configure"
+#configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
+ dune install coq-core coq-stdlib coq --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (48 preceding siblings ...)
2024-02-02 10:29 ` MIvanchev
@ 2024-02-02 10:51 ` MIvanchev
2024-02-02 11:14 ` MIvanchev
` (63 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 10:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18442 bytes --]
From 23c845fbdf177fe424a4a99d7c7f2893aca6ca36 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 38 ++--
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 92 insertions(+), 311 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..1e9cbad4b2535 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,45 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib coq
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (49 preceding siblings ...)
2024-02-02 10:51 ` MIvanchev
@ 2024-02-02 11:14 ` MIvanchev
2024-02-02 11:28 ` MIvanchev
` (62 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 11:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18505 bytes --]
From bb47eb87118591859ea390cb5192436c68cda44e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 40 ++--
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 95 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..4b4142a2869b8 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build @check -p coq-core,coq-stdlib,coq
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib coq
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (50 preceding siblings ...)
2024-02-02 11:14 ` MIvanchev
@ 2024-02-02 11:28 ` MIvanchev
2024-02-02 11:46 ` MIvanchev
` (61 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 11:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18502 bytes --]
From 2c09883d5245ad3dce81eeed9b55b7e2b3a4503d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 40 ++--
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 95 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..e4a995dd901eb 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build @check coq-core,coq-stdlib,coq
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib coq
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (51 preceding siblings ...)
2024-02-02 11:28 ` MIvanchev
@ 2024-02-02 11:46 ` MIvanchev
2024-02-02 12:00 ` MIvanchev
` (60 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 11:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18518 bytes --]
From aa47ae0603c24de31b0a86207b2f92cb6aca3406 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 40 ++--
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 95 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..43e4527d3093b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build --only-packages coq-core,coq-stdlib,coq @check
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib coq
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (52 preceding siblings ...)
2024-02-02 11:46 ` MIvanchev
@ 2024-02-02 12:00 ` MIvanchev
2024-02-02 13:05 ` MIvanchev
` (59 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 12:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18518 bytes --]
From 61c851499d29641692039d8323f3bf798cb9428c Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 40 ++--
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 95 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..ad79b0b43b058 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build --only-packages=coq-core,coq-stdlib,coq @check
}
do_build() {
make dunestrap
- dune build --display=short -p coq-core,coq-stdlib
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
+ dune build --display=short -p coq-core,coq-stdlib,coq
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib coq
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (53 preceding siblings ...)
2024-02-02 12:00 ` MIvanchev
@ 2024-02-02 13:05 ` MIvanchev
2024-02-02 13:34 ` MIvanchev
` (58 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 13:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 18441 bytes --]
From bf775b14610ef3fa0bc757ee56e9cbedd725cf77 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/template | 38 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
13 files changed, 94 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..5b9606925978b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build -p coq-core,coq-stdlib @check
}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (54 preceding siblings ...)
2024-02-02 13:05 ` MIvanchev
@ 2024-02-02 13:34 ` MIvanchev
2024-02-02 13:41 ` MIvanchev
` (57 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 13:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 20390 bytes --]
From c6ecb0beecf894d9764a269c89690ca1f1143fe7 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 45 ++++
srcpkgs/coq/template | 38 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 139 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..0e0f929b87459
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,45 @@
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..5b9606925978b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build -p coq-core,coq-stdlib @check
}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (55 preceding siblings ...)
2024-02-02 13:34 ` MIvanchev
@ 2024-02-02 13:41 ` MIvanchev
2024-02-02 13:53 ` MIvanchev
` (56 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 13:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 21935 bytes --]
From 0bec3d9b4f866b56890e7971a8053970335ca9a0 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 96 +++++++++
srcpkgs/coq/template | 38 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 190 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..72b9efa43329d
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,96 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..5b9606925978b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build -p coq-core,coq-stdlib @check
}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (56 preceding siblings ...)
2024-02-02 13:41 ` MIvanchev
@ 2024-02-02 13:53 ` MIvanchev
2024-02-02 14:09 ` MIvanchev
` (55 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 13:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 23953 bytes --]
From bc24a0799357a9dd46edb74b4a8422af25a26f18 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 176 ++++++++++++++++
srcpkgs/coq/template | 38 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 270 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..191cef10382bd
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,176 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..9c14f7edaf 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..5b9606925978b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build -p coq-core,coq-stdlib @check
}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (57 preceding siblings ...)
2024-02-02 13:53 ` MIvanchev
@ 2024-02-02 14:09 ` MIvanchev
2024-02-02 14:20 ` MIvanchev
` (54 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 14:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 23953 bytes --]
From 1d6da578340938c17834f9d0d8d0009ee59a48cc Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 176 ++++++++++++++++
srcpkgs/coq/template | 38 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 270 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..191cef10382bd
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,176 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..9c14f7edaf 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..5b9606925978b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build -p coq-core,coq-stdlib @check
}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (58 preceding siblings ...)
2024-02-02 14:09 ` MIvanchev
@ 2024-02-02 14:20 ` MIvanchev
2024-02-02 14:32 ` MIvanchev
` (53 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 14:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 24921 bytes --]
From b974f8cda4725152301b428742c9884a91d87e46 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 38 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 297 insertions(+), 309 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..5b9606925978b 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,33 +1,49 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr -mandir /usr/share/man -docdir /usr/share/doc"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+do_check() {
+ dune build -p coq-core,coq-stdlib @check
}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
do_install() {
- dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
- --mandir=/usr/share/man --docdir=/usr/share/doc
+ dune install --destdir="$DESTDIR" coq-core coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (59 preceding siblings ...)
2024-02-02 14:20 ` MIvanchev
@ 2024-02-02 14:32 ` MIvanchev
2024-02-02 15:18 ` MIvanchev
` (52 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 14:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 24844 bytes --]
From c82c46df655bc034e821592146d610b559607372 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 38 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 298 insertions(+), 308 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..54267fa45d237 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
@@ -31,3 +48,4 @@ do_install() {
dune install coq-core coq-stdlib --prefix=/usr --destdir="$DESTDIR" \
--mandir=/usr/share/man --docdir=/usr/share/doc
}
+
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (60 preceding siblings ...)
2024-02-02 14:32 ` MIvanchev
@ 2024-02-02 15:18 ` MIvanchev
2024-02-02 15:18 ` MIvanchev
` (51 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 15:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 24683 bytes --]
From 801112085a4a0808c1fddd9d94560c1e64bf46a8 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 2 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 297 insertions(+), 308 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
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"
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (61 preceding siblings ...)
2024-02-02 15:18 ` MIvanchev
@ 2024-02-02 15:18 ` MIvanchev
2024-02-02 15:19 ` MIvanchev
` (50 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 15:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 25042 bytes --]
From b507db501e6006023194040eda0868004f48b779 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 6 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 299 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..8e3b3efe4e22a 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=2.2.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=
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (62 preceding siblings ...)
2024-02-02 15:18 ` MIvanchev
@ 2024-02-02 15:19 ` MIvanchev
2024-02-02 15:19 ` MIvanchev
` (49 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 15:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 25106 bytes --]
From dceea8cf434a460f7498ca337f86557df3036e13 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 6 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 299 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..3c70c63c31020 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=2.2.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=e7e8f3ebfebae10fd290a63fffdbe311d32df7eebc2e66777e194269e72697f5
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (63 preceding siblings ...)
2024-02-02 15:19 ` MIvanchev
@ 2024-02-02 15:19 ` MIvanchev
2024-02-02 15:20 ` MIvanchev
` (48 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 15:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 25106 bytes --]
From 916d2ccd4abf2df8b515d76f077dd215969275e5 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 6 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 299 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..3c70c63c31020 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=2.2.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=e7e8f3ebfebae10fd290a63fffdbe311d32df7eebc2e66777e194269e72697f5
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (64 preceding siblings ...)
2024-02-02 15:19 ` MIvanchev
@ 2024-02-02 15:20 ` MIvanchev
2024-02-02 15:41 ` MIvanchev
` (47 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 15:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 25106 bytes --]
From 3bd685be30c17a3b95821c4b96594cbe92479205 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 6 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 299 insertions(+), 310 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..3c70c63c31020 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=2.2.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=e7e8f3ebfebae10fd290a63fffdbe311d32df7eebc2e66777e194269e72697f5
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (65 preceding siblings ...)
2024-02-02 15:20 ` MIvanchev
@ 2024-02-02 15:41 ` MIvanchev
2024-02-02 23:21 ` MIvanchev
` (46 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 15:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 25278 bytes --]
From a8d67f76d22720cfb8936dd5b850294070dd4a4e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
14 files changed, 300 insertions(+), 311 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (66 preceding siblings ...)
2024-02-02 15:41 ` MIvanchev
@ 2024-02-02 23:21 ` MIvanchev
2024-02-02 23:33 ` MIvanchev
` (45 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 23:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27475 bytes --]
From 8de014b58553eed791844c806501f36e3de3704a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 2 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 305 insertions(+), 316 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
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"
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (67 preceding siblings ...)
2024-02-02 23:21 ` MIvanchev
@ 2024-02-02 23:33 ` MIvanchev
2024-02-03 8:35 ` MIvanchev
` (44 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-02 23:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27841 bytes --]
From 291e9e9af38219e6aa387f877db1d1c33f8d69cf Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 6 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 309 insertions(+), 316 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..5b5c09223f4da 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"
@@ -13,6 +13,10 @@ distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
nocross=yes
+pre_build() {
+ command -v ocamlc.opt >/dev/null || export NATIVE_COMPILER=false
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (68 preceding siblings ...)
2024-02-02 23:33 ` MIvanchev
@ 2024-02-03 8:35 ` MIvanchev
2024-02-03 8:52 ` MIvanchev
` (43 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 8:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27855 bytes --]
From 661caac274d7bd6de6a01b9ec8530656d83d7eed Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 37 +++-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 7 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 310 insertions(+), 316 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..fcae295481cce 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,46 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- ppc*) broken="R_PPC_REL24 relocation out of range";;
-esac
+#if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# configure_args+=" -native-compiler no"
+#fi
-post_patch() {
- vsed -i -e 's/which/command -v/g' dev/tools/make_git_revision.sh
-}
+#pre_configure() {
+# if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_module.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/dune_rule_gen/coq_rules.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/CoqMakefile.in
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/makefile.ml
+# sed -i 's/\.cmxs/.cmo/g' vernac/mltop.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coqdep/lib/loadpath.ml
+# sed -i 's/\.cmxs/.cmo/g' tools/coq_makefile.ml
+# fi
+#}
+
+#do_check() {
+# dune build -p coq-core,coq-stdlib @check
+#}
do_build() {
make dunestrap
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..bf41077a563b9 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"
@@ -13,6 +13,11 @@ distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
nocross=yes
+pre_build() {
+ command -v ocamlc.opt >/dev/null || export NATDYNLINK=false
+ echo $NATDYNLINK
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (69 preceding siblings ...)
2024-02-03 8:35 ` MIvanchev
@ 2024-02-03 8:52 ` MIvanchev
2024-02-03 8:59 ` MIvanchev
` (42 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 8:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27291 bytes --]
From fd2bf83c43965f05e44ce1152128fe7d4a859306 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 12 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 297 insertions(+), 318 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..6df6cc4737851 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"
@@ -13,6 +13,16 @@ distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
nocross=yes
+pre_build() {
+ if [ ! command -v ocamlc.opt >/dev/null ]; then
+ export NATDYNLINK=false
+ export NATIVE_COMPILER=false
+ fi
+
+ echo $NATDYNLINK
+ echo $NATIVE_COMPILER
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (70 preceding siblings ...)
2024-02-03 8:52 ` MIvanchev
@ 2024-02-03 8:59 ` MIvanchev
2024-02-03 9:50 ` MIvanchev
` (41 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 8:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27287 bytes --]
From 3ea1451fd13ad069a5d41a0a927db01c4d819e49 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 12 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 297 insertions(+), 318 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..e409f2c472af9 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"
@@ -13,6 +13,16 @@ distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
nocross=yes
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ export NATDYNLINK=false
+ export NATIVE_COMPILER=false
+ fi
+
+ echo $NATDYNLINK
+ echo $NATIVE_COMPILER
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (71 preceding siblings ...)
2024-02-03 8:59 ` MIvanchev
@ 2024-02-03 9:50 ` MIvanchev
2024-02-03 9:56 ` MIvanchev
` (40 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 9:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27229 bytes --]
From 45b57e89193cc4965eb1d98065a497029f1f7add Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 8 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 293 insertions(+), 318 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..be647bade2c13 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"
@@ -13,6 +13,12 @@ distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
nocross=yes
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/all:: nums\.cmxs/#\0/' src/Makefile
+ fi
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (72 preceding siblings ...)
2024-02-03 9:50 ` MIvanchev
@ 2024-02-03 9:56 ` MIvanchev
2024-02-03 10:20 ` MIvanchev
` (39 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 9:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27232 bytes --]
From 6032f8b6dc0f56bcce8722260a98dd8ee84fa117 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 8 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 293 insertions(+), 318 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..b6945e74f8600 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"
@@ -13,6 +13,12 @@ distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
nocross=yes
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed -i 's/all:: nums\.cmxs/#\0/' src/Makefile
+ fi
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (73 preceding siblings ...)
2024-02-03 9:56 ` MIvanchev
@ 2024-02-03 10:20 ` MIvanchev
2024-02-03 10:24 ` MIvanchev
` (38 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 10:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27345 bytes --]
From 9a6979c07a26e7f3e532fcac55b49e2ab40f67c6 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 11 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 295 insertions(+), 319 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..ef02b077f9358 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -13,6 +13,13 @@ distfiles="https://github.com/ocaml/num/archive/v${version}.tar.gz"
checksum=015088b68e717b04c07997920e33c53219711dfaf36d1196d02313f48ea00f24
nocross=yes
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (74 preceding siblings ...)
2024-02-03 10:20 ` MIvanchev
@ 2024-02-03 10:24 ` MIvanchev
2024-02-03 10:38 ` MIvanchev
` (37 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 10:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27574 bytes --]
From 998727b40c77baf6933970b14abfca7797fe9f09 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 13 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 296 insertions(+), 320 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..ab969eabdb2b4 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,9 +10,16 @@ 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_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
+
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
vmkdir /usr/lib/ocaml/stublibs
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (75 preceding siblings ...)
2024-02-03 10:24 ` MIvanchev
@ 2024-02-03 10:38 ` MIvanchev
2024-02-04 8:41 ` MIvanchev
` (36 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-03 10:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27569 bytes --]
From 1edb36e8e55e74f2def83296d6960bf950a36634 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 297 insertions(+), 320 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (76 preceding siblings ...)
2024-02-03 10:38 ` MIvanchev
@ 2024-02-04 8:41 ` MIvanchev
2024-02-04 8:42 ` MIvanchev
` (35 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 8:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 27607 bytes --]
From 2ff9f9bfed93be3ee7e3fc699295b16b3bc82f2d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/template | 2 +-
19 files changed, 297 insertions(+), 320 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2e50a0a0e82ac7 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (77 preceding siblings ...)
2024-02-04 8:41 ` MIvanchev
@ 2024-02-04 8:42 ` MIvanchev
2024-02-04 9:20 ` MIvanchev
` (34 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 8:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 29529 bytes --]
From 3c99eb88d3806aa263c4c23eee9d9345b6291053 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 27 ++-
srcpkgs/z3/template | 2 +-
20 files changed, 321 insertions(+), 323 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..005925b5e92b4 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,24 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..6c2791738 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (78 preceding siblings ...)
2024-02-04 8:42 ` MIvanchev
@ 2024-02-04 9:20 ` MIvanchev
2024-02-04 9:22 ` MIvanchev
` (33 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 9:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 29935 bytes --]
From 6560801323382a5d35f8ee0a7fd828801d8274a8 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 36 +++-
srcpkgs/z3/template | 2 +-
20 files changed, 330 insertions(+), 323 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..f5c4249fffef1 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,33 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..24251080f 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2036,7 +2036,7 @@ class MLComponent(Component):
+ ft = os.path.join(self.sub_dir, m + '.cmx')
+ out.write('%s: %s %s %s\n' % (ft, ff, cmos, cmxs))
+ out.write('\t%s -I %s -o %s -c %s\n' % (OCAMLOPTF, self.sub_dir, ft, ff))
+- cmxs = cmxs + ' ' + ft
++# cmxs = cmxs + ' ' + ft
+
+
+ OCAMLMKLIB = 'ocamlmklib'
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (79 preceding siblings ...)
2024-02-04 9:20 ` MIvanchev
@ 2024-02-04 9:22 ` MIvanchev
2024-02-04 9:30 ` MIvanchev
` (32 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 9:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 31239 bytes --]
From 455d3dc6b0587471a837f2b481c0b91a43c12627 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 54 ++++-
srcpkgs/z3/template | 2 +-
20 files changed, 348 insertions(+), 323 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..bb857282a91b2 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,51 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..2601596e9 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma %s.cmxa\n' % (z3mls, z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2094,7 +2094,7 @@ class MLComponent(Component):
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2126,7 +2126,7 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2e50a0a0e82ac 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (80 preceding siblings ...)
2024-02-04 9:22 ` MIvanchev
@ 2024-02-04 9:30 ` MIvanchev
2024-02-04 10:20 ` MIvanchev
` (31 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 9:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 31575 bytes --]
From 0baab8ec7acc49c36556acc2ab062a9fed0f099d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 58 ++++-
srcpkgs/z3/template | 2 +-
20 files changed, 352 insertions(+), 323 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83ee..66be99be44ec7a 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,55 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..c33e782bc 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2125,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2e50a0a0e82ac7 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (81 preceding siblings ...)
2024-02-04 9:30 ` MIvanchev
@ 2024-02-04 10:20 ` MIvanchev
2024-02-04 11:46 ` MIvanchev
` (30 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 10:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 31693 bytes --]
From e94f06a201819abbc6fd4233ee071c41fbf3c74f Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 58 ++++-
srcpkgs/z3/template | 6 +-
20 files changed, 356 insertions(+), 323 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..66be99be44ec7 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,55 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..c33e782bc 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2125,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..e9144a11252fc 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,7 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
+revision=2
build_style=configure
configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
make_build_args="-C build all examples"
@@ -31,6 +31,10 @@ do_check() {
./build/test-z3 /a
}
+pre_build() {
+ cat build/Makefile
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (82 preceding siblings ...)
2024-02-04 10:20 ` MIvanchev
@ 2024-02-04 11:46 ` MIvanchev
2024-02-04 11:51 ` MIvanchev
` (29 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 11:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 32460 bytes --]
From 44c30675157273b3aa0b1dd0490753de9f9b0b41 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 58 ++++-
srcpkgs/z3/template | 17 +-
20 files changed, 362 insertions(+), 328 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..66be99be44ec7 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,55 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..c33e782bc 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2125,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..0378402f1552d 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -31,6 +31,11 @@ do_check() {
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ make -C build
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (83 preceding siblings ...)
2024-02-04 11:46 ` MIvanchev
@ 2024-02-04 11:51 ` MIvanchev
2024-02-04 12:07 ` MIvanchev
` (28 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 11:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 32502 bytes --]
From ef87b83140436771f344364d916d405b6aa72c53 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 58 ++++-
srcpkgs/z3/template | 17 +-
20 files changed, 362 insertions(+), 328 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83ee..66be99be44ec7a 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,55 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..c33e782bc 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2125,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..62c65f41a79385 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -31,6 +31,11 @@ do_check() {
./build/test-z3 /a
}
+do_install() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ make -C build
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (84 preceding siblings ...)
2024-02-04 11:51 ` MIvanchev
@ 2024-02-04 12:07 ` MIvanchev
2024-02-04 12:32 ` MIvanchev
` (27 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 12:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 32505 bytes --]
From df34cbe7edb708b4f3faae5b5ab1792bcad26b14 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 58 ++++-
srcpkgs/z3/template | 21 +-
20 files changed, 366 insertions(+), 328 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..66be99be44ec7 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,55 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..c33e782bc 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2125,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..da6c1cdbfda18 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -31,6 +31,15 @@ do_check() {
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ make -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (85 preceding siblings ...)
2024-02-04 12:07 ` MIvanchev
@ 2024-02-04 12:32 ` MIvanchev
2024-02-04 19:28 ` MIvanchev
` (26 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 12:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 32662 bytes --]
From 0aa8ed36e7d7be1407e89058a4f62b7bbaac8e6b Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 58 ++++-
srcpkgs/z3/template | 23 +-
20 files changed, 367 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83ee..66be99be44ec7a 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,55 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..c33e782bc 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2125,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..9db281a48fb1ec 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,19 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (86 preceding siblings ...)
2024-02-04 12:32 ` MIvanchev
@ 2024-02-04 19:28 ` MIvanchev
2024-02-04 20:21 ` MIvanchev
` (25 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 19:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 31217 bytes --]
From b709030820a52329ebac800274f3dc245914bdc6 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 36 +++-
srcpkgs/z3/template | 23 +-
20 files changed, 345 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..8fc89e04c1b34 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,33 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..ddb93dd33 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..9db281a48fb1e 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,19 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (87 preceding siblings ...)
2024-02-04 19:28 ` MIvanchev
@ 2024-02-04 20:21 ` MIvanchev
2024-02-04 22:06 ` MIvanchev
` (24 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 20:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 32644 bytes --]
From 564d3af636bc96797222bbe0d53a9240e0e31bad Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 58 ++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 368 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..66be99be44ec7 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,55 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..c33e782bc 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2125,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..70be2a5b3ffef 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (88 preceding siblings ...)
2024-02-04 20:21 ` MIvanchev
@ 2024-02-04 22:06 ` MIvanchev
2024-02-05 8:41 ` MIvanchev
` (23 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-04 22:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33461 bytes --]
From bc934f6d90ee0ed13edcac20393b649faaa4fdc3 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 67 +++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 377 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..fde0029456dc1 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,64 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..e73a3c356 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2064,14 +2064,15 @@ class MLComponent(Component):
+ LIBZ3ML = '-oc ' + os.path.join(self.sub_dir, 'z3ml-static')
+
+ out.write('%s.cma: %s %s %s\n' % (z3mls, cmos, stubso, z3linkdep))
+- out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmos, LIBZ3))
++ out.write('\t%s -o %s %s -I %s -L. %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, cmos, LIBZ3))
++ out.write('\t%s -o %s %s -I %s -L. %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, LIBZ3))
+ out.write('%s.cmxa: %s %s %s %s.cma\n' % (z3mls, cmxs, stubso, z3linkdep, z3mls))
+ out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmxs, LIBZ3))
+ out.write('%s.cmxs: %s.cmxa\n' % (z3mls, z3mls))
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2094,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2126,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..70be2a5b3ffef 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (89 preceding siblings ...)
2024-02-04 22:06 ` MIvanchev
@ 2024-02-05 8:41 ` MIvanchev
2024-02-05 9:20 ` MIvanchev
` (22 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 8:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33411 bytes --]
From b94da811ce09bee6e41a127efa729c1d1220b86e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 67 +++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 377 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..fa773c077e268 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,64 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..636261702 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2064,14 +2064,15 @@ class MLComponent(Component):
+ LIBZ3ML = '-oc ' + os.path.join(self.sub_dir, 'z3ml-static')
+
+ out.write('%s.cma: %s %s %s\n' % (z3mls, cmos, stubso, z3linkdep))
+- out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmos, LIBZ3))
++ out.write('\t%s -o %s %s -I %s -L. %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, cmos, LIBZ3))
++ out.write('\t%s rc %s.a %s\n' % ('ar', z3mls, stubso))
+ out.write('%s.cmxa: %s %s %s %s.cma\n' % (z3mls, cmxs, stubso, z3linkdep, z3mls))
+ out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmxs, LIBZ3))
+ out.write('%s.cmxs: %s.cmxa\n' % (z3mls, z3mls))
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2094,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2125,8 +2126,8 @@ class MLComponent(Component):
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..70be2a5b3ffef 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (90 preceding siblings ...)
2024-02-05 8:41 ` MIvanchev
@ 2024-02-05 9:20 ` MIvanchev
2024-02-05 11:44 ` MIvanchev
` (21 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 9:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33779 bytes --]
From 58c7039acf932a9edad746da65cbf7046b228f3c Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 71 +++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 381 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83ee..521d9ce0f52877 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,68 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..23639a36d 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2064,14 +2064,14 @@ class MLComponent(Component):
+ LIBZ3ML = '-oc ' + os.path.join(self.sub_dir, 'z3ml-static')
+
+ out.write('%s.cma: %s %s %s\n' % (z3mls, cmos, stubso, z3linkdep))
+- out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmos, LIBZ3))
++ out.write('\t%s -o %s %s -I %s -L. %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, cmos, LIBZ3))
+ out.write('%s.cmxa: %s %s %s %s.cma\n' % (z3mls, cmxs, stubso, z3linkdep, z3mls))
+ out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmxs, LIBZ3))
+ out.write('%s.cmxs: %s.cmxa\n' % (z3mls, z3mls))
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2122,11 +2122,11 @@ class MLComponent(Component):
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..70be2a5b3ffefb 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (91 preceding siblings ...)
2024-02-05 9:20 ` MIvanchev
@ 2024-02-05 11:44 ` MIvanchev
2024-02-05 11:45 ` MIvanchev
` (20 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 11:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33879 bytes --]
From 37980def1da2c4c4a5ba3043921d5bd915669d02 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 73 ++++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 383 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83ee..f269cb824407d3 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,70 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..8023f94d2 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2064,14 +2064,14 @@ class MLComponent(Component):
+ LIBZ3ML = '-oc ' + os.path.join(self.sub_dir, 'z3ml-static')
+
+ out.write('%s.cma: %s %s %s\n' % (z3mls, cmos, stubso, z3linkdep))
+- out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmos, LIBZ3))
++ out.write('\t%s -o %s %s -I %s -L. %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, cmos, LIBZ3))
+ out.write('%s.cmxa: %s %s %s %s.cma\n' % (z3mls, cmxs, stubso, z3linkdep, z3mls))
+ out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmxs, LIBZ3))
+ out.write('%s.cmxs: %s.cmxa\n' % (z3mls, z3mls))
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..70be2a5b3ffefb 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (92 preceding siblings ...)
2024-02-05 11:44 ` MIvanchev
@ 2024-02-05 11:45 ` MIvanchev
2024-02-05 11:46 ` MIvanchev
` (19 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 11:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33849 bytes --]
From 32cfe95d82e48e8f2632c9dbf2cbe11791ef43b2 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 73 ++++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 383 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..b9ff68cf758f3 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,70 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..0bd07297e 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2064,14 +2064,14 @@ class MLComponent(Component):
+ LIBZ3ML = '-oc ' + os.path.join(self.sub_dir, 'z3ml-static')
+
+ out.write('%s.cma: %s %s %s\n' % (z3mls, cmos, stubso, z3linkdep))
+- out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmos, LIBZ3))
++ out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmos, LIBZ3)
+ out.write('%s.cmxa: %s %s %s %s.cma\n' % (z3mls, cmxs, stubso, z3linkdep, z3mls))
+ out.write('\t%s -o %s %s -I %s -L. %s %s %s\n' % (OCAMLMKLIB, z3mls, LIBZ3ML, self.sub_dir, stubso, cmxs, LIBZ3))
+ out.write('%s.cmxs: %s.cmxa\n' % (z3mls, z3mls))
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..70be2a5b3ffef 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (93 preceding siblings ...)
2024-02-05 11:45 ` MIvanchev
@ 2024-02-05 11:46 ` MIvanchev
2024-02-05 12:54 ` MIvanchev
` (18 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 11:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33181 bytes --]
From 20750a4ad4ca6b2448eac00f22b1fbe9371e0f7e Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 65 +++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 375 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83ee..b8112710108395 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,62 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..70be2a5b3ffefb 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (94 preceding siblings ...)
2024-02-05 11:46 ` MIvanchev
@ 2024-02-05 12:54 ` MIvanchev
2024-02-05 15:48 ` MIvanchev
` (17 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 12:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33154 bytes --]
From 65c79f037d173ef853b9b631b6f808beadd850e5 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 65 +++++-
srcpkgs/z3/template | 24 ++-
20 files changed, 375 insertions(+), 329 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..b811271010839 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,62 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..1e9dab4a71ff4 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,10 +27,20 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (95 preceding siblings ...)
2024-02-05 12:54 ` MIvanchev
@ 2024-02-05 15:48 ` MIvanchev
2024-02-05 16:47 ` MIvanchev
` (16 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 15:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33342 bytes --]
From bb206a3d0e730fb2330b115bc7f5b9aa8fede9a2 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 65 +++++-
srcpkgs/z3/template | 28 ++-
20 files changed, 375 insertions(+), 333 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..b811271010839 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,62 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..a98ba003bdd98 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,17 +27,23 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=/usr $(vopt_if ocaml --ml)
+ cat build/Makefile
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
- if [ "$build_option_ocaml" ]; then
- vmkdir usr/lib/ocaml/Z3/stublibs
- mv ${DESTDIR}/usr/lib/ocaml/Z3/dllz3ml.so ${DESTDIR}/usr/lib/ocaml/Z3/stublibs
- fi
vlicense LICENSE.txt
}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (96 preceding siblings ...)
2024-02-05 15:48 ` MIvanchev
@ 2024-02-05 16:47 ` MIvanchev
2024-02-05 21:02 ` MIvanchev
` (15 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 16:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33371 bytes --]
From 54eee843330a6585796b0fa6b6198e26a4db59b9 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 65 +++++-
srcpkgs/z3/template | 27 ++-
20 files changed, 374 insertions(+), 333 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83ee..b8112710108395 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,62 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..b86756a29407f0 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,17 +27,22 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix=${DESTDIR}/usr $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
- if [ "$build_option_ocaml" ]; then
- vmkdir usr/lib/ocaml/Z3/stublibs
- mv ${DESTDIR}/usr/lib/ocaml/Z3/dllz3ml.so ${DESTDIR}/usr/lib/ocaml/Z3/stublibs
- fi
vlicense LICENSE.txt
}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (97 preceding siblings ...)
2024-02-05 16:47 ` MIvanchev
@ 2024-02-05 21:02 ` MIvanchev
2024-02-05 21:55 ` MIvanchev
` (14 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 21:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33326 bytes --]
From f80a6c6078c2b0af200af9e0383dab5c0bdf2253 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/patches/ocaml.patch | 65 +++++-
srcpkgs/z3/template | 27 ++-
20 files changed, 374 insertions(+), 333 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
index 958f4376af83e..b811271010839 100644
--- a/srcpkgs/z3/patches/ocaml.patch
+++ b/srcpkgs/z3/patches/ocaml.patch
@@ -1,8 +1,8 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
+diff --git a/scripts/mk_project.py b/scripts/mk_project.py
+index 1a8046155..0c6849c88 100644
--- a/scripts/mk_project.py
+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
+@@ -111,7 +111,6 @@ def init_project_def():
add_c_example('maxsat')
add_dotnet_example('dotnet_example', 'dotnet')
add_java_example('java_example', 'java')
@@ -10,3 +10,62 @@ Does not use ocamlfind, so this fails on nums.cmxa.
add_z3py_example('py_example', 'python')
return API_files
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..7ae0c253fb4d5 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,11 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
+#build_style=configure
+#configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
+#make_build_args="-C build all examples"
+#make_install_args="-C build install"
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,7 +19,7 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
+#shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
@@ -27,17 +27,22 @@ if [ -z "$CROSS_BUILD" ]; then
fi
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
- if [ "$build_option_ocaml" ]; then
- vmkdir usr/lib/ocaml/Z3/stublibs
- mv ${DESTDIR}/usr/lib/ocaml/Z3/dllz3ml.so ${DESTDIR}/usr/lib/ocaml/Z3/stublibs
- fi
vlicense LICENSE.txt
}
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (98 preceding siblings ...)
2024-02-05 21:02 ` MIvanchev
@ 2024-02-05 21:55 ` MIvanchev
2024-02-05 22:00 ` MIvanchev
` (13 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 21:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33383 bytes --]
From 54932be4738e3b2d530ec301e306d8ffbdb0cef1 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
21 files changed, 373 insertions(+), 338 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..df4a21bea61713 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>"
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2dfe8b8b249228 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (99 preceding siblings ...)
2024-02-05 21:55 ` MIvanchev
@ 2024-02-05 22:00 ` MIvanchev
2024-02-05 22:20 ` MIvanchev
` (12 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 22:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33327 bytes --]
From efb6ee0bbbfe6bdd02f4b310f4893d71f6ff71df Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 2 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
21 files changed, 373 insertions(+), 338 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
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>"
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 0000000000000..ba7dac5932538
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83e..0000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2fbd8a33e4ea7 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (100 preceding siblings ...)
2024-02-05 22:00 ` MIvanchev
@ 2024-02-05 22:20 ` MIvanchev
2024-02-05 22:21 ` MIvanchev
` (11 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 22:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33805 bytes --]
From 79bae5e5c581db5071748c1748e103dea6368c84 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
21 files changed, 379 insertions(+), 339 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..a421df58d08d34 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>"
@@ -12,7 +12,12 @@ checksum=aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true
+ _native=true
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (101 preceding siblings ...)
2024-02-05 22:20 ` MIvanchev
@ 2024-02-05 22:21 ` MIvanchev
2024-02-06 8:32 ` MIvanchev
` (10 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-05 22:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 33796 bytes --]
From 95ebd5d37cb43c041e30bafb3dd83997da9b25ed Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 2 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
21 files changed, 379 insertions(+), 339 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
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"
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..028ff69d65bee4 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>"
@@ -12,7 +12,12 @@ checksum=aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (102 preceding siblings ...)
2024-02-05 22:21 ` MIvanchev
@ 2024-02-06 8:32 ` MIvanchev
2024-02-06 8:34 ` MIvanchev
` (9 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-06 8:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 34095 bytes --]
From 51a41dfdacd41cbbabc3caeca21d3167be32f117 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
21 files changed, 385 insertions(+), 339 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce84..f1fb10bfbfb81 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f5..028ff69d65bee 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>"
@@ -12,7 +12,12 @@ checksum=aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 0000000000000..ba7dac5932538
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83e..0000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2fbd8a33e4ea7 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (103 preceding siblings ...)
2024-02-06 8:32 ` MIvanchev
@ 2024-02-06 8:34 ` MIvanchev
2024-02-24 8:27 ` MIvanchev
` (8 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-06 8:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 34096 bytes --]
From bfb4a81aabee4066dea4d5ba46920e979d789fd8 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
21 files changed, 385 insertions(+), 339 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
diff --git a/srcpkgs/camlp5/template b/srcpkgs/camlp5/template
deleted file mode 100644
index 62223f806a0f0..0000000000000
--- 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 d3695ee92307b..0000000000000
--- a/srcpkgs/camlp5/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pattern='rel\K[\d\.]+(?=\.tar\.gz")'
-ignore='71?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 0000000000000..29139dff8482f
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda..0ced3aa0e43cc 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7..7cc448744e85a 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c..9d1de2eeae31e 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3..09a1427f3095d 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d074..8f6a51ccb6ae8 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce84..da2cc66c46290 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 0000000000000..458cc5348a017
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1c 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc030..3aa82504b3656 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b94..9e3e3af6944d2 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"
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f5..028ff69d65bee 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>"
@@ -12,7 +12,12 @@ checksum=aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 0000000000000..ba7dac5932538
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83e..0000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f..2fbd8a33e4ea7 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (104 preceding siblings ...)
2024-02-06 8:34 ` MIvanchev
@ 2024-02-24 8:27 ` MIvanchev
2024-02-24 8:34 ` MIvanchev
` (7 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 8:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 35176 bytes --]
From 298d63365bfbd29b842c5fd204466c70e1fac138 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Mon, 29 Jan 2024 22:43:20 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 12 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 393 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..06158caf7a97c0 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,9 @@ 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"
+fi
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 2360574efa4f51..028ff69d65bee4 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>"
@@ -12,7 +12,12 @@ checksum=aaea04fc5bc76dcfe8627683c9659ee4c194d4f992cc8aaa15bbb2820fc8de46
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (105 preceding siblings ...)
2024-02-24 8:27 ` MIvanchev
@ 2024-02-24 8:34 ` MIvanchev
2024-02-24 8:35 ` MIvanchev
` (6 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 8:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 34945 bytes --]
From d6520c4082228a2b7e96594159cd476d7b9a5ec5 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 12 +-
srcpkgs/unison/template | 7 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 392 insertions(+), 342 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..06158caf7a97c0 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,9 @@ 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"
+fi
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..87f06485863cc3 100644
--- a/srcpkgs/unison/template
+++ b/srcpkgs/unison/template
@@ -12,7 +12,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (106 preceding siblings ...)
2024-02-24 8:34 ` MIvanchev
@ 2024-02-24 8:35 ` MIvanchev
2024-02-24 8:48 ` MIvanchev
` (5 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 8:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 35163 bytes --]
From 00388db7a1358ec0e35b5960ca00a362876fb1fe Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 12 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 393 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..06158caf7a97c0 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,9 @@ 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"
+fi
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..b8c9c38bc7854a 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,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (107 preceding siblings ...)
2024-02-24 8:35 ` MIvanchev
@ 2024-02-24 8:48 ` MIvanchev
2024-02-24 9:24 ` MIvanchev
` (4 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 8:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 35156 bytes --]
From 3cd8ba034ea4ac1abfee0e64c5b35b8c2ccb4e96 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 12 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 393 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..d884d85b8b27eb 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,9 @@ 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"
+fi
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..b8c9c38bc7854a 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,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} UISTYLE=text DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (108 preceding siblings ...)
2024-02-24 8:48 ` MIvanchev
@ 2024-02-24 9:24 ` MIvanchev
2024-02-24 10:11 ` MIvanchev
` (3 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 9:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 35143 bytes --]
From 5bf09f6a8118393fd6c52deea1e6aefb5ae5290a Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 12 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 393 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..d884d85b8b27eb 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,9 @@ 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"
+fi
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..37d745259f8052 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,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (109 preceding siblings ...)
2024-02-24 9:24 ` MIvanchev
@ 2024-02-24 10:11 ` MIvanchev
2024-02-24 11:10 ` MIvanchev
` (2 subsequent siblings)
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 10:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 35162 bytes --]
From c3a5932a042086dfc01aaca1f6218a9bacb13ed7 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 13 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 394 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
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
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..37d745259f8052 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,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (110 preceding siblings ...)
2024-02-24 10:11 ` MIvanchev
@ 2024-02-24 11:10 ` MIvanchev
2024-02-24 11:37 ` MIvanchev
2024-02-24 18:06 ` MIvanchev
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 11:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 35352 bytes --]
From 12aee6f2e6f76563ec6dce8985144f2b8db22c93 Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 21 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 402 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..dcdd0568723e2a 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,18 @@ 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
+
+pre_check() {
+ cd tests
+ ../src/supermin --help
+ ../src/supermin --version | grep ^supermin
+ ../src/supermin --list-drivers
+ ../src/supermin --list-drivers | grep -v not-detected
+}
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..37d745259f8052 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,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (111 preceding siblings ...)
2024-02-24 11:10 ` MIvanchev
@ 2024-02-24 11:37 ` MIvanchev
2024-02-24 18:06 ` MIvanchev
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 11:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 35435 bytes --]
From 81258f3f06627364e00d120e6b795d12301eaeba Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 22 +-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 403 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..0ed5c807c6b0ff 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,16 +1,30 @@
# 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"
depends="cpio e2fsprogs"
+checkdepends="grep"
short_desc="Tool for creating supermin appliances"
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
+
+pre_check() {
+ cd tests
+ ../src/supermin --help
+ ../src/supermin --version | grep ^supermin
+ ../src/supermin --list-drivers
+ ../src/supermin --list-drivers | grep -v not-detected
+}
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..37d745259f8052 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,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] ocaml: update to 5.1.1
2024-01-29 21:43 [PR PATCH] " MIvanchev
` (112 preceding siblings ...)
2024-02-24 11:37 ` MIvanchev
@ 2024-02-24 18:06 ` MIvanchev
113 siblings, 0 replies; 161+ messages in thread
From: MIvanchev @ 2024-02-24 18:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages ocaml
https://github.com/void-linux/void-packages/pull/48430
[WIP] ocaml: update to 5.1.1
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/48430.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ocaml-48430.patch --]
[-- Type: text/x-diff, Size: 36108 bytes --]
From 9c51af3cb88fbe6677dab1f0052ca2c8fb75537d Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sat, 24 Feb 2024 09:34:16 +0100
Subject: [PATCH] ocaml: update to 5.1.1
---
srcpkgs/camlp5/template | 20 --
srcpkgs/camlp5/update | 2 -
srcpkgs/coq/patches/coqide.patch | 203 ++++++++++++++++++
srcpkgs/coq/template | 21 +-
srcpkgs/dune/template | 2 +-
srcpkgs/mathcomp/template | 8 +-
srcpkgs/ocaml-findlib/template | 22 +-
srcpkgs/ocaml-num/template | 14 +-
srcpkgs/ocaml-stdcompat/template | 8 +-
.../patches/native-code-tests.patch | 30 +++
srcpkgs/ocaml-zarith/template | 9 +-
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 | 21 +-
srcpkgs/ocamlbuild/template | 6 +-
srcpkgs/opam/template | 2 +-
srcpkgs/supermin/template | 47 +++-
srcpkgs/unison/template | 9 +-
srcpkgs/z3/files/ocaml-i686.patch | 59 +++++
srcpkgs/z3/patches/ocaml.patch | 12 --
srcpkgs/z3/template | 25 ++-
22 files changed, 428 insertions(+), 343 deletions(-)
delete mode 100644 srcpkgs/camlp5/template
delete mode 100644 srcpkgs/camlp5/update
create mode 100644 srcpkgs/coq/patches/coqide.patch
create mode 100644 srcpkgs/ocaml-zarith/patches/native-code-tests.patch
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
create mode 100644 srcpkgs/z3/files/ocaml-i686.patch
delete mode 100644 srcpkgs/z3/patches/ocaml.patch
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?'
diff --git a/srcpkgs/coq/patches/coqide.patch b/srcpkgs/coq/patches/coqide.patch
new file mode 100644
index 00000000000000..29139dff8482f2
--- /dev/null
+++ b/srcpkgs/coq/patches/coqide.patch
@@ -0,0 +1,203 @@
+diff --git a/coqide.opam b/coqide.opam
+deleted file mode 100644
+index 6fd9e8d3ba..0000000000
+--- a/coqide.opam
++++ /dev/null
+@@ -1,45 +0,0 @@
+-# This file is generated by dune, edit dune-project instead
+-opam-version: "2.0"
+-version: "dev"
+-synopsis: "The Coq Proof Assistant --- GTK3 IDE"
+-description: """
+-Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."""
+-maintainer: ["The Coq development team <coqdev@inria.fr>"]
+-authors: ["The Coq development team, INRIA, CNRS, and contributors"]
+-license: "LGPL-2.1-only"
+-homepage: "https://coq.inria.fr/"
+-doc: "https://coq.github.io/doc/"
+-bug-reports: "https://github.com/coq/coq/issues"
+-depends: [
+- "dune" {>= "2.9"}
+- "ocamlfind" {build}
+- "conf-findutils" {build}
+- "conf-adwaita-icon-theme"
+- "coqide-server" {= version}
+- "cairo2" {>= "0.6.4"}
+- "lablgtk3-sourceview3" {>= "3.1.2"}
+- "odoc" {with-doc}
+-]
+-build: [
+- ["dune" "subst"] {dev}
+- [
+- "dune"
+- "build"
+- "-p"
+- name
+- "-j"
+- jobs
+- "--promote-install-files=false"
+- "@install"
+- "@runtest" {with-test}
+- "@doc" {with-doc}
+- ]
+- ["dune" "install" "-p" name "--create-install-files" name]
+-]
+-dev-repo: "git+https://github.com/coq/coq.git"
+diff --git a/dune-project b/dune-project
+index a6a64f84f0..5bb8203351 100644
+--- a/dune-project
++++ b/dune-project
+@@ -80,23 +80,23 @@ implementation of Coq's [XML protocol](https://github.com/coq/coq/blob/master/de
+ which allows clients, such as CoqIDE, to interact with Coq in a
+ structured way."))
+
+-(package
+- (name coqide)
+- (depends
+- (ocamlfind :build)
+- (conf-findutils :build)
+- conf-adwaita-icon-theme
+- (coqide-server (= :version))
+- (cairo2 (>= 0.6.4))
+- (lablgtk3-sourceview3 (>= 3.1.2)))
+- (synopsis "The Coq Proof Assistant --- GTK3 IDE")
+- (description "Coq is a formal proof management system. It provides
+-a formal language to write mathematical definitions, executable
+-algorithms and theorems together with an environment for
+-semi-interactive development of machine-checked proofs.
+-
+-This package provides the CoqIDE, a graphical user interface for the
+-development of interactive proofs."))
++;(package
++; (name coqide)
++; (depends
++; (ocamlfind :build)
++; (conf-findutils :build)
++; conf-adwaita-icon-theme
++; (coqide-server (= :version))
++; (cairo2 (>= 0.6.4))
++; (lablgtk3-sourceview3 (>= 3.1.2)))
++; (synopsis "The Coq Proof Assistant --- GTK3 IDE")
++; (description "Coq is a formal proof management system. It provides
++;a formal language to write mathematical definitions, executable
++;algorithms and theorems together with an environment for
++;semi-interactive development of machine-checked proofs.
++;
++;This package provides the CoqIDE, a graphical user interface for the
++;development of interactive proofs."))
+
+ (package
+ (name coq-doc)
+diff --git a/ide/coqide/dune b/ide/coqide/dune
+index c3a5469984..b96af2a073 100644
+--- a/ide/coqide/dune
++++ b/ide/coqide/dune
+@@ -23,16 +23,16 @@
+ (files (idetop.bc as coqidetop.byte)))
+
+ ; IDE Client, we may want to add the macos_prehook.ml conditionally.
+-(library
+- (name coqide_gui)
+- (wrapped false)
+- (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
+- shared shared_os_specific))
+- (modules_without_implementation configwin_types)
+- (foreign_stubs
+- (language c)
+- (names coqide_os_stubs))
+- (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
++;(library
++; (name coqide_gui)
++; (wrapped false)
++; (modules (:standard \ document idetop coqide_main default_bindings_src gen_gtk_platform
++; shared shared_os_specific))
++; (modules_without_implementation configwin_types)
++; (foreign_stubs
++; (language c)
++; (names coqide_os_stubs))
++; (libraries coqide-server.protocol coqide-server.core lablgtk3-sourceview3 platform_specific))
+
+ (library
+ (name platform_specific)
+@@ -68,16 +68,16 @@
+ (targets shared_os_stubs.c)
+ (action (copy shared_%{read:gtk_platform.conf}.c.in %{targets})))
+
+-(executable
+- (name coqide_main)
+- (public_name coqide)
+- (package coqide)
+- (modules coqide_main)
+- (modes exe byte)
+- (libraries coqide_gui))
++;(executable
++; (name coqide_main)
++; (public_name coqide)
++; (package coqide)
++; (modules coqide_main)
++; (modes exe byte)
++; (libraries coqide_gui))
+
+-(documentation
+- (package coqide))
++;(documentation
++; (package coqide))
+
+ ; Input-method bindings
+ (executable
+@@ -89,19 +89,19 @@
+ (deps (:gen ./default_bindings_src.exe))
+ (action (run %{gen} %{targets})))
+
+-(install
+- (section doc)
+- (package coqide)
+- (files FAQ))
++;(install
++; (section doc)
++; (package coqide)
++; (files FAQ))
+
+ ; FIXME: we should install those in share/coqide. We better do this
+ ; once the make-based system has been phased out.
+-(install
+- (section share_root)
+- (package coqide)
+- (files
+- (coq.png as coq/coq.png)
+- (default.bindings as coq/default.bindings)
+- (coq_style.xml as coq/coq_style.xml)
+- (coq.lang as coq/coq.lang)
+- (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
++;(install
++; (section share_root)
++; (package coqide)
++; (files
++; (coq.png as coq/coq.png)
++; (default.bindings as coq/default.bindings)
++; (coq_style.xml as coq/coq_style.xml)
++; (coq.lang as coq/coq.lang)
++; (coq-ssreflect.lang as coq/coq-ssreflect.lang)))
+diff --git a/man/dune b/man/dune
+index 3f33fcd95b..e2339853cc 100644
+--- a/man/dune
++++ b/man/dune
+@@ -3,8 +3,8 @@
+ (package coq-core)
+ (files coqc.1 coqtop.1 coqtop.byte.1 coqtop.opt.1 coqchk.1 coqdep.1 coqdoc.1 coq_makefile.1 coq-tex.1 coqwc.1 coqnative.1))
+
+-(install
+- (section man)
+- (package coqide)
+- (files coqide.1))
++;(install
++; (section man)
++; (package coqide)
++; (files coqide.1))
+
diff --git a/srcpkgs/coq/template b/srcpkgs/coq/template
index 78d6caa780dda0..0ced3aa0e43cc3 100644
--- a/srcpkgs/coq/template
+++ b/srcpkgs/coq/template
@@ -1,29 +1,26 @@
# 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"
+build_style="configure"
+configure_args="-prefix /usr"
+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>"
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
-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
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ sed -i 's/\.cmxs/.cma/g' theories/dune
+ sed -i 's/\.cmxs/.cma/g' user-contrib/Ltac2/dune
+ fi
dune build --display=short -p coq-core,coq-stdlib
}
diff --git a/srcpkgs/dune/template b/srcpkgs/dune/template
index ca28c69b2fac7e..7cc448744e85aa 100644
--- a/srcpkgs/dune/template
+++ b/srcpkgs/dune/template
@@ -1,7 +1,7 @@
# Template file for 'dune'
pkgname=dune
version=3.13.0
-revision=1
+revision=2
makedepends="ocaml"
depends="ocaml"
short_desc="Composable build system for OCaml"
diff --git a/srcpkgs/mathcomp/template b/srcpkgs/mathcomp/template
index 9757979e5af1c5..9d1de2eeae31e0 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"
@@ -9,8 +9,8 @@ short_desc="Mathematical Components Library for the Coq proof assistant"
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
+distfiles="https://github.com/math-comp/math-comp/archive/refs/tags/${pkgname}-${version}.tar.gz"
+checksum=786db902d904347f2108ffceae15ba29037ff8e63a6c58b87928f08671456394
nocross="ocaml"
post_patch() {
diff --git a/srcpkgs/ocaml-findlib/template b/srcpkgs/ocaml-findlib/template
index cd10d0a4bf4b3c..09a1427f3095d3 100644
--- a/srcpkgs/ocaml-findlib/template
+++ b/srcpkgs/ocaml-findlib/template
@@ -1,25 +1,31 @@
# 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
+case "$XBPS_TARGET_MACHINE" in
+ # native code platforms
+ x86_64*|aarch64*|riscv64*)
+ make_build_args="all opt" ;;
+ *)
+ make_build_target="all"
+ # Do not strip; removes byte code!
+ nostrip_files="/usr/bin/ocamlfind" ;;
+esac
+
do_install() {
make prefix="$DESTDIR" install
- vbin src/findlib/ocamlfind_opt
vlicense LICENSE
-
- rm -rf ${DESTDIR}/usr/lib/ocaml/ocamlbuild
}
diff --git a/srcpkgs/ocaml-num/template b/srcpkgs/ocaml-num/template
index 72c9bace0d0747..8f6a51ccb6ae87 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
+version=1.5
+revision=1
build_style=gnu-makefile
make_install_target="findlib-install"
makedepends="ocaml ocaml-findlib"
@@ -10,8 +10,16 @@ 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
+disable_parallel_build=yes
+
+pre_build() {
+ if ! command -v ocamlc.opt >/dev/null; then
+ sed 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ sed -i 's/ifeq "$(NATDYNLINK)" "true"/ifeq "true" "false"/' src/Makefile
+ fi
+}
pre_install() {
export OCAMLFIND_DESTDIR=${DESTDIR}/usr/lib/ocaml
diff --git a/srcpkgs/ocaml-stdcompat/template b/srcpkgs/ocaml-stdcompat/template
index 7bfcf2576ce842..da2cc66c462904 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,12 @@ checksum=0ca4067789e720de923e5b3a85c03fd89bdcee2bd836978c53aad8b157350a55
nocross=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
}
diff --git a/srcpkgs/ocaml-zarith/patches/native-code-tests.patch b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
new file mode 100644
index 00000000000000..458cc5348a017e
--- /dev/null
+++ b/srcpkgs/ocaml-zarith/patches/native-code-tests.patch
@@ -0,0 +1,30 @@
+diff --git a/tests/Makefile b/tests/Makefile
+index 760294b..9b3f365 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -10,14 +10,17 @@ NUMS_CMA=nums.cma
+ NUMS_CMXA=nums.cmxa
+ endif
+
++ifeq ($(HASOCAMLOPT),yes)
+ test:: zq.exe
+ @echo "Testing zq (native)..."
+ @if ./zq.exe | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
++endif
+
+ test:: zq.byt
+ @echo "Testing zq (bytecode)..."
+ @if ocamlrun -I .. ./zq.byt | cmp -s zq.output$(WORDSIZE) - ; then echo "zq: passed"; else echo "zq: FAILED"; exit 2; fi
+
++ifeq ($(HASOCAMLOPT),yes)
+ ifeq ($(HAS_NUM),true)
+ test:: bi.exe
+ @echo "Testing bi..."
+@@ -49,6 +52,7 @@ bench:: pi.exe
+ test:: tst_extract.exe
+ @echo "Testing extract..."
+ @if ./tst_extract.exe; then echo "tst_extract: passed"; else echo "tst_extract: FAILED"; exit 2; fi
++endif
+
+ tofloat.exe: tofloat.ml setround.o ../zarith.cmxa
+ ocamlopt -I .. -ccopt "-L.." zarith.cmxa -o tofloat.exe \
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
}
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..db4e45cc77d1cc 100644
--- a/srcpkgs/ocaml/template
+++ b/srcpkgs/ocaml/template
@@ -1,26 +1,25 @@
# 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"
+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
}
diff --git a/srcpkgs/ocamlbuild/template b/srcpkgs/ocamlbuild/template
index 188b9b23dc0303..3aa82504b36561 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"
@@ -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
+}
diff --git a/srcpkgs/opam/template b/srcpkgs/opam/template
index 46e4a305f2b946..9e3e3af6944d25 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"
diff --git a/srcpkgs/supermin/template b/srcpkgs/supermin/template
index 5f80c3515b3dc8..fd91d3d077d6bc 100644
--- a/srcpkgs/supermin/template
+++ b/srcpkgs/supermin/template
@@ -1,16 +1,55 @@
# 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"
depends="cpio e2fsprogs"
+checkdepends="grep"
short_desc="Tool for creating supermin appliances"
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
+
+pre_check() {
+ cd tests
+ ../src/supermin --help
+ ../src/supermin --version | grep ^supermin
+ ../src/supermin --list-drivers
+# ../src/supermin --list-drivers | grep -v not-detected
+ # XXX Hack for Arch.
+ if [ -f /etc/arch-release ]; then
+ export SUPERMIN_KERNEL=/boot/vmlinuz-linux
+ fi
+
+ tmpdir=`mktemp -d`
+
+ d1=$tmpdir/d1
+ d2=$tmpdir/d2
+ d3=$tmpdir/d3
+
+ test "$USE_NETWORK" = 1 || USE_INSTALLED=--use-installed
+
+ # We assume 'bash' is a package everywhere.
+ ../src/supermin -v --prepare $USE_INSTALLED bash -o $d1
+
+ arch="$(uname -m)"
+
+ # Check all supermin-helper formats work.
+ ../src/supermin -v --build -f chroot --host-cpu $arch $d1 -o $d2
+ ../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d3
+
+ # Need to chmod $d2 since rm -r can't remove unwritable directories.
+ chmod -R +w $d2 ||:
+ rm -rf $tmpdir ||:
+}
diff --git a/srcpkgs/unison/template b/srcpkgs/unison/template
index 8a5f06e0b6f911..37d745259f8052 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,12 @@ checksum=d19e4293013581dbc4d149aef89b34c76221efcbd873c7aa5193de489addb85a
nocross="OCaml does not cross compile"
do_build() {
- CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true
+ _native=true
+ if ! command -v ocamlc.opt >/dev/null; then
+ _native=false
+ fi
+
+ CFLAGS= make ${makejobs} DEBUGGING=false THREADS=true NATIVE=$_native
CFLAGS= make ${makejobs} -C man
}
diff --git a/srcpkgs/z3/files/ocaml-i686.patch b/srcpkgs/z3/files/ocaml-i686.patch
new file mode 100644
index 00000000000000..ba7dac59325388
--- /dev/null
+++ b/srcpkgs/z3/files/ocaml-i686.patch
@@ -0,0 +1,59 @@
+diff --git a/scripts/mk_util.py b/scripts/mk_util.py
+index 014b0e40f..642a49a40 100644
+--- a/scripts/mk_util.py
++++ b/scripts/mk_util.py
+@@ -458,11 +458,11 @@ def check_ml():
+ r = exec_cmd([OCAMLC, '-o', 'a.out', 'hello.ml'])
+ if r != 0:
+ raise MKException('Failed testing ocamlc compiler. Set environment variable OCAMLC with the path to the Ocaml compiler')
+- if is_verbose():
+- print ('Testing %s...' % OCAMLOPT)
+- r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
+- if r != 0:
+- raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
++# if is_verbose():
++# print ('Testing %s...' % OCAMLOPT)
++# r = exec_cmd([OCAMLOPT, '-o', 'a.out', 'hello.ml'])
++# if r != 0:
++# raise MKException('Failed testing ocamlopt compiler. Set environment variable OCAMLOPT with the path to the Ocaml native compiler. Note that ocamlopt may require flexlink to be in your path.')
+ try:
+ rmf('hello.cmi')
+ rmf('hello.cmo')
+@@ -2071,7 +2071,7 @@ class MLComponent(Component):
+ out.write('\t%s -linkall -shared -o %s.cmxs -I . -I %s %s.cmxa\n' % (OCAMLOPTF, z3mls, self.sub_dir, z3mls))
+
+ out.write('\n')
+- out.write('ml: %s.cma %s.cmxa %s.cmxs\n' % (z3mls, z3mls, z3mls))
++ out.write('ml: %s.cma\n' % (z3mls))
+ if IS_OSX:
+ out.write('\tinstall_name_tool -id %s/libz3.dylib libz3.dylib\n' % (stubs_install_path))
+ out.write('\tinstall_name_tool -change libz3.dylib %s/libz3.dylib api/ml/dllz3ml.so\n' % (stubs_install_path))
+@@ -2093,8 +2093,8 @@ class MLComponent(Component):
+ out.write(get_component(Z3_DLL_COMPONENT).dll_name + '$(SO_EXT) ')
+ out.write(os.path.join(self.sub_dir, 'META '))
+ out.write(os.path.join(self.sub_dir, 'z3ml.cma '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
+- out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxa '))
++# out.write(os.path.join(self.sub_dir, 'z3ml.cmxs '))
+
+ def mk_install(self, out):
+ if is_ml_enabled() and self._install_bindings():
+@@ -2121,12 +2121,12 @@ class MLComponent(Component):
+ else:
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.mli')
+ out.write(' ' + os.path.join(self.sub_dir, m) + '.cmi')
+- out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
++# out.write(' ' + os.path.join(self.sub_dir, m) + '.cmx')
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'libz3ml$(LIB_EXT)'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml$(LIB_EXT)'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cma'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
+- out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxa'))))
++# out.write(' %s' % ((os.path.join(self.sub_dir, 'z3ml.cmxs'))))
+ out.write(' %s' % ((os.path.join(self.sub_dir, 'dllz3ml'))))
+ if is_windows() or is_cygwin_mingw() or is_msys2():
+ out.write('.dll')
diff --git a/srcpkgs/z3/patches/ocaml.patch b/srcpkgs/z3/patches/ocaml.patch
deleted file mode 100644
index 958f4376af83ee..00000000000000
--- a/srcpkgs/z3/patches/ocaml.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Does not use ocamlfind, so this fails on nums.cmxa.
-
---- a/scripts/mk_project.py
-+++ b/scripts/mk_project.py
-@@ -101,7 +101,6 @@
- add_c_example('maxsat')
- add_dotnet_example('dotnet_example', 'dotnet')
- add_java_example('java_example', 'java')
-- add_ml_example('ml_example', 'ml')
- add_z3py_example('py_example', 'python')
- return API_files
-
diff --git a/srcpkgs/z3/template b/srcpkgs/z3/template
index 5c24bec533b2f9..2fbd8a33e4ea73 100644
--- a/srcpkgs/z3/template
+++ b/srcpkgs/z3/template
@@ -1,11 +1,7 @@
# Template file for 'z3'
pkgname=z3
version=4.12.5
-revision=1
-build_style=configure
-configure_args="--prefix=/usr -g --python $(vopt_if ocaml --ml)"
-make_build_args="-C build all examples"
-make_install_args="-C build install"
+revision=2
hostmakedepends="python3 which $(vopt_if ocaml 'ocaml ocaml-findlib')"
makedepends="libgomp-devel gmp-devel $(vopt_if ocaml 'ocaml-zarith ncurses-devel')"
depends="python3 python3-setuptools"
@@ -19,18 +15,33 @@ checksum=70e211e0a8e77febccc51865e45111066f623356a4ef0b527c3597362bc6db72
build_options="ocaml"
desc_option_ocaml="Enable support for OCaml bindings"
-shlib_provides="libz3.so"
subpackages="$(vopt_if ocaml z3-ocaml)"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="ocaml"
fi
+post_patch() {
+ sed -i 's/add_ml_example(.*)/#\0/' scripts/mk_project.py
+ if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then
+ patch -p1 -i ${FILESDIR}/ocaml-i686.patch
+ fi
+}
+
do_check() {
- make ${MAKEJOBS} -C build test
+ make ${makejobs} -C build test
./build/test-z3 /a
}
+do_build() {
+ python scripts/mk_make.py --prefix /usr -g --python $(vopt_if ocaml --ml)
+ make ${makejobs} -C build all examples
+}
+
+do_install() {
+ make -C build install DESTDIR=${DESTDIR}
+}
+
post_install() {
vbin build/z3_tptp
vbin build/maxsat
^ permalink raw reply [flat|nested] 161+ messages in thread