From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1E6F41382C5 for ; Sat, 6 Jun 2020 13:17:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 51EA7E099E; Sat, 6 Jun 2020 13:17:18 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2E3E1E099E for ; Sat, 6 Jun 2020 13:17:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1A9F834F232 for ; Sat, 6 Jun 2020 13:17:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 059FC287 for ; Sat, 6 Jun 2020 13:17:14 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1591449420.448215ed366bed91445ad383572a9e3eb9f25e74.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/files/, sci-libs/vtk/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/vtk/files/vtk-8.2.0-py38.patch sci-libs/vtk/vtk-8.2.0.ebuild X-VCS-Directories: sci-libs/vtk/ sci-libs/vtk/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 448215ed366bed91445ad383572a9e3eb9f25e74 X-VCS-Branch: master Date: Sat, 6 Jun 2020 13:17:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0179547a-0742-4bd9-9c2b-b8d24c59f0e1 X-Archives-Hash: 567519781f91c87f0d2c9e2bd2aa1a3b commit: 448215ed366bed91445ad383572a9e3eb9f25e74 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Jun 6 12:09:39 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Jun 6 13:17:00 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=448215ed sci-libs/vtk: python3_8 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner gentoo.org> sci-libs/vtk/files/vtk-8.2.0-py38.patch | 175 ++++++++++++++++++++++++++++++++ sci-libs/vtk/vtk-8.2.0.ebuild | 3 +- 2 files changed, 177 insertions(+), 1 deletion(-) diff --git a/sci-libs/vtk/files/vtk-8.2.0-py38.patch b/sci-libs/vtk/files/vtk-8.2.0-py38.patch new file mode 100644 index 00000000000..c4c235dafd3 --- /dev/null +++ b/sci-libs/vtk/files/vtk-8.2.0-py38.patch @@ -0,0 +1,175 @@ +From 257b9d7b18d5f3db3fe099dc18f230e23f7dfbab Mon Sep 17 00:00:00 2001 +From: David Gobbi +Date: Tue, 20 Aug 2019 17:02:24 -0600 +Subject: [PATCH] Compatibility for Python 3.8 + +The PyTypeObject struct was modified in Python 3.8, this change is +required to avoid compile errors. +--- + .../PythonInterpreter/vtkPythonStdStreamCaptureHelper.h | 6 ++++++ + Wrapping/PythonCore/PyVTKMethodDescriptor.cxx | 2 +- + Wrapping/PythonCore/PyVTKNamespace.cxx | 2 +- + Wrapping/PythonCore/PyVTKReference.cxx | 8 ++++---- + Wrapping/PythonCore/PyVTKTemplate.cxx | 2 +- + Wrapping/PythonCore/vtkPythonCompatibility.h | 8 +++++++- + Wrapping/Tools/vtkWrapPythonClass.c | 2 +- + Wrapping/Tools/vtkWrapPythonEnum.c | 2 +- + Wrapping/Tools/vtkWrapPythonType.c | 2 +- + 9 files changed, 23 insertions(+), 11 deletions(-) + +diff --git a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h +index b1c12c83de..14ccfbe928 100644 +--- a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h ++++ b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h +@@ -140,6 +140,12 @@ static PyTypeObject vtkPythonStdStreamCaptureHelperType = { + #if PY_VERSION_HEX >= 0x03040000 + 0, // tp_finalize + #endif ++#if PY_VERSION_HEX >= 0x03080000 ++ 0, // tp_vectorcall ++#if PY_VERSION_HEX < 0x03090000 ++ 0, // tp_print ++#endif ++#endif + }; + + static PyObject* vtkWrite(PyObject* self, PyObject* args) +diff --git a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx +index 2b0d443537..3840038498 100644 +--- a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx ++++ b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx +@@ -186,7 +186,7 @@ PyTypeObject PyVTKMethodDescriptor_Type = { + sizeof(PyMethodDescrObject), // tp_basicsize + 0, // tp_itemsize + PyVTKMethodDescriptor_Delete, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_vectorcall_offset + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare +diff --git a/Wrapping/PythonCore/PyVTKNamespace.cxx b/Wrapping/PythonCore/PyVTKNamespace.cxx +index 71ee2a3516..5cf5bfbe6b 100644 +--- a/Wrapping/PythonCore/PyVTKNamespace.cxx ++++ b/Wrapping/PythonCore/PyVTKNamespace.cxx +@@ -49,7 +49,7 @@ PyTypeObject PyVTKNamespace_Type = { + 0, // tp_basicsize + 0, // tp_itemsize + PyVTKNamespace_Delete, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_vectorcall_offset + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare +diff --git a/Wrapping/PythonCore/PyVTKReference.cxx b/Wrapping/PythonCore/PyVTKReference.cxx +index 943ac71080..b7104091c0 100644 +--- a/Wrapping/PythonCore/PyVTKReference.cxx ++++ b/Wrapping/PythonCore/PyVTKReference.cxx +@@ -1010,7 +1010,7 @@ PyTypeObject PyVTKReference_Type = { + sizeof(PyVTKReference), // tp_basicsize + 0, // tp_itemsize + PyVTKReference_Delete, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_vectorcall_offset + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare +@@ -1067,7 +1067,7 @@ PyTypeObject PyVTKNumberReference_Type = { + sizeof(PyVTKReference), // tp_basicsize + 0, // tp_itemsize + PyVTKReference_Delete, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_vectorcall_offset + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare +@@ -1124,7 +1124,7 @@ PyTypeObject PyVTKStringReference_Type = { + sizeof(PyVTKReference), // tp_basicsize + 0, // tp_itemsize + PyVTKReference_Delete, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_vectorcall_offset + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare +@@ -1181,7 +1181,7 @@ PyTypeObject PyVTKTupleReference_Type = { + sizeof(PyVTKReference), // tp_basicsize + 0, // tp_itemsize + PyVTKReference_Delete, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_vectorcall_offset + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare +diff --git a/Wrapping/PythonCore/PyVTKTemplate.cxx b/Wrapping/PythonCore/PyVTKTemplate.cxx +index be200985b3..340fe7953b 100644 +--- a/Wrapping/PythonCore/PyVTKTemplate.cxx ++++ b/Wrapping/PythonCore/PyVTKTemplate.cxx +@@ -268,7 +268,7 @@ PyTypeObject PyVTKTemplate_Type = { + 0, // tp_basicsize + 0, // tp_itemsize + nullptr, // tp_dealloc +- nullptr, // tp_print ++ 0, // tp_vectorcall_offset + nullptr, // tp_getattr + nullptr, // tp_setattr + nullptr, // tp_compare +diff --git a/Wrapping/PythonCore/vtkPythonCompatibility.h b/Wrapping/PythonCore/vtkPythonCompatibility.h +index 4a767844a6..be208faeef 100644 +--- a/Wrapping/PythonCore/vtkPythonCompatibility.h ++++ b/Wrapping/PythonCore/vtkPythonCompatibility.h +@@ -64,7 +64,13 @@ + #endif + + // PyTypeObject compatibility +-#if PY_VERSION_HEX >= 0x03040000 ++#if PY_VERSION_HEX >= 0x03090000 ++#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \ ++ 0, 0, 0, 0, ++#elif PY_VERSION_HEX >= 0x03080000 ++#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \ ++ 0, 0, 0, 0, 0, ++#elif PY_VERSION_HEX >= 0x03040000 + #define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \ + 0, 0, 0, + #else +diff --git a/Wrapping/Tools/vtkWrapPythonClass.c b/Wrapping/Tools/vtkWrapPythonClass.c +index b1e45f8e80..4d558ea081 100644 +--- a/Wrapping/Tools/vtkWrapPythonClass.c ++++ b/Wrapping/Tools/vtkWrapPythonClass.c +@@ -521,7 +521,7 @@ void vtkWrapPython_GenerateObjectType( + " sizeof(PyVTKObject), // tp_basicsize\n" + " 0, // tp_itemsize\n" + " PyVTKObject_Delete, // tp_dealloc\n" +- " nullptr, // tp_print\n" ++ " 0, // tp_vectorcall_offset\n" + " nullptr, // tp_getattr\n" + " nullptr, // tp_setattr\n" + " nullptr, // tp_compare\n" +diff --git a/Wrapping/Tools/vtkWrapPythonEnum.c b/Wrapping/Tools/vtkWrapPythonEnum.c +index b933702242..1249362854 100644 +--- a/Wrapping/Tools/vtkWrapPythonEnum.c ++++ b/Wrapping/Tools/vtkWrapPythonEnum.c +@@ -145,7 +145,7 @@ void vtkWrapPython_GenerateEnumType( + " sizeof(PyIntObject), // tp_basicsize\n" + " 0, // tp_itemsize\n" + " nullptr, // tp_dealloc\n" +- " nullptr, // tp_print\n" ++ " 0, // tp_vectorcall_offset\n" + " nullptr, // tp_getattr\n" + " nullptr, // tp_setattr\n" + " nullptr, // tp_compare\n" +diff --git a/Wrapping/Tools/vtkWrapPythonType.c b/Wrapping/Tools/vtkWrapPythonType.c +index 744cb1b9d3..0a1375e541 100644 +--- a/Wrapping/Tools/vtkWrapPythonType.c ++++ b/Wrapping/Tools/vtkWrapPythonType.c +@@ -709,7 +709,7 @@ void vtkWrapPython_GenerateSpecialType( + " sizeof(PyVTKSpecialObject), // tp_basicsize\n" + " 0, // tp_itemsize\n" + " Py%s_Delete, // tp_dealloc\n" +- " nullptr, // tp_print\n" ++ " 0, // tp_vectorcall_offset\n" + " nullptr, // tp_getattr\n" + " nullptr, // tp_setattr\n" + " nullptr, // tp_compare\n" +-- +2.21.0 diff --git a/sci-libs/vtk/vtk-8.2.0.ebuild b/sci-libs/vtk/vtk-8.2.0.ebuild index 127d1b0e81e..ea05c1e5549 100644 --- a/sci-libs/vtk/vtk-8.2.0.ebuild +++ b/sci-libs/vtk/vtk-8.2.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8} ) WEBAPP_OPTIONAL=yes WEBAPP_MANUAL_SLOT=yes @@ -128,6 +128,7 @@ PATCHES=( "${FILESDIR}"/${P}-qt-5.15.patch # bug 726960 "${FILESDIR}"/${P}-gcc-10.patch # bug 723374 "${FILESDIR}"/${P}-fno-common.patch # bug 721048 + "${FILESDIR}"/${P}-py38.patch ) RESTRICT="test"