dev-ml/ocamlbuild: test with j1 and 5.3.0 fix

Closes: https://bugs.gentoo.org/951545
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone 2025-03-18 20:53:56 +01:00
parent 821e103e78
commit 6a25d22521
No known key found for this signature in database
GPG Key ID: FBE5925C5B02CE58
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From c70704cc301cfd826cc3950f26af674b3b3bfab4 Mon Sep 17 00:00:00 2001
From: Hugo Heuzard <hugo.heuzard@gmail.com>
Date: Mon, 10 Mar 2025 10:53:27 +0100
Subject: [PATCH] Testsuite: fix for OCaml 5.3
---
testsuite/internal.ml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/testsuite/internal.ml b/testsuite/internal.ml
index 0b9ac319..eb221cb1 100644
--- a/testsuite/internal.ml
+++ b/testsuite/internal.ml
@@ -314,7 +314,7 @@ Error: This expression has type int but an expression was expected of type
unit
because it is in the left-hand side of a sequence
Command exited with code 2.|}
-else
+else if Sys.ocaml_version < "5.3.0" then
{|File "hello.ml", line 1, characters 9-10:
1 | let () = 1; ()
^
@@ -322,6 +322,14 @@ Error: This expression has type "int" but an expression was expected of type
"unit"
because it is in the left-hand side of a sequence
Command exited with code 2.|}
+else
+{|File "hello.ml", line 1, characters 9-10:
+1 | let () = 1; ()
+ ^
+Error: The constant "1" has type "int" but an expression was expected of type
+ "unit"
+ because it is in the left-hand side of a sequence
+Command exited with code 2.|}
)
~targets:("hello.byte",[]) ();;

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -17,6 +17,9 @@ DEPEND="${RDEPEND}
dev-ml/findlib"
QA_FLAGS_IGNORED='.*'
PATCHES=( "${FILESDIR}"/${P}-test.patch )
src_prepare() {
sed -i \
-e "/package_exists/s:camlp4.macro:xxxxxx:" \
@ -48,3 +51,7 @@ src_install() {
emake CHECK_IF_PREINSTALLED=false DESTDIR="${D}" install
dodoc Changes
}
src_test() {
emake -j1 test
}