Build without reflections optional dependency

Resolves: #1954987
Version: 5.6.0-4
This commit is contained in:
Ondrej Dubaj 2021-04-29 11:06:56 +02:00
parent 3e34c51802
commit 1db55ad723
1 changed files with 4 additions and 12 deletions

View File

@ -1,9 +1,6 @@
# Allow conditionally building without the reflections library
%bcond_without reflections
Name: jna
Version: 5.6.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Pure Java access to native libraries
# Most of code is dual-licensed under either LGPL 2.1+ only or Apache
# License 2.0. WeakIdentityHashMap.java was taken from Apache CXF,
@ -45,9 +42,6 @@ BuildRequires: ant-junit
BuildRequires: junit
BuildRequires: libX11-devel
BuildRequires: libXt-devel
%if %{with reflections}
BuildRequires: reflections
%endif
%description
JNA provides Java programs easy access to native shared libraries
@ -92,14 +86,9 @@ sed -i 's/\r//' LICENSE
chmod -c 0644 LICENSE OTHERS CHANGES.md
%if %{with reflections}
sed s,'<include name="junit.jar"/>,&<include name="reflections.jar"/>,' -i build.xml
build-jar-repository -s -p lib junit reflections
%else
build-jar-repository -s -p lib junit
rm test/com/sun/jna/StructureFieldOrderInspector.java
rm test/com/sun/jna/StructureFieldOrderInspectorTest.java
%endif
ln -s $(xmvn-resolve ant:ant:1.10.5) lib/ant.jar
cp lib/native/aix-ppc64.jar lib/clover.jar
@ -146,6 +135,9 @@ install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
%changelog
* Thu Apr 29 2021 Ondrej Dubaj <odubaj@redhat.com> - 5.6.0-4
- Build without reflections optional dependency (#1954987)
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.6.0-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937