update to 3.5.0
This commit is contained in:
parent
984ee1deaf
commit
af0fc5edf5
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
jna-3.2.7.tar.bz2
|
jna-3.2.7.tar.bz2
|
||||||
/jna-3.4.0.tar.bz2
|
/jna-3.4.0.tar.bz2
|
||||||
|
/jna-3.5.0.tar.bz2
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
diff -up jna-3.4.0/native/Makefile~ jna-3.4.0/native/Makefile
|
|
||||||
--- jna-3.4.0/native/Makefile~ 2011-11-26 15:17:49.000000000 +0200
|
|
||||||
+++ jna-3.4.0/native/Makefile 2012-03-10 11:36:05.667190103 +0200
|
|
||||||
@@ -86,7 +86,7 @@ CDEFINES=-D_REENTRANT
|
|
||||||
PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
|
|
||||||
CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
|
|
||||||
-DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
|
|
||||||
-LDFLAGS=-o $@ -shared
|
|
||||||
+LDFLAGS=$(RPM_LD_FLAGS) -o $@ -shared
|
|
||||||
ifeq ($(DYNAMIC_LIBFFI),true)
|
|
||||||
CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
|
|
||||||
LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)
|
|
||||||
@@ -276,7 +276,6 @@ $(RSRC): $(BUILD)/jnidispatch.rc
|
|
||||||
|
|
||||||
$(LIBRARY): $(JNIDISPATCH_OBJS) $(FFI_LIB)
|
|
||||||
$(LD) $(LDFLAGS) $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LIBS)
|
|
||||||
- $(STRIP) $@
|
|
||||||
|
|
||||||
$(TESTLIB): $(BUILD)/testlib.o
|
|
||||||
$(LD) $(LDFLAGS) $< $(LIBS)
|
|
20
jna-3.5.0-build.patch
Normal file
20
jna-3.5.0-build.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -up ./native/Makefile.build ./native/Makefile
|
||||||
|
--- ./native/Makefile.build 2012-10-19 03:53:11.000000000 +0200
|
||||||
|
+++ ./native/Makefile 2012-10-26 11:25:19.003999925 +0200
|
||||||
|
@@ -90,7 +90,7 @@ CDEFINES=-D_REENTRANT
|
||||||
|
PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
|
||||||
|
CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
|
||||||
|
-DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
|
||||||
|
-LDFLAGS=-o $@ -shared
|
||||||
|
+LDFLAGS=$(RPM_LD_FLAGS) -o $@ -shared
|
||||||
|
ifeq ($(DYNAMIC_LIBFFI),true)
|
||||||
|
CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
|
||||||
|
LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)
|
||||||
|
@@ -344,7 +344,6 @@ $(RSRC): $(BUILD)/jnidispatch.rc
|
||||||
|
|
||||||
|
$(LIBRARY): $(JNIDISPATCH_OBJS) $(FFI_LIB)
|
||||||
|
$(LD) $(LDFLAGS) $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LIBS)
|
||||||
|
- $(STRIP) $@
|
||||||
|
|
||||||
|
$(TESTLIB): $(BUILD)/testlib.o
|
||||||
|
$(LD) $(LDFLAGS) $< $(LIBS)
|
@ -1,7 +1,7 @@
|
|||||||
diff -up ./build.xml.gcj-javadoc ./build.xml
|
diff -up ./build.xml.gcj-javadoc ./build.xml
|
||||||
--- ./build.xml.gcj-javadoc 2010-07-23 21:41:42.000000000 +0200
|
--- ./build.xml.gcj-javadoc 2012-10-26 11:39:31.000000000 +0200
|
||||||
+++ ./build.xml 2010-07-23 21:43:12.161570259 +0200
|
+++ ./build.xml 2012-10-26 11:40:11.194483580 +0200
|
||||||
@@ -570,8 +570,6 @@
|
@@ -893,8 +893,6 @@ osname=macos
|
||||||
<group title="Java Native Access" packages="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.win32"/>
|
<group title="Java Native Access" packages="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.win32"/>
|
||||||
<group title="Platform Utilities" packages="com.sun.jna.platform,com.sun.jna.platform.dnd"/>
|
<group title="Platform Utilities" packages="com.sun.jna.platform,com.sun.jna.platform.dnd"/>
|
||||||
<group title="Platform Specific" packages="com.sun.jna.platform.*"/>
|
<group title="Platform Specific" packages="com.sun.jna.platform.*"/>
|
||||||
@ -11,8 +11,8 @@ diff -up ./build.xml.gcj-javadoc ./build.xml
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
diff -up ./src/com/sun/jna/Function.java.gcj-javadoc ./src/com/sun/jna/Function.java
|
diff -up ./src/com/sun/jna/Function.java.gcj-javadoc ./src/com/sun/jna/Function.java
|
||||||
--- ./src/com/sun/jna/Function.java.gcj-javadoc 2009-10-24 17:43:53.000000000 +0200
|
--- ./src/com/sun/jna/Function.java.gcj-javadoc 2012-10-19 03:53:11.000000000 +0200
|
||||||
+++ ./src/com/sun/jna/Function.java 2010-07-23 21:41:42.148570758 +0200
|
+++ ./src/com/sun/jna/Function.java 2012-10-26 11:39:31.112063090 +0200
|
||||||
@@ -76,7 +76,7 @@ public class Function extends Pointer {
|
@@ -76,7 +76,7 @@ public class Function extends Pointer {
|
||||||
* Library in which to find the native function
|
* Library in which to find the native function
|
||||||
* @param functionName
|
* @param functionName
|
@ -1,7 +1,7 @@
|
|||||||
diff -up ./build.xml.junit ./build.xml
|
diff -up ./build.xml.junit ./build.xml
|
||||||
--- ./build.xml.junit 2012-03-07 12:01:58.716741284 +0100
|
--- ./build.xml.junit 2012-10-26 11:42:01.192000696 +0200
|
||||||
+++ ./build.xml 2012-03-07 12:03:39.669022092 +0100
|
+++ ./build.xml 2012-10-26 11:44:42.912125221 +0200
|
||||||
@@ -188,9 +188,6 @@
|
@@ -239,9 +239,6 @@
|
||||||
<target name="-setup" depends="-dynamic-properties">
|
<target name="-setup" depends="-dynamic-properties">
|
||||||
<path id="compile-test.path">
|
<path id="compile-test.path">
|
||||||
<path id="test.libs">
|
<path id="test.libs">
|
||||||
@ -11,23 +11,23 @@ diff -up ./build.xml.junit ./build.xml
|
|||||||
<pathelement path="${classes}"/>
|
<pathelement path="${classes}"/>
|
||||||
</path>
|
</path>
|
||||||
</path>
|
</path>
|
||||||
@@ -253,7 +250,6 @@
|
@@ -429,7 +426,6 @@ osname=macos
|
||||||
<subant target="jar">
|
<subant target="jar" failonerror="true">
|
||||||
<property name="file.reference.jna.build" location="${build}"/>
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
||||||
|
<property name="javac.source" value="${platform.compatibility}"/>
|
||||||
|
<property name="javac.target" value="${platform.compatibility}"/>
|
||||||
<fileset dir="${contrib}" includes="platform/build.xml" />
|
<fileset dir="${contrib}" includes="platform/build.xml" />
|
||||||
</subant>
|
@@ -447,7 +443,6 @@ osname=macos
|
||||||
</target>
|
<subant target="jar" failonerror="true">
|
||||||
@@ -262,7 +258,6 @@
|
|
||||||
<subant target="jar">
|
|
||||||
<property name="file.reference.jna.build" location="${build}"/>
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
||||||
<fileset dir="${contrib}" includes="*/build.xml" excludes="platform/build.xml"/>
|
<fileset dir="${contrib}" includes="*/build.xml" excludes="platform/build.xml"/>
|
||||||
</subant>
|
</subant>
|
||||||
</target>
|
</target>
|
||||||
@@ -491,13 +486,12 @@
|
@@ -711,13 +706,12 @@ osname=macos
|
||||||
<mkdir dir="${build}/jws"/>
|
<mkdir dir="${build}/jws"/>
|
||||||
<copy todir="${build}/jws" file="${build}/${jar}"/>
|
<copy todir="${build}/jws" file="${build}/${jar}"/>
|
||||||
<copy todir="${build}/jws" file="${build}/${testjar}"/>
|
<copy todir="${build}/jws" file="${build}/${testjar}"/>
|
||||||
@ -37,20 +37,20 @@ diff -up ./build.xml.junit ./build.xml
|
|||||||
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
|
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
|
||||||
</jar>
|
</jar>
|
||||||
<signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
|
<signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
|
||||||
- <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar,clover.jar"/>
|
- <fileset dir="${build}/jws" includes="${jar},${testjar},junit.jar,jnidispatch.jar,clover.jar"/>
|
||||||
+ <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,jnidispatch.jar,clover.jar"/>
|
+ <fileset dir="${build}/jws" includes="${jar},${testjar},jnidispatch.jar,clover.jar"/>
|
||||||
</signjar>
|
</signjar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@@ -587,7 +581,6 @@
|
@@ -822,7 +816,6 @@ osname=macos
|
||||||
<subant target="test">
|
<subant target="test" failonerror="true">
|
||||||
<property name="file.reference.jna.build" location="${build}"/>
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
||||||
|
<property name="javac.source" value="${test.compatibility}"/>
|
||||||
|
<property name="javac.target" value="${test.compatibility}"/>
|
||||||
<fileset dir="${contrib}" includes="platform/build.xml"/>
|
<fileset dir="${contrib}" includes="platform/build.xml"/>
|
||||||
</subant>
|
@@ -930,7 +923,7 @@ osname=macos
|
||||||
</target>
|
|
||||||
@@ -813,7 +806,7 @@ osname=macos,
|
|
||||||
<!-- Full sources required to build and test everything -->
|
<!-- Full sources required to build and test everything -->
|
||||||
<zip zipfile="${dist}/src-full.zip">
|
<zip zipfile="${dist}/src-full.zip">
|
||||||
<zipfileset src="${dist}/src.zip"/>
|
<zipfileset src="${dist}/src.zip"/>
|
@ -1,7 +1,7 @@
|
|||||||
diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
||||||
--- ./src/com/sun/jna/Native.java.loadlib 2012-03-07 11:41:53.378594071 +0100
|
--- ./src/com/sun/jna/Native.java.loadlib 2012-10-19 03:53:11.000000000 +0200
|
||||||
+++ ./src/com/sun/jna/Native.java 2012-03-07 11:52:18.537721064 +0100
|
+++ ./src/com/sun/jna/Native.java 2012-10-26 11:36:51.028999957 +0200
|
||||||
@@ -634,148 +634,18 @@ public final class Native {
|
@@ -641,152 +641,18 @@ public final class Native {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the JNA stub library.
|
* Loads the JNA stub library.
|
||||||
@ -54,6 +54,10 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
|
- }
|
||||||
|
- if (Platform.isAndroid()) {
|
||||||
|
- // Native libraries on android must be bundled with the APK
|
||||||
|
- System.setProperty("jna.nounpack", "true");
|
||||||
- }
|
- }
|
||||||
try {
|
try {
|
||||||
- if (!Boolean.getBoolean("jna.nosys")) {
|
- if (!Boolean.getBoolean("jna.nosys")) {
|
||||||
@ -95,7 +99,7 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- url = Native.class.getResource(resourceName);
|
- url = Native.class.getResource(resourceName);
|
||||||
- }
|
- }
|
||||||
- if (url == null) {
|
- if (url == null) {
|
||||||
- throw new UnsatisfiedLinkError("jnidispatch (" + resourceName
|
- throw new UnsatisfiedLinkError("JNA native support (" + resourceName
|
||||||
- + ") not found in resource path");
|
- + ") not found in resource path");
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
@ -134,7 +138,7 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- unpacked = true;
|
- unpacked = true;
|
||||||
- }
|
- }
|
||||||
- catch(IOException e) {
|
- catch(IOException e) {
|
||||||
- throw new Error("Failed to create temporary file for jnidispatch library: " + e);
|
- throw new Error("Failed to create temporary file for jnidispatch library", e);
|
||||||
- }
|
- }
|
||||||
- finally {
|
- finally {
|
||||||
- try { is.close(); } catch(IOException e) { }
|
- try { is.close(); } catch(IOException e) { }
|
37
jna.spec
37
jna.spec
@ -1,6 +1,6 @@
|
|||||||
Name: jna
|
Name: jna
|
||||||
Version: 3.4.0
|
Version: 3.5.0
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Pure Java access to native libraries
|
Summary: Pure Java access to native libraries
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -11,24 +11,24 @@ URL: https://jna.dev.java.net/
|
|||||||
# https://github.com/twall/jna/tarball/%{version}
|
# https://github.com/twall/jna/tarball/%{version}
|
||||||
# tar xzf twall-jna-%{version}*.tar.gz
|
# tar xzf twall-jna-%{version}*.tar.gz
|
||||||
# mv twall-jna-* jna-%{version}
|
# mv twall-jna-* jna-%{version}
|
||||||
# rm -rf jna-%{version}/{dist,www}
|
# rm -rf jna-%{version}/{dist/*,www}
|
||||||
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.bz2 jna-%{version}
|
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.bz2 jna-%{version}
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: pom-%{name}.xml
|
Source1: pom-%{name}.xml
|
||||||
Source2: pom-platform.xml
|
Source2: pom-platform.xml
|
||||||
Patch0: jna-3.4.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-3.4.0-loadlibrary.patch
|
Patch1: jna-3.5.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-3.4.0-tests-headless.patch
|
Patch2: jna-3.4.0-tests-headless.patch
|
||||||
# Build using GCJ javadoc
|
# Build using GCJ javadoc
|
||||||
Patch3: jna-3.2.7-gcj-javadoc.patch
|
Patch3: jna-3.5.0-gcj-javadoc.patch
|
||||||
# junit cames from rpm
|
# junit cames from rpm
|
||||||
Patch4: jna-3.4.0-junit.patch
|
Patch4: jna-3.5.0-junit.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
# We manually require libffi because find-requires doesn't work
|
# We manually require libffi because find-requires doesn't work
|
||||||
@ -112,7 +112,7 @@ chmod -c 0644 LICENSE OTHERS CHANGES.md
|
|||||||
%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.
|
||||||
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true jar contrib-jars javadoc
|
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true javadoc jar contrib-jars javadoc
|
||||||
# remove compiled contribs
|
# remove compiled contribs
|
||||||
find contrib -name build -exec rm -rf {} \; || :
|
find contrib -name build -exec rm -rf {} \; || :
|
||||||
sed -i "s/VERSION/%{version}/" pom-%{name}.xml pom-platform.xml
|
sed -i "s/VERSION/%{version}/" pom-%{name}.xml pom-platform.xml
|
||||||
@ -136,8 +136,14 @@ install -Dm 644 pom-%{name}.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
|||||||
install -Dm 644 pom-platform.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-platform.pom
|
install -Dm 644 pom-platform.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-platform.pom
|
||||||
|
|
||||||
# ... and maven depmap
|
# ... and maven depmap
|
||||||
|
%if 0%{?fedora} >= 9
|
||||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
||||||
%add_maven_depmap JPP.%{name}-platform.pom -f platform %{name}/platform.jar
|
%add_maven_depmap JPP.%{name}-platform.pom -f platform %{name}/platform.jar
|
||||||
|
%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
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# javadocs
|
# javadocs
|
||||||
@ -158,6 +164,21 @@ cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
|||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?rhel} > 5
|
||||||
|
%post
|
||||||
|
%update_maven_depmap
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%update_maven_depmap
|
||||||
|
|
||||||
|
%post contrib
|
||||||
|
%update_maven_depmap
|
||||||
|
|
||||||
|
%postun contrib
|
||||||
|
%update_maven_depmap
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE OTHERS README.md CHANGES.md TODO
|
%doc LICENSE OTHERS README.md CHANGES.md TODO
|
||||||
|
Loading…
Reference in New Issue
Block a user