From 2517a3204ba3bd0e14b99343ccd1e624d0438fbdc9b338c7bd76f3f6329cb33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Fri, 22 Nov 2024 18:28:37 +0100 Subject: [PATCH] fix: failing jpl:prolog_in_java (gh#SWI-Prolog/packages-jpl#104) Patch from gh#SWI-Prolog/packages-jpl@e3be3065f2c8 --- 104-fix-prolog_in_java.patch | 46 ++++++++++++++++++++++++++++++++++++ swipl.changes | 1 + swipl.spec | 5 ++-- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 104-fix-prolog_in_java.patch diff --git a/104-fix-prolog_in_java.patch b/104-fix-prolog_in_java.patch new file mode 100644 index 0000000..a23e188 --- /dev/null +++ b/104-fix-prolog_in_java.patch @@ -0,0 +1,46 @@ +--- + packages/jpl/cmake/JUnit.cmake | 33 ++++++++++++++++++++++----------- + 1 file changed, 22 insertions(+), 11 deletions(-) + +--- a/packages/jpl/cmake/JUnit.cmake ++++ b/packages/jpl/cmake/JUnit.cmake +@@ -16,17 +16,28 @@ + # Unfortunately GLOB ? means exactly one, so cannot use it to make the - optional! + ## GLOB EXPRESSION: https://facelessuser.github.io/wcmatch/glob/ + if(NOT JUNIT_JAR) +- file(GLOB JUNIT_JAR +- ${JAVA_LIB_INSTALL_DIR}/junit4.jar +- ${JAVA_LIB_INSTALL_DIR}/junit-4*.jar +- /usr/share/java/junit4.jar +- /usr/share/java/junit-4*.jar +- /usr/share/java/junit.jar +- /opt/local/share/java/junit.jar # Macport +- /opt/local/share/java/junit4.jar +- /opt/local/share/java/junit-4*.jar +- /usr/local/share/java/junit4.jar +- /usr/local/share/java/junit-4*.jar) ++ file(GLOB F_JUNIT_JAR ++ ${JAVA_LIB_INSTALL_DIR}/junit4.jar ++ ${JAVA_LIB_INSTALL_DIR}/junit-4*.jar ++ /usr/share/java/junit4.jar ++ /usr/share/java/junit-4*.jar ++ /opt/local/share/java/junit4.jar ++ /opt/local/share/java/junit-4*.jar ++ /usr/local/share/java/junit4.jar ++ /usr/local/share/java/junit-4*.jar) ++ if(NOT F_JUNIT_JAR) ++ file(GLOB F_JUNIT_JAR ++ /usr/share/java/junit.jar ++ /opt/local/share/java/junit.jar) ++ endif() ++ if(F_JUNIT_JAR) ++ list(GET F_JUNIT_JAR 0 F_JUNIT_JAR) ++ message("Found junit at ${F_JUNIT_JAR}") ++ else() ++ message("Could not find junit.jar.") ++ endif() ++ set(JUNIT_JAR ${F_JUNIT_JAR} CACHE FILEPATH ++ "junit4 jar file") + endif() + MARK_AS_ADVANCED(JUNIT_JAR) + find_file(HAMCREST diff --git a/swipl.changes b/swipl.changes index a097b7a..27ab47c 100644 --- a/swipl.changes +++ b/swipl.changes @@ -6,6 +6,7 @@ Fri Nov 22 13:31:23 UTC 2024 - Matej Cepl https://www.swi-prolog.org/ChangeLog?branch=development&from=9.3.12&to=9.3.15 and upstream still doesn’t provide any abbreviated version, and the list of changes is still too long to enumerate here. +- Add 104-fix-prolog_in_java.patch to fix failing test jpl:prolog_in_java ------------------------------------------------------------------- Wed Oct 9 13:15:26 UTC 2024 - Matej Cepl diff --git a/swipl.spec b/swipl.spec index 96ee3ea..0e029cd 100644 --- a/swipl.spec +++ b/swipl.spec @@ -26,6 +26,9 @@ Source0: https://www.swi-prolog.org/download/devel/src/swipl-%{version}.t Source98: swipl-rpmlintrc # For SOURCE_DATE_EPOCH variable- reproducible builds Source99: %{name}.changes +# PATCH-FIX-UPSTREAM 104-fix-prolog_in_java.patch gh#SWI-Prolog/packages-jpl#104 mcepl@suse.com +# Fix the wrong location of hamcrest location +Patch0: 104-fix-prolog_in_java.patch BuildRequires: cmake BuildRequires: db-devel BuildRequires: fdupes @@ -114,8 +117,6 @@ CTEST_OPT_ARGS="" %ifarch %ix86 CTEST_OPT_ARGS+=" --exclude-regex 'swipl:transaction'" %endif -# gh#SWI-Prolog/swipl-devel#1333 -CTEST_OPT_ARGS+=" --exclude-regex 'jpl:prolog_in_java'" %ctest --verbose $CTEST_OPT_ARGS %files