update to 4.2.0
This commit is contained in:
parent
c86ee709cd
commit
529173fab2
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ jna-3.2.7.tar.bz2
|
|||||||
/jna-4.0.0.tar.gz
|
/jna-4.0.0.tar.gz
|
||||||
/jna-4.1.0.tar.gz
|
/jna-4.1.0.tar.gz
|
||||||
/jna-4.1.0-clean.tar.xz
|
/jna-4.1.0-clean.tar.xz
|
||||||
|
/jna-4.2.0-clean.tar.xz
|
||||||
|
@ -4,10 +4,10 @@ set -e
|
|||||||
version=`grep Version: *spec | sed -e 's/Version:\s*\(.*\)/\1/'`
|
version=`grep Version: *spec | sed -e 's/Version:\s*\(.*\)/\1/'`
|
||||||
|
|
||||||
|
|
||||||
wget https://github.com/twall/jna/tarball/${version} -O jna-${version}.tar.gz
|
wget https://github.com/java-native-access/jna/archive/${version}.tar.gz -O jna-${version}.tar.gz
|
||||||
rm -rf jna-${version}
|
rm -rf jna-${version}
|
||||||
tar xf jna-${version}.tar.gz
|
tar xf jna-${version}.tar.gz
|
||||||
mv twall-jna-* jna-${version}
|
#mv twall-jna-* jna-${version}
|
||||||
# remove bundled things with unknown licensing
|
# remove bundled things with unknown licensing
|
||||||
rm -rvf jna-${version}/{dist/*,www,native/libffi}
|
rm -rvf jna-${version}/{dist/*,www,native/libffi}
|
||||||
# jars in lib/native subdir need to be present in tarball so
|
# jars in lib/native subdir need to be present in tarball so
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff -up ./native/callback.c.ffi ./native/callback.c
|
|
||||||
--- ./native/callback.c.ffi 2013-07-15 14:41:13.643452439 +0200
|
|
||||||
+++ ./native/callback.c 2013-07-15 14:47:23.254830318 +0200
|
|
||||||
@@ -253,7 +253,7 @@ create_callback(JNIEnv* env, jobject obj
|
|
||||||
case 'D': cb->fptr_offset = OFFSETOF(env, CallDoubleMethod); break;
|
|
||||||
default: cb->fptr_offset = OFFSETOF(env, CallObjectMethod); break;
|
|
||||||
}
|
|
||||||
- status = ffi_prep_cif_var(&cb->java_cif, java_abi, 2, argc+3, java_ffi_rtype, cb->java_arg_types);
|
|
||||||
+ status = ffi_prep_cif(&cb->java_cif, java_abi, argc+3, java_ffi_rtype, cb->java_arg_types);
|
|
||||||
if (!ffi_error(env, "callback setup (2)", status)) {
|
|
||||||
ffi_prep_closure_loc(cb->closure, &cb->cif, callback_dispatch, cb,
|
|
||||||
cb->x_closure);
|
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/test/com/sun/jna/NativeTest.java b/test/com/sun/jna/NativeTest.java
|
|
||||||
index a946ca8..b71c9ec 100644
|
|
||||||
--- a/test/com/sun/jna/NativeTest.java
|
|
||||||
+++ b/test/com/sun/jna/NativeTest.java
|
|
||||||
@@ -410,7 +410,7 @@ public class NativeTest extends TestCase {
|
|
||||||
for (int i=0;i < args.length;i++) {
|
|
||||||
System.out.println("Running tests on class " + args[i]);
|
|
||||||
try {
|
|
||||||
- junit.textui.TestRunner.run(Class.forName(args[i]));
|
|
||||||
+ junit.textui.TestRunner.run((Class) Class.forName(args[i]));
|
|
||||||
}
|
|
||||||
catch(Throwable e) {
|
|
||||||
e.printStackTrace();
|
|
@ -1,6 +1,7 @@
|
|||||||
--- jna-4.1.0/src/com/sun/jna/Native.java.loadlib 2014-03-06 17:06:40.000000000 +0100
|
diff -up jna-4.2.0/src/com/sun/jna/Native.java.loadlib jna-4.2.0/src/com/sun/jna/Native.java
|
||||||
+++ jna-4.1.0/src/com/sun/jna/Native.java 2015-06-11 09:38:51.017572762 +0200
|
--- jna-4.2.0/src/com/sun/jna/Native.java.loadlib 2015-09-15 00:31:20.000000000 +0200
|
||||||
@@ -642,102 +642,12 @@
|
+++ jna-4.2.0/src/com/sun/jna/Native.java 2015-09-15 14:25:23.631580142 +0200
|
||||||
|
@@ -732,102 +732,12 @@ public final class Native implements Ver
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the JNA stub library.
|
* Loads the JNA stub library.
|
50
jna.spec
50
jna.spec
@ -1,12 +1,12 @@
|
|||||||
Name: jna
|
Name: jna
|
||||||
Version: 4.1.0
|
Version: 4.2.0
|
||||||
Release: 9%{?dist}
|
Release: 1%{?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,
|
||||||
# which is pure Apache License 2.0.
|
# which is pure Apache License 2.0.
|
||||||
License: (LGPLv2 or ASL 2.0) and ASL 2.0
|
License: (LGPLv2 or ASL 2.0) and ASL 2.0
|
||||||
URL: https://github.com/twall/jna
|
URL: https://github.com/java-native-access/jna/
|
||||||
# ./generate-tarball.sh
|
# ./generate-tarball.sh
|
||||||
Source0: %{name}-%{version}-clean.tar.xz
|
Source0: %{name}-%{version}-clean.tar.xz
|
||||||
Source1: package-list
|
Source1: package-list
|
||||||
@ -14,21 +14,26 @@ Source2: generate-tarball.sh
|
|||||||
Patch0: jna-3.5.0-build.patch
|
Patch0: jna-3.5.0-build.patch
|
||||||
# This patch is Fedora-specific for now until we get the huge
|
# This patch is Fedora-specific for now until we get the huge
|
||||||
# JNI library location mess sorted upstream
|
# JNI library location mess sorted upstream
|
||||||
Patch1: jna-4.0.0-loadlibrary.patch
|
Patch1: jna-4.2.0-loadlibrary.patch
|
||||||
# The X11 tests currently segfault; overall I think the X11 JNA stuff is just a
|
# The X11 tests currently segfault; overall I think the X11 JNA stuff is just a
|
||||||
# Really Bad Idea, for relying on AWT internals, using the X11 API at all,
|
# Really Bad Idea, for relying on AWT internals, using the X11 API at all,
|
||||||
# and using a complex API like X11 through JNA just increases the potential
|
# and using a complex API like X11 through JNA just increases the potential
|
||||||
# for problems.
|
# for problems.
|
||||||
Patch2: jna-4.0.0-tests-headless.patch
|
Patch2: jna-4.0.0-tests-headless.patch
|
||||||
Patch6: jna-4.0.0-ffi.patch
|
# junit cames from rpm
|
||||||
Patch7: jna-4.0.0-fix-native-test.patch
|
Patch4: jna-4.1.0-junit.patch
|
||||||
|
|
||||||
# We manually require libffi because find-requires doesn't work
|
# We manually require libffi because find-requires doesn't work
|
||||||
# inside jars.
|
# inside jars.
|
||||||
Requires: java, jpackage-utils, libffi
|
Requires: java, jpackage-utils, libffi
|
||||||
BuildRequires: java-devel, jpackage-utils, libffi-devel
|
BuildRequires: java-devel, jpackage-utils, libffi-devel
|
||||||
BuildRequires: ant, ant-junit, junit, reflections
|
BuildRequires: ant, ant-junit, junit
|
||||||
BuildRequires: libX11-devel, libXt-devel
|
%if 0%{?fedora}
|
||||||
|
BuildRequires: reflections
|
||||||
|
%endif
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
|
BuildRequires: ant-nodeps, ant-trax
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -42,7 +47,10 @@ of use take priority.
|
|||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadocs for %{name}
|
Summary: Javadocs for %{name}
|
||||||
|
Group: Documentation
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 5
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description javadoc
|
%description javadoc
|
||||||
@ -52,8 +60,10 @@ This package contains the javadocs for %{name}.
|
|||||||
%package contrib
|
%package contrib
|
||||||
Summary: Contrib for %{name}
|
Summary: Contrib for %{name}
|
||||||
License: LGPLv2 or ASL 2.0
|
License: LGPLv2 or ASL 2.0
|
||||||
BuildArch: noarch
|
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 5
|
||||||
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%description contrib
|
%description contrib
|
||||||
@ -66,8 +76,6 @@ cp %{SOURCE1} .
|
|||||||
%patch0 -p1 -b .build
|
%patch0 -p1 -b .build
|
||||||
%patch1 -p1 -b .loadlib
|
%patch1 -p1 -b .loadlib
|
||||||
%patch2 -p1 -b .tests-headless
|
%patch2 -p1 -b .tests-headless
|
||||||
%patch6 -p1 -b .ffi
|
|
||||||
%patch7 -p1
|
|
||||||
|
|
||||||
chmod -Rf a+rX,u+w,g-w,o-w .
|
chmod -Rf a+rX,u+w,g-w,o-w .
|
||||||
sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java
|
sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java
|
||||||
@ -77,11 +85,17 @@ sed -i 's/\r//' LICENSE
|
|||||||
|
|
||||||
chmod -c 0644 LICENSE OTHERS CHANGES.md
|
chmod -c 0644 LICENSE OTHERS CHANGES.md
|
||||||
|
|
||||||
|
%if 0%{?rhel}
|
||||||
|
%patch4 -p1 -b .junit
|
||||||
|
build-jar-repository -s -p lib junit
|
||||||
|
%else
|
||||||
sed s,'<include name="junit.jar"/>,&<include name="reflections.jar"/>,' -i build.xml
|
sed s,'<include name="junit.jar"/>,&<include name="reflections.jar"/>,' -i build.xml
|
||||||
|
|
||||||
build-jar-repository -s -p lib junit reflections
|
build-jar-repository -s -p lib junit reflections
|
||||||
|
%endif
|
||||||
|
|
||||||
cp lib/native/aix-ppc64.jar lib/clover.jar
|
cp lib/native/aix-ppc64.jar lib/clover.jar
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# 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.
|
||||||
@ -106,16 +120,26 @@ install -Dm 644 pom-%{name}.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|||||||
install -Dm 644 pom-%{name}-platform.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-platform.pom
|
install -Dm 644 pom-%{name}-platform.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-platform.pom
|
||||||
|
|
||||||
# ... and maven depmap
|
# ... and maven depmap
|
||||||
|
%if 0%{?fedora} >= 9 || 0%{?rhel} > 6
|
||||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
||||||
%add_maven_depmap JPP.%{name}-%{name}-platform.pom -f platform %{name}/%{name}-platform.jar -a "net.java.dev.jna:platform"
|
%add_maven_depmap JPP.%{name}-%{name}-platform.pom -f platform %{name}/%{name}-platform.jar -a "net.java.dev.jna:platform"
|
||||||
|
%else
|
||||||
|
%add_to_maven_depmap net.java.dev.jna jna-platform %{version} JPP jna-platform
|
||||||
|
mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-platform
|
||||||
|
%add_to_maven_depmap net.java.dev.jna %{name} %{version} JPP %{name}
|
||||||
|
%endif
|
||||||
|
|
||||||
# javadocs
|
# javadocs
|
||||||
install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
|
||||||
#%check
|
#if 0%{?rhel} >= 6 || 0%{?fedora} >= 9
|
||||||
|
#ifnarch ppc s390 s390x
|
||||||
|
#check
|
||||||
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true test
|
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true test
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -f .mfiles
|
||||||
|
Loading…
Reference in New Issue
Block a user