From b21d7378217999d3eb8d8b29416c764cb4d544f7 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 3 Jul 2018 08:36:29 +0200 Subject: [PATCH] fix for Python 3.7 --- ...or-python3-devel-3.7.0-1.fc29.x86_64.patch | 54 +++++++++++++++++++ libreoffice.spec | 2 + 2 files changed, 56 insertions(+) create mode 100644 0001-const-fixes-for-python3-devel-3.7.0-1.fc29.x86_64.patch diff --git a/0001-const-fixes-for-python3-devel-3.7.0-1.fc29.x86_64.patch b/0001-const-fixes-for-python3-devel-3.7.0-1.fc29.x86_64.patch new file mode 100644 index 0000000..75ef102 --- /dev/null +++ b/0001-const-fixes-for-python3-devel-3.7.0-1.fc29.x86_64.patch @@ -0,0 +1,54 @@ +From cf8cb4348f270462c217d7850a509f71029153fc Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +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 +--- + 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); +-- +2.17.1 + diff --git a/libreoffice.spec b/libreoffice.spec index e4b74dc..ea3924d 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -274,6 +274,7 @@ Patch4: 0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch Patch5: 0001-request-installation-of-langpack-via-packagekit.patch Patch6: 0001-tdf-117537-block-rentry-to-CheckAndMarkUnknownFont.patch Patch7: 0001-Explicitly-qualify-ICU-types-with-icu-namespace.patch +Patch8: 0001-const-fixes-for-python3-devel-3.7.0-1.fc29.x86_64.patch %if 0%{?rhel} # not upstreamed @@ -2325,6 +2326,7 @@ done * Fri Jun 22 2018 Caolán McNamara - 1:6.0.5.2-1 - latest 6.0 release - fix for ICU 61 +- fix for Python 3.7 * Tue Jun 19 2018 Miro Hrončok - 1:6.0.4.2-5 - Rebuilt for Python 3.7