Drop java for i686 (bz#2104047)

This commit is contained in:
Orion Poplawski 2022-07-10 11:36:11 -06:00
parent 117cf570cf
commit 83d2526353
2 changed files with 21 additions and 33 deletions

View File

@ -1,17 +0,0 @@
--- configure.orig.ac 2017-06-24 23:00:04.000000000 +0200
+++ configure.ac 2017-07-21 22:13:19.695919835 +0200
@@ -264,10 +264,10 @@
JNIFLAGS="$JNIFLAGS -I$JNI_INCLUDE_DIR"
done
## Find junit for testing the JNI code
- AX_CHECK_CLASSPATH()
- CLASSPATH_ENV=$H4_CLASSPATH
- AX_CHECK_JUNIT()
- AX_CHECK_JAVA_HOME
+ ## AX_CHECK_CLASSPATH()
+ ## CLASSPATH_ENV=$H4_CLASSPATH
+ ## AX_CHECK_JUNIT()
+ ## AX_CHECK_JAVA_HOME
AC_MSG_RESULT([yes])
else

View File

@ -1,10 +1,13 @@
%if 0%{?rhel} && 0%{?rhel} < 7
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
# No more Java on i686
%ifarch %{java_arches}
%bcond_without java
%else
%bcond_with java
%endif
Name: hdf
Version: 4.2.15
Release: 9%{?dist}
Release: 10%{?dist}
Summary: A general purpose library and file format for storing scientific data
License: BSD
URL: https://portal.hdfgroup.org/
@ -24,11 +27,6 @@ Patch8: hdf-aarch64.patch
# ppc64le support
# https://bugzilla.redhat.com/show_bug.cgi?id=1134385
Patch9: hdf-ppc64le.patch
# Fix syntax error on epel6 builds
# Use only if java is disabled
Patch10: hdf-avoid_syntax_error_el6.patch
# Fix java build
Patch11: hdf-build.patch
@ -38,8 +36,12 @@ BuildRequires: chrpath
BuildRequires: flex byacc libjpeg-devel zlib-devel %{!?el6:libaec-devel}
BuildRequires: libtirpc-devel
BuildRequires: gcc-gfortran, gcc
%if %{with java}
BuildRequires: java-devel
BuildRequires: javapackages-tools
%else
Obsoletes: java-hdf < %{version}-%{release}
%endif
BuildRequires: hamcrest
BuildRequires: junit
BuildRequires: slf4j
@ -84,6 +86,7 @@ Requires: %{name}-devel = %{version}-%{release}
HDF4 static libraries.
%if %{with java}
%package -n java-hdf
Summary: HDF4 java library
Requires: slf4j
@ -91,6 +94,7 @@ Obsoletes: jhdf < 3.3.1-2
%description -n java-hdf
HDF4 java library
%endif
%prep
@ -107,10 +111,11 @@ HDF4 java library
%patch9 -p1 -b .ppc64le
%patch11 -p1 -b .build
%if %{with java}
# Replace jars with system versions
# hamcrest-core is obsoleted in hamcrest-2.2
# Junit tests are failing with junit-4.13.1
%if 0%{?rhel} >= 9 || 0%{?fedora} > 34
%if 0%{?rhel} >= 9 || 0%{?fedora}
find . ! -name junit.jar -name "*.jar" -delete
ln -s %{_javadir}/hamcrest/hamcrest.jar java/lib/hamcrest-core.jar
%else
@ -124,11 +129,6 @@ sed -i -e "s/JUnit version .*/JUnit version $junit_ver/" java/test/testfiles/JUn
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 syntax error bacause 'CLASSPATH_ENV=$H4_CLASSPATH' line on epel6 builds
# Use only if java is disabled
%if 0%{?rhel} && 0%{?rhel} < 7
%patch10 -p0
%endif
find . -type f -name "*.h" -exec chmod 0644 '{}' \;
@ -155,7 +155,7 @@ export LIBS="-ltirpc"
mkdir -p build-shared/java/lib
cd build-shared
# Java requires shared libraries, fortran requires static
%configure --disable-production --enable-java --disable-netcdf \
%configure --disable-production %{?with_java:--enable-java} --disable-netcdf \
--enable-shared=yes --enable-static=no --disable-fortran %{!?el6:--with-szlib} \
--includedir=%{_includedir}/%{name}
%make_build
@ -165,7 +165,7 @@ cd build-static
# Java requires shared libraries, fortran requires static
# Temporary workaround for compiling on GCC-10
%if 0%{?fedora} > 31 || 0%{?rhel} > 8
%if 0%{?fedora} || 0%{?rhel} > 8
export FCFLAGS="%{build_fflags} -fallow-argument-mismatch"
export FFLAGS="%{build_fflags} -fallow-argument-mismatch"
%endif
@ -261,12 +261,17 @@ make -j1 -C build-static check
%files static
%{_libdir}/*.a
%if %{with java}
%files -n java-hdf
%{_jnidir}/hdf.jar
%{_libdir}/%{name}/libhdf_java.so
%endif
%changelog
* Sun Jul 10 2022 Orion Poplawski <orion@nwra.com> - 4.2.15-10
- Drop java for i686 (bz#2104047)
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 4.2.15-9
- Rebuilt for java-17-openjdk as system jdk