[arch-commits] Commit in libreoffice-fresh/trunk (PKGBUILD pyuno-python37.patch)

Evangelos Foutras foutrelis at archlinux.org
Mon Jul 23 19:50:19 UTC 2018


    Date: Monday, July 23, 2018 @ 19:50:19
  Author: foutrelis
Revision: 329478

Python 3.7 rebuild

Added:
  libreoffice-fresh/trunk/pyuno-python37.patch
Modified:
  libreoffice-fresh/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   17 +++++++++------
 pyuno-python37.patch |   54 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-07-23 19:42:04 UTC (rev 329477)
+++ PKGBUILD	2018-07-23 19:50:19 UTC (rev 329478)
@@ -13,11 +13,11 @@
 pkgname=('libreoffice-fresh-sdk' 'libreoffice-fresh')
 _LOver=6.0.5.2
 pkgver=6.0.5
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 license=('LGPL3')
 url="http://www.libreoffice.org/"
-makedepends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.6' 'libwpd>=0.9.2' 'libwps'
+makedepends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.7' 'libwpd>=0.9.2' 'libwps'
 	'neon>=0.28.6' 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib'
 	'libxslt' 'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'graphite' 'icu' 
 	'lcms2' 'poppler>=0.24.0' 'libvisio' 'libetonyek' 'libodfgen' 'libcdr'
@@ -55,6 +55,7 @@
 	${_additional_source_url2}/odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar # for test suite
 	${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
 	make-pyuno-work-with-system-wide-module-install.diff
+	pyuno-python37.patch
 	emfio.patch
 	libreoffice-fresh.sh libreoffice-fresh.csh)
 noextract=(boost_1_65_1.tar.bz2
@@ -96,6 +97,7 @@
             '702413413a5d8076c17fe79c0808dfba145a7260020f6c8627ea529a0cf83769'
             'eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6'
             'c463654a73ecfbc242ff109726fb4faecdbfb3d91affafe919b24bea65afb563'
+            '5d874bfa2ef7340615dfd34dc17e9e72bfc8587dce7864b949cfcde7fcbabb52'
             '8b4815788be087940750b775690b5890c4cf9e121f11006a72ccab834f212abb'
             '76f62957d0058092b11316357d9d716a62b48a53e5277426ffa87429ab5510e4'
             'd24cfcb556ae1db02087c49012bbc4621f9ef7e3465ca832e1410326d260f283')
@@ -133,6 +135,9 @@
 	# fix not upstreamable pyuno paths - FS#54250
 	patch -Np1 -i ${srcdir}/make-pyuno-work-with-system-wide-module-install.diff
 
+	# const fixes for Python 3.7
+	patch -Np1 -i ${srcdir}/pyuno-python37.patch
+
 	#use the CFLAGS but remove the LibO overridden ones
 	for i in $CFLAGS; do
 		case "$i" in
@@ -272,7 +277,7 @@
 
 package_libreoffice-fresh() {
 	pkgdesc="LibreOffice branch which contains new features and program enhancements"
-	depends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.6' 'libwpd>=0.9.2' 'libwps'
+	depends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.7' 'libwpd>=0.9.2' 'libwps'
 		'neon>=0.28.6' 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib'
 		'libxslt' 'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'graphite' 'icu' 
 		'lcms2' 'poppler>=0.24.0' 'libvisio' 'libetonyek' 'libodfgen' 'libcdr'
@@ -325,11 +330,11 @@
 	install -m755 ${srcdir}/libreoffice-fresh.{sh,csh} ${pkgdir}/etc/profile.d/
 
 	# make pyuno find its modules
-	install -dm755 ${pkgdir}/usr/lib/python3.6/site-packages
+	install -dm755 ${pkgdir}/usr/lib/python3.7/site-packages
 	ln -svf /usr/lib/libreoffice/program/uno.py \
-		${pkgdir}/usr/lib/python3.6/site-packages/uno.py
+		${pkgdir}/usr/lib/python3.7/site-packages/uno.py
 	ln -svf /usr/lib/libreoffice/program/unohelper.py \
-		${pkgdir}/usr/lib/python3.6/site-packages/unohelper.py
+		${pkgdir}/usr/lib/python3.7/site-packages/unohelper.py
 		
 	# add a symlink required for gnome-documents; FS#51887
 	# https://lists.freedesktop.org/archives/libreoffice/2016-March/073787.html

Added: pyuno-python37.patch
===================================================================
--- pyuno-python37.patch	                        (rev 0)
+++ pyuno-python37.patch	2018-07-23 19:50:19 UTC (rev 329478)
@@ -0,0 +1,54 @@
+From 76a29148be63cb006a7e25e312dc93acc93e071f Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Tue, 3 Jul 2018 08:33:34 +0200
+Subject: [PATCH] const fixes for python3-devel-3.7.0-1.fc29.x86_64
+
+Change-Id: Ia16a8b828e11ce36e9bb77ecf9e8a1179bd9b90c
+Reviewed-on: https://gerrit.libreoffice.org/56841
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
+---
+ pyuno/source/module/pyuno_impl.hxx | 2 +-
+ pyuno/source/module/pyuno_type.cxx | 2 +-
+ pyuno/source/module/pyuno_util.cxx | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx
+index ea0e419ffb1b..73acabdf4a16 100644
+--- a/pyuno/source/module/pyuno_impl.hxx
++++ b/pyuno/source/module/pyuno_impl.hxx
+@@ -80,7 +80,7 @@ inline PyObject* PyStr_FromString(const char *string)
+     return PyUnicode_FromString(string);
+ }
+ 
+-inline char * PyStr_AsString(PyObject *object)
++inline char const * PyStr_AsString(PyObject *object)
+ {
+     return PyUnicode_AsUTF8(object);
+ }
+diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
+index c6fc1351436b..80505d85bbd1 100644
+--- a/pyuno/source/module/pyuno_type.cxx
++++ b/pyuno/source/module/pyuno_type.cxx
+@@ -157,7 +157,7 @@ Any PyEnum2Enum( PyObject *obj )
+     }
+ 
+     OUString strTypeName( OUString::createFromAscii( PyStr_AsString( typeName.get() ) ) );
+-    char *stringValue = PyStr_AsString( value.get() );
++    char const *stringValue = PyStr_AsString( value.get() );
+ 
+     TypeDescription desc( strTypeName );
+     if( !desc.is() )
+diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
+index 45ee5a38e40b..f9714fb270f0 100644
+--- a/pyuno/source/module/pyuno_util.cxx
++++ b/pyuno/source/module/pyuno_util.cxx
+@@ -69,7 +69,7 @@ OUString pyString2ustring( PyObject *pystr )
+ #else
+ #if PY_MAJOR_VERSION >= 3
+     Py_ssize_t size(0);
+-    char *pUtf8(PyUnicode_AsUTF8AndSize(pystr, &size));
++    char const *pUtf8(PyUnicode_AsUTF8AndSize(pystr, &size));
+     ret = OUString(pUtf8, size, RTL_TEXTENCODING_UTF8);
+ #else
+     PyObject* pUtf8 = PyUnicode_AsUTF8String(pystr);



More information about the arch-commits mailing list