From 1356a2748d0d15205bd42f7106059a16733a43b4 Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 22 Aug 2022 13:42:32 +0200 Subject: [PATCH 1/7] shiboken2: update to 5.15.5 --- .../patches/fix-for-numpy-1.23.0.patch | 18 +++ .../patches/no-python-arch-suffix.patch | 2 +- srcpkgs/shiboken2/patches/python310.patch | 114 ------------------ .../patches/tests-python-syntax.patch | 91 -------------- srcpkgs/shiboken2/template | 6 +- 5 files changed, 22 insertions(+), 209 deletions(-) create mode 100644 srcpkgs/shiboken2/patches/fix-for-numpy-1.23.0.patch delete mode 100644 srcpkgs/shiboken2/patches/python310.patch delete mode 100644 srcpkgs/shiboken2/patches/tests-python-syntax.patch diff --git a/srcpkgs/shiboken2/patches/fix-for-numpy-1.23.0.patch b/srcpkgs/shiboken2/patches/fix-for-numpy-1.23.0.patch new file mode 100644 index 000000000000..708cebe3f9fc --- /dev/null +++ b/srcpkgs/shiboken2/patches/fix-for-numpy-1.23.0.patch @@ -0,0 +1,18 @@ +rework of commit 1422cf4a7f277fb13fd209f24a90d6c02641497d (shiboken6) + +--- a/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp ++++ b/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp +@@ -116,8 +116,13 @@ + str << " NPY_ARRAY_NOTSWAPPED"; + if ((flags & NPY_ARRAY_WRITEABLE) != 0) + str << " NPY_ARRAY_WRITEABLE"; ++#if NPY_VERSION >= 0x00000010 // NPY_1_23_API_VERSION ++ if ((flags & NPY_ARRAY_WRITEBACKIFCOPY) != 0) ++ str << " NPY_ARRAY_WRITEBACKIFCOPY"; ++#else + if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0) + str << " NPY_ARRAY_UPDATEIFCOPY"; ++#endif + } else { + str << '0'; + } diff --git a/srcpkgs/shiboken2/patches/no-python-arch-suffix.patch b/srcpkgs/shiboken2/patches/no-python-arch-suffix.patch index 02baa6896f7b..31e9c55db6f2 100644 --- a/srcpkgs/shiboken2/patches/no-python-arch-suffix.patch +++ b/srcpkgs/shiboken2/patches/no-python-arch-suffix.patch @@ -1,5 +1,5 @@ Consistent file naming across architectures for so libs and cmake files: -remove intermediate suffix like ".cpython-36m-x86_64-linux-gnu". +remove python suffix like ".cpython-36m-x86_64-linux-gnu". Avoid overwriting the "real" cmake file with the generic wrapper's one (same name in such a case) diff --git a/srcpkgs/shiboken2/patches/python310.patch b/srcpkgs/shiboken2/patches/python310.patch deleted file mode 100644 index 1600deda46f2..000000000000 --- a/srcpkgs/shiboken2/patches/python310.patch +++ /dev/null @@ -1,114 +0,0 @@ -The first patch is taken from the issue and resolution documented at - - https://bugreports.qt.io/browse/PYSIDE-1436 - -Note that strings created as part of the `staticStrings()` set used in the -`finalizeStaticStrings()` function are created by `createStaticString()`, which -uses `PyUnicode_InternFromString` to create an owned reference to an interned -Python string **and** calls Py_INCREF to further guard against the strings -disappearing. Thus, in `finalizeStaticStrings()`, we need *two* calls to -Py_DECREF: one to clear the "guard" increment after creation and one to release -ownership from the creation itself. - -The second and third patches are adapted from - - https://codereview.qt-project.org/c/pyside/pyside-setup/+/348390 - -The second addresses the disappearance of _Py_Mangle from Python 3.10 by -providing an alternative implementation that was previously reserved for -Py_LIMITED_API. - -The fourth patch was adapted from - - https://codereview.qt-project.org/c/pyside/pyside-setup/+/365403/4 - -Together with the third patch,t his addresses changes to the typing module that -caused the pyi binding generator to fail in some cases. - -diff -ur a/sources/shiboken2/libshiboken/pep384impl.cpp b/sources/shiboken2/libshiboken/pep384impl.cpp ---- a/sources/shiboken2/libshiboken/pep384impl.cpp 2020-11-11 07:51:30.000000000 -0500 -+++ b/sources/shiboken2/libshiboken/pep384impl.cpp 2021-09-26 08:47:00.614184926 -0400 -@@ -751,14 +751,14 @@ - #endif // IS_PY2 - Shiboken::AutoDecRef privateobj(PyObject_GetAttr( - reinterpret_cast(Py_TYPE(self)), Shiboken::PyMagicName::name())); --#ifndef Py_LIMITED_API -- return _Py_Mangle(privateobj, name); --#else -- // For some reason, _Py_Mangle is not in the Limited API. Why? -- size_t plen = PyUnicode_GET_LENGTH(privateobj); -+ -+ // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always. -+ // The rest of this function is our own implementation of _Py_Mangle. -+ // Please compare the original function in compile.c . -+ size_t plen = PyUnicode_GET_LENGTH(privateobj.object()); - /* Strip leading underscores from class name */ - size_t ipriv = 0; -- while (PyUnicode_READ_CHAR(privateobj, ipriv) == '_') -+ while (PyUnicode_READ_CHAR(privateobj.object(), ipriv) == '_') - ipriv++; - if (ipriv == plen) { - Py_INCREF(name); -@@ -787,7 +787,6 @@ - if (amount > big_stack) - free(resbuf); - return result; --#endif // else Py_LIMITED_API - } - - /***************************************************************************** -diff -ur a/sources/shiboken2/libshiboken/sbkstring.cpp b/sources/shiboken2/libshiboken/sbkstring.cpp ---- a/sources/shiboken2/libshiboken/sbkstring.cpp 2020-11-11 07:51:30.000000000 -0500 -+++ b/sources/shiboken2/libshiboken/sbkstring.cpp 2021-09-26 08:47:00.614184926 -0400 -@@ -247,8 +247,15 @@ - { - auto &set = staticStrings(); - for (PyObject *ob : set) { -+ // Since Python 3.10, interned strings at deleted at Python exit. -+#if PY_VERSION_HEX >= 0x030a0000 -+ Py_DECREF(ob); -+ // createStaticString() calls Py_INCREF() -+ Py_DECREF(ob); -+#else - Py_REFCNT(ob) = 1; - Py_DECREF(ob); -+#endif - } - set.clear(); - } -diff -ur a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py ---- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2020-11-11 07:51:30.000000000 -0500 -+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2021-09-26 08:47:00.614184926 -0400 -@@ -300,6 +300,7 @@ - "zero(object)": None, - "zero(str)": "", - "zero(typing.Any)": None, -+ "zero(Any)": None, - }) - - type_map.update({ -diff -ur a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py ---- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2020-11-11 07:51:30.000000000 -0500 -+++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2021-09-26 08:48:27.743171587 -0400 -@@ -43,10 +43,11 @@ - import re - import warnings - import types -+import typing - import keyword - import functools - from shibokensupport.signature.mapping import (type_map, update_mapping, -- namespace, typing, _NotCalled, ResultVariable, ArrayLikeVariable) -+ namespace, _NotCalled, ResultVariable, ArrayLikeVariable) - from shibokensupport.signature.lib.tool import (SimpleNamespace, - build_brace_pattern) - -@@ -222,7 +223,7 @@ - def to_string(thing): - if isinstance(thing, str): - return thing -- if hasattr(thing, "__name__"): -+ if hasattr(thing, "__name__") and thing.__module__ != "typing": - dot = "." in str(thing) - name = get_name(thing) - return thing.__module__ + "." + name if dot else name diff --git a/srcpkgs/shiboken2/patches/tests-python-syntax.patch b/srcpkgs/shiboken2/patches/tests-python-syntax.patch deleted file mode 100644 index 32743a6295ce..000000000000 --- a/srcpkgs/shiboken2/patches/tests-python-syntax.patch +++ /dev/null @@ -1,91 +0,0 @@ -This changeset is about both shiboken2 and python3-pyside2 -(that are separated packages) -upstream: yes - -From c6184e01e993dcca9798f306fb8e9cb322fdd0dc Mon Sep 17 00:00:00 2001 -From: Christian Tismer -Date: Thu, 3 Dec 2020 13:38:58 +0100 -Subject: [PATCH] fix both qflags_test and the qflags cppgenerator code - -There was a years-old qflags test failing on Python 3. -It was blacklisted with the comment - - "# Nested exception in Python 3" - -This was nonsense: The test was wrong also for Python 2. -It just happened to work, because Python 2 had some weird -errors leaking. The real bug was in missing error handling -in cppgenerator.cpp . - -See the main description in the issue. - -Change-Id: Ia0f9466640e0eb33f1b8b26178d33f2be0bcb32f -Task-number: PYSIDE-1442 -Reviewed-by: Friedemann Kleint -(cherry picked from commit 288fadb796ec4e11e99e3752d531ada7edf15d75) ---- - build_history/blacklist.txt | 3 --- - sources/pyside2/tests/QtCore/qflags_test.py | 12 +++++++----- - .../shiboken2/generator/shiboken2/cppgenerator.cpp | 2 ++ - 3 files changed, 9 insertions(+), 8 deletions(-) - -diff --git build_history/blacklist.txt build_history/blacklist.txt -index 9b63f9784..2a2a5d4c4 100644 ---- a/build_history/blacklist.txt -+++ b/build_history/blacklist.txt -@@ -18,9 +18,6 @@ - darwin py3 - [QtCore::qfileread_test] - darwin --# Nested exception in Python 3 --[QtCore::qflags_test] -- py3 - [QtCore::qobject_connect_notify_test] - linux - darwin -diff --git sources/pyside2/tests/QtCore/qflags_test.py sources/pyside2/tests/QtCore/qflags_test.py -index 08a7c55b1..e1e989c1e 100644 ---- a/sources/pyside2/tests/QtCore/qflags_test.py -+++ b/sources/pyside2/tests/QtCore/qflags_test.py -@@ -30,6 +30,7 @@ - - '''Test cases for QFlags''' - -+import operator - import os - import sys - import unittest -@@ -117,12 +118,13 @@ class QFlagsOnQVariant(unittest.TestCase): - class QFlagsWrongType(unittest.TestCase): - def testWrongType(self): - '''Wrong type passed to QFlags binary operators''' -+ for op in operator.or_, operator.and_, operator.xor: -+ for x in '43', 'jabba', QObject, object: -+ self.assertRaises(TypeError, op, Qt.NoItemFlags, x) -+ self.assertRaises(TypeError, op, x, Qt.NoItemFlags) -+ # making sure this actually does not fail all the time -+ self.assertEqual(operator.or_(Qt.NoItemFlags, 43), 43) - -- self.assertRaises(TypeError, Qt.NoItemFlags | '43') -- self.assertRaises(TypeError, Qt.NoItemFlags & '43') -- self.assertRaises(TypeError, 'jabba' & Qt.NoItemFlags) -- self.assertRaises(TypeError, 'hut' & Qt.NoItemFlags) -- self.assertRaises(TypeError, Qt.NoItemFlags & QObject()) - - if __name__ == '__main__': - unittest.main() -diff --git sources/shiboken2/generator/shiboken2/cppgenerator.cpp sources/shiboken2/generator/shiboken2/cppgenerator.cpp -index ff44db955..87ddd73a5 100644 ---- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp -+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp -@@ -5230,6 +5230,8 @@ void CppGenerator::writeFlagsBinaryOperator(QTextStream &s, const AbstractMetaEn - s << INDENT << "cppArg = static_cast<" << flagsEntry->originalName() - << ">(int(PyInt_AsLong(" << PYTHON_ARG << ")));\n"; - s << "#endif\n\n"; -+ s << INDENT << "if (PyErr_Occurred())\n" << indent(INDENT) -+ << INDENT << "return nullptr;\n" << outdent(INDENT); - s << INDENT << "cppResult = " << CPP_SELF_VAR << " " << cppOpName << " cppArg;\n"; - s << INDENT << "return "; - writeToPythonConversion(s, flagsType, nullptr, QLatin1String("cppResult")); --- -2.29.2 diff --git a/srcpkgs/shiboken2/template b/srcpkgs/shiboken2/template index b56613229c13..d0335b22bf51 100644 --- a/srcpkgs/shiboken2/template +++ b/srcpkgs/shiboken2/template @@ -1,7 +1,7 @@ # Template file for 'shiboken2' pkgname=shiboken2 -version=5.15.2 -revision=4 +version=5.15.5 +revision=1 _pkgname="pyside-setup-opensource-src-${version}" wrksrc="${_pkgname/%5.14.2.1/5.14.2}" build_wrksrc="sources/shiboken2" @@ -15,7 +15,7 @@ maintainer="yopito " license="GPL-3.0-or-later" homepage="https://wiki.qt.io/Qt_for_Python/Shiboken" distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz" -checksum=b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418 +checksum=3920a4fb353300260c9bc46ff70f1fb975c5e7efa22e9d51222588928ce19b33 python_version=3 export CLANG_INSTALL_DIR=${XBPS_CROSS_BASE}/usr From b8499eb6653be38d6362316f4eb55c88f184ac93 Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 22 Aug 2022 13:42:35 +0200 Subject: [PATCH 2/7] python3-pyside2: update to 5.15.5 --- .../patches/tests-python-syntax.patch | 106 ------------------ srcpkgs/python3-pyside2/template | 6 +- 2 files changed, 3 insertions(+), 109 deletions(-) delete mode 100644 srcpkgs/python3-pyside2/patches/tests-python-syntax.patch diff --git a/srcpkgs/python3-pyside2/patches/tests-python-syntax.patch b/srcpkgs/python3-pyside2/patches/tests-python-syntax.patch deleted file mode 100644 index 7f3ab1172f9f..000000000000 --- a/srcpkgs/python3-pyside2/patches/tests-python-syntax.patch +++ /dev/null @@ -1,106 +0,0 @@ -This changeset is about both shiboken2 and python3-pyside2 -(that are separated packages) -upstream: yes - -From c6184e01e993dcca9798f306fb8e9cb322fdd0dc Mon Sep 17 00:00:00 2001 -From: Christian Tismer -Date: Thu, 3 Dec 2020 13:38:58 +0100 -Subject: [PATCH] fix both qflags_test and the qflags cppgenerator code - -There was a years-old qflags test failing on Python 3. -It was blacklisted with the comment - - "# Nested exception in Python 3" - -This was nonsense: The test was wrong also for Python 2. -It just happened to work, because Python 2 had some weird -errors leaking. The real bug was in missing error handling -in cppgenerator.cpp . - -See the main description in the issue. - -Change-Id: Ia0f9466640e0eb33f1b8b26178d33f2be0bcb32f -Task-number: PYSIDE-1442 -Reviewed-by: Friedemann Kleint -(cherry picked from commit 288fadb796ec4e11e99e3752d531ada7edf15d75) ---- - build_history/blacklist.txt | 3 --- - sources/pyside2/tests/QtCore/qflags_test.py | 12 +++++++----- - .../shiboken2/generator/shiboken2/cppgenerator.cpp | 2 ++ - 3 files changed, 9 insertions(+), 8 deletions(-) - -diff --git build_history/blacklist.txt build_history/blacklist.txt -index 9b63f9784..2a2a5d4c4 100644 ---- a/build_history/blacklist.txt -+++ b/build_history/blacklist.txt -@@ -18,9 +18,6 @@ - darwin py3 - [QtCore::qfileread_test] - darwin --# Nested exception in Python 3 --[QtCore::qflags_test] -- py3 - [QtCore::qobject_connect_notify_test] - linux - darwin -diff --git sources/pyside2/tests/QtCore/qflags_test.py sources/pyside2/tests/QtCore/qflags_test.py -index 08a7c55b1..e1e989c1e 100644 ---- a/sources/pyside2/tests/QtCore/qflags_test.py -+++ b/sources/pyside2/tests/QtCore/qflags_test.py -@@ -30,6 +30,7 @@ - - '''Test cases for QFlags''' - -+import operator - import os - import sys - import unittest -@@ -117,12 +118,13 @@ class QFlagsOnQVariant(unittest.TestCase): - class QFlagsWrongType(unittest.TestCase): - def testWrongType(self): - '''Wrong type passed to QFlags binary operators''' -+ for op in operator.or_, operator.and_, operator.xor: -+ for x in '43', 'jabba', QObject, object: -+ self.assertRaises(TypeError, op, Qt.NoItemFlags, x) -+ self.assertRaises(TypeError, op, x, Qt.NoItemFlags) -+ # making sure this actually does not fail all the time -+ self.assertEqual(operator.or_(Qt.NoItemFlags, 43), 43) - -- self.assertRaises(TypeError, Qt.NoItemFlags | '43') -- self.assertRaises(TypeError, Qt.NoItemFlags & '43') -- self.assertRaises(TypeError, 'jabba' & Qt.NoItemFlags) -- self.assertRaises(TypeError, 'hut' & Qt.NoItemFlags) -- self.assertRaises(TypeError, Qt.NoItemFlags & QObject()) - - if __name__ == '__main__': - unittest.main() -diff --git sources/shiboken2/generator/shiboken2/cppgenerator.cpp sources/shiboken2/generator/shiboken2/cppgenerator.cpp -index ff44db955..87ddd73a5 100644 ---- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp -+++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp -@@ -5230,6 +5230,8 @@ void CppGenerator::writeFlagsBinaryOperator(QTextStream &s, const AbstractMetaEn - s << INDENT << "cppArg = static_cast<" << flagsEntry->originalName() - << ">(int(PyInt_AsLong(" << PYTHON_ARG << ")));\n"; - s << "#endif\n\n"; -+ s << INDENT << "if (PyErr_Occurred())\n" << indent(INDENT) -+ << INDENT << "return nullptr;\n" << outdent(INDENT); - s << INDENT << "cppResult = " << CPP_SELF_VAR << " " << cppOpName << " cppArg;\n"; - s << INDENT << "return "; - writeToPythonConversion(s, flagsType, nullptr, QLatin1String("cppResult")); --- -2.29.2 - -Fix python warning about 'is not' usage. -This diff is DISTINCT from the previous patch - ---- a/sources/pyside2/tests/QtWidgets/qwidget_test.py 2020-11-11 13:51:30.000000000 +0100 -+++ b/sources/pyside2/tests/QtWidgets/qwidget_test.py 2020-11-24 14:28:06.103093649 +0100 -@@ -73,7 +73,7 @@ - self.assertTrue(not widget.isVisible()) - widget.setVisible(True) - self.assertTrue(widget.isVisible()) -- self.assertTrue(widget.winId() is not 0) -+ self.assertTrue(widget.winId() != 0) - # skip this test on macOS since no native events are received - if sys.platform == 'darwin': - return diff --git a/srcpkgs/python3-pyside2/template b/srcpkgs/python3-pyside2/template index edad85a5112f..971b77fe1ef8 100644 --- a/srcpkgs/python3-pyside2/template +++ b/srcpkgs/python3-pyside2/template @@ -1,7 +1,7 @@ # Template file for 'python3-pyside2' pkgname=python3-pyside2 -version=5.15.2 -revision=2 +version=5.15.5 +revision=1 _pkgname="pyside-setup-opensource-src-${version}" wrksrc="${_pkgname/%5.14.2.1/5.14.2}" build_wrksrc="sources/pyside2" @@ -24,7 +24,7 @@ maintainer="yopito " license="LGPL-3.0-or-later" homepage="https://wiki.qt.io/Qt_for_Python" distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz" -checksum=b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418 +checksum=3920a4fb353300260c9bc46ff70f1fb975c5e7efa22e9d51222588928ce19b33 build_options="webengine" desc_option_webengine="Build Qt5 WebEngine bindings" From c6a62d396479825eb185c3844cf7475d42074278 Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 22 Aug 2022 13:42:36 +0200 Subject: [PATCH 3/7] pyside2-tools: update to 5.15.5 --- srcpkgs/pyside2-tools/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/pyside2-tools/template b/srcpkgs/pyside2-tools/template index 35d353aba95d..0aa2d8ea9e83 100644 --- a/srcpkgs/pyside2-tools/template +++ b/srcpkgs/pyside2-tools/template @@ -1,6 +1,6 @@ # Template file for 'pyside2-tools' pkgname=pyside2-tools -version=5.15.2 +version=5.15.5 revision=1 _pkgname="pyside-setup-opensource-src-${version}" wrksrc="${_pkgname/%5.14.2.1/5.14.2}" @@ -15,7 +15,7 @@ maintainer="yopito " license="LGPL-3.0-or-later" homepage="https://wiki.qt.io/Qt_for_Python/Shiboken" distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz" -checksum=b306504b0b8037079a8eab772ee774b9e877a2d84bab2dbefbe4fa6f83941418 +checksum=3920a4fb353300260c9bc46ff70f1fb975c5e7efa22e9d51222588928ce19b33 python_version=3 if [ ${CROSS_BUILD} ]; then From 33d5efdcabf86e0e028a69ce3b2c6dc8e5c21dff Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 22 Aug 2022 13:42:37 +0200 Subject: [PATCH 4/7] python3-QtPy: rebuild with python3-pyside2 5.15.5 --- srcpkgs/python3-QtPy/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/python3-QtPy/template b/srcpkgs/python3-QtPy/template index b9ddef1af192..92c0b509dec6 100644 --- a/srcpkgs/python3-QtPy/template +++ b/srcpkgs/python3-QtPy/template @@ -1,7 +1,7 @@ # Template file for 'python3-QtPy' pkgname=python3-QtPy version=1.9.0 -revision=3 +revision=4 wrksrc=QtPy-${version} build_style=python3-module hostmakedepends="python3-setuptools" From 1b31507fa73d790f9b6924e61ac4990b582775c3 Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 22 Aug 2022 13:42:38 +0200 Subject: [PATCH 5/7] libspnav: update to 1.0, fix licensing --- .../patches/OO.Makefile.fix-liblinks.patch | 16 ---------------- srcpkgs/libspnav/template | 10 +++++++--- 2 files changed, 7 insertions(+), 19 deletions(-) delete mode 100644 srcpkgs/libspnav/patches/OO.Makefile.fix-liblinks.patch diff --git a/srcpkgs/libspnav/patches/OO.Makefile.fix-liblinks.patch b/srcpkgs/libspnav/patches/OO.Makefile.fix-liblinks.patch deleted file mode 100644 index 850aae51fe02..000000000000 --- a/srcpkgs/libspnav/patches/OO.Makefile.fix-liblinks.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fix link generation of .so files -Source: https://git.archlinux.org/svntogit/packages.git/plain/trunk/Makefile.patch?h=packages/libspnav - ---- a/Makefile.in~ 2015-01-10 09:08:35.043417955 +0000 -+++ b/Makefile.in 2015-01-10 09:09:00.833315269 +0000 -@@ -54,8 +54,8 @@ - cp $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) - [ -n "$(soname)" ] && \ - rm -f $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) && \ -- ln -s $(DESTDIR)$(PREFIX)/$(libdir)/$(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) && \ -- ln -s $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \ -+ ln -s $(lib_so) $(DESTDIR)$(PREFIX)/$(libdir)/$(soname) && \ -+ ln -s $(soname) $(DESTDIR)$(PREFIX)/$(libdir)/$(devlink) || \ - true - for h in $(hdr); do cp -p $(srcdir)/$$h $(DESTDIR)$(PREFIX)/include/; done - diff --git a/srcpkgs/libspnav/template b/srcpkgs/libspnav/template index df35072b2404..4c2a6ac34756 100644 --- a/srcpkgs/libspnav/template +++ b/srcpkgs/libspnav/template @@ -1,21 +1,24 @@ # Template file for 'libspnav' pkgname=libspnav -version=0.2.3 +version=1.0 revision=1 build_style=gnu-configure configure_args="--disable-opt" makedepends="libX11-devel" short_desc="Open source alternative to 3DConnextion drivers" maintainer="yopito " -license="GPL-3" +license="BSD-3-Clause" homepage="http://spacenav.sourceforge.net/" distfiles="${SOURCEFORGE_SITE}/spacenav/${pkgname}-${version}.tar.gz" -checksum=7ae4d7bb7f6a5dda28b487891e01accc856311440f582299760dace6ee5f1f93 +checksum=8849b7f7826d750f6956cf8f4f53937f2359ab6da97d6c834c71d5f771212e7c do_build() { make CC="${CC}" AR="${AR}" } +post_install() { + vlicense LICENSE +} libspnav-devel_package() { short_desc+=" - development files" depends="${makedepends} ${sourcepkg}>=${version}_${revision}" @@ -23,5 +26,6 @@ libspnav-devel_package() { vmove usr/include vmove "usr/lib/*.a" vmove "usr/lib/*.so" + vmove usr/share/pkgconfig } } From 4421bff05ebe026549d5a363cdcac9656953fad9 Mon Sep 17 00:00:00 2001 From: yopito Date: Thu, 25 Aug 2022 13:56:37 +0200 Subject: [PATCH 6/7] python3-pivy: update to 0.6.8 --- srcpkgs/python3-pivy/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/python3-pivy/template b/srcpkgs/python3-pivy/template index a442b6a94c87..b09865a03ec1 100644 --- a/srcpkgs/python3-pivy/template +++ b/srcpkgs/python3-pivy/template @@ -1,6 +1,6 @@ # Template file for 'python3-pivy' pkgname=python3-pivy -version=0.6.7 +version=0.6.8 revision=1 wrksrc="pivy-${version}" build_style=cmake @@ -12,7 +12,7 @@ maintainer="yopito " license="ISC" homepage="https://github.com/coin3d/pivy" distfiles="${homepage}/archive/${version}.tar.gz" -checksum=37e33d85117aac27640e011df74ddcd77f270428300df916b46ee5c50645d582 +checksum=c443dd7dd724b0bfa06427478b9d24d31e0c3b5138ac5741a2917a443b28f346 # still relevant with pivy 0.6.6 ? case "$XBPS_TARGET_MACHINE" in From a5a90cc23b0ccf8a7a5c010ec8a71f90dca5b8e4 Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 22 Aug 2022 13:42:39 +0200 Subject: [PATCH 7/7] freecad: update to 0.20.1 --- srcpkgs/freecad/patches/002-execinfo.patch | 30 - .../patches/010-salomesmesh-execinfo.patch | 30 - srcpkgs/freecad/patches/150-vtk9.patch | 796 ------------------ srcpkgs/freecad/patches/152-cmake-vtk9.patch | 53 -- .../patches/153-limits.h-for-musl.patch | 13 + .../154-revert-gui-tmp-redirect-stderr.patch | 73 ++ srcpkgs/freecad/template | 9 +- 7 files changed, 90 insertions(+), 914 deletions(-) delete mode 100644 srcpkgs/freecad/patches/002-execinfo.patch delete mode 100644 srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch delete mode 100644 srcpkgs/freecad/patches/150-vtk9.patch delete mode 100644 srcpkgs/freecad/patches/152-cmake-vtk9.patch create mode 100644 srcpkgs/freecad/patches/153-limits.h-for-musl.patch create mode 100644 srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch deleted file mode 100644 index bcdca77a72a4..000000000000 --- a/srcpkgs/freecad/patches/002-execinfo.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/src/App/Application.cpp 2020-01-22 23:27:42.709273087 +0100 -+++ b/src/App/Application.cpp 2020-01-22 23:50:53.915075955 +0100 -@@ -1485,7 +1485,9 @@ - #endif - - #if defined(FC_OS_LINUX) -+#ifdef __GLIBC__ - #include -+#endif - #include - #include - -@@ -1497,6 +1499,7 @@ - // This function produces a stack backtrace with demangled function & method names. - void printBacktrace(size_t skip=0) - { -+#ifdef __GLIBC__ - void *callstack[128]; - size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]); - size_t nFrames = backtrace(callstack, nMaxFrames); -@@ -1527,6 +1530,9 @@ - } - - free(symbols); -+#else -+ std::cerr << "sorry, no backtrace on musl libc"; -+#endif - } - #endif - diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch deleted file mode 100644 index cc6bdc9ff485..000000000000 --- a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp -+++ b/src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp -@@ -29,7 +29,9 @@ - #ifndef WIN32 - #include - #include -+#ifdef __GLIBC__ - #include -+#endif - #endif - - -@@ -109,6 +111,7 @@ - #ifndef WIN32 - void print_traceback() - { -+#ifdef __GLIBC__ - void *array[50]; - size_t size; - char **strings; -@@ -123,6 +126,9 @@ - } - - free (strings); -+#else -+ std::cerr << "sorry, no backtrace on musl libc"; -+#endif - } - #else - #if (_MSC_VER >= 1400) // Visual Studio 2005 diff --git a/srcpkgs/freecad/patches/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch deleted file mode 100644 index 92673e7c9b9f..000000000000 --- a/srcpkgs/freecad/patches/150-vtk9.patch +++ /dev/null @@ -1,796 +0,0 @@ -Taken from https://github.com/wwmayer/FreeCAD/commit/bb9bcbd51df7c3cb76c5823038e4ea0f7e25a9ff -but removed patch on file src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp : already applied (2021-01-20) - -diff --git src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -index 14a6d9a763f..0e9b9e6c905 100644 ---- a/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -+++ b/src/3rdParty/salomesmesh/inc/SMDS_MeshElement.hxx -@@ -40,11 +40,16 @@ - - #include - #include -+#include - - //typedef unsigned short UShortType; - typedef short ShortType; - typedef int LongType; -- -+#ifdef VTK_CELL_ARRAY_V2 -+typedef const vtkIdType* vtkIdTypePtr; -+#else -+typedef vtkIdType* vtkIdTypePtr; -+#endif - class SMDS_MeshNode; - class SMDS_MeshEdge; - class SMDS_MeshFace; -@@ -192,7 +197,7 @@ protected: - //! Element index in vector SMDS_Mesh::myNodes or SMDS_Mesh::myCells - int myID; - //! index in vtkUnstructuredGrid -- int myVtkID; -+ vtkIdType myVtkID; - //! SMDS_Mesh identification in SMESH - ShortType myMeshId; - //! SubShape and SubMesh identification in SMESHDS -diff --git src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -index 9e4a23eddfb..77465814541 100644 ---- a/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -+++ b/src/3rdParty/salomesmesh/inc/SMDS_UnstructuredGrid.hxx -@@ -95,7 +95,11 @@ public: - std::map >& nodeQuadDomains); - vtkCellLinks* GetLinks() - { -+#ifdef VTK_CELL_ARRAY_V2 -+ return static_cast(GetCellLinks()); -+#else - return Links; -+#endif - } - SMDS_Downward* getDownArray(unsigned char vtkType) - { -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -index 299093c94f6..2680c217305 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_BallElement.cpp -@@ -67,10 +67,16 @@ void SMDS_BallElement::SetDiameter(double diameter) - bool SMDS_BallElement::ChangeNode (const SMDS_MeshNode * node) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ cellPoints->SetId(0, node->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - pts[0] = node->getVtkId(); -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -83,7 +89,8 @@ void SMDS_BallElement::Print (std::ostream & OS) const - const SMDS_MeshNode* SMDS_BallElement::GetNode (const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ 0 ]); - } -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -index d6049c0bd19..a41f5c18e78 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Downward.cpp -@@ -303,7 +303,7 @@ int SMDS_Down1D::getNodeSet(int cellId, int* nodeSet) - void SMDS_Down1D::setNodes(int cellId, int vtkId) - { - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(vtkId, npts, pts); - // MESSAGE(vtkId << " " << npts << " " << _nbDownCells); - //ASSERT(npts == _nbDownCells); -@@ -357,7 +357,7 @@ int SMDS_Down1D::computeVtkCells(int *pts, std::vector& vtkIds) - { - vtkIdType point = pts[i]; - int numCells = _grid->GetLinks()->GetNcells(point); -- vtkIdType *cells = _grid->GetLinks()->GetCells(point); -+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point); - for (int j = 0; j < numCells; j++) - { - int vtkCellId = cells[j]; -@@ -532,7 +532,7 @@ int SMDS_Down2D::computeVolumeIds(int cellId, int* ids) - // --- find point id's of the face - - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(cellId, npts, pts); - vector nodes; - for (int i = 0; i < npts; i++) -@@ -577,7 +577,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids) - vtkIdType point = pts[i]; - int numCells = _grid->GetLinks()->GetNcells(point); - //MESSAGE("cells pour " << i << " " << numCells); -- vtkIdType *cells = _grid->GetLinks()->GetCells(point); -+ vtkIdTypePtr cells = _grid->GetLinks()->GetCells(point); - for (int j = 0; j < numCells; j++) - { - int vtkCellId = cells[j]; -@@ -627,7 +627,7 @@ int SMDS_Down2D::computeVolumeIdsFromNodesFace(int* pts, int npts, int* ids) - void SMDS_Down2D::setTempNodes(int cellId, int vtkId) - { - vtkIdType npts = 0; -- vtkIdType *pts; // will refer to the point id's of the face -+ vtkIdTypePtr pts; // will refer to the point id's of the face - _grid->GetCellPoints(vtkId, npts, pts); - // MESSAGE(vtkId << " " << npts << " " << _nbNodes); - //ASSERT(npts == _nbNodes); -@@ -795,7 +795,7 @@ void SMDS_Down3D::getNodeIds(int cellId, std::set& nodeSet) - { - int vtkId = this->_vtkCellIds[cellId]; - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(vtkId, npts, nodes); - for (int i = 0; i < npts; i++) - nodeSet.insert(nodes[i]); -@@ -1126,7 +1126,7 @@ void SMDS_DownTetra::getOrderedNodesOfFace(int cellId, std::vector& o - //MESSAGE("cellId = " << cellId); - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(this->_vtkCellIds[cellId], npts, nodes); - - set tofind; -@@ -1178,7 +1178,7 @@ void SMDS_DownTetra::computeFacesWithNodes(int cellId, ListElemByNodesType& face - // --- find point id's of the volume - - vtkIdType npts = 0; -- vtkIdType *nodes; // will refer to the point id's of the volume -+ vtkIdTypePtr nodes; // will refer to the point id's of the volume - _grid->GetCellPoints(cellId, npts, nodes); - - // --- create all the ordered list of node id's for each face -@@ -1234,7 +1234,7 @@ void SMDS_DownQuadTetra::getOrderedNodesOfFace(int cellId, std::vectorGetCellLinks(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkCellLinks *links = static_cast(myGrid->GetCellLinks()); -+#else -+ vtkCellLinks *links = myGrid->GetCellLinks(); -+#endif - for (int i=0; iGetNcells(i); -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -index 95438eab064..0df32e3b97c 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh0DElement.cpp -@@ -146,6 +146,17 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN - if ( nbNodes == 1 ) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ myNode = nodes[0]; -+ cellPoints->SetId(0, myNode->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -156,6 +167,7 @@ bool SMDS_Mesh0DElement::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbN - } - myNode = nodes[0]; - pts[0] = myNode->getVtkId(); -+#endif - - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -index f647a5f1b8f..5b903c8fb55 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_MeshNode.cpp -@@ -191,7 +191,7 @@ class SMDS_MeshNode_MyInvIterator: public SMDS_ElemIterator - SMDS_ElemIteratorPtr SMDS_MeshNode:: - GetInverseElementIterator(SMDSAbs_ElementType type) const - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - //MESSAGE("myID " << myID << " ncells " << l.ncells); - return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); - } -@@ -251,7 +251,7 @@ elementsIterator(SMDSAbs_ElementType type) const - return SMDS_MeshElement::elementsIterator(SMDSAbs_Node); - else - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type)); - } - } -@@ -350,7 +350,7 @@ void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME) - const SMDS_MeshCell *cell = dynamic_cast (ME); - assert(cell); - SMDS_UnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkCellLinks *Links = grid->GetCellLinks(); -+ vtkCellLinks *Links = static_cast(grid->GetCellLinks()); - Links->ResizeCellList(myVtkID, 1); - Links->AddCellReference(cell->getVtkId(), myVtkID); - } -@@ -366,7 +366,7 @@ void SMDS_MeshNode::ClearInverseElements() - - bool SMDS_MeshNode::emptyInverseElements() - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - return (l.ncells == 0); - } - -@@ -378,7 +378,7 @@ bool SMDS_MeshNode::emptyInverseElements() - - int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const - { -- vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myVtkID); -+ vtkCellLinks::Link l = static_cast(SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks())->GetLink(myVtkID); - - if ( type == SMDSAbs_All ) - return l.ncells; -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -index fbd903b1e74..ff2b81e9694 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp -@@ -139,8 +139,8 @@ int SMDS_UnstructuredGrid::InsertNextLinkedCell(int type, int npts, vtkIdType *p - for (; it != setOfNodes.end(); ++it) - { - //MESSAGE("reverse link for node " << *it << " cell " << cellid); -- this->Links->ResizeCellList(*it, 1); -- this->Links->AddCellReference(cellid, *it); -+ this->GetLinks()->ResizeCellList(*it, 1); -+ this->GetLinks()->AddCellReference(cellid, *it); - } - - return cellid; -@@ -332,9 +332,13 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes, - { - newTypes->SetValue(alreadyCopied, this->Types->GetValue(j)); - idCellsOldToNew[j] = alreadyCopied; // old vtkId --> new vtkId -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkIdType oldLoc = this->GetCellLocationsArray()->GetValue(j); -+#else - vtkIdType oldLoc = this->Locations->GetValue(j); -+#endif - vtkIdType nbpts; -- vtkIdType *oldPtsCell = 0; -+ vtkIdTypePtr oldPtsCell = 0; - this->Connectivity->GetCell(oldLoc, nbpts, oldPtsCell); - assert(nbpts < NBMAXNODESINCELL); - //MESSAGE(j << " " << alreadyCopied << " " << (int)this->Types->GetValue(j) << " " << oldLoc << " " << nbpts ); -@@ -952,6 +956,21 @@ void SMDS_UnstructuredGrid::GetNodeIds(std::set& nodeSet, int downId, unsig - */ - void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map localClonedNodeIds) - { -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ this->GetCellPoints(vtkVolId, cellPoints.GetPointer()); -+ for (vtkIdType i = 0; i < cellPoints->GetNumberOfIds(); i++) -+ { -+ if (localClonedNodeIds.count(cellPoints->GetId(i))) -+ { -+ vtkIdType oldpt = cellPoints->GetId(i); -+ cellPoints->SetId(i, localClonedNodeIds[oldpt]); -+ //MESSAGE(oldpt << " --> " << pts[i]); -+ //this->RemoveReferenceToCell(oldpt, vtkVolId); -+ //this->AddReferenceToCell(pts[i], vtkVolId); -+ } -+ } -+#else - vtkIdType npts = 0; - vtkIdType *pts; // will refer to the point id's of the face - this->GetCellPoints(vtkVolId, npts, pts); -@@ -966,6 +985,7 @@ void SMDS_UnstructuredGrid::ModifyCellNodes(int vtkVolId, std::map loc - //this->AddReferenceToCell(pts[i], vtkVolId); - } - } -+#endif - } - - /*! reorder the nodes of a face -@@ -995,11 +1015,20 @@ void SMDS_UnstructuredGrid::BuildLinks() - this->Links->UnRegister(this); - } - -+#ifdef VTK_CELL_ARRAY_V2 -+ this->Links = SMDS_CellLinks::New(); -+ GetLinks()->Allocate(this->GetNumberOfPoints()); -+ GetLinks()->Register(this); -+//FIXME: vtk9 -+ GetLinks()->BuildLinks(this); -+ GetLinks()->Delete(); -+#else - this->Links = SMDS_CellLinks::New(); - this->Links->Allocate(this->GetNumberOfPoints()); - this->Links->Register(this); - this->Links->BuildLinks(this, this->Connectivity); - this->Links->Delete(); -+#endif - } - - /*! Create a volume (prism or hexahedron) by duplication of a face. -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -index deb05985f00..63b6eabb704 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkCellIterator.cpp -@@ -33,7 +33,8 @@ SMDS_VtkCellIterator::SMDS_VtkCellIterator(SMDS_Mesh* mesh, int vtkCellId, SMDSA - } - else - { -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( _cellId, npts, pts ); - _vtkIdList->SetNumberOfIds( _nbNodes = npts ); - for (int i = 0; i < _nbNodes; i++) -@@ -67,7 +68,7 @@ SMDS_VtkCellIteratorToUNV::SMDS_VtkCellIteratorToUNV(SMDS_Mesh* mesh, int vtkCel - //MESSAGE("SMDS_VtkCellInterlacedIterator (UNV)" << _type); - - _vtkIdList = vtkIdList::New(); -- vtkIdType* pts; -+ vtkIdTypePtr pts; - vtkIdType npts; - vtkUnstructuredGrid* grid = _mesh->getGrid(); - grid->GetCellPoints((vtkIdType)_cellId, npts, pts); -@@ -182,7 +183,7 @@ SMDS_VtkCellIteratorPolyH::SMDS_VtkCellIteratorPolyH(SMDS_Mesh* mesh, int vtkCel - { - //MESSAGE("SMDS_VtkCellIterator Polyhedra"); - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(_cellId, nFaces, ptIds); - int id = 0; - _nbNodesInFaces = 0; -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -index 9786abf9aae..6d772a3cd4a 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkEdge.cpp -@@ -67,6 +67,19 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode * node1, const SMDS_MeshNode - bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -79,6 +92,7 @@ bool SMDS_VtkEdge::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -87,7 +101,7 @@ bool SMDS_VtkEdge::IsMediumNode(const SMDS_MeshNode* node) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - //MESSAGE("IsMediumNode " << npts << " " << (node->getVtkId() == pts[npts-1])); - return ((npts == 3) && (node->getVtkId() == pts[2])); -@@ -137,7 +151,8 @@ const SMDS_MeshNode* - SMDS_VtkEdge::GetNode(const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]); - } -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -index 1389e0d3585..cb981bfb18e 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkFace.cpp -@@ -101,6 +101,19 @@ void SMDS_VtkFace::initQuadPoly(const std::vector& nodeIds, SMDS_Mesh - bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -113,6 +126,7 @@ bool SMDS_VtkFace::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -173,7 +187,8 @@ const SMDS_MeshNode* - SMDS_VtkFace::GetNode(const int ind) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ ind ]); - } -@@ -186,7 +201,8 @@ SMDS_VtkFace::GetNode(const int ind) const - int SMDS_VtkFace::GetNodeIndex( const SMDS_MeshNode* node ) const - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - for ( vtkIdType i = 0; i < npts; ++i ) - if ( pts[i] == node->getVtkId() ) -@@ -251,7 +267,7 @@ bool SMDS_VtkFace::IsMediumNode(const SMDS_MeshNode* node) const - return false; - } - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - vtkIdType nodeId = node->getVtkId(); - for (int rank = 0; rank < npts; rank++) -@@ -356,11 +372,18 @@ SMDS_NodeIteratorPtr SMDS_VtkFace::interlacedNodesIterator() const - void SMDS_VtkFace::ChangeApex(SMDS_MeshNode* node) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ grid->RemoveReferenceToCell(cellPoints->GetId(0), myVtkID); -+ cellPoints->SetId(0, node->getVtkId()); -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - grid->RemoveReferenceToCell(pts[0], myVtkID); - pts[0] = node->getVtkId(); -+#endif - node->AddInverseElement(this), - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - } -diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -index 015edf75fd2..19ebd0746c8 100644 ---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_VtkVolume.cpp -@@ -133,6 +133,19 @@ void SMDS_VtkVolume::initPoly(const std::vector& nodeIds, - bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes) - { - vtkUnstructuredGrid* grid = SMDS_Mesh::_meshList[myMeshId]->getGrid(); -+#ifdef VTK_CELL_ARRAY_V2 -+ vtkNew cellPoints; -+ grid->GetCellPoints(myVtkID, cellPoints.GetPointer()); -+ if (nbNodes != cellPoints->GetNumberOfIds()) -+ { -+ MESSAGE("ChangeNodes problem: not the same number of nodes " << cellPoints->GetNumberOfIds() << " -> " << nbNodes); -+ return false; -+ } -+ for (int i = 0; i < nbNodes; i++) -+ { -+ cellPoints->SetId(i, nodes[i]->getVtkId()); -+ } -+#else - vtkIdType npts = 0; - vtkIdType* pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); -@@ -145,6 +158,7 @@ bool SMDS_VtkVolume::ChangeNodes(const SMDS_MeshNode* nodes[], const int nbNodes - { - pts[i] = nodes[i]->getVtkId(); - } -+#endif - SMDS_Mesh::_meshList[myMeshId]->setMyModified(); - return true; - } -@@ -207,7 +221,7 @@ int SMDS_VtkVolume::NbFaces() const - case VTK_POLYHEDRON: - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - nbFaces = nFaces; - break; -@@ -236,7 +250,7 @@ int SMDS_VtkVolume::NbNodes() const - else - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -276,7 +290,7 @@ int SMDS_VtkVolume::NbEdges() const - case VTK_POLYHEDRON: - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - nbEdges = 0; - int id = 0; -@@ -312,7 +326,7 @@ int SMDS_VtkVolume::NbFaceNodes(const int face_ind) const - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -342,7 +356,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetFaceNode(const int face_ind, const int n - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -372,7 +386,7 @@ std::vector SMDS_VtkVolume::GetQuantities() const - if (aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int i = 0; i < nFaces; i++) -@@ -430,7 +444,7 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const - if ( aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0, nbPoints = 0; - for (int i = 0; i < nFaces; i++) -@@ -443,7 +457,8 @@ const SMDS_MeshNode* SMDS_VtkVolume::GetNode(const int ind) const - } - return 0; - } -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - const std::vector& interlace = SMDS_MeshCell::fromVtkOrder( VTKCellType( aVtkType )); - return SMDS_Mesh::_meshList[myMeshId]->FindNodeVtk( pts[ interlace.empty() ? ind : interlace[ind]] ); -@@ -460,7 +475,7 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const - if ( aVtkType == VTK_POLYHEDRON) - { - vtkIdType nFaces = 0; -- vtkIdType* ptIds = 0; -+ vtkIdTypePtr ptIds = 0; - grid->GetFaceStream(this->myVtkID, nFaces, ptIds); - int id = 0; - for (int iF = 0; iF < nFaces; iF++) -@@ -473,7 +488,8 @@ int SMDS_VtkVolume::GetNodeIndex( const SMDS_MeshNode* node ) const - } - return -1; - } -- vtkIdType npts, *pts; -+ vtkIdType npts; -+ vtkIdTypePtr pts; - grid->GetCellPoints( this->myVtkID, npts, pts ); - for ( vtkIdType i = 0; i < npts; ++i ) - if ( pts[i] == node->getVtkId() ) -@@ -534,7 +550,7 @@ bool SMDS_VtkVolume::IsMediumNode(const SMDS_MeshNode* node) const - return false; - } - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(myVtkID, npts, pts); - vtkIdType nodeId = node->getVtkId(); - for (int rank = 0; rank < npts; rank++) -diff --git src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -index fcd044b00f2..f54c24f8618 100644 ---- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -+++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp -@@ -11348,7 +11348,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vectorGetCellLinks()->GetLink(oldId); -+ vtkCellLinks::Link l = static_cast(grid->GetCellLinks())->GetLink(oldId); - for (int i=0; iGetID()); - double values[3]; - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(vtkVolIds[ivol], npts, pts); - SMDS_VtkVolume::gravityCenter(grid, pts, npts, values); - if (id ==0) -@@ -11708,7 +11708,7 @@ bool SMESH_MeshEditor::DoubleNodesOnGroupBoundaries( const std::vectorfirst; - //MESSAGE(" node " << oldId); -- vtkCellLinks::Link l = grid->GetCellLinks()->GetLink(oldId); -+ vtkCellLinks::Link l = static_cast(grid->GetCellLinks())->GetLink(oldId); - for (int i = 0; i < l.ncells; i++) - { - int vtkId = l.cells[i]; -@@ -12165,7 +12165,7 @@ void SMESH_MeshEditor::CreateHoleSkin(double radius, - MESSAGE("volume to check, vtkId " << vtkId << " smdsId " << meshDS->fromVtkToSmds(vtkId)); - bool volInside = false; - vtkIdType npts = 0; -- vtkIdType* pts = 0; -+ vtkIdTypePtr pts = 0; - grid->GetCellPoints(vtkId, npts, pts); - for (int i=0; i ++#endif ++#endif ++ + #endif //FC_CONFIG_H diff --git a/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch b/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch new file mode 100644 index 000000000000..287179a23c3c --- /dev/null +++ b/srcpkgs/freecad/patches/154-revert-gui-tmp-redirect-stderr.patch @@ -0,0 +1,73 @@ +see https://github.com/FreeCAD/FreeCAD/commit/cfe94b00d3434f3e2c8b5114d2909f628c330fa8#commitcomment-71413407 + +upstream: yes + +From 7b377a216b9185960e4cee980a6504dc1a755f50 Mon Sep 17 00:00:00 2001 +From: wmayer +Date: Wed, 29 Jun 2022 15:19:18 +0200 +Subject: [PATCH] Gui: remove workaround for spnav 0.23 due to build failure + with musl libc + +--- + src/Gui/3Dconnexion/GuiNativeEventLinux.cpp | 27 --------------------- + 1 file changed, 27 deletions(-) + +diff --git a/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp b/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp +index 7f0ddd75d..455ece0b3 100644 +--- a/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp ++++ b/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp +@@ -21,42 +21,17 @@ + ***************************************************************************/ + + #include +-#include + + #include "GuiNativeEventLinux.h" + + #include "GuiApplicationNativeEventAware.h" + #include +-#include + #include + + #include + + #include + +-namespace { +-class RedirectStdErr +-{ +-public: +- RedirectStdErr() +- : fi(Base::FileInfo::getTempFileName()) +- , file(stderr) +- { +- stderr = fopen(fi.filePath().c_str(), "w"); +- } +- ~RedirectStdErr() +- { +- fclose(stderr); +- fi.deleteFile(); +- stderr = file; +- } +- +-private: +- Base::FileInfo fi; +- FILE* file; +-}; +-} +- + Gui::GuiNativeEvent::GuiNativeEvent(Gui::GUIApplicationNativeEventAware *app) + : GuiAbstractNativeEvent(app) + { +@@ -72,8 +47,6 @@ Gui::GuiNativeEvent::~GuiNativeEvent() + + void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) + { +- // tmp. redirect stderr to a file to suppress an error message from spnav_open() +- RedirectStdErr err; + Q_UNUSED(window) + if (spnav_open() == -1) { + Base::Console().Log("Couldn't connect to spacenav daemon. Please ignore if you don't have a spacemouse.\n"); +-- +2.37.1 + diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template index 1e2aec024fd7..e9c697adbe1a 100644 --- a/srcpkgs/freecad/template +++ b/srcpkgs/freecad/template @@ -1,6 +1,6 @@ # Template file for 'freecad' pkgname=freecad -version=0.19.4 +version=0.20.1 revision=1 wrksrc="FreeCAD-${version}" build_style=cmake @@ -23,10 +23,9 @@ makedepends="python3-devel boost-devel libxerces-c-devel zlib-devel occt-devel coin3-devel libshiboken2-devel libspnav-devel pyside2-tools liblz4-devel libpyside2-python3-devel python3-matplotlib netcdf-devel jsoncpp-devel qt5-devel qt5-svg-devel qt5-tools-devel qt5-webkit-devel - qt5-xmlpatterns-devel coin3-doc glew-devel" + qt5-xmlpatterns-devel coin3-doc glew-devel python3-pivy" -# FreeCAD help: qt5/assistant with SQLite storage -depends="python3-matplotlib python3-pyside2 qt5-plugin-sqlite python3-pivy" +depends="python3-matplotlib python3-pyside2-webengine python3-pivy" python_version=3 pycompile_dirs="usr/lib/${pkgname}/Mod" @@ -36,7 +35,7 @@ maintainer="yopito " license="LGPL-2.0-or-later" homepage="https://freecadweb.org/" distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz" -checksum=e40a1c343956e13c56cc8578d025ae83d68d9d20acda1732953bc8a3883e9722 +checksum=70c15f7c1c676e3376cdc2a66c136030c5502f9802935e5b626ca8ce3f8812ed if [ "$XBPS_TARGET_LIBC" = musl ]; then makedepends+=" libexecinfo-devel"