[med-svn] r19936 - in trunk/packages/libsis-jhdf5-java/trunk/debian: . patches test
Timothy Booth
tbooth-guest at moszumanska.debian.org
Fri Aug 14 14:44:34 UTC 2015
Author: tbooth-guest
Date: 2015-08-14 14:44:34 +0000 (Fri, 14 Aug 2015)
New Revision: 19936
Added:
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/rename_jni_library.patch
Removed:
trunk/packages/libsis-jhdf5-java/trunk/debian/i_hate_java.perl
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch
Modified:
trunk/packages/libsis-jhdf5-java/trunk/debian/README.source
trunk/packages/libsis-jhdf5-java/trunk/debian/changelog
trunk/packages/libsis-jhdf5-java/trunk/debian/control
trunk/packages/libsis-jhdf5-java/trunk/debian/copyright
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_dodgy_cast.patch
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/remove_ch_rinn_imports.patch
trunk/packages/libsis-jhdf5-java/trunk/debian/patches/series
trunk/packages/libsis-jhdf5-java/trunk/debian/rules
trunk/packages/libsis-jhdf5-java/trunk/debian/test/ReadWriteTest.java
trunk/packages/libsis-jhdf5-java/trunk/debian/watch
Log:
This is much better. Now building from the full source.
This should work, apart from running the upstream tests which I think involves
using the gradle test runner.
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/README.source
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/README.source 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/README.source 2015-08-14 14:44:34 UTC (rev 19936)
@@ -11,28 +11,24 @@
So, trying to package sis-jhdf5:
-wget
-'https://wiki-bsse.ethz.ch/download/attachments/26609237/sis-jhdf5-14.12.1-r33502.zip?version=1&modificationDate=1424599261225&api=v2'
-# The source is in a zip within the zip...
-unzip sis-*
-mkdir sis-jhdf5-14.12.1
-cd !$
-unzip ../sis-jhdf5/src/sis-jhdf5-src.zip
+The 'source' distribution' linked on the web page only have the Java source.
+The real source you need is in SVN:
+svn co http://svncisd.ethz.ch/repos/cisd/jhdf5/trunk/
+
For compilation to succeed, we also need sis-base, not to be confused
with the entirely separate project at sis.apache.org!
-wget
-http://bs-svn01.ethz.ch/repos/cisd/libraries/trunk/sis-base/sis-base-src.zip
+http://svncisd.ethz.ch/repos/cisd/base/trunk/
+See the libsis-base-java package for this.
The code also depends on their own args4j library, but only for the CLI
under ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java which we can
-simply leave out just now. I delete it from src/ before compiling and
-also leave out the h5ar.sh script which invokes it. If args4j is packaged
+simply leave out just now. I delete it from jsrc/ before compiling and
+also leave out the h5ar.sh script which invokes it. Once args4j is packaged
this can be reinstated and the h5ar command can be added to /usr/bin
( http://bs-svn01.ethz.ch/repos/cisd/libraries/trunk/cisd-args4j/ )
-
So - can we exclude the ncsa.hdf.hdf5lib.* classes from sis-jhdf5 and
compile it against the existing classes in /usr/share/java/jhdf5.jar?
My conclusion is not, because...
@@ -51,9 +47,7 @@
to compile the latest FastQC:
libsis-base-java (should be simple)
-libsis-jhdf5-java (depends on libsis-base-java + existing libjhdf5-jni)
+libsis-jhdf5-java (depends on libsis-base-java + libhdf5, but ignores
+ existing libjhdf5-jni package)
-- Tim Booth on 12th Aug 2015
-
-A further note - the dependency on libjhdf5-jni (>> 2.9-3) is there because
-2.9-3 on Trusty is buggy and fails "ldd -r /usr/lib/jni/libjhdf5.so".
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/changelog
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/changelog 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/changelog 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,6 +1,3 @@
-This build is totally broken. If you attempt to make it work without reading
-the README.source you are wasting your time.
-
libsis-jhdf5-java (14.12.1-0biolinux1) trusty; urgency=medium
* Build for Trusty
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/control
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/control 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/control 2015-08-14 14:44:34 UTC (rev 19936)
@@ -6,7 +6,8 @@
libcommons-lang-java,
libcommons-io-java,
libsis-base-java,
- libjhdf5-jni ( >> 2.9-3 )
+ libhdf5-dev (>= 1.8.13),
+ openjdk-7-jdk
Standards-Version: 3.9.5
Package: libsis-base-java
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/copyright
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/copyright 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/copyright 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: JHDF5 (HDF5 for Java)
Upstream-Contact: https://wiki-bsse.ethz.ch/pages/viewpage.action?pageId=26609113
-Source: https://wiki-bsse.ethz.ch/display/JHDF5/Download+Page
+Source: http://svncisd.ethz.ch/repos/cisd/jhdf5/tags/release/
Files: ch/*
Copyright: Copyright (C) Copyright 2007-2015 ETH Zuerich, CISD
Deleted: trunk/packages/libsis-jhdf5-java/trunk/debian/i_hate_java.perl
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/i_hate_java.perl 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/i_hate_java.perl 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,31 +0,0 @@
-#!/usr/bin/perl
-#debian/i_hate_java.perl - created Wed Aug 12 18:11:25 BST 2015
-
-use strict;
-use warnings;
-
-while (<>)
-{
- if(/^\s*public static native ([a-z]* .*)/)
- {
- until(/;\s*$/) {
- chomp();
- s/$/' '.<>/e;
- }
- /^(\s*public static) native ([a-z]* (\w+)\((.*)\)(.*));/
- or die "Failed match on $_";
-
- my $firstbit = "$1 $2";
- my $func = "ncsa.hdf.hdf5lib.H5.$3";
-
- my @args = map { (split())[-1] } split(/,/, $4);
-
- my $secondbit = "{ return $func(" . join(',', at args) . "); }";
-
- print "$firstbit $secondbit\n";
- }
- else
- {
- print $_;
- }
-}
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_dodgy_cast.patch
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_dodgy_cast.patch 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_dodgy_cast.patch 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,7 +1,7 @@
This is why I don't program Java any more. Templated classes are nasty, nasty, nasty.
---- a/ch/systemsx/cisd/hdf5/HDF5CompoundMemberByteifyerEnumArrayFactory.java
-+++ b/ch/systemsx/cisd/hdf5/HDF5CompoundMemberByteifyerEnumArrayFactory.java
+--- a/source/java/ch/systemsx/cisd/hdf5/HDF5CompoundMemberByteifyerEnumArrayFactory.java
++++ b/source/java/ch/systemsx/cisd/hdf5/HDF5CompoundMemberByteifyerEnumArrayFactory.java
@@ -438,7 +438,7 @@
{ "unchecked", "rawtypes" })
private static Enum<?> getValue(Class<? extends Enum<?>> enumClass, String value)
Deleted: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/fix_link_error.patch 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,52 +0,0 @@
---- a/ch/systemsx/cisd/hdf5/hdf5lib/H5.java
-+++ b/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/ncsa/hdf/hdf5lib/H5.java
-+++ b/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-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/remove_ch_rinn_imports.patch 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,6 +1,6 @@
I can't find a definition of this decorator, and we hopefully don't need it at all.
---- a/ch/systemsx/cisd/hdf5/BitSetConversionUtils.java
+--- a/source/java/ch/systemsx/cisd/hdf5/BitSetConversionUtils.java
+++ b/ch/systemsx/cisd/hdf5/BitSetConversionUtils.java
@@ -23,7 +23,6 @@
@@ -18,7 +18,7 @@
static BitSet fromStorageFormGeneric(final long[] serializedWordArray, int start, int length)
{
final BitSet result = new BitSet();
---- a/ch/systemsx/cisd/hdf5/HDF5Utils.java
+--- a/source/java/ch/systemsx/cisd/hdf5/HDF5Utils.java
+++ b/ch/systemsx/cisd/hdf5/HDF5Utils.java
@@ -22,7 +22,6 @@
Added: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/rename_jni_library.patch
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/rename_jni_library.patch (rev 0)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/rename_jni_library.patch 2015-08-14 14:44:34 UTC (rev 19936)
@@ -0,0 +1,14 @@
+There is already a libjhdf5.so on the system. This is an incompatible fork.
+Since the .so is tightly bound to the Java library there seems no harm in simply
+renaming this one; nothing outside this package should want to link to it.
+--- a/source/java/ch/systemsx/cisd/hdf5/hdf5lib/H5.java
++++ b/source/java/ch/systemsx/cisd/hdf5/hdf5lib/H5.java
+@@ -36,7 +36,7 @@
+
+ static
+ {
+- if (NativeLibraryUtilities.loadNativeLibrary("jhdf5") == false)
++ if (NativeLibraryUtilities.loadNativeLibrary("sis-jhdf5") == false)
+ {
+ throw new UnsupportedOperationException("No suitable HDF5 native library found for this platform.");
+ }
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/series
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/series 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/series 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,3 +1,3 @@
fix_dodgy_cast.patch
remove_ch_rinn_imports.patch
-fix_link_error.patch
+rename_jni_library.patch
Deleted: trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/patches/sort_exceptions.patch 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,364 +0,0 @@
-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/ch/systemsx/cisd/hdf5/HDF5Utils.java 2015-08-10 17:27:59.874762864 +0100
-+++ sis-jhdf5-14.12.1/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-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/rules 2015-08-14 14:44:34 UTC (rev 19936)
@@ -9,16 +9,26 @@
dh $@ --with javahelper
override_dh_auto_clean:
- rm -rf src lib build *.jar
+ rm -rf jsrc lib build *.jar
+ rm -rf source/c/*.log
+ cd debian/test && rm -f *.h5 *.class
#find test -name '*.class' -delete
override_dh_auto_build:
- # Avoids jh_build thinking that files in .svn or .pc are things it
- # needs to compile.
- mkdir src ; cp -r ch ncsa 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
+ # C build
+ cd source/c && \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -shared -fPIC -Wl,--exclude-libs,ALL \
+ -I/usr/lib/jvm/default-java/include/ \
+ jhdf5/*.c hdf-java/*.c -o libsis-jhdf5.so -lz -lhdf5
+ # 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
+
+override_dh_auto_test:
+ # Try our little test snippet.
+ export CLASSPATH=".:`readlink -f sis-jhdf5.jar`" JNIPATH="`readlink -f source/c`" ; \
+ cd debian/test && javac *.java && \
+ java -Djava.library.path="$$JNIPATH" ReadWriteTest
+
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/test/ReadWriteTest.java
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/test/ReadWriteTest.java 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/test/ReadWriteTest.java 2015-08-14 14:44:34 UTC (rev 19936)
@@ -12,8 +12,6 @@
public static void main(String[] args) {
- System.loadLibrary("jhdf5");
-
//Make an array
double[] mydata = new double[1000];
for (int nn=0 ; nn < mydata.length ; nn++) {
Modified: trunk/packages/libsis-jhdf5-java/trunk/debian/watch
===================================================================
--- trunk/packages/libsis-jhdf5-java/trunk/debian/watch 2015-08-13 09:34:09 UTC (rev 19935)
+++ trunk/packages/libsis-jhdf5-java/trunk/debian/watch 2015-08-14 14:44:34 UTC (rev 19936)
@@ -1,6 +1,6 @@
# The source is packed into a .zip within the binary distribution.
#
# TODO - make a get_orig_source script to extract it, or work out how to
-# pull it from the SVN.
+# pull it from the SVN via HTTP.
-# see: https://wiki-bsse.ethz.ch/display/JHDF5/Download+Page
+# see: http://svncisd.ethz.ch/repos/cisd/jhdf5/tags/release/
More information about the debian-med-commit
mailing list