1 |
scarabeus 12/03/01 13:14:47 |
2 |
|
3 |
Added: libreoffice-system-pyuno.patch |
4 |
Log: |
5 |
Try to make pyuno work with system python. (works here). Wrt bug#379227. |
6 |
|
7 |
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-office/libreoffice/files/libreoffice-system-pyuno.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-system-pyuno.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/libreoffice/files/libreoffice-system-pyuno.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: libreoffice-system-pyuno.patch |
16 |
=================================================================== |
17 |
diff --git a/desktop/scripts/soffice.sh.in b/desktop/scripts/soffice.sh.in |
18 |
index defd7b2..ea2a809 100755 |
19 |
--- a/desktop/scripts/soffice.sh.in |
20 |
+++ b/desktop/scripts/soffice.sh.in |
21 |
@@ -128,6 +128,9 @@ if echo "$checks" | grep -q "cc" ; then |
22 |
exit 1; |
23 |
fi |
24 |
|
25 |
+PYTHONPATH=$sd_prog${PYTHONPATH+:$PYTHONPATH} |
26 |
+export PYTHONPATH |
27 |
+ |
28 |
case "`uname -s`" in |
29 |
NetBSD|OpenBSD|FreeBSD|DragonFly) |
30 |
# this is a temporary hack until we can live with the default search paths |
31 |
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py |
32 |
index f93ac5e..92a2891 100644 |
33 |
--- a/pyuno/source/module/uno.py |
34 |
+++ b/pyuno/source/module/uno.py |
35 |
@@ -26,8 +26,12 @@ |
36 |
# for a copy of the LGPLv3 License. |
37 |
# |
38 |
#************************************************************************* |
39 |
+import os |
40 |
import sys |
41 |
|
42 |
+sys.path.append('%eprefix%/usr/%libdir%/libreoffice/program') |
43 |
+if getattr(os.environ, 'URE_BOOTSTRAP', None) is None: |
44 |
+ os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:%eprefix%/usr/%libdir%/libreoffice/program/fundamentalrc" |
45 |
import pyuno |
46 |
|
47 |
try: |
48 |
diff --git a/scripting/source/pyprov/officehelper.py b/scripting/source/pyprov/officehelper.py |
49 |
index 610ac5f..df243d0 100755 |
50 |
--- a/scripting/source/pyprov/officehelper.py |
51 |
+++ b/scripting/source/pyprov/officehelper.py |
52 |
@@ -53,7 +53,7 @@ def bootstrap(): |
53 |
if "UNO_PATH" in os.environ: |
54 |
sOffice = os.environ["UNO_PATH"] |
55 |
else: |
56 |
- sOffice = "" # lets hope for the best |
57 |
+ sOffice = "%eprefix%/usr/%libdir%/libreoffice/program" |
58 |
sOffice = os.path.join(sOffice, "soffice") |
59 |
if platform.startswith("win"): |
60 |
sOffice += ".exe" |