[packages/libreoffice] fix jre detection when using single jvm path
atler
atler at pld-linux.org
Sat Mar 11 22:44:39 CET 2023
commit f7139b9608c3481282abd77e16e6c52dcf5c9369
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Mar 11 22:43:37 2023 +0100
fix jre detection when using single jvm path
jvm-path.patch | 14 ++++++++++++++
libreoffice.spec | 2 ++
2 files changed, 16 insertions(+)
---
diff --git a/libreoffice.spec b/libreoffice.spec
index 694a3a3..260d54e 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -109,6 +109,7 @@ Source32: https://dev-www.libreoffice.org/src/skia-m103-b301ff025004c9cd82816c86
Source33: https://dev-www.libreoffice.org/src/libcmis-0.5.2.tar.xz
# Source33-md5: 3653bc54e1bcd17ae09a1a7086daa38b
Patch0: disable-failing-test.patch
+Patch1: jvm-path.patch
URL: https://www.documentfoundation.org/
BuildRequires: /usr/bin/getopt
%{?with_firebird:BuildRequires: Firebird-devel >= 3.0.0.0}
@@ -2941,6 +2942,7 @@ oraz narzędzie ui-previewer do sprawdzania wyglądu okien dialogowych.
%prep
%setup -q -a1 -a2 -a3
%patch0 -p1
+%patch1 -p1
for dir in *-%{version}; do
[ -f $dir/ChangeLog ] && %{__mv} $dir/ChangeLog ChangeLog-$dir
diff --git a/jvm-path.patch b/jvm-path.patch
new file mode 100644
index 0000000..a4c1d26
--- /dev/null
+++ b/jvm-path.patch
@@ -0,0 +1,14 @@
+--- libreoffice-7.5.1.2/jvmfwk/plugins/sunmajor/pluginlib/util.cxx.orig 2023-02-22 20:52:27.000000000 +0100
++++ libreoffice-7.5.1.2/jvmfwk/plugins/sunmajor/pluginlib/util.cxx 2023-03-11 21:48:38.572214374 +0100
+@@ -460,6 +460,11 @@
+ if(sHomeProperty.equals(sKey))
+ {
+ sVal = homePath + "/jre";
++ DirectoryItem jreDirItem;
++ if (DirectoryItem::get(homePath + "/jre", jreDirItem) == File::E_None)
++ sVal = homePath + "/jre";
++ else
++ sVal = homePath;
+ }
+ #endif
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libreoffice.git/commitdiff/f7139b9608c3481282abd77e16e6c52dcf5c9369
More information about the pld-cvs-commit
mailing list