[jffi] 02/02: Merge debian directory from jffi-1.2.7 repo

Tim Potter tpot-guest at moszumanska.debian.org
Wed Mar 4 10:42:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

tpot-guest pushed a commit to branch master
in repository jffi.

commit ca585ab782b6b59833803b34c39352357c61b710
Author: Tim Potter <tpot at hp.com>
Date:   Wed Mar 4 13:08:23 2015 +1100

    Merge debian directory from jffi-1.2.7 repo
---
 debian/README.Debian-source                        |  6 +-
 debian/changelog                                   | 13 ++++
 debian/compat                                      |  2 +-
 debian/control                                     | 20 +++--
 debian/copyright                                   | 59 +++++++++++++--
 debian/docs                                        |  0
 debian/jffi.bnd                                    |  2 +-
 debian/libjffi-java.links                          |  3 +
 debian/libjffi-java.poms                           | 28 +++++++
 debian/manifest                                    |  1 -
 debian/maven.cleanIgnoreRules                      |  1 +
 debian/maven.ignoreRules                           |  2 +
 debian/maven.publishedRules                        |  1 +
 debian/maven.rules                                 |  3 +
 debian/orig-tar.sh                                 | 12 ---
 .../patches/0001-don-t-access-removed-jars.patch   | 86 ----------------------
 debian/patches/0002-ignore-test-failures.patch     | 29 --------
 .../0003-do-not-add-m32-or-m64-to-CC-and-LD.patch  | 40 ----------
 ...oad-jffi-native.jar-from-system-directory.patch | 53 -------------
 .../disable-warnings-as-errors-for-jni.patch       | 18 +++++
 debian/patches/ftbfs-gcc-4.7.diff                  | 38 ----------
 debian/patches/series                              |  6 +-
 debian/repack-tar.sh                               | 15 ++++
 debian/rules                                       | 67 ++++++++++++-----
 debian/watch                                       |  8 +-
 25 files changed, 210 insertions(+), 303 deletions(-)

diff --git a/debian/README.Debian-source b/debian/README.Debian-source
index d53c645..63a89fc 100644
--- a/debian/README.Debian-source
+++ b/debian/README.Debian-source
@@ -1,8 +1,8 @@
 jffi
 ====
 
-Use the rules/get-orig-source target to create the orig.tar.gz.
+Use the rules/get-orig-source target to create the orig.tar.xz.
 For more details on repackaging of upstream sources please see the
-debian/orig-tar.sh file.
+debian/repack-tar.sh file.
 
- -- Torsten Werner <twerner at debian.org>  Fri, 30 Jul 2010 21:47:34 +0200
+ -- tony mancill <tmancill at debian.org> Sun, 25 Jan 2015 21:40:01 -0800
diff --git a/debian/changelog b/debian/changelog
index 9e29e4a..d922171 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+jffi (1.2.7-1) UNRELEASED; urgency=low
+
+  * Team upload.
+  [ Tim Potter ]
+  * New upstream release (Closes: #776082)
+
+  [ tony mancill ]
+  * Update debian/copyright; jffi is now dual-licensed under Apache 2.0 or
+    LGPL-3. (See upstream commit: 36b973f46c44efb728bc1db350ec5fd35347553e)
+  * Update debian/watch to repack upstream tarball to remove JARs.
+
+ -- tony mancill <tmancill at debian.org>  Sun, 25 Jan 2015 21:54:13 -0800
+
 jffi (1.0.2-11) unstable; urgency=low
 
   * Re-enable OSGi metadata generation.
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index c949dd4..5cfc8a7 100644
--- a/debian/control
+++ b/debian/control
@@ -2,12 +2,18 @@ Source: jffi
 Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Jakub Adam <jakub.adam at ktknet.cz>
-Build-Depends: debhelper (>= 7), cdbs, maven-repo-helper, libffi-dev, pkg-config,
- ant-optional, default-jdk, junit4, bnd
-Standards-Version: 3.9.4
-Vcs-Git: git://git.debian.org/git/pkg-java/jffi.git
-Vcs-Browser: http://git.debian.org/?p=pkg-java/jffi.git
+Uploaders: Jakub Adam <jakub.adam at ktknet.cz>,
+ Tim Potter <tpot at hp.com>
+Build-Depends: debhelper (>= 9),
+ javahelper,
+ maven-debian-helper,
+ libmaven-antrun-plugin-java, libmaven-assembly-plugin-java,
+ maven-repo-helper, libffi-dev, pkg-config, ant,
+ ant-optional, default-jdk, junit4, bnd,
+ libltdl-dev
+Standards-Version: 3.9.6
+Vcs-Git: git://anonscm.debian.org/pkg-java/jffi.git
+Vcs-Browser: http://anonscm.debian.org/?p=pkg-java-maint/jffi.git;a=summary
 Homepage: http://github.com/wmeissner/jffi
 
 Package: libjffi-java
@@ -24,7 +30,7 @@ Architecture: any
 Depends: ${misc:Depends}, ${shlibs:Depends}
 Recommends: libjffi-java
 Description: Java Foreign Function Interface (JNI library)
- JFFI is a wrapper for libffi, the foreign function interface library. A foreign
+ JFFI is a wrapper for libffi, the foreign function interface library. A foreig
  function interface is the popular name for the interface that allows code
  written in one language to call code written in another language.
  Java-based codings helper classes for Joni and JRuby
diff --git a/debian/copyright b/debian/copyright
index e15dcff..3994268 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,14 +3,44 @@ Upstream-Name: jffi
 Upstream-Contact: Wayne Meissner
 Source: http://github.com/wmeissner/jffi
 
+Files: *
 Copyright: 2010 Wayne Meissner
-License: LGPL-3 only
- The full text of the license can be found in
+License: LGPL-3 or Apache-2.0
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  .
+      http://www.apache.org/licenses/LICENSE-2.0
+  .
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  .
+ The full text of the Apache 2.0 license can be found in
+ `/usr/share/common-licenses/Apache-2.0'.
+  .
+  Alternatively, you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+  . 
+  This code is distributed in the hope that it will be useful, but WITHOUT
+  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  version 3 for more details.
+  . 
+  You should have received a copy of the GNU Lesser General Public License
+  version 3 along with this work.  If not, see <http://www.gnu.org/licenses/>.
+  .
+ .
+ The full text of the LGPL-3 license can be found in
  `/usr/share/common-licenses/LGPL-3'.
 
 Files: jni/jffi/queue.h
 Copyright: 1991, 1993 The Regents of the University of California.
-License: BSD
+License: Expat
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:
@@ -37,7 +67,7 @@ License: BSD
 
 Files: libtest/*
 Copyright: 2007 Wayne Meissner
-License: BSD
+License: Expat
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:
  .
@@ -63,7 +93,7 @@ License: BSD
 
 Files: debian/*
 Copyright: 2010 Torsten Werner <twerner at debian.org>
-License: BSD
+License: Expat
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:
@@ -87,3 +117,22 @@ License: BSD
  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  SUCH DAMAGE.
+
+Files: debian/*
+Copyright: 2014 Tim Potter <tpot at hp.com>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e69de29
diff --git a/debian/jffi.bnd b/debian/jffi.bnd
index 5a75135..f18f241 100644
--- a/debian/jffi.bnd
+++ b/debian/jffi.bnd
@@ -1,5 +1,5 @@
 Bundle-Name: Java Foreign Function Interface
 Bundle-SymbolicName: com.kenai.jffi
-Bundle-Version: 1.0.0
+Bundle-Version: 1.2.7
 Bundle-Vendor: Debian.org
 Import-Package: sun.misc;resolution:=optional, *
diff --git a/debian/libjffi-java.links b/debian/libjffi-java.links
new file mode 100644
index 0000000..018620c
--- /dev/null
+++ b/debian/libjffi-java.links
@@ -0,0 +1,3 @@
+/usr/share/java/jffi-native.jar usr/share/java/jffi-1.2.7-native.jar
+/usr/share/java/jffi-native.jar usr/share/maven-repo/com/github/jnr/jffi/debian/jffi-native-debian.jar
+/usr/share/java/jffi-native.jar usr/share/maven-repo/com/github/jnr/jffi/1.2.7/jffi-1.2.7-native.jar
diff --git a/debian/libjffi-java.poms b/debian/libjffi-java.poms
new file mode 100644
index 0000000..64b1188
--- /dev/null
+++ b/debian/libjffi-java.poms
@@ -0,0 +1,28 @@
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+#   --ignore: ignore this POM and its artifact if any
+#   --ignore-pom: don't install the POM. To use on POM files that are created
+#     temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+#   --no-parent: remove the <parent> tag from the POM
+#   --package=<package>: an alternative package to use when installing this POM
+#      and its artifact
+#   --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+#      of the version for the package.
+#   --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+#      during a clean operation with mh_cleanpom or mh_installpom
+#   --artifact=<path>: path to the build artifact associated with this POM,
+#      it will be installed when using the command mh_install. [mh_install]
+#   --java-lib: install the jar into /usr/share/java to comply with Debian
+#      packaging guidelines
+#   --usj-name=<name>: name to use when installing the library in /usr/share/java
+#   --usj-version=<version>: version to use when installing the library in /usr/share/java
+#   --no-usj-versionless: don't install the versionless link in /usr/share/java
+#   --dest-jar=<path>: the destination for the real jar.
+#     It will be installed with mh_install. [mh_install]
+#   --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+#   --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+#     Empty by default. [mh_install]
+#
+pom.xml --no-parent --has-package-version --java-lib
diff --git a/debian/manifest b/debian/manifest
deleted file mode 100644
index 20c012f..0000000
--- a/debian/manifest
+++ /dev/null
@@ -1 +0,0 @@
-Class-Path: /usr/lib/jffi/jffi-native.jar
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.cleanIgnoreRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..a059d02
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,2 @@
+
+org.apache.maven.plugins maven-release-plugin * * * *
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.publishedRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..0f9ded2
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,3 @@
+
+junit junit jar s/.*/4.x/ * *
+junit junit jar s/4\..*/4.x/ * *
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
deleted file mode 100755
index 0897548..0000000
--- a/debian/orig-tar.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh -e
-
-# called by uscan with '--upstream-version' <version> <file>
-
-DIR=jffi-$2
-
-git clone http://github.com/wmeissner/jffi.git $DIR
-(cd $DIR && git checkout $2)
-
-tar cfz jffi_$2.orig.tar.gz -X debian/orig-tar.exclude $DIR
-
-rm -rf $DIR ../$2
diff --git a/debian/patches/0001-don-t-access-removed-jars.patch b/debian/patches/0001-don-t-access-removed-jars.patch
deleted file mode 100644
index 060f316..0000000
--- a/debian/patches/0001-don-t-access-removed-jars.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From: Torsten Werner <twerner at debian.org>
-Date: Fri, 30 Jul 2010 21:32:52 +0200
-Subject: don't access removed jars
-
----
- custom-build.xml         |   11 -----------
- nbproject/build-impl.xml |   15 ++++++---------
- 2 files changed, 6 insertions(+), 20 deletions(-)
-
-diff --git a/custom-build.xml b/custom-build.xml
-index fedf250..2ee9ea3 100644
---- a/custom-build.xml
-+++ b/custom-build.xml
-@@ -198,18 +198,7 @@
-     <target name="-assemble-native-jar" depends="-init-vars, -build-platform-jar">
-         <jar jarfile="${native.jar}" index="true" update="true" duplicate="preserve"
-             filesetmanifest="skip">
--            <zipfileset src="archive/jffi-Darwin.jar"/>
-             <zipfileset src="${dist.dir}/jffi-${platform}.jar"/>
--            <zipfileset src="archive/jffi-i386-Windows.jar"/>
--            <zipfileset src="archive/jffi-i386-Linux.jar"/>
--            <zipfileset src="archive/jffi-i386-SunOS.jar"/>
--            <zipfileset src="archive/jffi-x86_64-SunOS.jar"/>
--            <zipfileset src="archive/jffi-x86_64-Linux.jar"/>
--            <zipfileset src="archive/jffi-s390x-Linux.jar"/>
--            <zipfileset src="archive/jffi-sparc-SunOS.jar"/>
--            <zipfileset src="archive/jffi-sparcv9-SunOS.jar"/>
--            <zipfileset src="archive/jffi-ppc-AIX.jar"/>
--            <zipfileset src="archive/jffi-ppc-Linux.jar"/>
-         </jar>
-     </target>
-     <target name="-archive-platform-jar" depends="-build-platform-jar">
-diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
-index b7e8374..2219b94 100644
---- a/nbproject/build-impl.xml
-+++ b/nbproject/build-impl.xml
-@@ -506,14 +506,13 @@ is divided into following sections:
-                 <globmapper from="*" to="lib/*"/>
-             </chainedmapper>
-         </pathconvert>
--        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
--        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
-+        <jar compress="${jar.compress}" destfile="${dist.jar}" manifest="${manifest.file}">
-             <fileset dir="${build.classes.dir}"/>
-             <manifest>
-                 <attribute name="Main-Class" value="${main.class}"/>
-                 <attribute name="Class-Path" value="${jar.classpath}"/>
-             </manifest>
--        </copylibs>
-+        </jar>
-         <echo>To run this application from the command line without Ant, try:</echo>
-         <property location="${dist.jar}" name="dist.jar.resolved"/>
-         <echo>java -jar "${dist.jar.resolved}"</echo>
-@@ -531,13 +530,12 @@ is divided into following sections:
-                 <globmapper from="*" to="lib/*"/>
-             </chainedmapper>
-         </pathconvert>
--        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
--        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
-+        <jar compress="${jar.compress}" destfile="${dist.jar}" manifest="${manifest.file}">
-             <fileset dir="${build.classes.dir}"/>
-             <manifest>
-                 <attribute name="Class-Path" value="${jar.classpath}"/>
-             </manifest>
--        </copylibs>
-+        </jar>
-     </target>
-     <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.mkdist" name="-do-jar-with-libraries-without-manifest" unless="manifest.available">
-         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
-@@ -552,13 +550,12 @@ is divided into following sections:
-                 <globmapper from="*" to="lib/*"/>
-             </chainedmapper>
-         </pathconvert>
--        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
--        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
-+        <jar compress="${jar.compress}" destfile="${dist.jar}">
-             <fileset dir="${build.classes.dir}"/>
-             <manifest>
-                 <attribute name="Class-Path" value="${jar.classpath}"/>
-             </manifest>
--        </copylibs>
-+        </jar>
-     </target>
-     <target name="-post-jar">
-         <!-- Empty placeholder for easier customization. -->
--- 
diff --git a/debian/patches/0002-ignore-test-failures.patch b/debian/patches/0002-ignore-test-failures.patch
deleted file mode 100644
index 84b3c68..0000000
--- a/debian/patches/0002-ignore-test-failures.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: Torsten Werner <twerner at debian.org>
-Date: Fri, 30 Jul 2010 22:17:56 +0200
-Subject: ignore test failures
-
----
- nbproject/build-impl.xml |    2 --
- 1 files changed, 0 insertions(+), 2 deletions(-)
-
-diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
-index 2219b94..968288c 100644
---- a/nbproject/build-impl.xml
-+++ b/nbproject/build-impl.xml
-@@ -704,7 +704,6 @@ is divided into following sections:
-         <j2seproject3:junit testincludes="**/*Test.java"/>
-     </target>
-     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
--        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
-     </target>
-     <target depends="init" if="have.tests" name="test-report"/>
-     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
-@@ -717,7 +716,6 @@ is divided into following sections:
-         <j2seproject3:junit excludes="" includes="${test.includes}"/>
-     </target>
-     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
--        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
-     </target>
-     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
-     <!--
--- 
diff --git a/debian/patches/0003-do-not-add-m32-or-m64-to-CC-and-LD.patch b/debian/patches/0003-do-not-add-m32-or-m64-to-CC-and-LD.patch
deleted file mode 100644
index dbc6f20..0000000
--- a/debian/patches/0003-do-not-add-m32-or-m64-to-CC-and-LD.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Torsten Werner <twerner at debian.org>
-Date: Thu, 5 Aug 2010 04:28:08 +0200
-Subject: do not add -m32 or -m64 to CC and LD
-
----
- jni/GNUmakefile     |    4 ++--
- libtest/GNUmakefile |    4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/jni/GNUmakefile b/jni/GNUmakefile
-index 87d1ef1..166ff8a 100755
---- a/jni/GNUmakefile
-+++ b/jni/GNUmakefile
-@@ -198,8 +198,8 @@ endif
- ifneq ($(strip $(findstring $(OS), linux solaris)),)
-   # Change the CC/LD instead of CFLAGS/LDFLAGS, incase other things in the flags
-   # makes the libffi build choke
--  CC += -m$(MODEL)
--  LD += -m$(MODEL)
-+  #CC += -m$(MODEL)
-+  #LD += -m$(MODEL)
- endif
- 
- LIBJFFI = $(BUILD_DIR)/$(PREFIX)$(LIBNAME)-$(VERSION).$(JNIEXT)
-diff --git a/libtest/GNUmakefile b/libtest/GNUmakefile
-index 298a612..bd2928a 100644
---- a/libtest/GNUmakefile
-+++ b/libtest/GNUmakefile
-@@ -149,8 +149,8 @@ endif
- ifneq ($(strip $(findstring $(OS), linux solaris)),)
-   # Change the CC/LD instead of CFLAGS/LDFLAGS, incase other things in the flags
-   # makes the libffi build choke
--  CC += -m$(MODEL)
--  LD += -m$(MODEL)
-+  #CC += -m$(MODEL)
-+  #LD += -m$(MODEL)
- endif
- 
- LIBTEST = $(BUILD_DIR)/$(LIBNAME)
--- 
diff --git a/debian/patches/0004-load-jffi-native.jar-from-system-directory.patch b/debian/patches/0004-load-jffi-native.jar-from-system-directory.patch
deleted file mode 100644
index 2899637..0000000
--- a/debian/patches/0004-load-jffi-native.jar-from-system-directory.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: twerner at debian.org <twerner at debian.org>
-Date: Sat, 17 Sep 2011 11:43:48 +0200
-Subject: load jffi-native.jar from system directory
-
----
- src/com/kenai/jffi/Init.java |   20 ++++++++++++++++++--
- 1 files changed, 18 insertions(+), 2 deletions(-)
-
-Index: b/src/com/kenai/jffi/Init.java
-===================================================================
---- a/src/com/kenai/jffi/Init.java	2013-05-11 23:11:40.488998792 +0000
-+++ b/src/com/kenai/jffi/Init.java	2013-05-11 23:11:40.484998854 +0000
-@@ -27,6 +27,9 @@
- import java.nio.channels.FileChannel;
- import java.nio.channels.ReadableByteChannel;
- import java.util.Properties;
-+import java.net.URL;
-+import java.net.URLClassLoader;
-+import java.net.MalformedURLException;
- 
- /**
-  * Utility class to load the jffi stub library
-@@ -159,7 +162,20 @@
-     private static final InputStream getStubLibraryStream() {
-         String path = getStubLibraryPath();
- 
--        InputStream is = Init.class.getResourceAsStream(path);
-+        File jar = new File("/usr/lib/jffi/jffi-native.jar");
-+        if (jar == null) {
-+            throw new UnsatisfiedLinkError("Could not open jar file /usr/lib/jffi/jffi-native.jar");
-+        }
-+        URL url;
-+        try {
-+            url = jar.toURL();
-+        }
-+        catch(MalformedURLException e) {
-+            throw new UnsatisfiedLinkError("Problem with /usr/lib/jffi/jffi-native.jar");
-+        }
-+        URL[] urls = { url };
-+        URLClassLoader ulc = new URLClassLoader(urls);
-+        InputStream is = ulc.getResourceAsStream(path);
- 
-         // On MacOS, the stub might be named .dylib or .jnilib - cater for both
-         if (is == null && Platform.getPlatform().getOS() == Platform.OS.DARWIN) {
-@@ -188,7 +204,7 @@
-      * @return The path of the jar file.
-      */
-     private static final String getStubLibraryPath() {
--        return "/jni/" + Platform.getPlatform().getName() + "/"+ System.mapLibraryName(stubLibraryName);
-+        return "jni/" + Platform.getPlatform().getName() + "/"+ System.mapLibraryName(stubLibraryName);
-     }
- 
- }
diff --git a/debian/patches/disable-warnings-as-errors-for-jni.patch b/debian/patches/disable-warnings-as-errors-for-jni.patch
new file mode 100644
index 0000000..cec6391
--- /dev/null
+++ b/debian/patches/disable-warnings-as-errors-for-jni.patch
@@ -0,0 +1,18 @@
+Description: Disable warnings as errors for jni
+ Remove the default use of -Werror when building the jni native
+ extensions as expecting a warning-free build of cross-platform
+ software is a bit of a fairy tale really.
+Reviewed-By: Tim Potter <tpot at hp.com>
+Last-Update: 2015-02-25
+
+--- jffi-1.2.7.orig/jni/GNUmakefile
++++ jffi-1.2.7/jni/GNUmakefile
+@@ -64,7 +64,7 @@ JFLAGS = -fno-omit-frame-pointer -fno-st
+ OFLAGS = -O2 $(JFLAGS)
+
+ # MacOS headers aren't completely warning free, so turn them off
+-WERROR = -Werror
++WERROR =
+ ifneq ($(OS),darwin)
+   WFLAGS += -Wundef $(WERROR)
+ endif
diff --git a/debian/patches/ftbfs-gcc-4.7.diff b/debian/patches/ftbfs-gcc-4.7.diff
deleted file mode 100644
index 780c3bc..0000000
--- a/debian/patches/ftbfs-gcc-4.7.diff
+++ /dev/null
@@ -1,38 +0,0 @@
-Index: b/jni/GNUmakefile
-===================================================================
---- a/jni/GNUmakefile	2013-05-11 23:13:56.101912633 +0000
-+++ b/jni/GNUmakefile	2013-05-11 23:14:28.978133869 +0000
-@@ -65,7 +65,7 @@
- 
- # MacOS headers aren't completely warning free, so turn them off
- ifneq ($(OS),darwin)
--  WFLAGS += -Wundef -Werror
-+  WFLAGS += -Wundef -Werror -Wno-error=unused-parameter
- endif
- WFLAGS += -W -Wall -Wno-unused -Wno-parentheses
- PICFLAGS = -fPIC
-@@ -156,7 +156,7 @@
- endif
- 
- ifeq ($(OS), linux)
--  SOFLAGS = -shared -mimpure-text -static-libgcc -Wl,-soname,$(@F) -Wl,-O1
-+  SOFLAGS = -shared -static-libgcc -Wl,-soname,$(@F) -Wl,-O1
-   CFLAGS += -pthread
- endif
- 
-Index: b/libtest/GNUmakefile
-===================================================================
---- a/libtest/GNUmakefile	2013-05-11 23:13:56.101912633 +0000
-+++ b/libtest/GNUmakefile	2013-05-11 23:14:17.886064740 +0000
-@@ -45,9 +45,9 @@
- #   http://weblogs.java.net/blog/kellyohair/archive/2006/01/compilation_of_1.html
- JFLAGS = -fno-omit-frame-pointer -fno-strict-aliasing
- OFLAGS = -O2 $(JFLAGS)
--WFLAGS = -W -Werror -Wall -Wno-unused -Wno-parentheses
-+WFLAGS = -W -Werror -Wno-error=unused-parameter -Wall -Wno-unused -Wno-parentheses
- PICFLAGS = -fPIC
--SOFLAGS = -shared -mimpure-text -Wl,-O1
-+SOFLAGS = -shared -Wl,-O1
- LDFLAGS += $(SOFLAGS)
- 
- IFLAGS = -I"$(BUILD_DIR)"
diff --git a/debian/patches/series b/debian/patches/series
index 671c1a8..09b1c8b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1 @@
-0001-don-t-access-removed-jars.patch
-0002-ignore-test-failures.patch
-0003-do-not-add-m32-or-m64-to-CC-and-LD.patch
-0004-load-jffi-native.jar-from-system-directory.patch
-ftbfs-gcc-4.7.diff
+disable-warnings-as-errors-for-jni.patch
diff --git a/debian/repack-tar.sh b/debian/repack-tar.sh
new file mode 100755
index 0000000..abeb19c
--- /dev/null
+++ b/debian/repack-tar.sh
@@ -0,0 +1,15 @@
+#/bin/sh -e
+
+VERSION=$2
+UPSTREAM_TAR=../$VERSION.tar.gz
+TAR=../jffi_$VERSION.orig.tar.xz
+DIR=jffi-$VERSION
+mkdir -p $DIR
+
+# Unpack ready fo re-packing
+tar -xzf $UPSTREAM_TAR -C $DIR --strip-components=1
+
+# Repack excluding stuff we don't need
+tar -cJf $TAR --exclude-from debian/orig-tar.exclude $DIR
+rm -rf $DIR
+
diff --git a/debian/rules b/debian/rules
index 5db2f5d..696b125 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,28 +1,55 @@
 #!/usr/bin/make -f
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/ant.mk
+export JAVA_HOME=/usr/lib/jvm/default-java
+export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
 
-JAVA_HOME            := /usr/lib/jvm/default-java
-DEB_ANT_BUILD_TARGET := -Duse.system.libffi=1 jar test
-DEB_JARS             := ant-nodeps ant-junit junit4
+%:
+	dh $@ --buildsystem=maven --with javahelper
 
-common-post-build-indep::
-	# Generate OSGi metadata for jffi.jar
-	bnd wrap -properties debian/jffi.bnd -output dist/jffi.jar dist/jffi.jar
+override_dh_install:
+	dh_install
+	mh_installjar -plibjffi-java pom.xml target/jffi-1.2.7.jar
+	mkdir -p debian/libjffi-jni/usr/share/java
+	cp dist/jffi-*-Linux.jar debian/libjffi-jni/usr/share/java/jffi-native.jar
 
-install/libjffi-java::
-	mh_installpom -plibjffi-java pom.xml
-	$(JAVA_HOME)/bin/jar umf debian/manifest dist/jffi.jar
-	mh_installjar -plibjffi-java pom.xml -l dist/jffi.jar
+override_dh_auto_build:
+	mkdir -p archive
+	ant -Duse.system.libffi=1
+	dh_auto_build
 
-install/libjffi-jni::
-	install -D -m644 dist/jffi-*-*.jar \
-		debian/libjffi-jni/usr/lib/jffi/jffi-native.jar
-	cp ./build/jni/libjffi-1.0.so debian/libjffi-jni/usr/lib/
-
-binary-predeb/libjffi-jni::
-	rm -f debian/libjffi-jni/usr/lib/libjffi-1.0.so
+override_dh_clean:
+	ant clean
+	dh_clean
 
 get-orig-source:
-	uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
+	uscan --force-download --verbose --no-symlink
+
+#
+# original jffi package
+#
+##!/usr/bin/make -f
+#
+#include /usr/share/cdbs/1/rules/debhelper.mk
+#include /usr/share/cdbs/1/class/ant.mk
+#
+#JAVA_HOME            := /usr/lib/jvm/default-java
+#DEB_ANT_BUILD_TARGET := -Duse.system.libffi=1 jar test
+#DEB_JARS             := ant-nodeps ant-junit junit4
+#
+#common-post-build-indep::
+#	# Generate OSGi metadata for jffi.jar
+#	bnd wrap -properties debian/jffi.bnd -output dist/jffi.jar dist/jffi.jar
+#
+#install/libjffi-java::
+#	mh_installpom -plibjffi-java pom.xml
+#	$(JAVA_HOME)/bin/jar umf debian/manifest dist/jffi.jar
+#	mh_installjar -plibjffi-java pom.xml -l dist/jffi.jar
+#
+#install/libjffi-jni::
+#	install -D -m644 dist/jffi-*-*.jar \
+#		debian/libjffi-jni/usr/lib/jffi/jffi-native.jar
+#	cp ./build/jni/libjffi-1.0.so debian/libjffi-jni/usr/lib/
+#
+#binary-predeb/libjffi-jni::
+#	rm -f debian/libjffi-jni/usr/lib/libjffi-1.0.so
+#
diff --git a/debian/watch b/debian/watch
index bc57cf9..34a207b 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,7 @@
+#version=3
+#opts=dversionmangle=s/\.dfsg// \
+#http://githubredir.debian.net/github/jnr/jffi/ (.+).tar.gz debian debian/orig-tar.sh
+#
 version=3
-http://github.com/wmeissner/jffi/downloads \
-  /wmeissner/jffi/tarball/(.*) debian debian/orig-tar.sh
+#opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/jffi-$1\.tar\.gz/ \
+https://github.com/jnr/jffi/releases .*/v?(\d\S*)\.tar\.gz debian debian/repack-tar.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jffi.git



More information about the pkg-java-commits mailing list