libreoffice/openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch

82 lines
2.6 KiB
Diff
Raw Normal View History

2015-10-19 10:20:36 +00:00
From 43b718b8687d087cd6cc28991efb3b7f507e6e3a Mon Sep 17 00:00:00 2001
2014-02-03 20:57:23 +00:00
From: David Tardon <dtardon@redhat.com>
Date: Mon, 3 Feb 2014 20:24:50 +0100
Subject: [PATCH] i#86080 unopkg bodge
---
2015-06-23 10:00:39 +00:00
desktop/scripts/unopkg.sh | 53 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 51 insertions(+), 2 deletions(-)
2014-02-03 20:57:23 +00:00
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh
2015-10-19 10:20:36 +00:00
index 18d0a73..6bab04f 100755
2014-02-03 20:57:23 +00:00
--- a/desktop/scripts/unopkg.sh
+++ b/desktop/scripts/unopkg.sh
2015-10-19 10:20:36 +00:00
@@ -61,6 +61,53 @@ do
esac
done
2010-10-09 07:39:30 +00:00
2015-06-23 10:00:39 +00:00
+if [ $isnotuser -eq 1 ]; then
+ echo $@ | grep -q env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY
+ if [ $? -ne 0 ]; then
+ set -- $@ '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ fi
+ echo $@ | grep -q env:UNO_JAVA_JFW_INSTALL_DATA
+ if [ $? -ne 0 -a -w $sd_prog/../share/config/javasettingsunopkginstall.xml ]; then
+ set -- $@ '-env:UNO_JAVA_JFW_INSTALL_DATA=$$ORIGIN/../share/config/javasettingsunopkginstall.xml'
+ fi
+ echo $@ | grep -q env:UserInstallation
+ if [ $? -ne 0 ]; then
+ INSTDIR=`/bin/mktemp -d --tmpdir unoinstall.XXXXXX`
+ if [ $? -ne 0 ]; then
+ echo "Could not create tmp dir" >&2
+ exit 1
+ fi
+ set -- $@ '-env:UserInstallation=file://'$INSTDIR
+ fi
+fi
+
2011-04-15 15:23:41 +00:00
+isnotuser=0
2010-10-09 07:39:30 +00:00
+for arg in $@
+do
2014-02-20 11:38:16 +00:00
+if [ "$arg" = "--shared" -o "$arg" = "--bundled" ]; then
2011-04-15 15:23:41 +00:00
+ isnotuser=1
2010-10-09 07:39:30 +00:00
+fi
+done
2011-04-15 15:23:41 +00:00
+if [ $isnotuser -eq 1 ]; then
2010-10-09 07:39:30 +00:00
+ echo $@ | grep -q env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY
+ if [ $? -ne 0 ]; then
+ set -- $@ '-env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1'
+ fi
+ echo $@ | grep -q env:UNO_JAVA_JFW_INSTALL_DATA
+ if [ $? -ne 0 -a -w $sd_prog/../share/config/javasettingsunopkginstall.xml ]; then
+ set -- $@ '-env:UNO_JAVA_JFW_INSTALL_DATA=$$ORIGIN/../share/config/javasettingsunopkginstall.xml'
+ fi
+ echo $@ | grep -q env:UserInstallation
+ if [ $? -ne 0 ]; then
+ INSTDIR=`/bin/mktemp -d --tmpdir unoinstall.XXXXXX`
+ if [ $? -ne 0 ]; then
+ echo "Could not create tmp dir" >&2
+ exit 1
+ fi
+ set -- $@ '-env:UserInstallation=file://'$INSTDIR
+ fi
+fi
+
2015-06-23 10:00:39 +00:00
# extend the ld_library_path for java: javaldx checks the sofficerc for us
if [ -x "${sd_prog}/javaldx" ] ; then
my_path=`"${sd_prog}/javaldx" $BOOTSTRAPVARS \
2015-10-19 10:20:36 +00:00
@@ -89,6 +136,8 @@ unset XENVIRONMENT
2010-10-09 07:39:30 +00:00
# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
# execute binary
2012-08-16 11:00:22 +00:00
-exec "$sd_prog/unopkg.bin" "$@" \
+"$sd_prog/unopkg.bin" "$@" \
2010-10-09 07:39:30 +00:00
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"
-
+if [ -n "$INSTDIR" ]; then
+ rm -rf $INSTDIR
+fi
2014-02-03 20:57:23 +00:00
--
2015-10-19 10:20:36 +00:00
2.1.0
2014-02-03 20:57:23 +00:00