[Pkg-octave-commit] [octave-io] 05/08: Update patches:
Sébastien Villemot
sebastien at debian.org
Thu Feb 20 15:11:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository octave-io.
commit 6a83a52564393aef37c2635ef4c5db08ef23b097
Author: Sébastien Villemot <sebastien at debian.org>
Date: Thu Feb 20 15:37:01 2014 +0100
Update patches:
+ configure-java-classpatch.patch: no longer needed
+ uno.patch: new patch, fixes detection of UNO interface
+ low-priority-for-UNO.patch: new patch, lowers priority of UNO interface
Git-Dch: Full
---
debian/patches/autoload-yes.patch | 6 +-
debian/patches/configure-java-classpath.patch | 81 --------------
debian/patches/low-priority-for-POI.patch | 97 +++++++++++++---
debian/patches/low-priority-for-UNO.patch | 154 ++++++++++++++++++++++++++
debian/patches/series | 3 +-
debian/patches/uno.patch | 51 +++++++++
6 files changed, 293 insertions(+), 99 deletions(-)
diff --git a/debian/patches/autoload-yes.patch b/debian/patches/autoload-yes.patch
index 4f634d1..d6b2c95 100644
--- a/debian/patches/autoload-yes.patch
+++ b/debian/patches/autoload-yes.patch
@@ -6,10 +6,10 @@ Last-Update: 2013-04-17
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/DESCRIPTION
+++ b/DESCRIPTION
-@@ -9,6 +9,6 @@
+@@ -9,6 +9,6 @@ Categories: IO
Problems: Default initial Java memory probably too small, increase with java.opts (see documentation). No OXS write support. UNO support experimental.
- Depends: octave (>= 3.4.0), octave (<= 3.7.1)
- Suggested: java (>= 1.2.8), windows (>= 1.0.10)
+ Depends: octave (>= 3.7.2)
+ Suggested: windows (>= 1.2.1)
-Autoload: no
+Autoload: yes
License: GPLv3+, simplified BSD
diff --git a/debian/patches/configure-java-classpath.patch b/debian/patches/configure-java-classpath.patch
deleted file mode 100644
index e78946a..0000000
--- a/debian/patches/configure-java-classpath.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Description: Enable spreadsheet support
- This patch does 4 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
- - do not delete PKG_ADD in post_install.m, we need it!
-Author: Sébastien Villemot <sebastien at debian.org>
-Forwarded: not-needed
-Last-Update: 2012-06-09
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/post_install.m
-+++ /dev/null
-@@ -1,16 +0,0 @@
--## this function removes the PKG_ADD script from the .oct directory of the io
--## package after installation. The reason is that PKG_ADD calls chk_spreadsheet_support
--## which belongs to the io package itself. While it is ok when called from the
--## .m directory (since chk_spreadsheet_support is there), when called from the
--## .oct directory it fails since the package hasn't been loaded yet
--
--function post_install (desc)
-- file = cstrcat (desc.archprefix, filesep, octave_config_info ("canonical_host_type"),
-- "-", octave_config_info ("api_version"), filesep, "PKG_ADD");
-- [err, msg] = unlink (file);
-- if (err)
-- warning ("Unable to remove PKG_ADD: %s", msg);
-- printf ("For spreadsheet I/O you may need to manually add the required\n", ...
-- "Java class libs to the javaclasspath");
-- endif
--endfunction
---- a/PKG_ADD
-+++ b/PKG_ADD
-@@ -4,13 +4,36 @@
- 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");
-- ## Allow time for package to be fully loaded
-- pause (0.25);
-- spr_status = chk_spreadsheet_support ([ libdir filesep "java" ]);
-+ if exist (javapkg.dir, "dir") && (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/program", "dir") ...
-+ && exist ("/usr/share/libreoffice/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/program
-+ javaaddpath /usr/share/libreoffice/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
- ## Clean up
--clear javapkgind javapkg libdir spr_status pkglist ;
-\ No newline at end of file
-+clear javapkgind javapkg pkglist ;
diff --git a/debian/patches/low-priority-for-POI.patch b/debian/patches/low-priority-for-POI.patch
index 48051ab..2f33804 100644
--- a/debian/patches/low-priority-for-POI.patch
+++ b/debian/patches/low-priority-for-POI.patch
@@ -1,40 +1,109 @@
Description: Give low priority to POI interface
- It seems to not function correctly: it sees the file but no data inside.
+ It does not function correctly: it sees the file but no data inside.
Author: Sébastien Villemot <sebastien at debian.org>
+Bug-Debian: http://bugs.debian.org/739602
Forwarded: no
-Last-Update: 2013-11-16
+Last-Update: 2014-02-20
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/inst/xlsopen.m
+++ b/inst/xlsopen.m
-@@ -296,7 +296,7 @@
+@@ -318,7 +318,7 @@ function [ xls ] = xlsopen (filename, xw
## Keep track of which interface is selected
xlssupport = 0;
- ## Interface preference order is defined below: currently COM -> POI -> JXL -> OXS -> UNO -> OCT
+ ## Interface preference order is defined below: currently COM -> JXL -> OXS -> UNO -> OCT -> POI
- ## chk1, chk2 (xls file type) and chk5 (gnumeric) are conveyed depending on interface capabilities
+ ## ftype (file type) is conveyed depending on interface capabilities
- if ((! xlssupport) && xlsinterfaces.COM && (! chk5))
-@@ -304,10 +304,6 @@
+ if ((! xlssupport) && xlsinterfaces.COM && (ftype != 5))
+@@ -326,10 +326,6 @@ function [ xls ] = xlsopen (filename, xw
[ xls, xlssupport, lastintf ] = __COM_spsh_open__ (xls, xwrite, filename, xlssupport);
endif
-- if ((! xlssupport) && xlsinterfaces.POI && (chk1 || chk2) && (! chk5))
-- [ xls, xlssupport, lastintf ] = __POI_spsh_open__ (xls, xwrite, filename, xlssupport, chk1, chk2, xlsinterfaces);
+- if ((! xlssupport) && xlsinterfaces.POI && (ftype <= 2))
+- [ xls, xlssupport, lastintf ] = __POI_spsh_open__ (xls, xwrite, filename, xlssupport, ftype, xlsinterfaces);
- endif
-
- if ((! xlssupport) && xlsinterfaces.JXL && chk1 && (! chk5))
- [ xls, xlssupport, lastintf ] = __JXL_spsh_open__ (xls, xwrite, filename, xlssupport, chk1);
+ if ((! xlssupport) && xlsinterfaces.JXL && ftype == 1)
+ [ xls, xlssupport, lastintf ] = __JXL_spsh_open__ (xls, xwrite, filename, xlssupport, ftype);
endif
-@@ -324,6 +320,10 @@
- [ xls, xlssupport, lastintf ] = __OCT_spsh_open__ (xls, xwrite, filename, xlssupport, chk2, 0, chk5);
+@@ -351,6 +347,10 @@ function [ xls ] = xlsopen (filename, xw
+ [ xls, xlssupport, lastintf ] = __OCT_spsh_open__ (xls, xwrite, filename, xlssupport, ftype);
endif
-+ if ((! xlssupport) && xlsinterfaces.POI && (chk1 || chk2) && (! chk5))
-+ [ xls, xlssupport, lastintf ] = __POI_spsh_open__ (xls, xwrite, filename, xlssupport, chk1, chk2, xlsinterfaces);
++ if ((! xlssupport) && xlsinterfaces.POI && (ftype <= 2))
++ [ xls, xlssupport, lastintf ] = __POI_spsh_open__ (xls, xwrite, filename, xlssupport, ftype, xlsinterfaces);
+ endif
+
## if
## ---- other interfaces
## endif
+--- a/inst/private/getxlsinterfaces.m
++++ b/inst/private/getxlsinterfaces.m
+@@ -161,32 +161,6 @@ function [xlsinterfaces] = getxlsinterfa
+ endif
+ endif
+
+- ## Try Java & Apache POI
+- if (isempty (xlsinterfaces.POI))
+- xlsinterfaces.POI = 0;
+- ## Check basic .xls (BIFF8) support
+- entries = {{"apache-poi.", "poi-3"}, {"apache-poi-ooxml.", "poi-ooxml-3"}};
+- ## Only under *nix we might use brute force: e.g., strfind (classname, classpath);
+- ## under Windows we need the following more subtle, platform-independent approach:
+- if (chk_jar_entries (jcp, entries) >= numel (entries))
+- xlsinterfaces.POI = 1;
+- printf ("POI");
+- endif
+- ## Check OOXML support
+- entries = {{"xbean", "xmlbean"}, {"apache-poi-ooxml-schemas", "poi-ooxml-schemas"}, "dom4j"};
+- if (chk_jar_entries (jcp, entries) >= numel (entries))
+- printf (" (& OOXML)");
+- endif
+- if (xlsinterfaces.POI)
+- if (deflt)
+- printf ("; ");
+- else
+- printf ("*; ");
+- deflt = 1;
+- endif
+- endif
+- endif
+-
+ ## Try Java & JExcelAPI
+ if (isempty (xlsinterfaces.JXL))
+ xlsinterfaces.JXL = 0;
+@@ -259,6 +233,32 @@ function [xlsinterfaces] = getxlsinterfa
+ endif
+ endif
+
++ ## Try Java & Apache POI
++ if (isempty (xlsinterfaces.POI))
++ xlsinterfaces.POI = 0;
++ ## Check basic .xls (BIFF8) support
++ entries = {{"apache-poi.", "poi-3"}, {"apache-poi-ooxml.", "poi-ooxml-3"}};
++ ## Only under *nix we might use brute force: e.g., strfind (classname, classpath);
++ ## under Windows we need the following more subtle, platform-independent approach:
++ if (chk_jar_entries (jcp, entries) >= numel (entries))
++ xlsinterfaces.POI = 1;
++ printf ("POI");
++ endif
++ ## Check OOXML support
++ entries = {{"xbean", "xmlbean"}, {"apache-poi-ooxml-schemas", "poi-ooxml-schemas"}, "dom4j"};
++ if (chk_jar_entries (jcp, entries) >= numel (entries))
++ printf (" (& OOXML)");
++ endif
++ if (xlsinterfaces.POI)
++ if (deflt)
++ printf ("; ");
++ else
++ printf ("*; ");
++ deflt = 1;
++ endif
++ endif
++ endif
++
+ ## ---- Other interfaces here, similar to the ones above
+
+ if (deflt)
diff --git a/debian/patches/low-priority-for-UNO.patch b/debian/patches/low-priority-for-UNO.patch
new file mode 100644
index 0000000..0791993
--- /dev/null
+++ b/debian/patches/low-priority-for-UNO.patch
@@ -0,0 +1,154 @@
+Description: Give low priority to UNO interface (below OCT)
+ It does not work well in chroots, and is experimental.
+Author: Sébastien Villemot <sebastien at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-02-20
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/inst/odsopen.m
++++ b/inst/odsopen.m
+@@ -285,6 +285,12 @@ function [ ods ] = odsopen (filename, rw
+ __JOD_spsh_open__ (ods, rw, filename, odssupport);
+ endif
+
++ if (odsinterfaces.OCT && ! odssupport && ...
++ (ftype == 2 || ftype == 3 || ftype == 5))
++ [ ods, odssupport, lastintf ] = ...
++ __OCT_spsh_open__ (ods, rw, filename, odssupport, ftype);
++ endif
++
+ if (odsinterfaces.UNO && ! odssupport && ftype < 5)
+ ## Warn for LO / OOo stubbornness
+ if (ftype == 0 || ftype == 5 || ftype == 6)
+@@ -294,12 +300,6 @@ function [ ods ] = odsopen (filename, rw
+ __UNO_spsh_open__ (ods, rw, filename, odssupport);
+ endif
+
+- if (odsinterfaces.OCT && ! odssupport && ...
+- (ftype == 2 || ftype == 3 || ftype == 5))
+- [ ods, odssupport, lastintf ] = ...
+- __OCT_spsh_open__ (ods, rw, filename, odssupport, ftype);
+- endif
+-
+ ## if
+ ## <other interfaces here>
+
+--- a/inst/private/getodsinterfaces.m
++++ b/inst/private/getodsinterfaces.m
+@@ -188,6 +188,19 @@ function [odsinterfaces] = getodsinterfa
+ endif
+ endif
+
++ ## Native Octave
++ if (isempty (odsinterfaces.OCT))
++ ## Nothing to check, always supported
++ odsinterfaces.OCT = 1;
++ printf ("OCT");
++ if (deflt)
++ printf ("; ");
++ else
++ printf ("*; ");
++ deflt = 1;
++ endif
++ endif
++
+ ## Try Java & UNO
+ if (isempty (odsinterfaces.UNO))
+ odsinterfaces.UNO = 0;
+@@ -208,19 +221,6 @@ function [odsinterfaces] = getodsinterfa
+ endif
+ endif
+
+- ## Native Octave
+- if (isempty (odsinterfaces.OCT))
+- ## Nothing to check, always supported
+- odsinterfaces.OCT = 1;
+- printf ("OCT");
+- if (deflt)
+- printf ("; ");
+- else
+- printf ("*; ");
+- deflt = 1;
+- endif
+- endif
+-
+ ## ---- Other interfaces here, similar to the ones above
+
+ if (deflt)
+--- a/inst/private/getxlsinterfaces.m
++++ b/inst/private/getxlsinterfaces.m
+@@ -202,6 +202,19 @@ function [xlsinterfaces] = getxlsinterfa
+ endif
+ endif
+
++ ## Native Octave
++ if (isempty (xlsinterfaces.OCT))
++ ## Nothing to check, always supported
++ xlsinterfaces.OCT = 1;
++ printf ("OCT");
++ if (deflt)
++ printf ("; ");
++ else
++ printf ("*; ");
++ deflt = 1;
++ endif
++ endif
++
+ ## Try Java & UNO
+ if (isempty (xlsinterfaces.UNO))
+ xlsinterfaces.UNO = 0;
+@@ -220,19 +233,6 @@ function [xlsinterfaces] = getxlsinterfa
+ endif
+ endif
+
+- ## Native Octave
+- if (isempty (xlsinterfaces.OCT))
+- ## Nothing to check, always supported
+- xlsinterfaces.OCT = 1;
+- printf ("OCT");
+- if (deflt)
+- printf ("; ");
+- else
+- printf ("*; ");
+- deflt = 1;
+- endif
+- endif
+-
+ ## Try Java & Apache POI
+ if (isempty (xlsinterfaces.POI))
+ xlsinterfaces.POI = 0;
+--- a/inst/xlsopen.m
++++ b/inst/xlsopen.m
+@@ -318,7 +318,7 @@ function [ xls ] = xlsopen (filename, xw
+ ## Keep track of which interface is selected
+ xlssupport = 0;
+
+- ## Interface preference order is defined below: currently COM -> JXL -> OXS -> UNO -> OCT -> POI
++ ## Interface preference order is defined below: currently COM -> JXL -> OXS -> OCT -> UNO -> POI
+ ## ftype (file type) is conveyed depending on interface capabilities
+
+ if ((! xlssupport) && xlsinterfaces.COM && (ftype != 5))
+@@ -334,6 +334,11 @@ function [ xls ] = xlsopen (filename, xw
+ [ xls, xlssupport, lastintf ] = __OXS_spsh_open__ (xls, xwrite, filename, xlssupport, ftype);
+ endif
+
++ if ((! xlssupport) && xlsinterfaces.OCT && ...
++ (ftype == 2 || ftype == 3 || ftype == 5))
++ [ xls, xlssupport, lastintf ] = __OCT_spsh_open__ (xls, xwrite, filename, xlssupport, ftype);
++ endif
++
+ if ((! xlssupport) && xlsinterfaces.UNO && (ftype != 5))
+ ## Warn for LO / OOo stubbornness
+ if (ftype == 0 || ftype == 5 || ftype == 6)
+@@ -342,11 +347,6 @@ function [ xls ] = xlsopen (filename, xw
+ [ xls, xlssupport, lastintf ] = __UNO_spsh_open__ (xls, xwrite, filename, xlssupport);
+ endif
+
+- if ((! xlssupport) && xlsinterfaces.OCT && ...
+- (ftype == 2 || ftype == 3 || ftype == 5))
+- [ xls, xlssupport, lastintf ] = __OCT_spsh_open__ (xls, xwrite, filename, xlssupport, ftype);
+- endif
+-
+ if ((! xlssupport) && xlsinterfaces.POI && (ftype <= 2))
+ [ xls, xlssupport, lastintf ] = __POI_spsh_open__ (xls, xwrite, filename, xlssupport, ftype, xlsinterfaces);
+ endif
diff --git a/debian/patches/series b/debian/patches/series
index b4b9abc..126b715 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
-configure-java-classpath.patch
no-flexml.patch
autoload-yes.patch
low-priority-for-POI.patch
+uno.patch
+low-priority-for-UNO.patch
diff --git a/debian/patches/uno.patch b/debian/patches/uno.patch
new file mode 100644
index 0000000..664d7d7
--- /dev/null
+++ b/debian/patches/uno.patch
@@ -0,0 +1,51 @@
+--- a/PKG_ADD
++++ b/PKG_ADD
+@@ -20,28 +20,20 @@ if (octave_config_info ("features").JAVA
+ libdir = ".";
+ endif
+
+- ## Find LibreOffice or OpenOffice.org
+- ooopath = '';
+- ii = 0;
+- ## Possible locations for OOo or LO.
+- bnam = {"C:/Program Files (X86)", ...
+- "C:/Program Files", ...
+- "C:/Programs", ...
+- "/opt", ...
+- "/usr/lib"};
+- while (isempty (ooopath) && ii < numel (bnam))
+- ooopath = glob ([ bnam{++ii} filesep "LibreOffice*"]);
+- endwhile
+- while (isempty (ooopath) && ii < numel (bnam))
+- ooopath = glob ([ bnam{++ii} filesep "OpenOffice.org*"]);
+- endwhile
+- while (isempty (ooopath) && ii < numel (bnam))
+- ooopath = glob ([ bnam{++ii} filesep "ooo*"]);
+- endwhile
+- if (! isempty (ooopath))
+- ooopath = ooopath{:};
+- else
+- ooopath = '';
++ ## Find LibreOffice
++ ooopath = '/usr/share/libreoffice';
++ if exist ("/usr/share/libreoffice/program", "dir") ...
++ && exist ("/usr/share/libreoffice/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/program
++ javaaddpath /usr/share/libreoffice/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
+
+ ## One big try-catch to circumvent possible problems on Linux
+@@ -73,4 +65,4 @@ if (octave_config_info ("features").JAVA
+ end_try_catch
+ endif
+ ## Clean up
+-clear libdir spr_status userdir homedir bnam ooopath ii;
++clear libdir spr_status userdir homedir ooopath;
--
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-io.git
More information about the Pkg-octave-commit
mailing list