[Pkg-octave-commit] [SCM] Debian packaging for octave-io branch, master, updated. 5e4844d1ec17c151a696f406a800b673e8b29302

Sébastien Villemot sebastien.villemot at ens.fr
Sat Mar 17 14:19:13 UTC 2012


The following commit has been merged in the master branch:
commit c6e713ff6e8ef39672769a560963cda53dbf8d84
Author: Sébastien Villemot <sebastien.villemot at ens.fr>
Date:   Sat Mar 17 15:06:29 2012 +0100

    debian/patches/configure-java-classpath.patch: new patch

diff --git a/debian/patches/configure-java-classpath.patch b/debian/patches/configure-java-classpath.patch
new file mode 100644
index 0000000..23e6554
--- /dev/null
+++ b/debian/patches/configure-java-classpath.patch
@@ -0,0 +1,55 @@
+Description: Enable spreadsheet support
+ This patch does 3 things:
+ - make sure the java package is loaded if available (the field "loaded" does
+   not seem to be very reliable, so force package loading if autoload is
+   enabled)
+ - add UNO and JXL interfaces the java classpath if available (auto-detection
+   by chk_spreadsheet_support does not work well)
+ - let chk_spreadsheet_support auto-detect other JARs from /usr/share/java and
+   /usr/local/share/java in case the user installed them manually
+Author: Sébastien Villemot <sebastien.villemot at ens.fr>
+Forwarded: not-needed
+Last-Update: 2012-03-17
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/PKG_ADD
++++ b/PKG_ADD
+@@ -4,9 +4,34 @@
+ javapkgind = find (cellfun(@(x) strcmp(x.name, "java"), pkglist), 1, "first");
+ if ~isempty (javapkgind)
+   javapkg = pkglist{javapkgind};
+-  if javapkg.loaded
+-    # Assume jar files are in /lib/java and let chk_spreadsheet_support sort it out
+-    libdir = octave_config_info("libdir");
+-    spr_status = chk_spreadsheet_support ([libdir "/java"]);
++  if javapkg.autoload || javapkg.loaded
++      ## Force loading of java package if autoload=yes but loaded=no
++      if ~javapkg.loaded
++          pkg load java
++      endif
++
++      ## Add UNO support if present
++      if exist ("/usr/share/libreoffice/basis-link/program", "dir") ...
++              && exist ("/usr/share/libreoffice/basis-link/program/classes/unoil.jar", "file") ...
++              && exist ("/usr/share/java/jurt.jar", "file") ...
++              && exist ("/usr/share/java/juh.jar", "file") ...
++              && exist ("/usr/share/java/unoloader.jar", "file") ...
++              && exist ("/usr/share/java/ridl.jar", "file")
++          javaaddpath /usr/share/libreoffice/basis-link/program
++          javaaddpath /usr/share/libreoffice/basis-link/program/classes/unoil.jar
++          javaaddpath /usr/share/java/jurt.jar
++          javaaddpath /usr/share/java/juh.jar
++          javaaddpath /usr/share/java/unoloader.jar
++          javaaddpath /usr/share/java/ridl.jar
++      endif
++
++      ## Add JXL support if present
++      if exist ("/usr/share/java/jxl.jar", "file")
++          javaaddpath /usr/share/java/jxl.jar
++      endif
++
++      ## Auto-detect other interfaces possibly installed
++      chk_spreadsheet_support ("/usr/share/java");
++      chk_spreadsheet_support ("/usr/local/share/java");
+   endif
+ endif
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..caef8ff
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+configure-java-classpath.patch

-- 
Debian packaging for octave-io



More information about the Pkg-octave-commit mailing list