Pierre Gruet pushed to branch master at Debian Med / libsis-jhdf5-java


Commits:
4d1d2783 by Pierre Gruet at 2020-05-07T23:19:04+02:00
Changing the name of generated .so to avoid name collisions

- - - - -


3 changed files:

- debian/changelog
- debian/patches/loading_jni_in_java_file.patch
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+libsis-jhdf5-java (19.04.0+dfsg-2) UNRELEASED; urgency=medium
+
+  * Changing the name of the .so file in libsis-jhdf5-jni (Closes: #959955)
+
+ -- Pierre Gruet <[email protected]>  Thu, 07 May 2020 21:46:07 +0200
+
 libsis-jhdf5-java (19.04.0+dfsg-1) unstable; urgency=medium
 
   [ Andreas Tille ]


=====================================
debian/patches/loading_jni_in_java_file.patch
=====================================
@@ -1,6 +1,8 @@
 Description: adding loading of jni part in Java code
+ In two files, the library has to be loaded by calling System.loadLibrary.
+ In two other ones, the library call has to be changed.
 Author: Pierre Gruet <[email protected]>
-Last-Update: 2020-05-03
+Last-Update: 2020-05-07
 
 --- a/source/java/ch/systemsx/cisd/hdf5/io/HDF5DataSetRandomAccessFile.java
 +++ b/source/java/ch/systemsx/cisd/hdf5/io/HDF5DataSetRandomAccessFile.java
@@ -8,7 +10,7 @@ Last-Update: 2020-05-03
      {
          this(createHDF5ReaderOrWriter(hdf5File, readOnly), dataSetPath, 
creationStorageFeature,
                  size, opaqueTagOrNull, true);
-+        System.loadLibrary("jhdf5");
++        System.loadLibrary("sis-jhdf5");
      }
  
      private static IHDF5Reader createHDF5ReaderOrWriter(File hdf5File, 
boolean readOnly)
@@ -16,7 +18,29 @@ Last-Update: 2020-05-03
              HDF5GenericStorageFeatures creationStorageFeature, int size, 
String opaqueTagOrNull,
              boolean closeReaderOnCloseFile) throws IOExceptionUnchecked
      {
-+        System.loadLibrary("jhdf5");
++        System.loadLibrary("sis-jhdf5");
          this.closeReaderOnCloseFile = closeReaderOnCloseFile;
          final boolean readOnly = (reader instanceof IHDF5Writer) == false;
          try
+--- a/source/java/ch/systemsx/cisd/hdf5/BuildAndEnvironmentInfo.java
++++ b/source/java/ch/systemsx/cisd/hdf5/BuildAndEnvironmentInfo.java
+@@ -26,7 +26,7 @@
+  */
+ public class BuildAndEnvironmentInfo extends AbstractBuildAndEnvironmentInfo
+ {
+-    private final static String BASE = "jhdf5";
++    private final static String BASE = "sis-jhdf5";
+     
+     public final static BuildAndEnvironmentInfo INSTANCE = new 
BuildAndEnvironmentInfo();
+     
+--- a/source/java/hdf/hdf5lib/H5.java
++++ b/source/java/hdf/hdf5lib/H5.java
+@@ -235,7 +235,7 @@
+         {
+             return;
+         }
+-        if (NativeLibraryUtilities.loadNativeLibrary("jhdf5") == false)
++        if (NativeLibraryUtilities.loadNativeLibrary("sis-jhdf5") == false)
+         {
+             throw new UnsupportedOperationException("No suitable HDF5 native 
library found for this platform.");
+         }


=====================================
debian/rules
=====================================
@@ -20,7 +20,7 @@ override_dh_auto_clean:
        -rm -rf debian/libsis-jhdf5-java/ debian/libsis-jhdf5-jni/ debian/tmp/ 
debian/.debhelper/
        -rm debian/*debhelper* debian/files debian/*.substvars
        -rm -rf targets/ test-output/
-       -rm source/c/libjhdf5.so
+       -rm source/c/libsis-jhdf5.so
 
 override_dh_auto_build:
        dh_auto_build
@@ -32,7 +32,7 @@ override_dh_auto_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 
\
-               *.c jni/*.c -o libjhdf5.so -lz -lhdf5_serial
+               *.c jni/*.c -o libsis-jhdf5.so -lz -lhdf5_serial
 
 override_jh_installlibs:
        # The jar that is build is placed in targets/gradle/libs, and its name



View it on GitLab: 
https://salsa.debian.org/med-team/libsis-jhdf5-java/-/commit/4d1d27836208c0a4a36a18df2826ffbdd95861c1

-- 
View it on GitLab: 
https://salsa.debian.org/med-team/libsis-jhdf5-java/-/commit/4d1d27836208c0a4a36a18df2826ffbdd95861c1
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to