Use bundled junit| Fix hamcrest symlinks in Fedora 35+

epel9
Antonio Trande 3 years ago
parent d981e4771c
commit b05b5b4f6a

@ -162,15 +162,22 @@ HDF5 parallel openmpi static libraries
%patch5 -p1 -b .wrappers %patch5 -p1 -b .wrappers
# Replace jars with system versions # Replace jars with system versions
find -name \*.jar -delete # hamcrest-core is obsoleted in hamcrest-2.2
# Junit tests are failing with junit-4.13.1
%if 0%{?rhel} >= 9 || 0%{?fedora} > 34
find . ! -name junit.jar -name "*.jar" -delete
ln -s %{_javadir}/hamcrest/hamcrest.jar java/lib/hamcrest-core.jar
%else
find . -name "*.jar" -delete
ln -s %{_javadir}/hamcrest/core.jar java/lib/hamcrest-core.jar ln -s %{_javadir}/hamcrest/core.jar java/lib/hamcrest-core.jar
ln -s %{_javadir}/junit.jar java/lib/junit.jar ln -s %{_javadir}/junit.jar java/lib/junit.jar
ln -s %{_javadir}/slf4j/api.jar java/lib/slf4j-api-1.7.25.jar
ln -s %{_javadir}/slf4j/nop.jar java/lib/ext/slf4j-nop-1.7.25.jar
ln -s %{_javadir}/slf4j/simple.jar java/lib/ext/slf4j-simple-1.7.25.jar
# Fix test output # Fix test output
junit_ver=$(sed -n '/<version>/{s/^.*>\([0-9]\.[0-9.]*\)<.*/\1/;p;q}' /usr/share/maven-poms/junit.pom) junit_ver=$(sed -n '/<version>/{s/^.*>\([0-9]\.[0-9.]*\)<.*/\1/;p;q}' /usr/share/maven-poms/junit.pom)
sed -i -e "s/JUnit version .*/JUnit version $junit_ver/" java/test/testfiles/JUnit-*.txt sed -i -e "s/JUnit version .*/JUnit version $junit_ver/" java/test/testfiles/JUnit-*.txt
%endif
ln -s %{_javadir}/slf4j/api.jar java/lib/slf4j-api-1.7.25.jar
ln -s %{_javadir}/slf4j/nop.jar java/lib/ext/slf4j-nop-1.7.25.jar
ln -s %{_javadir}/slf4j/simple.jar java/lib/ext/slf4j-simple-1.7.25.jar
# Force shared by default for compiler wrappers (bug #1266645) # Force shared by default for compiler wrappers (bug #1266645)
sed -i -e '/^STATIC_AVAILABLE=/s/=.*/=no/' */*/h5[cf]*.in sed -i -e '/^STATIC_AVAILABLE=/s/=.*/=no/' */*/h5[cf]*.in
@ -478,8 +485,10 @@ done
%changelog %changelog
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.6-7 * Thu Jul 29 2021 Antonio Trande <sagitter@fedoraproject.org> - 1.10.6-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
- Use bundled junit
- Fix hamcrest symlinks in Fedora 35+
* Sun May 30 2021 Orion Poplawski <orion@nwra.com> - 1.10.6-6 * Sun May 30 2021 Orion Poplawski <orion@nwra.com> - 1.10.6-6
- Handle junit versions better - Handle junit versions better

Loading…
Cancel
Save