update to 3.5.0

This commit is contained in:
Levente Farkas 2012-10-26 13:31:17 +02:00
parent 984ee1deaf
commit af0fc5edf5
8 changed files with 86 additions and 60 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
jna-3.2.7.tar.bz2
/jna-3.4.0.tar.bz2
/jna-3.5.0.tar.bz2

View File

@ -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
View 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)

View File

@ -1,18 +1,18 @@
diff -up ./build.xml.gcj-javadoc ./build.xml
--- ./build.xml.gcj-javadoc 2010-07-23 21:41:42.000000000 +0200
+++ ./build.xml 2010-07-23 21:43:12.161570259 +0200
@@ -570,8 +570,6 @@
--- ./build.xml.gcj-javadoc 2012-10-26 11:39:31.000000000 +0200
+++ ./build.xml 2012-10-26 11:40:11.194483580 +0200
@@ -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="Platform Utilities" packages="com.sun.jna.platform,com.sun.jna.platform.dnd"/>
<group title="Platform Specific" packages="com.sun.jna.platform.*"/>
-
-
- <arg value="-notimestamp"/>
</javadoc>
</target>
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 2010-07-23 21:41:42.148570758 +0200
--- ./src/com/sun/jna/Function.java.gcj-javadoc 2012-10-19 03:53:11.000000000 +0200
+++ ./src/com/sun/jna/Function.java 2012-10-26 11:39:31.112063090 +0200
@@ -76,7 +76,7 @@ public class Function extends Pointer {
* Library in which to find the native function
* @param functionName

View File

@ -1,33 +1,33 @@
diff -up ./build.xml.junit ./build.xml
--- ./build.xml.junit 2012-03-07 12:01:58.716741284 +0100
+++ ./build.xml 2012-03-07 12:03:39.669022092 +0100
@@ -188,9 +188,6 @@
--- ./build.xml.junit 2012-10-26 11:42:01.192000696 +0200
+++ ./build.xml 2012-10-26 11:44:42.912125221 +0200
@@ -239,9 +239,6 @@
<target name="-setup" depends="-dynamic-properties">
<path id="compile-test.path">
<path id="test.libs">
- <fileset dir="lib">
- <include name="junit.jar"/>
- <include name="junit.jar"/>
- </fileset>
<pathelement path="${classes}"/>
</path>
</path>
@@ -253,7 +250,6 @@
<subant target="jar">
@@ -429,7 +426,6 @@ osname=macos
<subant target="jar" failonerror="true">
<property name="file.reference.jna.build" location="${build}"/>
<property name="file.reference.jna.jar" location="${build}/${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" />
</subant>
</target>
@@ -262,7 +258,6 @@
<subant target="jar">
@@ -447,7 +443,6 @@ osname=macos
<subant target="jar" failonerror="true">
<property name="file.reference.jna.build" location="${build}"/>
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
<fileset dir="${contrib}" includes="*/build.xml" excludes="platform/build.xml"/>
</subant>
</target>
@@ -491,13 +486,12 @@
@@ -711,13 +706,12 @@ osname=macos
<mkdir dir="${build}/jws"/>
<copy todir="${build}/jws" file="${build}/${jar}"/>
<copy todir="${build}/jws" file="${build}/${testjar}"/>
@ -36,21 +36,21 @@ diff -up ./build.xml.junit ./build.xml
<jar jarfile="${build}/jws/jnidispatch.jar">
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
</jar>
<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="jna.jar,jna-test.jar,jnidispatch.jar,clover.jar"/>
<signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
- <fileset dir="${build}/jws" includes="${jar},${testjar},junit.jar,jnidispatch.jar,clover.jar"/>
+ <fileset dir="${build}/jws" includes="${jar},${testjar},jnidispatch.jar,clover.jar"/>
</signjar>
</target>
@@ -587,7 +581,6 @@
<subant target="test">
@@ -822,7 +816,6 @@ osname=macos
<subant target="test" failonerror="true">
<property name="file.reference.jna.build" location="${build}"/>
<property name="file.reference.jna.jar" location="${build}/${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"/>
</subant>
</target>
@@ -813,7 +806,7 @@ osname=macos,
@@ -930,7 +923,7 @@ osname=macos
<!-- Full sources required to build and test everything -->
<zip zipfile="${dist}/src-full.zip">
<zipfileset src="${dist}/src.zip"/>

View File

@ -1,7 +1,7 @@
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 2012-03-07 11:52:18.537721064 +0100
@@ -634,148 +634,18 @@ public final class Native {
--- ./src/com/sun/jna/Native.java.loadlib 2012-10-19 03:53:11.000000000 +0200
+++ ./src/com/sun/jna/Native.java 2012-10-26 11:36:51.028999957 +0200
@@ -641,152 +641,18 @@ public final class Native {
/**
* 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 {
- 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);
- }
- if (url == null) {
- throw new UnsatisfiedLinkError("jnidispatch (" + resourceName
- throw new UnsatisfiedLinkError("JNA native support (" + resourceName
- + ") 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;
- }
- 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 {
- try { is.close(); } catch(IOException e) { }

View File

@ -1,6 +1,6 @@
Name: jna
Version: 3.4.0
Release: 5%{?dist}
Version: 3.5.0
Release: 1%{?dist}
Summary: Pure Java access to native libraries
Group: Development/Libraries
@ -11,24 +11,24 @@ URL: https://jna.dev.java.net/
# https://github.com/twall/jna/tarball/%{version}
# tar xzf twall-jna-%{version}*.tar.gz
# 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}
Source0: %{name}-%{version}.tar.bz2
Source1: pom-%{name}.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
# 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
# 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
# for problems.
Patch2: jna-3.4.0-tests-headless.patch
# Build using GCJ javadoc
Patch3: jna-3.2.7-gcj-javadoc.patch
Patch3: jna-3.5.0-gcj-javadoc.patch
# 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)
# We manually require libffi because find-requires doesn't work
@ -112,7 +112,7 @@ chmod -c 0644 LICENSE OTHERS CHANGES.md
%build
# We pass -Ddynlink.native which comes from our patch because
# 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
find contrib -name build -exec rm -rf {} \; || :
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
# ... and maven depmap
%if 0%{?fedora} >= 9
%add_maven_depmap JPP-%{name}.pom %{name}.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
# javadocs
@ -158,6 +164,21 @@ cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
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
%defattr(-,root,root,-)
%doc LICENSE OTHERS README.md CHANGES.md TODO

View File

@ -1 +1 @@
800b73894dfdb46f45ab2f1f7145b8ec jna-3.4.0.tar.bz2
0feb9738ab7c98eac722b51532cb93e8 jna-3.5.0.tar.bz2