Speed up builds on 32bit arm

This commit is contained in:
Mat Booth 2019-06-08 15:28:28 +01:00
parent 53cd350fc6
commit f70c9f36ea

View File

@ -3,7 +3,7 @@
Name: jna Name: jna
Version: 4.5.1 Version: 4.5.1
Release: 6%{?dist} Release: 7%{?dist}
Summary: Pure Java access to native libraries Summary: Pure Java access to native libraries
# Most of code is dual-licensed under either LGPL 2.1 only or Apache # Most of code is dual-licensed under either LGPL 2.1 only or Apache
# License 2.0. WeakIdentityHashMap.java was taken from Apache CXF, # License 2.0. WeakIdentityHashMap.java was taken from Apache CXF,
@ -47,6 +47,11 @@ BuildRequires: libXt-devel
BuildRequires: reflections BuildRequires: reflections
%endif %endif
%ifarch %{arm}
# Speed up builds on 32bit arm
BuildRequires: java-1.8.0-openjdk-aarch32-devel
%endif
%description %description
JNA provides Java programs easy access to native shared libraries JNA provides Java programs easy access to native shared libraries
(DLLs on Windows) without writing anything but Java code. JNA's (DLLs on Windows) without writing anything but Java code. JNA's
@ -104,6 +109,13 @@ cp lib/native/aix-ppc64.jar lib/clover.jar
%build %build
# Ensure we get the jit on arm
%ifarch %{arm}
export JAVA_HOME=$(ls -d %{_jvmdir}/java-1.8.0-openjdk-aarch32*)
%else
export JAVA_HOME=%{_jvmdir}/java
%endif
# We pass -Ddynlink.native which comes from our patch because # We pass -Ddynlink.native which comes from our patch because
# upstream doesn't want to default to dynamic linking. # upstream doesn't want to default to dynamic linking.
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true native compile javadoc jar contrib-jars #ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true native compile javadoc jar contrib-jars
@ -141,6 +153,9 @@ install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
%changelog %changelog
* Sat Jun 08 2019 Mat Booth <mbooth@apache.org> - 4.5.1-7
- Speed up builds on 32bit arm
* Thu Mar 07 2019 Mat Booth <mat.booth@redhat.com> - 4.5.1-6 * Thu Mar 07 2019 Mat Booth <mat.booth@redhat.com> - 4.5.1-6
- Allow conditionally building without the reflections library for tests - Allow conditionally building without the reflections library for tests