From 6a25d22521957a9fa28da0d39221cf2357f1d1fd Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Tue, 18 Mar 2025 20:53:56 +0100 Subject: [PATCH] dev-ml/ocamlbuild: test with j1 and 5.3.0 fix Closes: https://bugs.gentoo.org/951545 Signed-off-by: Alfredo Tupone --- .../files/ocamlbuild-0.15.0-test.patch | 37 +++++++++++++++++++ dev-ml/ocamlbuild/ocamlbuild-0.15.0.ebuild | 9 ++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 dev-ml/ocamlbuild/files/ocamlbuild-0.15.0-test.patch diff --git a/dev-ml/ocamlbuild/files/ocamlbuild-0.15.0-test.patch b/dev-ml/ocamlbuild/files/ocamlbuild-0.15.0-test.patch new file mode 100644 index 0000000000000..db02dd5de7321 --- /dev/null +++ b/dev-ml/ocamlbuild/files/ocamlbuild-0.15.0-test.patch @@ -0,0 +1,37 @@ +From c70704cc301cfd826cc3950f26af674b3b3bfab4 Mon Sep 17 00:00:00 2001 +From: Hugo Heuzard +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",[]) ();; + diff --git a/dev-ml/ocamlbuild/ocamlbuild-0.15.0.ebuild b/dev-ml/ocamlbuild/ocamlbuild-0.15.0.ebuild index 1fbdfe7dc118b..a56cc131cd0ee 100644 --- a/dev-ml/ocamlbuild/ocamlbuild-0.15.0.ebuild +++ b/dev-ml/ocamlbuild/ocamlbuild-0.15.0.ebuild @@ -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 +}