upstream 64bit fixes

This commit is contained in:
Levente Farkas 2010-07-23 23:00:18 +00:00
parent bfac7b287d
commit 52a9d9fa5e
6 changed files with 192 additions and 51 deletions

View File

@ -1,2 +1,3 @@
jna-3_2_4-1_el5:HEAD:jna-3.2.4-1.el5.src.rpm:1259001126
jna-3_2_7-2_fc12:F-13:jna-3.2.7-2.fc12.src.rpm:1279835196
jna-3_2_7-3_fc12:F-13:jna-3.2.7-3.fc12.src.rpm:1279925941

View File

@ -1,11 +0,0 @@
--- build.xml 2010-04-21 17:45:22.419903811 -0400
+++ build.xml.orig 2010-04-21 17:45:10.204664997 -0400
@@ -43,7 +43,7 @@
<property name="jni.revision" value="1"/>
<property name="jni.build" value="${build.number}"/>
<property name="jni.version" value="${jni.major}.${jni.minor}.${jni.revision}"/>
- <property name="jni.md5" value=""/>
+ <property name="jni.md5" value="c870290c36c8d3fdf85db7c782febc3f"/>
<property name="spec.title" value="Java Native Access (JNA)"/>
<property name="spec.vendor" value="${vendor}"/>
<property name="spec.version" value="${jna.major}"/>

View File

@ -1,12 +0,0 @@
diff -up ./native/dispatch.c.old ./native/dispatch.c
--- ./native/dispatch.c.old 2010-05-12 09:56:55.478872622 +0200
+++ ./native/dispatch.c 2010-05-12 09:57:11.639872467 +0200
@@ -2808,7 +2808,7 @@ Java_com_sun_jna_Native_unregister(JNIEn
free(md);
}
(*env)->ReleaseLongArrayElements(env, handles, data, 0);
- (*env)->UnregisterNatives(env, cls);
+ //(*env)->UnregisterNatives(env, cls);
}
JNIEXPORT jlong JNICALL

View File

@ -1,18 +1,18 @@
diff -up ./build.xml.gcj-javadoc ./build.xml
--- ./build.xml.gcj-javadoc 2010-07-22 11:47:35.097371333 +0200
+++ ./build.xml 2010-07-22 11:47:56.222245622 +0200
@@ -555,8 +555,6 @@
--- ./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 @@
<group title="Java Native Access" packages="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.win32"/>
<group title="Platform Specific" packages="com.sun.jna.platform"/>
<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>
<subant target="javadoc">
<fileset dir="${contrib}" includes="platform/build.xml"/>
</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 2010-07-22 11:48:33.732370892 +0200
+++ ./src/com/sun/jna/Function.java 2010-07-22 11:49:25.324392691 +0200
--- ./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
@@ -76,7 +76,7 @@ public class Function extends Pointer {
* Library in which to find the native function
* @param functionName

173
jna-3.2.7-javadoc.patch Normal file
View File

@ -0,0 +1,173 @@
Index: jnalib/build.xml
===================================================================
--- jnalib/build.xml (revision 1138)
+++ jnalib/build.xml (revision 1139)
@@ -22,6 +22,7 @@
<property name="dynlink.native" value="false"/>
<property name="native" location="native"/>
<property name="src" location="src"/>
+ <property name="platform.src" location="contrib/platform/src"/>
<property name="contrib" location="contrib"/>
<property name="dist" location="dist"/>
<property name="test.src" location="test"/>
@@ -526,6 +527,14 @@
</target>
<target name="javadoc" depends="-setup">
+ <path id="javadoc.src.path">
+ <path refid="src.path"/>
+ <pathelement location="${platform.src}"/>
+ </path>
+ <path id="javadoc.compile.path">
+ <path refid="compile.path"/>
+ <pathelement location="${classes}"/>
+ </path>
<property name="header"
value="&lt;b&gt;JNA API&lt;/&gt;&lt;font size=&quot;-1&quot;&gt; ${jna.version}&lt;/font&gt;"/>
<property name="footer"
@@ -534,10 +543,10 @@
<mkdir dir="${javadoc}"/>
<javadoc package="true"
windowtitle="JNA API"
- sourcepathref="src.path"
- classpathref="compile.path"
+ sourcepathref="javadoc.src.path"
+ classpathref="javadoc.compile.path"
maxmemory="256m"
- packagenames="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.platform,com.sun.jna.platform.win32,com.sun.jna.exmaples.unix"
+ packagenames="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.platform,com.sun.jna.platform.win32"
overview="${src}/com/sun/jna/overview.html"
destdir="${javadoc}">
<!-- stylesheetfile="${stylesheet}" -->
@@ -551,15 +560,18 @@
<include name="com/sun/jna/**/*"/>
</patternset>
</packageset>
+ <packageset dir="${platform.src}" defaultexcludes="yes">
+ <patternset>
+ <include name="com/sun/jna/platform/**/*"/>
+ </patternset>
+ </packageset>
<group title="Java Native Access" packages="com.sun.jna,com.sun.jna.ptr,com.sun.jna.types,com.sun.jna.win32"/>
- <group title="Platform Specific" packages="com.sun.jna.platform"/>
+ <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>
- <subant target="javadoc">
- <fileset dir="${contrib}" includes="platform/build.xml"/>
- </subant>
</target>
<target name="dist" depends="jar,contrib-jars,compile-tests,native,javadoc"
@@ -632,11 +644,10 @@
</copy>
<zip zipfile="${dist}/doc.zip">
<zipfileset dir="${javadoc}" prefix="javadoc"/>
- <zipfileset dir="${contrib}/platform/dist/javadoc" prefix="platform/javadoc"/>
</zip>
<!-- JNA sources only, for use in Linux build from source/shared libffi -->
<zip zipfile="${dist}/src.zip">
- <zipfileset dir="." includes="build.xml,LICENSE.txt"/>
+ <zipfileset dir="." includes="build.xml,pom.xml,LICENSE.txt"/>
<zipfileset dir="${src}" includes="**/*.java" prefix="src"/>
<zipfileset dir="${test.src}" includes="**/*.java" prefix="test"/>
<zipfileset dir="${native}" excludes="libffi,libffi/**/*,build,build/**/*" prefix="native"/>
Index: jnalib/contrib/platform/src/com/sun/jna/platform/mac/package.html
===================================================================
--- jnalib/contrib/platform/src/com/sun/jna/platform/mac/package.html (revision 0)
+++ jnalib/contrib/platform/src/com/sun/jna/platform/mac/package.html (revision 1139)
@@ -0,0 +1,13 @@
+<html>
+<head>
+<!--
+ Copyright (c) 2010 Timothy Wall
+-->
+</head>
+<body bgcolor="white">
+
+<!-- One sentence summary -->
+Provides common library mappings for the OS X platform.
+
+</body>
+</html>
\ No newline at end of file
Index: jnalib/contrib/platform/src/com/sun/jna/platform/win32/package.html
===================================================================
--- jnalib/contrib/platform/src/com/sun/jna/platform/win32/package.html (revision 0)
+++ jnalib/contrib/platform/src/com/sun/jna/platform/win32/package.html (revision 1139)
@@ -0,0 +1,13 @@
+<html>
+<head>
+<!--
+ Copyright (c) 2010 Timothy Wall
+-->
+</head>
+<body bgcolor="white">
+
+<!-- One sentence summary -->
+Provides common library mappings for the Windows platform.
+
+</body>
+</html>
\ No newline at end of file
Index: jnalib/contrib/platform/src/com/sun/jna/platform/unix/package.html
===================================================================
--- jnalib/contrib/platform/src/com/sun/jna/platform/unix/package.html (revision 0)
+++ jnalib/contrib/platform/src/com/sun/jna/platform/unix/package.html (revision 1139)
@@ -0,0 +1,13 @@
+<html>
+<head>
+<!--
+ Copyright (c) 2010 Timothy Wall
+-->
+</head>
+<body bgcolor="white">
+
+<!-- One sentence summary -->
+Provides common library mappings for Unix and X11-based platforms.
+
+</body>
+</html>
\ No newline at end of file
Index: jnalib/contrib/platform/src/com/sun/jna/platform/dnd/package.html
===================================================================
--- jnalib/contrib/platform/src/com/sun/jna/platform/dnd/package.html (revision 0)
+++ jnalib/contrib/platform/src/com/sun/jna/platform/dnd/package.html (revision 1139)
@@ -0,0 +1,14 @@
+<html>
+<head>
+<!--
+ Copyright (c) 2010 Timothy Wall
+-->
+</head>
+<body bgcolor="white">
+
+<!-- One sentence summary -->
+Provides integrated, extended drag and drop functionality,
+allowing ghosted drag images to be used on all platforms.
+
+</body>
+</html>
\ No newline at end of file
Index: jnalib/contrib/platform/src/com/sun/jna/platform/package.html
===================================================================
--- jnalib/contrib/platform/src/com/sun/jna/platform/package.html (revision 0)
+++ jnalib/contrib/platform/src/com/sun/jna/platform/package.html (revision 1139)
@@ -0,0 +1,13 @@
+<html>
+<head>
+<!--
+ Copyright (c) 2010 Timothy Wall
+-->
+</head>
+<body bgcolor="white">
+
+<!-- One sentence summary -->
+Provides cross-platform utilities based on platform-specific libraries.
+
+</body>
+</html>
\ No newline at end of file

View File

@ -1,6 +1,6 @@
Name: jna
Version: 3.2.7
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Pure Java access to native libraries
Group: Development/Libraries
@ -21,14 +21,11 @@ Patch1: jna-3.2.5-loadlibrary.patch
# and using a complex API like X11 through JNA just increases the potential
# for problems.
Patch2: jna-3.2.4-tests-headless.patch
# native jar. Carve that out so we always build it.
Patch3: jna-3.2.4-build-md5.patch
Patch3: jna-3.2.7-javadoc.patch
# Build using GCJ javadoc
Patch4: jna-3.2.7-gcj-javadoc.patch
# junit cames from rpm
Patch5: jna-3.2.5-junit.patch
# see: https://jna.dev.java.net/issues/show_bug.cgi?id=154
Patch6: jna-3.2.5-direct.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# We manually require libffi because find-requires doesn't work
@ -36,7 +33,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: java >= 1:1.6.0 jpackage-utils libffi
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
BuildRequires: java-devel >= 1:1.6.0 ant jpackage-utils ant-nodeps
BuildRequires: java-devel >= 1:1.6.0 ant jpackage-utils ant-nodeps junit4
BuildRequires: libX11-devel libXt-devel libffi-devel
# for ExcludeArch see bug: 468831
%if 0%{?rhel} < 6 && 0%{?fedora} < 10
@ -77,10 +74,9 @@ This package contains the contributed examples for %{name}.
%setup -q -n %{name}-%{version}
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
%patch2 -p1 -b .tests-headless
#patch3 -p0 -R -b .md5
%patch3 -p1 -b .javadoc
%patch4 -p0 -b .gcj-javadoc
%patch5 -p1 -b .junit
#patch6 -p1 -b .direct
cp %{SOURCE1} ./
# all java binaries must be removed from the sources
@ -99,12 +95,7 @@ chmod 0644 LICENSE.txt
%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
# dirty 64bit hack
%ifarch x86_64
ln -s build-d64 build
%endif
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true javadoc
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true jar javadoc
# remove compiled contribs
find contrib -name build -delete || :
sed -i "s/VERSION/%{version}/" %{name}-pom.xml
@ -112,10 +103,6 @@ sed -i "s/VERSION/%{version}/" %{name}-pom.xml
%install
rm -rf %{buildroot}
# dirty 64bit hack
%ifarch x86_64
rm build
%endif
# jars
install -D -m 644 build*/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
(cd %{buildroot}%{_javadir}/; for jar in `ls *-%{version}.jar`; do ln -s $jar `echo $jar | sed -e 's/-%{version}//'`; done)
@ -136,7 +123,7 @@ install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
%if 0%{?fedora} >= 9
%if 0%{?rhel} >= 6 || 0%{?fedora} >= 9
%check
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true test
%endif
@ -175,6 +162,9 @@ rm -rf %{buildroot}
%changelog
* Sat Jul 24 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-3
- upstream 64bit fixes
* Thu Jul 23 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-2
- Temporary hack for 64bit build