[arch-commits] Commit in libreoffice/trunk (2 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Sun Sep 16 18:09:22 UTC 2012


    Date: Sunday, September 16, 2012 @ 14:09:21
  Author: andyrtr
Revision: 166719

prepare next release; apply a fix to improve sitation with pyuno - FS#27257

Added:
  libreoffice/trunk/make-pyuno-work-with-system-wide-module-install.diff
Modified:
  libreoffice/trunk/PKGBUILD

------------------------------------------------------+
 PKGBUILD                                             |   37 ++++++--------
 make-pyuno-work-with-system-wide-module-install.diff |   44 +++++++++++++++++
 2 files changed, 62 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-09-16 16:43:50 UTC (rev 166718)
+++ PKGBUILD	2012-09-16 18:09:21 UTC (rev 166719)
@@ -26,7 +26,7 @@
 	'libreoffice-extension-nlpsolver') # svn up -r 142692 (last one with all extensions built)
 _LOver=3.6.2.1
 pkgver=3.6.2
-pkgrel=0.1
+pkgrel=0.3
 arch=('i686' 'x86_64')
 license=('LGPL3')
 url="http://www.libreoffice.org/"
@@ -80,6 +80,7 @@
 	${_additional_source_url}/0d2dcdfbf28d6208751b33057f5361f0-libcmis-0.2.3.tar.gz
 	${_additional_source_url}/ce5a1def34578b75959ac31210f031f6-libcdr-0.0.8.tar.bz2
 	${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+	make-pyuno-work-with-system-wide-module-install.diff
 	buildfix.diff
 	libreoffice-common.sh libreoffice-common.csh)
 noextract=(94e7f271e38c976462558b4278590178-libvisio-0.0.19.tar.bz2
@@ -145,6 +146,7 @@
          '0d2dcdfbf28d6208751b33057f5361f0'
          'ce5a1def34578b75959ac31210f031f6'
          '185d60944ea767075d27247c3162b3bc'
+         '97bf43dda273d79ff90c848ab53b0e3c'
          '234e91ac65945ce1ab1e3839780e90f7'
          'abcb1b0a7deaffe13ab3d7ca70becb49'
          '72790a4103da259a55cadd66db931d00')
@@ -170,6 +172,9 @@
 	# buildfixes & bugfixes
     patch -Np1 -i ${srcdir}/buildfix.diff	# leaves out a broken pdfimport test
     
+    # fix not upstreamable pyuno paths - patch taken from Debian
+    patch -Np1 -i ${srcdir}/make-pyuno-work-with-system-wide-module-install.diff
+    
 	#use the CFLAGS but remove the LibO overridden ones
 	for i in $CFLAGS; do
 		case "$i" in
@@ -262,7 +267,7 @@
 	make
 	# fake installation to create split file lists
 	mkdir $srcdir/fakeinstall
-	make DESTDIR=${srcdir}/fakeinstall distro-pack-install
+	make DESTDIR=${srcdir}/fakeinstall distro-pack-install # -o build -o check
 }
 
 #check() {
@@ -368,27 +373,22 @@
  groups=('libreoffice')
  replaces=('libreoffice')
 
- # no file-list so far
- install -dm755 ${pkgdir}/usr/lib/libreoffice/program/services
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.uno.so ${pkgdir}/usr/lib/libreoffice/program
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc-impl.uno.so ${pkgdir}/usr/lib/libreoffice/program
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/postgresql-sdbc.ini ${pkgdir}/usr/lib/libreoffice/program
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/program/services/postgresql-sdbc.rdb ${pkgdir}/usr/lib/libreoffice/program/services
- install -dm755 ${pkgdir}/usr/lib/libreoffice/share/registry
- install -m644 ${srcdir}/fakeinstall/usr/lib/libreoffice/share/registry/postgresqlsdbc.xcd ${pkgdir}/usr/lib/libreoffice/share/registry
+ # workaround double entries in the file list
+ mv ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt.orig
+ sort ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt.orig | uniq 1>& ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt
  
  # create directories from *list.txt file
-# for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
-#   install -dm755 ${pkgdir}/${directory/\%dir/}
-# done
+ for directory in `grep ^%dir ${srcdir}/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
+   install -dm755 ${pkgdir}/${directory/\%dir/}
+ done
  # install files into the pkg from fakeinstall dir
-# for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
-#   dirname=`dirname $file`
+ for file in `grep -v ^%dir $srcdir/libreoffice-core-$_LOver/file-lists/postgresql_list.txt`; do
+   dirname=`dirname $file`
    # check if directory has been already been created - some are missing like manpages
-#   [ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
+   [ -d ${pkgdir}/$dirname ] || install -dm755 ${pkgdir}/$dirname
    # mv file from fakeinstall to pkgdir
-#   mv ${srcdir}/fakeinstall${file} ${pkgdir}$file
-# done
+   mv ${srcdir}/fakeinstall${file} ${pkgdir}$file
+ done
 }
 
 package_libreoffice-calc() {
@@ -545,7 +545,6 @@
  done
  
   # fix environment path to keep compatibility with openjdk6 and openjdk7
-  #sed -i -e "s:\/usr\/lib\/jvm\/java-7-openjdk:\$J2SDKDIR:"          /usr/lib/libreoffice/sdk/setsdkenv_unix.{sh,csh}
   sed -i -e "s:\/usr\/lib\/jvm\/java-7-openjdk:\$J2SDKDIR:" ${pkgdir}/usr/lib/libreoffice/sdk/setsdkenv_unix.{sh,csh}
 }
 

Added: make-pyuno-work-with-system-wide-module-install.diff
===================================================================
--- make-pyuno-work-with-system-wide-module-install.diff	                        (rev 0)
+++ make-pyuno-work-with-system-wide-module-install.diff	2012-09-16 18:09:21 UTC (rev 166719)
@@ -0,0 +1,44 @@
+diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
+index defd7b2..ea2a809 100755
+--- a/desktop/scripts/soffice.sh
++++ b/desktop/scripts/soffice.sh
+@@ -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('/usr/lib/libreoffice/program')
++if getattr(os.environ, 'URE_BOOTSTRAP', None) is None:
++     os.environ['URE_BOOTSTRAP'] = "vnd.sun.star.pathname:/usr/lib/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 = "/usr/lib/libreoffice/program"
+         sOffice = os.path.join(sOffice, "soffice")
+         if platform.startswith("win"): 
+             sOffice += ".exe"




More information about the arch-commits mailing list