public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-office/libreoffice/files: libreoffice-system-pyuno.patch
@ 2012-03-01 13:14 Tomas Chvatal (scarabeus)
  0 siblings, 0 replies; only message in thread
From: Tomas Chvatal (scarabeus) @ 2012-03-01 13:14 UTC (permalink / raw
  To: gentoo-commits

scarabeus    12/03/01 13:14:47

  Added:                libreoffice-system-pyuno.patch
  Log:
  Try to make pyuno work with system python. (works here). Wrt bug#379227.
  
  (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  app-office/libreoffice/files/libreoffice-system-pyuno.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-system-pyuno.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-system-pyuno.patch?rev=1.1&content-type=text/plain

Index: libreoffice-system-pyuno.patch
===================================================================
diff --git a/desktop/scripts/soffice.sh.in b/desktop/scripts/soffice.sh.in
index defd7b2..ea2a809 100755
--- a/desktop/scripts/soffice.sh.in
+++ b/desktop/scripts/soffice.sh.in
@@ -128,6 +128,9 @@ if echo "$checks" | grep -q "cc" ; then
     exit 1;
 fi
 
+PYTHONPATH=$sd_prog${PYTHONPATH+:$PYTHONPATH}
+export PYTHONPATH
+
 case "`uname -s`" in
 NetBSD|OpenBSD|FreeBSD|DragonFly)
 # this is a temporary hack until we can live with the default search paths
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py
index f93ac5e..92a2891 100644
--- a/pyuno/source/module/uno.py
+++ b/pyuno/source/module/uno.py
@@ -26,8 +26,12 @@
 # for a copy of the LGPLv3 License.
 #
 #*************************************************************************
+import os
 import sys
 
+sys.path.append('%eprefix%/usr/%libdir%/libreoffice/program')
+if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
+     os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:%eprefix%/usr/%libdir%/libreoffice/program/fundamentalrc"
 import pyuno
 
 try:
diff --git a/scripting/source/pyprov/officehelper.py b/scripting/source/pyprov/officehelper.py
index 610ac5f..df243d0 100755
--- a/scripting/source/pyprov/officehelper.py
+++ b/scripting/source/pyprov/officehelper.py
@@ -53,7 +53,7 @@ def bootstrap():
         if "UNO_PATH" in os.environ:
             sOffice = os.environ["UNO_PATH"]
         else:
-            sOffice = "" # lets hope for the best
+            sOffice = "%eprefix%/usr/%libdir%/libreoffice/program"
         sOffice = os.path.join(sOffice, "soffice")
         if platform.startswith("win"): 
             sOffice += ".exe"






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-01 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 13:14 [gentoo-commits] gentoo-x86 commit in app-office/libreoffice/files: libreoffice-system-pyuno.patch Tomas Chvatal (scarabeus)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox