diff --git a/extra/libreoffice-still/PKGBUILD b/extra/libreoffice-still/PKGBUILD index a720b3a11..3fb0861fc 100644 --- a/extra/libreoffice-still/PKGBUILD +++ b/extra/libreoffice-still/PKGBUILD @@ -20,7 +20,7 @@ pkgbase=libreoffice-still pkgname=('libreoffice-still-sdk' 'libreoffice-still') _LOver=6.2.8.2 pkgver=6.2.8 -pkgrel=1 +pkgrel=3 arch=('x86_64') license=('LGPL3') url="https://www.libreoffice.org/" @@ -62,7 +62,9 @@ source=(${_mirror}/libreoffice{,-help,-translations}-${_LOver}.tar.xz{,.asc} ${_additional_source_url2}/49a64f3bcf20a7909ba2751349231d6652ded9cd2840e961b5164d09de3ffa63-opens___.ttf ${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll make-pyuno-work-with-system-wide-module-install.diff - libreoffice-still.sh libreoffice-still.csh) + python-3.8.patch + libreoffice-still.sh libreoffice-still.csh + libreoffice-poppler-0.82.patch::"https://github.com/LibreOffice/core/commit/2eadd46a.patch") noextract=(35c94d2df8893241173de1d16b6034c0-swingExSrc.zip 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip @@ -100,8 +102,10 @@ sha256sums=('3996f54d44187e600bf04c59f3577ecdbf65f29033f5aeac1c9ad20981f4fdda' '49a64f3bcf20a7909ba2751349231d6652ded9cd2840e961b5164d09de3ffa63' 'eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6' 'c463654a73ecfbc242ff109726fb4faecdbfb3d91affafe919b24bea65afb563' + '98f8ab4fba7b6a1c64f7e3cfe597083cafdd60e31bfd6b2da20456a2089d8581' 'c1e199f7767a4f42d9a95fc942cda4cf47737c7d67e6f334679c9b2e3e271dc2' - '07c28ff8f5258abfe4338efccbdfb1dd35892bd00a2ed7f53b1fc2263f71a8b6') + '07c28ff8f5258abfe4338efccbdfb1dd35892bd00a2ed7f53b1fc2263f71a8b6' + 'd649a07b38af95e9012633e71829fef3001e8a5830544ce7e91856df27f69c4b') prepare() { @@ -129,6 +133,10 @@ prepare() { esac ARCH_FLAGS="$ARCH_FLAGS $i" done + + patch -p1 -i "$srcdir"/python-3.8.patch # Fix build with python 3.8 + # fix build with poppler 0.82 + patch -p1 -i ../libreoffice-poppler-0.82.patch } build() { @@ -317,11 +325,11 @@ package_libreoffice-still() { install -m644 "${srcdir}"/libreoffice-still.{sh,csh} "${pkgdir}"/etc/profile.d/ # make pyuno find its modules - install -dm755 "${pkgdir}"/usr/lib/python3.7/site-packages + install -dm755 "${pkgdir}"/usr/lib/python3.8/site-packages ln -svf /usr/lib/libreoffice/program/uno.py \ - "${pkgdir}"/usr/lib/python3.7/site-packages/uno.py + "${pkgdir}"/usr/lib/python3.8/site-packages/uno.py ln -svf /usr/lib/libreoffice/program/unohelper.py \ - "${pkgdir}"/usr/lib/python3.7/site-packages/unohelper.py + "${pkgdir}"/usr/lib/python3.8/site-packages/unohelper.py # add a symlink required for gnome-documents; FS#51887 # https://lists.freedesktop.org/archives/libreoffice/2016-March/073787.html diff --git a/extra/libreoffice-still/python-3.8.patch b/extra/libreoffice-still/python-3.8.patch new file mode 100644 index 000000000..4813ed113 --- /dev/null +++ b/extra/libreoffice-still/python-3.8.patch @@ -0,0 +1,199 @@ +From a62b45cf541cf47d136bdff87dff4c13fd4296c2 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sbergman@redhat.com> +Date: Fri, 7 Jun 2019 15:57:13 +0200 +Subject: [PATCH] Adapt to upcoming Python 3.8 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +...which changed PyTypeObject in <https://github.com/python/cpython/commit/ +aacc77fbd77640a8f03638216fa09372cc21673d> "bpo-36974: implement PEP 590 +(GH-13185)". + +Change-Id: I687ec38aeda05d0747b9ed08221db75a758bed51 +Reviewed-on: https://gerrit.libreoffice.org/73664 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara <caolanm@redhat.com> +Tested-by: Caolán McNamara <caolanm@redhat.com> +(cherry picked from commit 2bd585f31d7abb066e3f53d9b29c822af20aea69) +Reviewed-on: https://gerrit.libreoffice.org/73778 +--- + pyuno/source/module/pyuno.cxx | 9 ++++++++- + pyuno/source/module/pyuno_callable.cxx | 9 ++++++++- + pyuno/source/module/pyuno_iterator.cxx | 18 ++++++++++++++++-- + pyuno/source/module/pyuno_runtime.cxx | 9 ++++++++- + pyuno/source/module/pyuno_struct.cxx | 9 ++++++++- + 5 files changed, 48 insertions(+), 6 deletions(-) + +diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx +index f5f23bf058fa..e59319030eb8 100644 +--- a/pyuno/source/module/pyuno.cxx ++++ b/pyuno/source/module/pyuno.cxx +@@ -1636,7 +1636,11 @@ static PyTypeObject PyUNOType = + sizeof (PyUNO), + 0, + PyUNO_del, +- nullptr, ++#if PY_VERSION_HEX >= 0x03080000 ++ 0, // Py_ssize_t tp_vectorcall_offset ++#else ++ nullptr, // printfunc tp_print ++#endif + PyUNO_getattr, + PyUNO_setattr, + /* this type does not exist in Python 3: (cmpfunc) */ nullptr, +@@ -1680,6 +1684,9 @@ static PyTypeObject PyUNOType = + , 0 + #if PY_VERSION_HEX >= 0x03040000 + , nullptr ++#if PY_VERSION_HEX >= 0x03080000 ++ , nullptr // vectorcallfunc tp_vectorcall ++#endif + #endif + }; + +diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx +index 6519d20734c9..656d1c84cb0e 100644 +--- a/pyuno/source/module/pyuno_callable.cxx ++++ b/pyuno/source/module/pyuno_callable.cxx +@@ -181,7 +181,11 @@ static PyTypeObject PyUNO_callable_Type = + sizeof (PyUNO_callable), + 0, + ::pyuno::PyUNO_callable_del, +- nullptr, ++#if PY_VERSION_HEX >= 0x03080000 ++ 0, // Py_ssize_t tp_vectorcall_offset ++#else ++ nullptr, // printfunc tp_print ++#endif + nullptr, + nullptr, + nullptr, +@@ -225,6 +229,9 @@ static PyTypeObject PyUNO_callable_Type = + , 0 + #if PY_VERSION_HEX >= 0x03040000 + , nullptr ++#if PY_VERSION_HEX >= 0x03080000 ++ , nullptr // vectorcallfunc tp_vectorcall ++#endif + #endif + }; + +diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx +index 5f643c13b67e..a7862857d719 100644 +--- a/pyuno/source/module/pyuno_iterator.cxx ++++ b/pyuno/source/module/pyuno_iterator.cxx +@@ -118,7 +118,11 @@ static PyTypeObject PyUNO_iterator_Type = + sizeof (PyUNO_iterator), + 0, + PyUNO_iterator_del, +- nullptr, ++#if PY_VERSION_HEX >= 0x03080000 ++ 0, // Py_ssize_t tp_vectorcall_offset ++#else ++ nullptr, // printfunc tp_print ++#endif + nullptr, + nullptr, + nullptr, +@@ -162,6 +166,9 @@ static PyTypeObject PyUNO_iterator_Type = + 0 + #if PY_VERSION_HEX >= 0x03040000 + , nullptr ++#if PY_VERSION_HEX >= 0x03080000 ++ , nullptr // vectorcallfunc tp_vectorcall ++#endif + #endif + }; + +@@ -248,7 +255,11 @@ static PyTypeObject PyUNO_list_iterator_Type = + sizeof (PyUNO_list_iterator), + 0, + PyUNO_list_iterator_del, +- nullptr, ++#if PY_VERSION_HEX >= 0x03080000 ++ 0, // Py_ssize_t tp_vectorcall_offset ++#else ++ nullptr, // printfunc tp_print ++#endif + nullptr, + nullptr, + nullptr, +@@ -292,6 +303,9 @@ static PyTypeObject PyUNO_list_iterator_Type = + 0 + #if PY_VERSION_HEX >= 0x03040000 + , nullptr ++#if PY_VERSION_HEX >= 0x03080000 ++ , nullptr // vectorcallfunc tp_vectorcall ++#endif + #endif + }; + +diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx +index 9887c1fbc828..d307f9af363c 100644 +--- a/pyuno/source/module/pyuno_runtime.cxx ++++ b/pyuno/source/module/pyuno_runtime.cxx +@@ -75,7 +75,11 @@ static PyTypeObject RuntimeImpl_Type = + sizeof (RuntimeImpl), + 0, + RuntimeImpl::del, +- nullptr, ++#if PY_VERSION_HEX >= 0x03080000 ++ 0, // Py_ssize_t tp_vectorcall_offset ++#else ++ nullptr, // printfunc tp_print ++#endif + nullptr, + nullptr, + nullptr, +@@ -119,6 +123,9 @@ static PyTypeObject RuntimeImpl_Type = + , 0 + #if PY_VERSION_HEX >= 0x03040000 + , nullptr ++#if PY_VERSION_HEX >= 0x03080000 ++ , nullptr // vectorcallfunc tp_vectorcall ++#endif + #endif + }; + +diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx +index 7088fc346145..9ad9439318ce 100644 +--- a/pyuno/source/module/pyuno_struct.cxx ++++ b/pyuno/source/module/pyuno_struct.cxx +@@ -296,7 +296,11 @@ static PyTypeObject PyUNOStructType = + sizeof (PyUNO), + 0, + PyUNOStruct_del, +- nullptr, ++#if PY_VERSION_HEX >= 0x03080000 ++ 0, // Py_ssize_t tp_vectorcall_offset ++#else ++ nullptr, // printfunc tp_print ++#endif + PyUNOStruct_getattr, + PyUNOStruct_setattr, + /* this type does not exist in Python 3: (cmpfunc) */ nullptr, +@@ -340,6 +344,9 @@ static PyTypeObject PyUNOStructType = + , 0 + #if PY_VERSION_HEX >= 0x03040000 + , nullptr ++#if PY_VERSION_HEX >= 0x03080000 ++ , nullptr // vectorcallfunc tp_vectorcall ++#endif + #endif + }; + +diff --git a/configure.ac b/configure.ac +index 77cbacb109b6..39dd082b8366 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -8574,6 +8574,9 @@ if test $enable_python = system; then + if test -z "$PKG_CONFIG"; then + PYTHON_CFLAGS="-I$python_include" + PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs" ++ elif $PKG_CONFIG --exists python-$python_version-embed; then ++ PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version-embed`" ++ PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version-embed` $python_libs" + elif $PKG_CONFIG --exists python-$python_version; then + PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`" + PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"