[med-svn] r19963 - in trunk/packages/libsis-jhdf5-java/trunk/debian: . build_native build_native/hdf-java build_native/jhdf5 patches
Olivier Sallou
osallou at moszumanska.debian.org
Sun Aug 16 15:17:10 UTC 2015
Author: osallou
Date: 2015-08-16 15:17:09 +0000 (Sun, 16 Aug 2015)
New Revision: 19963
Added:
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/AUTHORS
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/ChangeLog
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/Makefile.am
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/NEWS
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/README
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/configure.ac
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/AUTHORS
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/ChangeLog
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/Makefile.am
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/NEWS
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/README
trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/configure.ac
trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.jlibs
trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.manifest
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch
Removed:
trunk/packages/libsis-jhdf5-java/trunk/debian/jlibs
trunk/packages/libsis-jhdf5-java/trunk/debian/manifest
Modified:
trunk/packages/libsis-jhdf5-java/trunk/debian/changelog
trunk/packages/libsis-jhdf5-java/trunk/debian/control
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/remove_ch_rinn_imports.patch
trunk/packages/libsis-jhdf5-java/trunk/debian/rules
Log:
add autotools script to build native libraries, add tests
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/AUTHORS
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/AUTHORS (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/AUTHORS 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,4 @@
+For autotools config files
+
+Olivier Sallou <osallou at debian.org>
+
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/ChangeLog
===================================================================
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/Makefile.am
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/Makefile.am (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/Makefile.am 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,6 @@
+AM_CFLAGS=-I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -I/usr/include/hdf5/serial
+
+lib_LTLIBRARIES = libcisd_hdf.la
+libcisd_hdf_la_SOURCES = *.c
+libcisd_hdf_la_LDFLAGS = -lhdf5_serial
+
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/NEWS
===================================================================
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/README
===================================================================
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/configure.ac
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/configure.ac (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/hdf-java/configure.ac 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,27 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([iscd], [1.14], [osallou at debian.org])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE
+LT_INIT
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([string.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_STRUCT_ST_BLOCKS
+
+# Checks for library functions.
+AC_FUNC_CHOWN
+AC_CHECK_FUNCS([strerror])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/AUTHORS
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/AUTHORS (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/AUTHORS 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,4 @@
+For autotools config files
+
+Olivier Sallou <osallou at debian.org>
+
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/ChangeLog
===================================================================
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/Makefile.am
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/Makefile.am (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/Makefile.am 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,7 @@
+AM_CFLAGS=-I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux -I/usr/include/hdf5/serial
+
+lib_LTLIBRARIES = libcisd_jhdf5.la
+libcisd_jhdf5_la_SOURCES = *.c
+libcisd_jhdf5_la_LDFLAGS = -lhdf5_serial
+#libcisd_jhdf5_la_LDFLAGS = -lhdf5_serial -ljhdf5 -L/usr/lib/jni/
+
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/NEWS
===================================================================
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/README
===================================================================
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/configure.ac
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/configure.ac (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/build_native/jhdf5/configure.ac 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,27 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([iscd], [1.14], [osallou at debian.org])
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE
+LT_INIT
+
+# Checks for programs.
+AC_PROG_CC
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_CHECK_HEADERS([string.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_STRUCT_ST_BLOCKS
+
+# Checks for library functions.
+AC_FUNC_CHOWN
+AC_CHECK_FUNCS([strerror])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/changelog
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/changelog 2015-08-16 14:59:53 UTC (rev 19962)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/changelog 2015-08-16 15:17:09 UTC (rev 19963)
@@ -1,5 +1,20 @@
-libsis-jhdf5-java (14.12.1-0biolinux1) trusty; urgency=medium
+libsis-jhdf5-java (14.12.1-1) UNRELEASED; urgency=medium
- * Build for Trusty
+ This build is totally broken. If you attempt to make it work without reading
+ the README.source you are wasting your time.
+ * [ Team upload ]
+ First package
+
+ * [ DONE ]
+ C libraries generated during build
+ Jar library generated during build
+ test jar file generated and executed during test step
+ * [TODO]
+ get-orig-source
+ polishing in control, DEP3 patches, copyright
+ test: are failing on H5 initalization (native lib). Libs are loaded
+ but something in init seems to fails. Java does not give hints
+ on what is wrong.
+
-- Tim Booth <tbooth at ceh.ac.uk> Wed, 12 Aug 2015 12:15:17 +0100
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/control
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/control 2015-08-16 14:59:53 UTC (rev 19962)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/control 2015-08-16 15:17:09 UTC (rev 19963)
@@ -6,16 +6,27 @@
libcommons-lang-java,
libcommons-io-java,
libsis-base-java,
- libhdf5-dev (>= 1.8.13),
- openjdk-7-jdk,
- junit4
-Standards-Version: 3.9.5
+ libjhdf5-jni ( >> 2.9-3 ),
+ libhdf5-dev,
+ junit4, testng, libjmock-java
+Standards-Version: 3.9.6
+Homepage: http://svncisd.ethz.ch/repos/cisd/jhdf5/tags/release/14.12.x/14.12.1/jhdf5
+Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/libsis-jhdf5-java/trunk/
+Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/libsis-jhdf5-java/trunk/
-Package: libsis-base-java
+
+Package: libsis-jhdf5-java
Architecture: any
-Depends: ${misc:Depends}, ${java:Depends}, libjhdf5-jni
+Depends: ${misc:Depends}, ${java:Depends}, libjhdf5-jni, libsis-jhdf5
Description: easy-to-use HDF library for Java
JHDF5 is a Java binding to the HDF Group library for HDF5 focusing on
ease-of-use, which was developed by CISD and is now maintained by ETH SIS.
The library uses HDF5 1.8 from the HDF Group and files created with
JHDF5 are fully compatible with HDF5 1.6/1.8 (as you choose).
+
+Package: libsis-jhdf5
+Section: libs
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: native libs used by libsis-jhdf5-java
+ bla bla bla
Deleted: trunk/packages/libsis-jhdf5-java/trunk/debian/jlibs
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/jlibs 2015-08-16 14:59:53 UTC (rev 19962)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/jlibs 2015-08-16 15:17:09 UTC (rev 19963)
@@ -1 +0,0 @@
-*.jar
Copied: trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.jlibs (from rev 19962, trunk/packages/libsis-jhdf5-java/trunk/debian/jlibs)
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.jlibs (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.jlibs 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1 @@
+sis-jhdf5.jar
Copied: trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.manifest (from rev 19962, trunk/packages/libsis-jhdf5-java/trunk/debian/manifest)
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.manifest (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/libsis-jhdf5-java.manifest 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,2 @@
+usr/share/java/sis-jhdf5.jar:
+ Class-Path: commons-lang.jar commons-io.jar sis-base.jar
Deleted: trunk/packages/libsis-jhdf5-java/trunk/debian/manifest
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/manifest 2015-08-16 14:59:53 UTC (rev 19962)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/manifest 2015-08-16 15:17:09 UTC (rev 19963)
@@ -1,2 +0,0 @@
-usr/share/java/sis-jhdf5.jar:
- Class-Path: commons-lang.jar commons-io.jar sis-base.jar
Copied: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch (from rev 19935, trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch)
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,52 @@
+--- a/source/java/ch/systemsx/cisd/hdf5/hdf5lib/H5.java
++++ b/source/java/ch/systemsx/cisd/hdf5/hdf5lib/H5.java
+@@ -14,9 +14,11 @@
+ import ncsa.hdf.hdf5lib.exceptions.HDF5Exception;
+ import ncsa.hdf.hdf5lib.exceptions.HDF5JavaException;
+ import ncsa.hdf.hdf5lib.exceptions.HDF5LibraryException;
++import ncsa.hdf.hdf5lib.H5.*;
+
+ import ch.systemsx.cisd.base.utilities.NativeLibraryUtilities;
+
++
+ /**
+ * The low-level C function wrappers. These functions are <i>not</i> thread-safe and need to be used
+ * through thread-safe wrappers.
+@@ -159,7 +161,7 @@
+ * @return a non-negative value if successful
+ * @exception HDF5LibraryException - Error from the HDF-5 Library.
+ */
+- private static native int H5dont_atexit() throws HDF5LibraryException;
++ public static native int H5dont_atexit() throws HDF5LibraryException;
+
+ /**
+ * H5get_libversion retrieves the major, minor, and release numbers of the version of the HDF
+@@ -1946,7 +1948,7 @@
+ // //
+ // ////////////////////////////////////////////////////////////
+
+- private static native int H5Rcreate(byte[] ref, int loc_id, String name, int ref_type,
++ public static native int H5Rcreate(byte[] ref, int loc_id, String name, int ref_type,
+ int space_id) throws HDF5LibraryException, NullPointerException,
+ IllegalArgumentException;
+
+--- a/source/java/ncsa/hdf/hdf5lib/H5.java
++++ b/source/java/ncsa/hdf/hdf5lib/H5.java
+@@ -356,7 +356,7 @@
+ * @exception HDF5LibraryException
+ * - Error from the HDF-5 Library.
+ **/
+-private synchronized static native int H5dont_atexit()
++public synchronized static native int H5dont_atexit()
+ throws HDF5LibraryException;
+
+ /**
+@@ -6861,7 +6861,7 @@
+ ////
+ //////////////////////////////////////////////////////////////
+
+-private synchronized static native int H5Rcreate(byte[] ref, int loc_id,
++public synchronized static native int H5Rcreate(byte[] ref, int loc_id,
+ String name, int ref_type, int space_id)
+ throws HDF5LibraryException, NullPointerException, IllegalArgumentException;
+
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/remove_ch_rinn_imports.patch
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/remove_ch_rinn_imports.patch 2015-08-16 14:59:53 UTC (rev 19962)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/remove_ch_rinn_imports.patch 2015-08-16 15:17:09 UTC (rev 19963)
@@ -1,7 +1,7 @@
I can't find a definition of this decorator, and we hopefully don't need it at all.
--- a/source/java/ch/systemsx/cisd/hdf5/BitSetConversionUtils.java
-+++ b/ch/systemsx/cisd/hdf5/BitSetConversionUtils.java
++++ b/source/java/ch/systemsx/cisd/hdf5/BitSetConversionUtils.java
@@ -23,7 +23,6 @@
import org.apache.commons.lang.SystemUtils;
@@ -19,7 +19,7 @@
{
final BitSet result = new BitSet();
--- a/source/java/ch/systemsx/cisd/hdf5/HDF5Utils.java
-+++ b/ch/systemsx/cisd/hdf5/HDF5Utils.java
++++ b/source/java/ch/systemsx/cisd/hdf5/HDF5Utils.java
@@ -22,7 +22,6 @@
import ncsa.hdf.hdf5lib.exceptions.HDF5JavaException;
@@ -36,3 +36,40 @@
static final int MIN_CHUNK_SIZE = 1;
/** The minimal size of a data set in order to allow for chunking. */
+--- a/sourceTest/java/ch/systemsx/cisd/hdf5/BitSetConversionTest.java
++++ b/sourceTest/java/ch/systemsx/cisd/hdf5/BitSetConversionTest.java
+@@ -25,7 +25,6 @@
+ import org.testng.annotations.DataProvider;
+ import org.testng.annotations.Test;
+
+-import ch.rinn.restrictions.Friend;
+ import ch.systemsx.cisd.base.mdarray.MDLongArray;
+
+ /**
+@@ -33,7 +32,6 @@
+ *
+ * @author Bernd Rinn
+ */
+- at Friend(toClasses = BitSetConversionUtils.class)
+ public class BitSetConversionTest
+ {
+ private BitSet create(final Integer... indices)
+--- a/sourceTest/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverTest.java
++++ b/sourceTest/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverTest.java
+@@ -38,7 +38,6 @@
+ import org.testng.annotations.BeforeSuite;
+ import org.testng.annotations.Test;
+
+-import ch.rinn.restrictions.Friend;
+ import ch.systemsx.cisd.base.unix.FileLinkType;
+ import ch.systemsx.cisd.base.unix.Unix;
+ import ch.systemsx.cisd.base.unix.Unix.Stat;
+@@ -51,8 +50,6 @@
+ *
+ * @author Bernd Rinn
+ */
+- at Friend(toClasses =
+- { HDF5Archiver.class, IdCache.class, LinkRecord.class })
+ public class HDF5ArchiverTest
+ {
+ private static final File rootDirectory = new File("targets", "unit-test-wd");
Copied: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch (from rev 19935, trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch)
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch 2015-08-16 15:17:09 UTC (rev 19963)
@@ -0,0 +1,364 @@
+This is my initial attempt to get the code to compile against /usr/share/java/jhdf5.jar that is
+in /usr/share/java/jhdf5.jar, but I realised the amount of pacthing was getting silly.
+
+I'm leaving this partial patch in the package for info.
+
+Index: sis-jhdf5-14.12.1/ch/systemsx/cisd/hdf5/HDF5Utils.java
+===================================================================
+--- sis-jhdf5-14.12.1.orig/source/java/ch/systemsx/cisd/hdf5/HDF5Utils.java 2015-08-10 17:27:59.874762864 +0100
++++ sis-jhdf5-14.12.1/source/java/ch/systemsx/cisd/hdf5/HDF5Utils.java 2015-08-10 17:27:59.866762864 +0100
+@@ -344,7 +344,7 @@
+ *
+ * @throws HDF5JavaException If <var>dimensions</var> do not define a one-dimensional array.
+ */
+- static int getOneDimensionalArraySize(final int[] dimensions)
++ static int getOneDimensionalArraySize(final int[] dimensions) throws HDF5JavaException
+ {
+ assert dimensions != null;
+
+@@ -366,7 +366,7 @@
+ * @throws HDF5JavaException If <var>dimensions</var> do not define a one-dimensional array or
+ * if <code>dimensions[0]</code> overflows the <code>int</code> type.
+ */
+- static int getOneDimensionalArraySize(final long[] dimensions)
++ static int getOneDimensionalArraySize(final long[] dimensions) throws HDF5JavaException
+ {
+ assert dimensions != null;
+
+Index: sis-jhdf5-14.12.1/ch/systemsx/cisd/hdf5/HDF5BaseReader.java
+===================================================================
+--- sis-jhdf5-14.12.1.orig/ch/systemsx/cisd/hdf5/HDF5BaseReader.java 2015-08-10 17:27:59.874762864 +0100
++++ sis-jhdf5-14.12.1/ch/systemsx/cisd/hdf5/HDF5BaseReader.java 2015-08-10 17:48:16.774795452 +0100
+@@ -114,7 +114,7 @@
+ final CharacterEncoding encodingForNewDataSets;
+
+ HDF5BaseReader(File hdf5File, boolean performNumericConversions, boolean autoDereference,
+- FileFormat fileFormat, boolean overwrite, String preferredHouseKeepingNameSuffix)
++ FileFormat fileFormat, boolean overwrite, String preferredHouseKeepingNameSuffix) throws HDF5FileNotFoundException
+ {
+ this(hdf5File, performNumericConversions, false, autoDereference, fileFormat, overwrite,
+ preferredHouseKeepingNameSuffix);
+@@ -122,7 +122,7 @@
+
+ HDF5BaseReader(File hdf5File, boolean performNumericConversions, boolean useUTF8CharEncoding,
+ boolean autoDereference, FileFormat fileFormat, boolean overwrite,
+- String preferredHouseKeepingNameSuffix)
++ String preferredHouseKeepingNameSuffix) throws HDF5FileNotFoundException
+ {
+ assert hdf5File != null;
+ assert preferredHouseKeepingNameSuffix != null;
+@@ -176,7 +176,7 @@
+ }
+ }
+
+- int openFile(FileFormat fileFormat, boolean overwrite)
++ int openFile(FileFormat fileFormat, boolean overwrite) throws HDF5FileNotFoundException
+ {
+ if (hdf5File.exists() == false)
+ {
+@@ -465,7 +465,7 @@
+ * <code>nullWhenOutside == true</code>.
+ */
+ DataSpaceParameters tryGetSpaceParameters(final int dataSetId, final long offset,
+- final int blockSize, boolean nullWhenOutside, ICleanUpRegistry registry)
++ final int blockSize, boolean nullWhenOutside, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ return tryGetSpaceParameters(dataSetId, 0, offset, blockSize, nullWhenOutside, registry);
+ }
+@@ -474,7 +474,7 @@
+ * Returns the {@link DataSpaceParameters} for a 1d block of the given <var>dataSetId</var>.
+ */
+ DataSpaceParameters getSpaceParameters(final int dataSetId, final long offset,
+- final int blockSize, ICleanUpRegistry registry)
++ final int blockSize, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ return tryGetSpaceParameters(dataSetId, 0, offset, blockSize, false, registry);
+ }
+@@ -483,7 +483,7 @@
+ * Returns the {@link DataSpaceParameters} for a 1d block of the given <var>dataSetId</var>.
+ */
+ DataSpaceParameters getSpaceParameters(final int dataSetId, final long memoryOffset,
+- final long offset, final int blockSize, ICleanUpRegistry registry)
++ final long offset, final int blockSize, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ return tryGetSpaceParameters(dataSetId, memoryOffset, offset, blockSize, false, registry);
+ }
+@@ -493,7 +493,7 @@
+ */
+ DataSpaceParameters tryGetSpaceParameters(final int dataSetId, final long memoryOffset,
+ final long offset, final int blockSize, boolean nullWhenOutside,
+- ICleanUpRegistry registry)
++ ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int memorySpaceId;
+ final int dataSpaceId;
+@@ -551,7 +551,7 @@
+ * <var>dataSetId</var>.
+ */
+ DataSpaceParameters getSpaceParameters(final int dataSetId, final long[] offset,
+- final int[] blockDimensionsOrNull, ICleanUpRegistry registry)
++ final int[] blockDimensionsOrNull, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ return tryGetSpaceParameters(dataSetId, offset, blockDimensionsOrNull, false, registry);
+ }
+@@ -561,7 +561,7 @@
+ * <var>dataSetId</var>.
+ */
+ DataSpaceParameters tryGetSpaceParameters(final int dataSetId, final long[] offset,
+- final int[] blockDimensionsOrNull, boolean nullWhenOutside, ICleanUpRegistry registry)
++ final int[] blockDimensionsOrNull, boolean nullWhenOutside, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int memorySpaceId;
+ final int dataSpaceId;
+@@ -610,7 +610,7 @@
+ * mapped to a block in memory.
+ */
+ DataSpaceParameters getBlockSpaceParameters(final int dataSetId, final int[] memoryOffset,
+- final int[] memoryDimensions, ICleanUpRegistry registry)
++ final int[] memoryDimensions, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ return tryGetBlockSpaceParameters(dataSetId, memoryOffset, memoryDimensions, false,
+ registry);
+@@ -621,7 +621,7 @@
+ * mapped to a block in memory.
+ */
+ DataSpaceParameters tryGetBlockSpaceParameters(final int dataSetId, final int[] memoryOffset,
+- final int[] memoryDimensions, final boolean nullWhenOutside, ICleanUpRegistry registry)
++ final int[] memoryDimensions, final boolean nullWhenOutside, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ assert memoryOffset != null;
+ assert memoryDimensions != null;
+@@ -653,7 +653,7 @@
+ */
+ DataSpaceParameters getBlockSpaceParameters(final int dataSetId, final int[] memoryOffset,
+ final int[] memoryDimensions, final long[] offset, final int[] blockDimensions,
+- ICleanUpRegistry registry)
++ ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ return tryGetBlockSpaceParameters(dataSetId, memoryOffset, memoryDimensions, offset,
+ blockDimensions, false, registry);
+@@ -665,7 +665,7 @@
+ */
+ DataSpaceParameters tryGetBlockSpaceParameters(final int dataSetId, final int[] memoryOffset,
+ final int[] memoryDimensions, final long[] offset, final int[] blockDimensions,
+- final boolean nullWhenOutside, ICleanUpRegistry registry)
++ final boolean nullWhenOutside, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ assert memoryOffset != null;
+ assert memoryDimensions != null;
+@@ -790,7 +790,7 @@
+ * @param dataSetPath The name (including path information) of the data set to return
+ * information about.
+ */
+- HDF5DataSetInformation getDataSetInformation(final String dataSetPath)
++ HDF5DataSetInformation getDataSetInformation(final String dataSetPath) throws HDF5JavaException
+ {
+ return getDataSetInformation(dataSetPath, DataTypeInfoOptions.DEFAULT, true);
+ }
+@@ -806,7 +806,7 @@
+ * @param fillDimensions If <code>true</code>, fill in the dimensions of the dataset
+ */
+ HDF5DataSetInformation getDataSetInformation(final String dataSetPath,
+- final DataTypeInfoOptions options, final boolean fillDimensions)
++ final DataTypeInfoOptions options, final boolean fillDimensions) throws HDF5JavaException
+ {
+ assert dataSetPath != null;
+
+@@ -814,7 +814,7 @@
+ new ICallableWithCleanUp<HDF5DataSetInformation>()
+ {
+ @Override
+- public HDF5DataSetInformation call(ICleanUpRegistry registry)
++ public HDF5DataSetInformation call(ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int dataSetId = h5.openDataSet(fileId, dataSetPath, registry);
+ final int dataTypeId = h5.getDataTypeForDataSet(dataSetId, registry);
+@@ -872,7 +872,7 @@
+ * the array rank into one rank. It is a failure condition if the <var>objectPath</var> does not
+ * exist or does not identify a data set. This method follows symbolic links.
+ */
+- int getRank(String dataSetPath)
++ int getRank(String dataSetPath) throws HDF5JavaException
+ {
+ final HDF5DataSetInformation info =
+ getDataSetInformation(dataSetPath, DataTypeInfoOptions.MINIMAL, true);
+@@ -885,7 +885,7 @@
+ * space). It is a failure condition if the <var>objectPath</var> does not exist or does not
+ * identify a data set. This method follows symbolic links.
+ */
+- long[] getDimensions(String dataSetPath)
++ long[] getDimensions(String dataSetPath) throws HDF5JavaException
+ {
+ assert dataSetPath != null;
+
+@@ -918,7 +918,7 @@
+ return runner.call(informationDeterminationRunnable);
+ }
+
+- HDF5DataTypeVariant tryGetTypeVariant(final String objectPath)
++ HDF5DataTypeVariant tryGetTypeVariant(final String objectPath) throws HDF5JavaException
+ {
+ assert objectPath != null;
+
+@@ -926,7 +926,7 @@
+ new ICallableWithCleanUp<HDF5DataTypeVariant>()
+ {
+ @Override
+- public HDF5DataTypeVariant call(ICleanUpRegistry registry)
++ public HDF5DataTypeVariant call(ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int objectId = h5.openObject(fileId, objectPath, registry);
+ return tryGetTypeVariant(objectId, registry);
+@@ -936,7 +936,7 @@
+ return runner.call(readRunnable);
+ }
+
+- HDF5DataTypeVariant tryGetTypeVariant(final String objectPath, final String attributeName)
++ HDF5DataTypeVariant tryGetTypeVariant(final String objectPath, final String attributeName) throws HDF5JavaException
+ {
+ assert objectPath != null;
+
+@@ -944,7 +944,7 @@
+ new ICallableWithCleanUp<HDF5DataTypeVariant>()
+ {
+ @Override
+- public HDF5DataTypeVariant call(ICleanUpRegistry registry)
++ public HDF5DataTypeVariant call(ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int objectId = h5.openObject(fileId, objectPath, registry);
+ return tryGetTypeVariant(objectId, attributeName, registry);
+@@ -955,7 +955,7 @@
+ }
+
+ HDF5EnumerationValueArray getEnumValueArray(final int attributeId, final String objectPath,
+- final String attributeName, ICleanUpRegistry registry)
++ final String attributeName, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int storageDataTypeId = h5.getDataTypeForAttribute(attributeId, registry);
+ final int nativeDataTypeId = h5.getNativeDataType(storageDataTypeId, registry);
+@@ -1000,7 +1000,7 @@
+ }
+
+ HDF5EnumerationValueMDArray getEnumValueMDArray(final int attributeId, final String objectPath,
+- final String attributeName, ICleanUpRegistry registry)
++ final String attributeName, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int storageDataTypeId = h5.getDataTypeForAttribute(attributeId, registry);
+ final int nativeDataTypeId = h5.getNativeDataType(storageDataTypeId, registry);
+@@ -1054,7 +1054,7 @@
+ }
+
+ HDF5DataTypeVariant[] tryGetTypeVariantForCompoundMembers(String dataTypePathOrNull,
+- ICleanUpRegistry registry)
++ ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ if (dataTypePathOrNull == null)
+ {
+@@ -1089,14 +1089,14 @@
+ }
+ }
+
+- HDF5DataTypeVariant tryGetTypeVariant(final int objectId, ICleanUpRegistry registry)
++ HDF5DataTypeVariant tryGetTypeVariant(final int objectId, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int typeVariantOrdinal = getAttributeTypeVariant(objectId, registry);
+ return typeVariantOrdinal < 0 ? null : HDF5DataTypeVariant.values()[typeVariantOrdinal];
+ }
+
+ HDF5DataTypeVariant tryGetTypeVariant(final int objectId, String attributeName,
+- ICleanUpRegistry registry)
++ ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int typeVariantOrdinal = getAttributeTypeVariant(objectId, attributeName, registry);
+ return typeVariantOrdinal < 0 ? null : HDF5DataTypeVariant.values()[typeVariantOrdinal];
+@@ -1109,7 +1109,7 @@
+ * @param objectId The id of the data set object in the file.
+ * @return The ordinal of the type variant or <code>null</code>.
+ */
+- int getAttributeTypeVariant(final int objectId, ICleanUpRegistry registry)
++ int getAttributeTypeVariant(final int objectId, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ checkOpen();
+ final String dataTypeVariantAttributeName =
+@@ -1130,7 +1130,7 @@
+ * @param attributeName The name of the attribute to get the type variant for.
+ * @return The ordinal of the type variant or <code>null</code>.
+ */
+- int getAttributeTypeVariant(final int objectId, String attributeName, ICleanUpRegistry registry)
++ int getAttributeTypeVariant(final int objectId, String attributeName, ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ checkOpen();
+ final String typeVariantAttrName =
+@@ -1380,7 +1380,7 @@
+
+ HDF5EnumerationType getEnumTypeForStorageDataType(final String nameOrNull,
+ final int storageDataTypeId, final boolean resolveName, final String objectPathOrNull,
+- final String attributeNameOrNull, final ICleanUpRegistry registry)
++ final String attributeNameOrNull, final ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ int classType = h5.getClassType(storageDataTypeId);
+ final boolean isArray = (classType == H5T_ARRAY);
+@@ -1423,7 +1423,7 @@
+ values, this);
+ }
+
+- void checkEnumValues(int dataTypeId, final String[] values, final String nameOrNull)
++ void checkEnumValues(int dataTypeId, final String[] values, final String nameOrNull) throws HDF5JavaException
+ {
+ final String[] valuesStored = h5.getNamesForEnumOrCompoundMembers(dataTypeId);
+ if (valuesStored.length != values.length)
+@@ -1462,13 +1462,13 @@
+ }
+ }
+
+- boolean isScaledEnum(final int objectId, final ICleanUpRegistry registry)
++ boolean isScaledEnum(final int objectId, final ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final HDF5DataTypeVariant typeVariantOrNull = tryGetTypeVariant(objectId, registry);
+ return (HDF5DataTypeVariant.ENUM == typeVariantOrNull);
+ }
+
+- boolean isScaledBitField(final int objectId, final ICleanUpRegistry registry)
++ boolean isScaledBitField(final int objectId, final ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final HDF5DataTypeVariant typeVariantOrNull = tryGetTypeVariant(objectId, registry);
+ return (HDF5DataTypeVariant.BITFIELD == typeVariantOrNull);
+@@ -1518,7 +1518,7 @@
+ }
+
+ String[] getStringArrayAttribute(final int objectId, final String objectPath,
+- final String attributeName, final boolean readRaw, final ICleanUpRegistry registry)
++ final String attributeName, final boolean readRaw, final ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int attributeId = h5.openAttribute(objectId, attributeName, registry);
+ final int stringArrayDataTypeId = h5.getDataTypeForAttribute(attributeId, registry);
+@@ -1568,7 +1568,7 @@
+ }
+
+ MDArray<String> getStringMDArrayAttribute(final int objectId, final String objectPath,
+- final String attributeName, final boolean readRaw, final ICleanUpRegistry registry)
++ final String attributeName, final boolean readRaw, final ICleanUpRegistry registry) throws HDF5JavaException
+ {
+ final int attributeId = h5.openAttribute(objectId, attributeName, registry);
+ final int stringArrayDataTypeId = h5.getDataTypeForAttribute(attributeId, registry);
+Index: sis-jhdf5-14.12.1/ch/systemsx/cisd/hdf5/cleanup/ICallableWithCleanUp.java
+===================================================================
+--- sis-jhdf5-14.12.1.orig/ch/systemsx/cisd/hdf5/cleanup/ICallableWithCleanUp.java 2015-02-22 10:46:50.000000000 +0000
++++ sis-jhdf5-14.12.1/ch/systemsx/cisd/hdf5/cleanup/ICallableWithCleanUp.java 2015-08-10 17:42:56.198786867 +0100
+@@ -16,6 +16,8 @@
+
+ package ch.systemsx.cisd.hdf5.cleanup;
+
++import ncsa.hdf.hdf5lib.exceptions.HDF5JavaException;
++
+ /**
+ * A role that calls a method which requires one or more clean-up steps that need to be run reliably
+ * at the end of the method regardless of whether the method is finished normally or whether it
+@@ -29,6 +31,6 @@
+ {
+
+ /** Calls the method requiring clean-up. */
+- public T call(ICleanUpRegistry registry);
++ public T call(ICleanUpRegistry registry) throws HDF5JavaException;
+
+ }
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/rules
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/rules 2015-08-16 14:59:53 UTC (rev 19962)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/rules 2015-08-16 15:17:09 UTC (rev 19963)
@@ -3,35 +3,53 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-export CLASSPATH=/usr/share/java/commons-lang.jar:/usr/share/java/commons-io.jar:/usr/share/java/sis-base.jar:/usr/share/java/junit4.jar
+export CLASSPATH=/usr/share/java/commons-lang.jar:/usr/share/java/commons-io.jar:/usr/share/java/sis-base.jar:/usr/share/java/testng.jar:/usr/share/java/junit4.jar:/usr/share/java/jmock.jar
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+
%:
dh $@ --with javahelper
+override_dh_auto_configure:
+ cp debian/build_native/hdf-java/* source/c/hdf-java
+ cd source/c/hdf-java && autoreconf -i
+ cp debian/build_native/jhdf5/* source/c/jhdf5
+ cd source/c/jhdf5 && autoreconf -i
+ dh_auto_configure
+
+
override_dh_auto_clean:
- rm -rf jsrc lib build *.jar
- rm -rf source/c/*.log
- cd debian/test && rm -f *.h5 *.class
- cd sourceTest/java && rm -f *.hdf
+ if test -e source/c/hdf-java/Makefile; then cd source/c/hdf-java; make clean; fi
+ rm -f source/c/hdf-java/AUTHORS source/c/hdf-java/NEWS source/c/hdf-java/README source/c/hdf-java/ChangeLog
+ rm -rf source/c/hdf-java/configure* source/c/hdf-java/Makefile* source/c/hdf-java/autom4te.cache
+ if test -e source/c/jhdf5/Makefile; then cd source/c/jhdf5; make clean; fi
+ rm -f source/c/jhdf5/AUTHORS source/c/jhdf5/NEWS source/c/jhdf5/README source/c/jhdf5/ChangeLog
+ rm -rf source/c/jhdf5/configure* source/c/jhdf5/Makefile* source/c/jhdf5/autom4te.cache
+ rm -rf src lib build *.jar test
#find test -name '*.class' -delete
override_dh_auto_build:
- # C build
- cd source/c && \
- $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -Wl,--exclude-libs,ALL \
- -I/usr/lib/jvm/default-java/include/ -I/usr/include/hdf5/serial \
- jhdf5/*.c hdf-java/*.c -o libsis-jhdf5.so -lz -lhdf5_serial
- # Java build - see README.source about the file being removed
- mkdir jsrc ; cp -r source/java/ch source/java/ncsa jsrc
- rm jsrc/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java
- # This line is still needed on Ubuntu 14.04
- jh_build sis-jhdf5.jar jsrc
+ # Avoids jh_build thinking that files in .svn or .pc are things it
+ # needs to compile.
+ mkdir src ; cp -r source/java/* src
+ # See README.source about this file being removed
+ rm src/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java
+ # This I cannot adequately explain:
+# perl debian/i_hate_java.perl < ch/systemsx/cisd/hdf5/hdf5lib/H5.java \
+# > src/ch/systemsx/cisd/hdf5/hdf5lib/H5.java
+ jh_build sis-jhdf5.jar src
+ cd source/c/hdf-java ; ./configure && make
+ cd source/c/jhdf5 ; ./configure && make
override_dh_auto_test:
- # Run the tests that come with the upstream source.
- export CLASSPATH=".:`readlink -f sis-jhdf5.jar`:$(CLASSPATH)" JNIPATH="`readlink -f source/c`" ; \
- cd sourceTest/java && \
- ln -s test/hdf5lib/h5ex_g_iterate.hdf . && \
- find test -name '*.java' | xargs javac && \
- java -Xmx2048M -Djava.library.path="$$JNIPATH" org.junit.runner.JUnitCore test.hdf5lib.TestAll
-
+ dh_auto_test
+ mkdir test ; cp -r source/java/* test ; cp -r sourceTest/java/* test
+ # See README.source about this file being removed
+ rm -f test/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java
+ # libmock-java does not match full API
+ rm -f test/ch/systemsx/cisd/hdf5/h5ar/DirectoryIndexUpdaterTest.java
+ jh_build sis-jhdf5-test.jar test
+ cp source/c/hdf-java/.libs/*.so* source/c/jhdf5/.libs/*.so* test/
+ java -Dnative.libpath=test -classpath /usr/share/java/junit4.jar:sis-jhdf5-test.jar:/usr/share/java/sis-base.jar:/usr/share/java/jhdf5.jar org.junit.runner.JUnitCore test.hdf5lib.TestAll
More information about the debian-med-commit
mailing list