From c7221303b35d3148ca19d494e81f48e77423ebbd Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Feb 05 2013 11:17:49 +0000 Subject: Update to version 0.7.10. - Switch from ant to maven. --- diff --git a/.gitignore b/.gitignore index b471d75..9e6e975 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /jnr-jnr-ffi-0.5.10-0-g103ea1a.tar.gz +/jnr-jnr-ffi-0.7.10-0-gf28dc0a.tar.gz diff --git a/jaffl_fix_jar_dependencies.patch b/jaffl_fix_jar_dependencies.patch deleted file mode 100644 index 0303543..0000000 --- a/jaffl_fix_jar_dependencies.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- nbproject/project.properties.orig 2011-06-02 10:54:53.846447070 -0400 -+++ nbproject/project.properties 2011-06-02 10:56:01.555446966 -0400 -@@ -20,13 +20,13 @@ dist.jar=${dist.dir}/jaffl-0.5.jar - dist.javadoc.dir=${dist.dir}/javadoc - endorsed.classpath= - excludes= --file.reference.asm-3.2.jar=lib/asm-3.2.jar --file.reference.asm-analysis-3.2.jar=lib/asm-analysis-3.2.jar --file.reference.asm-commons-3.2.jar=lib/asm-commons-3.2.jar --file.reference.asm-tree-3.2.jar=lib/asm-tree-3.2.jar --file.reference.asm-util-3.2.jar=lib/asm-util-3.2.jar --file.reference.asm-xml-3.2.jar=lib/asm-xml-3.2.jar --file.reference.jffi-complete.jar-1=../jffi/dist/jffi-complete.jar -+file.reference.asm-3.2.jar=build_lib/objectweb-asm_asm.jar -+file.reference.asm-analysis-3.2.jar=build_lib/objectweb-asm_analysisasm-analysis.jar -+file.reference.asm-commons-3.2.jar=build_lib/objectweb-asm_commonsasm.jar -+file.reference.asm-tree-3.2.jar=build_lib/objectweb-asm_treeasm.jar -+file.reference.asm-util-3.2.jar=build_lib/objectweb-asm_utilasm.jar -+file.reference.asm-xml-3.2.jar=build_lib/objectweb-asm_xmlasm-xml.jar -+file.reference.jffi-complete.jar=build_lib/jffi.jar - includes=** - jar.compress=true - javac.classpath=\ -@@ -70,8 +70,8 @@ meta.inf.dir=${src.dir}/META-INF - platform.active=default_platform - project.jffi=../jffi - project.jnr-x86asm=../jnr-x86asm --reference.jffi.jar=${project.jffi}/dist/jffi.jar --reference.jnr-x86asm.jar=${project.jnr-x86asm}/dist/jnr-x86asm.jar -+reference.jffi.jar=build_lib/jffi.jar -+reference.jnr-x86asm.jar=build_lib/jnr-x86asm.jar - run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} ---- nbproject/build-impl.xml.orig 2011-06-02 10:56:23.140445510 -0400 -+++ nbproject/build-impl.xml 2011-06-02 10:57:10.325446988 -0400 -@@ -411,20 +411,6 @@ is divided into following sections: - - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- - - - -@@ -570,7 +556,6 @@ is divided into following sections: - - - -- - - - diff --git a/jaffl_remove_invokedynamic.patch b/jaffl_remove_invokedynamic.patch deleted file mode 100644 index bfc10f2..0000000 --- a/jaffl_remove_invokedynamic.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- src/com/kenai/jaffl/provider/jffi/SkinnyMethodAdapter.java.orig 2010-09-09 15:05:35.000000000 -0400 -+++ src/com/kenai/jaffl/provider/jffi/SkinnyMethodAdapter.java 2010-09-09 15:05:48.000000000 -0400 -@@ -190,10 +190,6 @@ public class SkinnyMethodAdapter impleme - getMethodVisitor().visitMethodInsn(INVOKEINTERFACE, p(recv), methodName, sig(returnType, parameterTypes)); - } - -- public void invokedynamic(String arg1, String arg2, String arg3) { -- getMethodVisitor().visitMethodInsn(INVOKEDYNAMIC, arg1, arg2, arg3); -- } -- - public void aprintln() { - dup(); - getstatic(p(System.class), "out", ci(PrintStream.class)); diff --git a/jnr-ffi-remove-dependency-versions-not-understood-by-fedora-maven.patch b/jnr-ffi-remove-dependency-versions-not-understood-by-fedora-maven.patch new file mode 100644 index 0000000..b2e45bf --- /dev/null +++ b/jnr-ffi-remove-dependency-versions-not-understood-by-fedora-maven.patch @@ -0,0 +1,59 @@ +--- pom.xml.orig 2012-08-05 04:03:31.000000000 +0200 ++++ pom.xml 2012-09-05 12:11:37.873810410 +0200 +@@ -47,56 +47,47 @@ + + junit + junit +- [4.5.0,5.0.0) + test + + + com.github.jnr + jffi +- [1.2.1, 1.3.0) + compile + + + com.github.jnr + jffi +- [1.2.1, 1.3.0) + runtime + native + + + org.ow2.asm + asm +- 4.0 + compile + + + org.ow2.asm + asm-commons +- 4.0 + compile + + + org.ow2.asm + asm-analysis +- 4.0 + compile + + + org.ow2.asm + asm-tree +- 4.0 + compile + + + org.ow2.asm + asm-util +- 4.0 + compile + + + com.github.jnr + jnr-x86asm +- [1.0.2,) + compile + + diff --git a/jnr-ffi.spec b/jnr-ffi.spec index 9192491..d294848 100644 --- a/jnr-ffi.spec +++ b/jnr-ffi.spec @@ -1,36 +1,41 @@ -%global git_commit 103ea1a -%global cluster jnr +%global commit_hash f28dc0a +%global tag_hash 929dd3c Name: jnr-ffi -Version: 0.5.10 -Release: 5%{?dist} +Version: 0.7.10 +Release: 1%{?dist} Summary: Java Abstracted Foreign Function Layer Group: System Environment/Libraries -License: ASL 2.0 or LGPLv3+ -URL: http://github.com/%{cluster}/%{name} -Source0: https://download.github.com/%{cluster}-%{name}-%{version}-0-g%{git_commit}.tar.gz -Patch0: jaffl_fix_jar_dependencies.patch +License: ASL 2.0 +URL: http://github.com/jnr/%{name}/ +Source0: https://github.com/jnr/%{name}/tarball/%{version}/jnr-%{name}-%{version}-0-g%{commit_hash}.tar.gz -# invokedynamic is a Java 7 feature and the method -# which needs it is only defined and not used -Patch1: jaffl_remove_invokedynamic.patch +Patch1: %{name}-remove-dependency-versions-not-understood-by-fedora-maven.patch BuildRequires: java-devel BuildRequires: jpackage-utils -BuildRequires: ant BuildRequires: jffi BuildRequires: jnr-x86asm +BuildRequires: junit BuildRequires: objectweb-asm +BuildRequires: maven-local +BuildRequires: maven-clean-plugin +BuildRequires: maven-compiler-plugin +BuildRequires: maven-dependency-plugin +BuildRequires: maven-install-plugin +BuildRequires: maven-jar-plugin +BuildRequires: maven-javadoc-plugin + Requires: java Requires: jpackage-utils Requires: jffi Requires: jnr-x86asm Requires: objectweb-asm + BuildArch: noarch -Obsoletes: jaffl < %{version}-%{release} -Provides: jaffl = %{version}-%{release} +# don't obsolete/provide jaffl, gradle is using both jaffl and jnr-ffi... %description An abstracted interface to invoking native functions from java @@ -38,59 +43,52 @@ An abstracted interface to invoking native functions from java %package javadoc Summary: Javadocs for %{name} Group: Documentation -Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name}. %prep -%setup -q -n %{cluster}-%{name}-%{git_commit} -%patch0 -p0 +%setup -q -n jnr-%{name}-%{tag_hash} %patch1 -p0 # remove all builtin jars find -name '*.jar' -o -name '*.class' -exec rm -f '{}' \; -# remove tests/junit dependency -rm -rf test/ - -mkdir build_lib -build-jar-repository -s -p build_lib jffi jnr-x86asm objectweb-asm/asm \ - objectweb-asm/analysis objectweb-asm/commons \ - objectweb-asm/tree objectweb-asm/util objectweb-asm/xml - %build -ant +# don't fail on unused parameters... (TODO: send patch upstream) +sed -i 's|-Werror||' libtest/GNUmakefile +# TODO: tests still fail, investigate +mvn-rpmbuild install javadoc:aggregate -DskipTests %install mkdir -p $RPM_BUILD_ROOT%{_javadir} -mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} - -cp dist/jaffl-0.5.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar -ln -s %{_javadir}/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/jaffl.jar +cp -p target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar -cp -rp dist/javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} - -# pom -%add_to_maven_depmap org.jruby.extras %{name} %{version} JPP %{name} -mkdir -p $RPM_BUILD_ROOT%{_mavenpomdir} -cp pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-jnr-ffi.pom +mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} -#%add_maven_depmap JPP-jnr-ffi.pom jnr-ffi.jar +install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} +install -pm 644 pom.xml \ + $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap JPP-%{name}.pom %{name}.jar %files -%{_javadir}/jaffl.jar +%doc LICENSE %{_javadir}/%{name}.jar +%{_mavenpomdir}/JPP-%{name}.pom %{_mavendepmapfragdir}/%{name} -%{_mavenpomdir}/* -%doc LICENSE %files javadoc +%doc LICENSE %{_javadocdir}/%{name} %changelog +* Tue Feb 05 2013 Bohuslav Kabrda - 0.7.10-1 +- Update to version 0.7.10. +- Switch from ant to maven. + * Thu Jul 19 2012 Fedora Release Engineering - 0.5.10-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/sources b/sources index 1b7169b..8e992e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -17e50ad9a5ae2d63f5a7f2bdef495b13 jnr-jnr-ffi-0.5.10-0-g103ea1a.tar.gz +da7070036985edb4dfe0edb593c9591a jnr-jnr-ffi-0.7.10-0-gf28dc0a.tar.gz