[libreoffice] 08/08: backport Java 9 support patch
Rene Engelhard
rene at moszumanska.debian.org
Mon Aug 28 23:07:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
rene pushed a commit to branch master
in repository libreoffice.
commit 7cf986ff6c7f45bed256bbc23351a830e6bde1f5
Author: Rene Engelhard <rene at rene-engelhard.de>
Date: Tue Aug 29 01:07:01 2017 +0200
backport Java 9 support patch
---
changelog | 1 +
patches/java9.diff | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
patches/series | 1 +
3 files changed, 71 insertions(+)
diff --git a/changelog b/changelog
index cb88fce..8384f4d 100644
--- a/changelog
+++ b/changelog
@@ -5,6 +5,7 @@ libreoffice (1:5.4.1-1) unstable; urgency=medium
* debian/patches/stop-shipping-mimelnk-desktop-files.diff: as name says
(closes: #872001)
+ * debian/patches/java9.diff: backport Java 9 patch from master
* debian/rules:
- install appstream stuff into /usr/share/metainfo. sigh.
diff --git a/patches/java9.diff b/patches/java9.diff
new file mode 100644
index 0000000..9f815c3
--- /dev/null
+++ b/patches/java9.diff
@@ -0,0 +1,69 @@
+From 52ffad9bb7be800790de6d918154dbeade88cadd Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Mon, 28 Aug 2017 15:35:43 +0200
+Subject: tdf#100501: Adapt to Java 9 (at least on Linux x86-64)
+
+Checking with both jdk-9+181_linux-x64_bin.tar.gz and
+jre-9+181_linux-x64_bin.tar.gz as currently available at
+<http://jdk.java.net/9/> "JDK 9 Early-Access Builds":
+
+For one, make SunVersion::init understand <http://openjdk.java.net/jeps/223>
+"JEP 223: New Version-String Scheme" at least insofar as to accept strings like
+"9" with less than three dot-separated segments (where the missing segments are
+treated like "0").
+
+For another, at least for Linux x86-64, libjvm.so is now apparently located in a
+path without an "amd64" architecture segment, "lib/server/libjvm.so". (But
+could that also be "client"?) Other platforms may need further adjustments.
+
+Change-Id: Idcebc833472c81a1dc74dcdd481b0a37274a8713
+
+diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
+index 7f7c494..7543f49 100644
+--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
++++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx
+@@ -68,7 +68,8 @@ char const* const* SunInfo::getRuntimePaths(int * size)
+ "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so",
+ "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so",
+ "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so",
+- "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so"
++ "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so",
++ "/lib/server/libjvm.so"
+ #endif
+ };
+ *size = SAL_N_ELEMENTS(ar);
+diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+index 9646ba3..23c5983 100644
+--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
++++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+@@ -88,7 +88,7 @@ bool SunVersion::init(const char *szVersion)
+ ! (nPartPos == 0) // prevents: ".4.1", "..1", part must start with digit
+ && (
+ //separators after maintenance (1.4.1_01, 1.4.1-beta, or 1.4.1)
+- ((pCur == pEnd || *pCur == '_' || *pCur == '-') && (nPart == 2 ))
++ (pCur == pEnd || *pCur == '_' || *pCur == '-')
+ ||
+ //separators between major-minor and minor-maintenance
+ (nPart < 2 && *pCur == '.') )
+@@ -97,6 +97,8 @@ bool SunVersion::init(const char *szVersion)
+ pCur + 1 != pEnd
+ || rtl::isAsciiDigit(static_cast<unsigned char>(*pCur))) )
+ {
++ bool afterMaint = pCur != pEnd && (*pCur == '_' || *pCur == '-');
++
+ int len = pCur - pLast;
+ if (len >= 127)
+ return false;
+@@ -107,6 +109,9 @@ bool SunVersion::init(const char *szVersion)
+ pLast = pCur;
+
+ m_arVersionParts[nPart] = atoi(buf);
++
++ if (afterMaint)
++ nPart = 2;
+ nPart ++;
+ nPartPos = 0;
+ if (nPart == 3)
+--
+cgit v0.10.2
+
diff --git a/patches/series b/patches/series
index 30de6a1..98d02d2 100644
--- a/patches/series
+++ b/patches/series
@@ -31,3 +31,4 @@ cppunit-optional.diff
disable-unused-test-programs.diff
gb_SUPPRESS_TESTS.diff
stop-shipping-mimelnk-desktop-files.diff
+java9.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git
More information about the Pkg-openoffice-commits
mailing list