diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2012-03-01 13:14:47 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2012-03-01 13:14:47 +0000 |
commit | ccbf0e8737a09cbb47669bd62ae8161dcc123153 (patch) | |
tree | 57ab52390e087cb50677f063d5ff4322dfce0466 /app-office/libreoffice | |
parent | Fix libvpx-1.0.0 support, bug #401985 (diff) | |
download | gentoo-2-ccbf0e8737a09cbb47669bd62ae8161dcc123153.tar.gz gentoo-2-ccbf0e8737a09cbb47669bd62ae8161dcc123153.tar.bz2 gentoo-2-ccbf0e8737a09cbb47669bd62ae8161dcc123153.zip |
Try to make pyuno work with system python. (works here). Wrt bug#379227.
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'app-office/libreoffice')
-rw-r--r-- | app-office/libreoffice/ChangeLog | 7 | ||||
-rw-r--r-- | app-office/libreoffice/files/libreoffice-system-pyuno.patch | 44 | ||||
-rw-r--r-- | app-office/libreoffice/libreoffice-3.5.9999.ebuild | 17 | ||||
-rw-r--r-- | app-office/libreoffice/libreoffice-9999-r2.ebuild | 11 |
4 files changed, 73 insertions, 6 deletions
diff --git a/app-office/libreoffice/ChangeLog b/app-office/libreoffice/ChangeLog index d9f64a2987db..815aaaac81df 100644 --- a/app-office/libreoffice/ChangeLog +++ b/app-office/libreoffice/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-office/libreoffice # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.247 2012/02/29 15:21:02 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/ChangeLog,v 1.248 2012/03/01 13:14:47 scarabeus Exp $ + + 01 Mar 2012; Tomáš Chvátal <scarabeus@gentoo.org> + +files/libreoffice-system-pyuno.patch, libreoffice-3.5.9999.ebuild, + libreoffice-9999-r2.ebuild: + Try to make pyuno work with system python. (works here). Wrt bug#379227. 29 Feb 2012; Tomáš Chvátal <scarabeus@gentoo.org> libreoffice-3.4.3.2-r1.ebuild, libreoffice-3.4.5.2.ebuild, diff --git a/app-office/libreoffice/files/libreoffice-system-pyuno.patch b/app-office/libreoffice/files/libreoffice-system-pyuno.patch new file mode 100644 index 000000000000..c603d6acbb1a --- /dev/null +++ b/app-office/libreoffice/files/libreoffice-system-pyuno.patch @@ -0,0 +1,44 @@ +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" diff --git a/app-office/libreoffice/libreoffice-3.5.9999.ebuild b/app-office/libreoffice/libreoffice-3.5.9999.ebuild index 7ff2e63ec6cc..eb34e8b131b1 100644 --- a/app-office/libreoffice/libreoffice-3.5.9999.ebuild +++ b/app-office/libreoffice/libreoffice-3.5.9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-3.5.9999.ebuild,v 1.17 2012/02/29 15:21:02 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-3.5.9999.ebuild,v 1.18 2012/03/01 13:14:47 scarabeus Exp $ EAPI=4 @@ -155,8 +155,8 @@ PDEPEND=" " # FIXME: cppunit should be moved to test conditional -# after everything upstream is under gbuild -# as dmake execute tests right away +# after everything upstream is under gbuild +# as dmake execute tests right away DEPEND="${COMMON_DEPEND} >=dev-libs/boost-1.46 >=dev-libs/libxml2-2.7.8 @@ -191,6 +191,8 @@ DEPEND="${COMMON_DEPEND} " PATCHES=( + # this can't be upstreamed :( + "${FILESDIR}/${PN}-system-pyuno.patch" ) REQUIRED_USE=" @@ -220,7 +222,7 @@ pkg_pretend() { pgslot=$(postgresql-config show) if [[ ${pgslot//.} < 90 ]] ; then eerror "PostgreSQL slot must be set to 9.0 or higher." - eerror " postgresql-config set 9.0" + eerror " postgresql-config set 9.0" die "PostgreSQL slot is not set to 9.0 or higher." fi fi @@ -297,6 +299,13 @@ src_prepare() { eautoreconf # hack in the autogen.sh touch autogen.lastrun + # system pyuno mess + sed \ + -e "s:%eprefix%:${EPREFIX}:g" \ + -e "s:%libdir%:$(get_libdir):g" \ + -i pyuno/source/module/uno.py \ + -i scripting/source/pyprov/officehelper.py || die + } src_configure() { diff --git a/app-office/libreoffice/libreoffice-9999-r2.ebuild b/app-office/libreoffice/libreoffice-9999-r2.ebuild index 0bce89c2fc19..48b13815b3ff 100644 --- a/app-office/libreoffice/libreoffice-9999-r2.ebuild +++ b/app-office/libreoffice/libreoffice-9999-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-9999-r2.ebuild,v 1.31 2012/02/29 15:21:02 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice/libreoffice-9999-r2.ebuild,v 1.32 2012/03/01 13:14:47 scarabeus Exp $ EAPI=4 @@ -194,6 +194,8 @@ DEPEND="${COMMON_DEPEND} " PATCHES=( + # this can't be upstreamed :( + "${FILESDIR}/${PN}-system-pyuno.patch" ) REQUIRED_USE=" @@ -300,6 +302,13 @@ src_prepare() { eautoreconf # hack in the autogen.sh touch autogen.lastrun + + # system pyuno mess + sed \ + -e "s:%eprefix%:${EPREFIX}:g" \ + -e "s:%libdir%:$(get_libdir):g" \ + -i pyuno/source/module/uno.py \ + -i scripting/source/pyprov/officehelper.py || die } src_configure() { |