From 4a25b77ac0bf0cb07e2928527998c3be521b5c31 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 01:43:21 +0000 Subject: [PATCH 1/8] Initialize branch F-13 for jna --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From 56d5e996538bd96672a3a0fe422aff758561b69b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 21 Apr 2010 21:55:20 +0000 Subject: [PATCH 2/8] - Fix the build by removing upstream's hardcoded md5 --- jna.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jna.spec b/jna.spec index e470ec6..5084a42 100644 --- a/jna.spec +++ b/jna.spec @@ -1,6 +1,6 @@ Name: jna Version: 3.2.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Pure Java access to native libraries Group: Development/Libraries @@ -20,6 +20,9 @@ Patch1: jna-3.2.4-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 +# Upstream appears to have some sort of MD5 check on the contents of their +# native jar. Carve that out so we always build it. +Patch3: jna-3.2.4-build-md5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: java-devel >= 1.6 ant jpackage-utils ant-nodeps @@ -66,6 +69,7 @@ This package contains the 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 # all java binaries must be removed from the sources find . -name '*.jar' -exec rm -f '{}' \; @@ -128,6 +132,9 @@ rm -rf %{buildroot} %changelog +* Wed Apr 21 2010 Colin Walters - 3.2.4-4 +- Fix the build by removing upstream's hardcoded md5 + * Thu Dec 17 2009 Levente Farkas - 3.2.4-3 - add proper ExclusiveArch From 629151f0135349dcd1dd67d21115365771ffe5cf Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 22 Apr 2010 19:34:09 +0000 Subject: [PATCH 3/8] - Add patches to make the build happen with gcj --- jna-3.2.4-gcj-javadoc.patch | 40 +++++++++++++++++++++++++++++++++++++ jna.spec | 12 ++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 jna-3.2.4-gcj-javadoc.patch diff --git a/jna-3.2.4-gcj-javadoc.patch b/jna-3.2.4-gcj-javadoc.patch new file mode 100644 index 0000000..9865c8d --- /dev/null +++ b/jna-3.2.4-gcj-javadoc.patch @@ -0,0 +1,40 @@ +--- build.xml.orig 2010-04-22 15:22:49.082452327 -0400 ++++ build.xml 2010-04-22 15:22:54.266203934 -0400 +@@ -540,8 +540,6 @@ + + + +- +- + + + +--- src/com/sun/jna/Function.java.orig 2010-04-22 15:23:32.766205632 -0400 ++++ src/com/sun/jna/Function.java 2010-04-22 15:23:55.909207399 -0400 +@@ -76,7 +76,7 @@ + * Library in which to find the native function + * @param functionName + * Name of the native function to be linked with +- * @throws {@link UnsatisfiedLinkError} if the library is not found or ++ * @throws UnsatisfiedLinkError if the library is not found or + * the given function name is not found within the library. + */ + public static Function getFunction(String libraryName, String functionName) { +@@ -97,7 +97,7 @@ + * @param callFlags + * Function call flags + * +- * @throws {@link UnsatisfiedLinkError} if the library is not found or ++ * @throws UnsatisfiedLinkError if the library is not found or + * the given function name is not found within the library. + */ + public static Function getFunction(String libraryName, String functionName, int callFlags) { +@@ -161,7 +161,7 @@ + * Name of the native function to be linked with + * @param callFlags + * Function call flags +- * @throws {@link UnsatisfiedLinkError} if the given function name is ++ * @throws UnsatisfiedLinkError if the given function name is + * not found within the library. + */ + Function(NativeLibrary library, String functionName, int callFlags) { diff --git a/jna.spec b/jna.spec index 5084a42..2876c15 100644 --- a/jna.spec +++ b/jna.spec @@ -1,6 +1,6 @@ Name: jna Version: 3.2.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Pure Java access to native libraries Group: Development/Libraries @@ -23,13 +23,15 @@ Patch2: jna-3.2.4-tests-headless.patch # Upstream appears to have some sort of MD5 check on the contents of their # native jar. Carve that out so we always build it. Patch3: jna-3.2.4-build-md5.patch +# Build using GCJ javadoc +Patch4: jna-3.2.4-gcj-javadoc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: java-devel >= 1.6 ant jpackage-utils ant-nodeps +BuildRequires: java-devel ant jpackage-utils ant-nodeps BuildRequires: libX11-devel libXt-devel libffi-devel # We manually require libffi because find-requires doesn't work # inside jars. -Requires: java >= 1:1.6.0 jpackage-utils libffi +Requires: java jpackage-utils libffi # for ExcludeArch see bug: 468831 %if 0%{?rhel} < 6 && 0%{?fedora} < 10 ExcludeArch: ppc ppc64 @@ -70,6 +72,7 @@ This package contains the examples for %{name}. sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1 %patch2 -p1 -b .tests-headless %patch3 -p0 -R -b .md5 +%patch4 -p0 -b .gcj-javadoc # all java binaries must be removed from the sources find . -name '*.jar' -exec rm -f '{}' \; @@ -132,6 +135,9 @@ rm -rf %{buildroot} %changelog +* Thu Apr 22 2010 Colin Walters - 3.2.4-5 +- Add patches to make the build happen with gcj + * Wed Apr 21 2010 Colin Walters - 3.2.4-4 - Fix the build by removing upstream's hardcoded md5 From ce80c5d9a93b175aba54108291abdbfa5b514140 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 22 Apr 2010 19:47:29 +0000 Subject: [PATCH 4/8] add missing patch --- jna-3.2.4-build-md5.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 jna-3.2.4-build-md5.patch diff --git a/jna-3.2.4-build-md5.patch b/jna-3.2.4-build-md5.patch new file mode 100644 index 0000000..70fcfc0 --- /dev/null +++ b/jna-3.2.4-build-md5.patch @@ -0,0 +1,11 @@ +--- 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 @@ + + + +- ++ + + + From bfac7b287dc82f2183258cddfb2fb7d586c55973 Mon Sep 17 00:00:00 2001 From: Levente Farkas Date: Thu, 22 Jul 2010 21:47:03 +0000 Subject: [PATCH 5/8] Temporary hack for 64bit build --- .cvsignore | 2 +- import.log | 1 + jna-3.2.5-direct.patch | 12 +++ jna-3.2.5-junit.patch | 37 +++++++ ...brary.patch => jna-3.2.5-loadlibrary.patch | 8 +- ...vadoc.patch => jna-3.2.7-gcj-javadoc.patch | 30 +++--- jna-pom.xml | 52 ++++++++++ jna.spec | 97 ++++++++++++++----- sources | 2 +- 9 files changed, 197 insertions(+), 44 deletions(-) create mode 100644 jna-3.2.5-direct.patch create mode 100644 jna-3.2.5-junit.patch rename jna-3.2.4-loadlibrary.patch => jna-3.2.5-loadlibrary.patch (95%) rename jna-3.2.4-gcj-javadoc.patch => jna-3.2.7-gcj-javadoc.patch (60%) create mode 100644 jna-pom.xml diff --git a/.cvsignore b/.cvsignore index 5bc5a3e..d0f7e8f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -jna-3.2.4.tar.bz2 +jna-3.2.7.tar.bz2 diff --git a/import.log b/import.log index 94b7487..b7653a0 100644 --- a/import.log +++ b/import.log @@ -1 +1,2 @@ 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 diff --git a/jna-3.2.5-direct.patch b/jna-3.2.5-direct.patch new file mode 100644 index 0000000..8534f50 --- /dev/null +++ b/jna-3.2.5-direct.patch @@ -0,0 +1,12 @@ +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 diff --git a/jna-3.2.5-junit.patch b/jna-3.2.5-junit.patch new file mode 100644 index 0000000..afce350 --- /dev/null +++ b/jna-3.2.5-junit.patch @@ -0,0 +1,37 @@ +diff -up ./build.xml.junit ./build.xml +--- ./build.xml.junit 2010-05-01 12:18:55.547238394 +0200 ++++ ./build.xml 2010-05-01 12:20:49.253989440 +0200 +@@ -161,9 +161,6 @@ + + + +- +- +- + + + +@@ -419,13 +416,12 @@ + + + +- + + + + + +- ++ + + + +@@ -633,7 +629,7 @@ + + + +- ++ + + + diff --git a/jna-3.2.4-loadlibrary.patch b/jna-3.2.5-loadlibrary.patch similarity index 95% rename from jna-3.2.4-loadlibrary.patch rename to jna-3.2.5-loadlibrary.patch index 47238b1..99b2798 100644 --- a/jna-3.2.4-loadlibrary.patch +++ b/jna-3.2.5-loadlibrary.patch @@ -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 2009-11-09 10:23:05.000000000 +0100 -+++ ./src/com/sun/jna/Native.java 2009-11-09 10:30:41.000000000 +0100 -@@ -630,131 +630,19 @@ public final class Native { +--- ./src/com/sun/jna/Native.java.loadlib 2010-05-01 10:54:09.949779524 +0200 ++++ ./src/com/sun/jna/Native.java 2010-05-01 10:55:08.405824567 +0200 +@@ -631,131 +631,19 @@ public final class Native { } /** @@ -88,7 +88,7 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java - File lib = null; - if (url.getProtocol().toLowerCase().equals("file")) { - try { -- lib = new File(url.toURI()); +- lib = new File(new URI(url.toString())); - } - catch(URISyntaxException e) { - lib = new File(url.getPath()); diff --git a/jna-3.2.4-gcj-javadoc.patch b/jna-3.2.7-gcj-javadoc.patch similarity index 60% rename from jna-3.2.4-gcj-javadoc.patch rename to jna-3.2.7-gcj-javadoc.patch index 9865c8d..f1ea6d6 100644 --- a/jna-3.2.4-gcj-javadoc.patch +++ b/jna-3.2.7-gcj-javadoc.patch @@ -1,17 +1,19 @@ ---- build.xml.orig 2010-04-22 15:22:49.082452327 -0400 -+++ build.xml 2010-04-22 15:22:54.266203934 -0400 -@@ -540,8 +540,6 @@ - - - -- +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 @@ + + + +- - - - ---- src/com/sun/jna/Function.java.orig 2010-04-22 15:23:32.766205632 -0400 -+++ src/com/sun/jna/Function.java 2010-04-22 15:23:55.909207399 -0400 -@@ -76,7 +76,7 @@ + + +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 +@@ -76,7 +76,7 @@ public class Function extends Pointer { * Library in which to find the native function * @param functionName * Name of the native function to be linked with @@ -20,7 +22,7 @@ * the given function name is not found within the library. */ public static Function getFunction(String libraryName, String functionName) { -@@ -97,7 +97,7 @@ +@@ -97,7 +97,7 @@ public class Function extends Pointer { * @param callFlags * Function call flags * @@ -29,7 +31,7 @@ * the given function name is not found within the library. */ public static Function getFunction(String libraryName, String functionName, int callFlags) { -@@ -161,7 +161,7 @@ +@@ -161,7 +161,7 @@ public class Function extends Pointer { * Name of the native function to be linked with * @param callFlags * Function call flags diff --git a/jna-pom.xml b/jna-pom.xml new file mode 100644 index 0000000..019d11a --- /dev/null +++ b/jna-pom.xml @@ -0,0 +1,52 @@ + + 4.0.0 + net.java.dev.jna + jna + jar + VERSION + Java Native Access + + + + false + java.net-maven2-repository + java-net:/maven2-repository/trunk/repository/ + + + + + + + + org.jvnet.maven-antrun-extended-plugin + maven-antrun-extended-plugin + + + package + + run + + + + + + + + + + + + + + + org.jvnet.wagon-svn + wagon-svn + 1.8 + + + + + diff --git a/jna.spec b/jna.spec index 2876c15..7ba3e03 100644 --- a/jna.spec +++ b/jna.spec @@ -1,6 +1,6 @@ Name: jna -Version: 3.2.4 -Release: 5%{?dist} +Version: 3.2.7 +Release: 2%{?dist} Summary: Pure Java access to native libraries Group: Development/Libraries @@ -9,29 +9,35 @@ URL: https://jna.dev.java.net/ # The source for this package was pulled from upstream's vcs. Use the # following commands to generate the tarball: # svn export https://jna.dev.java.net/svn/jna/tags/%{version}/jnalib/ --username guest jna-%{version} -# rm jna-%{version}/dist/* -# tar -cjf jna-%{version}.tar.bz2 jna-%{version} +# rm -rf jna-%{version}/dist/* +# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.bz2 jna-%{version} Source0: %{name}-%{version}.tar.bz2 +Source1: %{name}-pom.xml # This patch is Fedora-specific for now until we get the huge # JNI library location mess sorted upstream -Patch1: jna-3.2.4-loadlibrary.patch +Patch1: jna-3.2.5-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.2.4-tests-headless.patch -# Upstream appears to have some sort of MD5 check on the contents of their # native jar. Carve that out so we always build it. Patch3: jna-3.2.4-build-md5.patch # Build using GCJ javadoc -Patch4: jna-3.2.4-gcj-javadoc.patch +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) -BuildRequires: java-devel ant jpackage-utils ant-nodeps -BuildRequires: libX11-devel libXt-devel libffi-devel # We manually require libffi because find-requires doesn't work # inside jars. -Requires: java jpackage-utils libffi +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: libX11-devel libXt-devel libffi-devel # for ExcludeArch see bug: 468831 %if 0%{?rhel} < 6 && 0%{?fedora} < 10 ExcludeArch: ppc ppc64 @@ -57,26 +63,30 @@ Requires: %{name} = %{version}-%{release} This package contains the javadocs for %{name}. -%package examples -Summary: Examples for %{name} +%package contrib +Summary: Contrib for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} -%description examples -This package contains the examples for %{name}. +%description contrib +This package contains the contributed examples for %{name}. %prep %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 -p0 -R -b .md5 %patch4 -p0 -b .gcj-javadoc +%patch5 -p1 -b .junit +#patch6 -p1 -b .direct +cp %{SOURCE1} ./ # all java binaries must be removed from the sources -find . -name '*.jar' -exec rm -f '{}' \; -find . -name '*.class' -exec rm -f '{}' \; +#find . -name '*.jar' -delete +rm lib/junit.jar +find . -name '*.class' -delete # remove internal copy of libffi rm -rf native/libffi @@ -89,16 +99,25 @@ 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 examples -ant javadoc - +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 +# remove compiled contribs +find contrib -name build -delete || : +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 -install -D -m 644 build*/examples.jar %{buildroot}%{_javadir}/%{name}-examples-%{version}.jar (cd %{buildroot}%{_javadir}/; for jar in `ls *-%{version}.jar`; do ln -s $jar `echo $jar | sed -e 's/-%{version}//'`; done) # NOTE: JNA has highly custom code to look for native jars in this # directory. Since this roughly matches the jpackage guidelines, @@ -106,21 +125,43 @@ install -D -m 644 build*/examples.jar %{buildroot}%{_javadir}/%{name}-examples-% install -d -m 755 %{buildroot}%{_libdir}/%{name} install -m 755 build*/native/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/ +# install maven pom file +install -Dm 644 %{name}-pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}.pom + +# ... and maven depmap +%add_to_maven_depmap net.java.dev.jna %{name} %{version} JPP %{name} + # javadocs install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version} cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version} +%if 0%{?fedora} >= 9 +%check +#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true test +%endif + + %clean rm -rf %{buildroot} +%post +%update_maven_depmap + + +%postun +%update_maven_depmap + + %files %defattr(-,root,root,-) %doc LICENSE.txt %{_libdir}/%{name} %{_javadir}/%{name}.jar %{_javadir}/%{name}-%{version}.jar +%{_mavenpomdir}/*.pom +%{_mavendepmapfragdir}/%{name} %files javadoc @@ -128,13 +169,21 @@ rm -rf %{buildroot} %{_javadocdir}/%{name}-%{version} -%files examples +%files contrib %defattr(-,root,root,-) -%{_javadir}/%{name}-examples.jar -%{_javadir}/%{name}-examples-%{version}.jar +%doc contrib %changelog +* Thu Jul 23 2010 Levente Farkas - 3.2.7-2 +- Temporary hack for 64bit build + +* Thu Jul 22 2010 Levente Farkas - 3.2.7-1 +- Rebase on upstream 3.2.7 + +* Wed Jul 21 2010 Stanislav Ochotnicky - 3.2.4-6 +- Add maven depmap + * Thu Apr 22 2010 Colin Walters - 3.2.4-5 - Add patches to make the build happen with gcj diff --git a/sources b/sources index 0a14343..b53151e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3e53de2ba6c9e3920ec681224114209e jna-3.2.4.tar.bz2 +59c5d5ac6b49f86b7ae701265f04a48c jna-3.2.7.tar.bz2 From 52a9d9fa5eabe0a4efc3edac0efdf8963f9a0dd9 Mon Sep 17 00:00:00 2001 From: Levente Farkas Date: Fri, 23 Jul 2010 23:00:18 +0000 Subject: [PATCH 6/8] upstream 64bit fixes --- import.log | 1 + jna-3.2.4-build-md5.patch | 11 --- jna-3.2.5-direct.patch | 12 --- jna-3.2.7-gcj-javadoc.patch | 18 ++-- jna-3.2.7-javadoc.patch | 173 ++++++++++++++++++++++++++++++++++++ jna.spec | 28 ++---- 6 files changed, 192 insertions(+), 51 deletions(-) delete mode 100644 jna-3.2.4-build-md5.patch delete mode 100644 jna-3.2.5-direct.patch create mode 100644 jna-3.2.7-javadoc.patch diff --git a/import.log b/import.log index b7653a0..a95de9d 100644 --- a/import.log +++ b/import.log @@ -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 diff --git a/jna-3.2.4-build-md5.patch b/jna-3.2.4-build-md5.patch deleted file mode 100644 index 70fcfc0..0000000 --- a/jna-3.2.4-build-md5.patch +++ /dev/null @@ -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 @@ - - - -- -+ - - - diff --git a/jna-3.2.5-direct.patch b/jna-3.2.5-direct.patch deleted file mode 100644 index 8534f50..0000000 --- a/jna-3.2.5-direct.patch +++ /dev/null @@ -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 diff --git a/jna-3.2.7-gcj-javadoc.patch b/jna-3.2.7-gcj-javadoc.patch index f1ea6d6..def1c19 100644 --- a/jna-3.2.7-gcj-javadoc.patch +++ b/jna-3.2.7-gcj-javadoc.patch @@ -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 @@ - + + - - - - + + 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 diff --git a/jna-3.2.7-javadoc.patch b/jna-3.2.7-javadoc.patch new file mode 100644 index 0000000..cf077fa --- /dev/null +++ b/jna-3.2.7-javadoc.patch @@ -0,0 +1,173 @@ +Index: jnalib/build.xml +=================================================================== +--- jnalib/build.xml (revision 1138) ++++ jnalib/build.xml (revision 1139) +@@ -22,6 +22,7 @@ + + + ++ + + + +@@ -526,6 +527,14 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ + + + + +@@ -551,15 +560,18 @@ + + + ++ ++ ++ ++ ++ + + +- ++ ++ + + + +- +- +- + + + + + +- + + + +- ++ + + + +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 @@ ++ ++ ++ ++ ++ ++ ++ ++Provides common library mappings for the OS X platform. ++ ++ ++ +\ 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 @@ ++ ++ ++ ++ ++ ++ ++ ++Provides common library mappings for the Windows platform. ++ ++ ++ +\ 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 @@ ++ ++ ++ ++ ++ ++ ++ ++Provides common library mappings for Unix and X11-based platforms. ++ ++ ++ +\ 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 @@ ++ ++ ++ ++ ++ ++ ++ ++Provides integrated, extended drag and drop functionality, ++allowing ghosted drag images to be used on all platforms. ++ ++ ++ +\ 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 @@ ++ ++ ++ ++ ++ ++ ++ ++Provides cross-platform utilities based on platform-specific libraries. ++ ++ ++ +\ No newline at end of file diff --git a/jna.spec b/jna.spec index 7ba3e03..d709e36 100644 --- a/jna.spec +++ b/jna.spec @@ -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 - 3.2.7-3 +- upstream 64bit fixes + * Thu Jul 23 2010 Levente Farkas - 3.2.7-2 - Temporary hack for 64bit build From 38beedcf16f87367b50f13f4d81268ac46adeb22 Mon Sep 17 00:00:00 2001 From: Levente Farkas Date: Tue, 27 Jul 2010 10:14:03 +0000 Subject: [PATCH 7/8] Obsoletes for jna-examples --- import.log | 1 + jna.spec | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/import.log b/import.log index a95de9d..1e9e088 100644 --- a/import.log +++ b/import.log @@ -1,3 +1,4 @@ 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 +jna-3_2_7-4_fc12:F-13:jna-3.2.7-4.fc12.src.rpm:1280225618 diff --git a/jna.spec b/jna.spec index d709e36..b8f0260 100644 --- a/jna.spec +++ b/jna.spec @@ -1,6 +1,6 @@ Name: jna Version: 3.2.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Pure Java access to native libraries Group: Development/Libraries @@ -64,6 +64,7 @@ This package contains the javadocs for %{name}. Summary: Contrib for %{name} Group: Documentation Requires: %{name} = %{version}-%{release} +Obsoletes: %{name}-examples %description contrib @@ -162,6 +163,9 @@ rm -rf %{buildroot} %changelog +* Tue Jul 27 2010 Levente Farkas - 3.2.7-4 +- add Obsoletes for jna-examples + * Sat Jul 24 2010 Levente Farkas - 3.2.7-3 - upstream 64bit fixes From 3e1ad9f0c86637a1edaa1736e5896f3dfcdcdc68 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 18:50:28 +0000 Subject: [PATCH 8/8] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - import.log | 4 ---- 4 files changed, 26 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 243fccc..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: jna -# $Id: Makefile,v 1.1 2008/04/04 22:09:38 kevin Exp $ -NAME := jna -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index baa94ef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-13 diff --git a/import.log b/import.log deleted file mode 100644 index 1e9e088..0000000 --- a/import.log +++ /dev/null @@ -1,4 +0,0 @@ -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 -jna-3_2_7-4_fc12:F-13:jna-3.2.7-4.fc12.src.rpm:1280225618