From cb5c64e623c9060f7e1c5cf40ffc5fc052b0e33a Mon Sep 17 00:00:00 2001 From: Stephen Walker-Weinshenker Date: Sat, 13 Mar 2021 19:06:12 -0700 Subject: [PATCH] FreeCAD: update to 0.19.1 Patches updated - get rid of python 2 - execinfo for musl builds - namespace missing std from 0.18 build - vtk9 patch from 0.18 build - fix for salomesmesh --- srcpkgs/freecad/patches/001-python3.patch | 11 -- .../freecad/patches/001-remove-python2.patch | 15 ++ srcpkgs/freecad/patches/002-execinfo.patch | 12 +- .../patches/010-salomesmesh-execinfo.patch | 30 +++ .../patches/020-namespace-missing-std.patch | 122 +----------- srcpkgs/freecad/patches/090-py38.patch | 22 --- srcpkgs/freecad/patches/091-py39.patch | 174 ------------------ ...00-detect-shiboken2-and-pyside2-5.14.patch | 33 ---- .../101-pyside2-tool-5.14-support.patch | 67 ------- srcpkgs/freecad/patches/102-qt5-5.15.0.patch | 14 -- .../patches/103-find-coin3v4-doc.patch | 50 ----- srcpkgs/freecad/patches/150-vtk9.patch | 28 +-- .../freecad/patches/151-python-warning.patch | 39 ---- srcpkgs/freecad/template | 9 +- 14 files changed, 63 insertions(+), 563 deletions(-) delete mode 100644 srcpkgs/freecad/patches/001-python3.patch create mode 100644 srcpkgs/freecad/patches/001-remove-python2.patch create mode 100644 srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch delete mode 100644 srcpkgs/freecad/patches/090-py38.patch delete mode 100644 srcpkgs/freecad/patches/091-py39.patch delete mode 100644 srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch delete mode 100644 srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch delete mode 100644 srcpkgs/freecad/patches/102-qt5-5.15.0.patch delete mode 100644 srcpkgs/freecad/patches/103-find-coin3v4-doc.patch delete mode 100644 srcpkgs/freecad/patches/151-python-warning.patch diff --git a/srcpkgs/freecad/patches/001-python3.patch b/srcpkgs/freecad/patches/001-python3.patch deleted file mode 100644 index b49978adcf37..000000000000 --- a/srcpkgs/freecad/patches/001-python3.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -445,7 +445,7 @@ - - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598 - # Acceptable versions of Python --set(Python_ADDITIONAL_VERSIONS "2.7") -+set(Python_ADDITIONAL_VERSIONS "2.7 3.6") - - # For building on OS X - if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") diff --git a/srcpkgs/freecad/patches/001-remove-python2.patch b/srcpkgs/freecad/patches/001-remove-python2.patch new file mode 100644 index 000000000000..64dfc24ce77f --- /dev/null +++ b/srcpkgs/freecad/patches/001-remove-python2.patch @@ -0,0 +1,15 @@ +diff --git cMake/FreeCAD_Helpers/SetupPython.cmake cMake/FreeCAD_Helpers/SetupPython.cmake +index 3c8e10635..c4d2f2629 100644 +--- cMake/FreeCAD_Helpers/SetupPython.cmake ++++ cMake/FreeCAD_Helpers/SetupPython.cmake +@@ -1,10 +1,6 @@ + macro(SetupPython) + # -------------------------------- Python -------------------------------- + +- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677598 +- # Acceptable versions of Python +- set(Python_ADDITIONAL_VERSIONS "2.7") +- + # For building on OS X + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT BUILD_WITH_CONDA) + diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch index 9f9d797d00f2..037ac0d947cc 100644 --- a/srcpkgs/freecad/patches/002-execinfo.patch +++ b/srcpkgs/freecad/patches/002-execinfo.patch @@ -1,6 +1,8 @@ ---- src/App/Application.cpp.orig 2019-03-08 18:56:16.000000000 +0100 -+++ src/App/Application.cpp 2019-03-13 21:36:38.873587534 +0100 -@@ -1163,7 +1163,9 @@ +diff --git src/App/Application.cpp src/App/Application.cpp +index 2d498974d..baacdc2fe 100644 +--- src/App/Application.cpp ++++ src/App/Application.cpp +@@ -1577,7 +1577,9 @@ static void freecadNewHandler () #endif #if defined(FC_OS_LINUX) @@ -10,7 +12,7 @@ #include #include -@@ -1175,6 +1177,7 @@ +@@ -1589,6 +1591,7 @@ static void freecadNewHandler () // This function produces a stack backtrace with demangled function & method names. void printBacktrace(size_t skip=0) { @@ -18,7 +20,7 @@ void *callstack[128]; size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]); size_t nFrames = backtrace(callstack, nMaxFrames); -@@ -1205,6 +1208,9 @@ +@@ -1619,6 +1622,9 @@ void printBacktrace(size_t skip=0) } free(symbols); diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch new file mode 100644 index 000000000000..2b46616ad7a2 --- /dev/null +++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch @@ -0,0 +1,30 @@ +--- src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp ++++ 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/020-namespace-missing-std.patch b/srcpkgs/freecad/patches/020-namespace-missing-std.patch index 82033cd5afb4..1ee6f4f5a80e 100644 --- a/srcpkgs/freecad/patches/020-namespace-missing-std.patch +++ b/srcpkgs/freecad/patches/020-namespace-missing-std.patch @@ -1,127 +1,15 @@ # reason: fix build with gcc9 # upstream: yes - -diff --git src/3rdParty/salomesmesh/inc/Rn.h src/3rdParty/salomesmesh/inc/Rn.h -index 6ec871d93..e92d2275a 100644 ---- src/3rdParty/salomesmesh/inc/Rn.h -+++ src/3rdParty/salomesmesh/inc/Rn.h -@@ -180,12 +180,12 @@ class R4: public R3 - { - friend std::ostream& operator <<(std::ostream& f, const R4 & P ) - { f << P.x << ' ' << P.y << ' ' << P.z << ' ' << P.omega; return f; } -- friend istream& operator >>(istream& f, R4 & P) -+ friend std::istream& operator >>(std::istream& f, R4 & P) - { f >> P.x >> P.y >> P.z >> P.omega ; return f; } - - friend std::ostream& operator <<(std::ostream& f, const R4 * P ) - { f << P->x << ' ' << P->y << ' ' << P->z << ' ' << P->omega; return f; } -- friend istream& operator >>(istream& f, R4 * P) -+ friend std::istream& operator >>(std::istream& f, R4 * P) - { f >> P->x >> P->y >> P->z >> P->omega ; return f; } - - public: - - -diff --git src/Mod/Drawing/App/DrawingExport.cpp src/Mod/Drawing/App/DrawingExport.cpp -index 0c3c23231..550b12c25 100644 ---- src/Mod/Drawing/App/DrawingExport.cpp -+++ src/Mod/Drawing/App/DrawingExport.cpp -@@ -81,6 +81,7 @@ - #include - - using namespace Drawing; -+using namespace std; - - TopoDS_Edge DrawingOutput::asCircle(const BRepAdaptor_Curve& c) const - { -diff --git src/Mod/Part/App/Geometry2d.cpp src/Mod/Part/App/Geometry2d.cpp -index fb1de909c..979465533 100644 ---- src/Mod/Part/App/Geometry2d.cpp -+++ src/Mod/Part/App/Geometry2d.cpp -@@ -83,6 +83,7 @@ - #include - - using namespace Part; -+using namespace std; - - extern const char* gce_ErrorStatusText(gce_ErrorType et); - -diff --git src/Mod/Raytracing/App/AppRaytracingPy.cpp src/Mod/Raytracing/App/AppRaytracingPy.cpp -index d48c51c97..1bb2b1b01 100644 ---- src/Mod/Raytracing/App/AppRaytracingPy.cpp -+++ src/Mod/Raytracing/App/AppRaytracingPy.cpp -@@ -40,6 +40,8 @@ - #include - #include - -+using namespace std; -+ - - namespace Raytracing { - class Module : public Py::ExtensionModule -diff --git src/Mod/Raytracing/App/LuxFeature.cpp src/Mod/Raytracing/App/LuxFeature.cpp -index 930fe12b7..d1e0a0089 100644 ---- src/Mod/Raytracing/App/LuxFeature.cpp -+++ src/Mod/Raytracing/App/LuxFeature.cpp -@@ -38,6 +38,7 @@ - - - using namespace Raytracing; -+using namespace std; - - PROPERTY_SOURCE(Raytracing::LuxFeature, Raytracing::RaySegment) - -diff --git src/Mod/Raytracing/App/RayFeature.cpp src/Mod/Raytracing/App/RayFeature.cpp -index cdd2cb6dc..235a98685 100644 ---- src/Mod/Raytracing/App/RayFeature.cpp -+++ src/Mod/Raytracing/App/RayFeature.cpp -@@ -36,6 +36,7 @@ - - - using namespace Raytracing; -+using namespace std; - - PROPERTY_SOURCE(Raytracing::RayFeature, Raytracing::RaySegment) - -diff --git src/Mod/TechDraw/App/Geometry.cpp src/Mod/TechDraw/App/Geometry.cpp -index c10b63177..d34eeb9bb 100644 ---- src/Mod/TechDraw/App/Geometry.cpp -+++ src/Mod/TechDraw/App/Geometry.cpp -@@ -80,6 +80,7 @@ - #include "Geometry.h" - - using namespace TechDraw; -+using namespace std; - - // Collection of Geometric Features - Wire::Wire() - - ---- src/Mod/Part/App/PropertyTopoShape.cpp -+++ src/Mod/Part/App/PropertyTopoShape.cpp -@@ -281,11 +281,11 @@ - static Standard_Boolean BRepTools_Write(const TopoDS_Shape& Sh, - const Standard_CString File) - { -- ofstream os; -+ std::ofstream os; - #if OCC_VERSION_HEX >= 0x060800 -- OSD_OpenStream(os, File, ios::out); -+ OSD_OpenStream(os, File, std::ios::out); - #else -- os.open(File, ios::out); -+ os.open(File, std::ios::out); - #endif - if (!os.rdbuf()->is_open()) return Standard_False; - - +diff --git src/Mod/Part/App/Geometry.cpp src/Mod/Part/App/Geometry.cpp +index e7663fdf2..692e1a9d5 100644 --- src/Mod/Part/App/Geometry.cpp +++ src/Mod/Part/App/Geometry.cpp -@@ -141,6 +141,7 @@ +@@ -141,7 +141,7 @@ #include "Geometry.h" using namespace Part; +- +using namespace std; - const char* gce_ErrorStatusText(gce_ErrorType et) + { diff --git a/srcpkgs/freecad/patches/090-py38.patch b/srcpkgs/freecad/patches/090-py38.patch deleted file mode 100644 index 92566df9df3d..000000000000 --- a/srcpkgs/freecad/patches/090-py38.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 174011749d836f3b6c6ae2630f53b2f4c1f9d3fc Mon Sep 17 00:00:00 2001 -From: Richard -Date: Thu, 17 Oct 2019 11:20:10 -0500 -Subject: [PATCH] Update swigpyrun.in for Python 3.8 - -In Python 3.8 some functions related to thread state were intentionally made private. - -This fix (specific to FreeCAD) was suggested here: - -https://bugs.python.org/issue35886 - ---- src/Base/swigpyrun.inl -+++ src/Base/swigpyrun.inl -@@ -72,7 +72,7 @@ void cleanupSWIG_T(const char* TypeName) - - PyObject *module, *dict; - PyInterpreterState *interp = PyThreadState_GET()->interp; -- PyObject *modules = interp->modules; -+ PyObject *modules = PyImport_GetModuleDict(); - module = PyDict_GetItemString(modules, "__builtin__"); - if (module != NULL && PyModule_Check(module)) { - dict = PyModule_GetDict(module); diff --git a/srcpkgs/freecad/patches/091-py39.patch b/srcpkgs/freecad/patches/091-py39.patch deleted file mode 100644 index d03bb03adb21..000000000000 --- a/srcpkgs/freecad/patches/091-py39.patch +++ /dev/null @@ -1,174 +0,0 @@ -Fix for Python 3.9 - -https://github.com/FreeCAD/FreeCAD/commit/ae641dc5278efafa22b168fc196875558b92e436 - -diff --git src/Base/swigpyrun_1.3.25.h src/Base/swigpyrun_1.3.25.h -index 91717210b..9ebadbc83 100644 ---- src/Base/swigpyrun_1.3.25.h -+++ src/Base/swigpyrun_1.3.25.h -@@ -699,7 +699,11 @@ PySwigObject_type(void) { - 0, /*tp_itemsize*/ - /* methods */ - (destructor)PySwigObject_dealloc, /*tp_dealloc*/ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)PySwigObject_print, /*tp_print*/ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - (getattrfunc)0, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)PySwigObject_compare, /*tp_compare*/ -@@ -859,7 +863,11 @@ PySwigPacked_type(void) { - 0, /*tp_itemsize*/ - /* methods */ - (destructor)PySwigPacked_dealloc, /*tp_dealloc*/ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)PySwigPacked_print, /*tp_print*/ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - (getattrfunc)0, /*tp_getattr*/ - (setattrfunc)0, /*tp_setattr*/ - (cmpfunc)PySwigPacked_compare, /*tp_compare*/ -diff --git src/Base/swigpyrun_1.3.33.h src/Base/swigpyrun_1.3.33.h -index f83ac1e89..afd5a8c50 100644 ---- src/Base/swigpyrun_1.3.33.h -+++ src/Base/swigpyrun_1.3.33.h -@@ -1620,7 +1620,11 @@ _PySwigObject_type(void) { - sizeof(PySwigObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)PySwigObject_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)PySwigObject_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - #if PY_VERSION_HEX < 0x02020000 - (getattrfunc)PySwigObject_getattr, /* tp_getattr */ - #else -@@ -1790,7 +1794,11 @@ _PySwigPacked_type(void) { - sizeof(PySwigPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)PySwigPacked_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)PySwigPacked_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)PySwigPacked_compare, /* tp_compare */ -diff --git src/Base/swigpyrun_1.3.36.h src/Base/swigpyrun_1.3.36.h -index 02c58ad8a..12ad41e12 100644 ---- src/Base/swigpyrun_1.3.36.h -+++ src/Base/swigpyrun_1.3.36.h -@@ -1628,7 +1628,12 @@ _PySwigObject_type(void) { - sizeof(PySwigObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)PySwigObject_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)PySwigObject_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif -+ - #if PY_VERSION_HEX < 0x02020000 - (getattrfunc)PySwigObject_getattr, /* tp_getattr */ - #else -@@ -1798,7 +1803,11 @@ _PySwigPacked_type(void) { - sizeof(PySwigPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)PySwigPacked_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)PySwigPacked_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)PySwigPacked_compare, /* tp_compare */ -diff --git src/Base/swigpyrun_1.3.38.h src/Base/swigpyrun_1.3.38.h -index dae058c20..7cacc1579 100644 ---- src/Base/swigpyrun_1.3.38.h -+++ src/Base/swigpyrun_1.3.38.h -@@ -1741,7 +1741,11 @@ _PySwigObject_type(void) { - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)SwigPyObject_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - #if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ - #else -@@ -1919,7 +1923,11 @@ _PySwigPacked_type(void) { - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)SwigPyPacked_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -diff --git src/Base/swigpyrun_1.3.40.h src/Base/swigpyrun_1.3.40.h -index 136ba809f..400db8b47 100644 ---- src/Base/swigpyrun_1.3.40.h -+++ src/Base/swigpyrun_1.3.40.h -@@ -1766,7 +1766,11 @@ _PySwigObject_type(void) { - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 - (printfunc)SwigPyObject_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - #if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ - #else -@@ -1947,8 +1951,12 @@ _PySwigPacked_type(void) { - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ -- (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ -- (printfunc)SwigPyPacked_print, /* tp_print */ -+ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ -+#if PY_VERSION_HEX < 0x03080000 -+ (printfunc)SwigPyPacked_print, /* tp_print */ -+#else -+ 0, /*tp_vectorcall_offset*/ -+#endif - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - #if PY_VERSION_HEX>=0x03000000 -diff --git src/CXX/Python3/cxx_extensions.cxx src/CXX/Python3/cxx_extensions.cxx -index fb3da455f..9ff94612f 100644 ---- src/CXX/Python3/cxx_extensions.cxx -+++ src/CXX/Python3/cxx_extensions.cxx -@@ -381,7 +381,11 @@ PythonType::PythonType( size_t basic_size, int itemsize, const char *default_nam - - // Methods to implement standard operations - table->tp_dealloc = (destructor)standard_dealloc; -+#if PY_VERSION_HEX < 0x03080000 - table->tp_print = 0; -+#else -+ table->tp_vectorcall_offset = 0; -+#endif - table->tp_getattr = 0; - table->tp_setattr = 0; - table->tp_repr = 0; -@@ -524,7 +528,9 @@ PythonType &PythonType::supportClass() - #ifdef PYCXX_PYTHON_2TO3 - PythonType &PythonType::supportPrint() - { -+#if PY_VERSION_HEX < 0x03080000 - table->tp_print = print_handler; -+#endif - return *this; - } - #endif diff --git a/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch b/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch deleted file mode 100644 index 14ce9d5fcf90..000000000000 --- a/srcpkgs/freecad/patches/100-detect-shiboken2-and-pyside2-5.14.patch +++ /dev/null @@ -1,33 +0,0 @@ -source: https://svnweb.freebsd.org/ports/head/cad/freecad/files/patch-CMakeLists.txt?revision=504361&view=co - ---- CMakeLists.txt.orig -+++ CMakeLists.txt -@@ -989,6 +989,13 @@ endif() - endif() - endif() - -+ # pyside2 changed it's cmake files, this is the dance we have -+ # to dance to be compatible with the old and the new versions -+ if(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR) -+ get_property(SHIBOKEN_INCLUDE_DIR TARGET Shiboken2::libshiboken PROPERTY INTERFACE_INCLUDE_DIRECTORIES) -+ get_property(SHIBOKEN_LIBRARY TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION_RELEASE) -+ endif(SHIBOKEN_PYTHON_INCLUDE_DIRS AND NOT SHIBOKEN_INCLUDE_DIR) -+ - if(NOT SHIBOKEN_INCLUDE_DIR) - MESSAGE("====================\n" - "shiboken2 not found.\n" -@@ -996,6 +1003,14 @@ endif() - endif(NOT SHIBOKEN_INCLUDE_DIR) - - find_package(PySide2 QUIET)# REQUIRED -+ -+ # pyside2 changed it's cmake files, this is the dance we have -+ # to dance to be compatible with the old and the new versions -+ if(NOT PYSIDE_INCLUDE_DIR) -+ get_property(PYSIDE_INCLUDE_DIR TARGET PySide2::pyside2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES) -+ get_property(PYSIDE_LIBRARY TARGET PySide2::pyside2 PROPERTY IMPORTED_LOCATION_RELEASE) -+ endif(NOT PYSIDE_INCLUDE_DIR) -+ - if(NOT PYSIDE_INCLUDE_DIR) - MESSAGE("==================\n" - "PySide2 not found.\n" diff --git a/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch b/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch deleted file mode 100644 index 632384d2df4a..000000000000 --- a/srcpkgs/freecad/patches/101-pyside2-tool-5.14-support.patch +++ /dev/null @@ -1,67 +0,0 @@ -backport from FreeCAD git master (rev @1bca539) - ---- cMake/FindPySide2Tools.cmake.ORIG -+++ cMake/FindPySide2Tools.cmake -@@ -20,8 +20,24 @@ - set(PYSIDE_BIN_DIR ${PYTHON_BIN_DIR}) - endif(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - --FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) --FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) -+# Since Qt v5.14, pyside2-uic and pyside2-rcc are directly provided by Qt5Core uic and rcc, with '-g python' option -+# We test Qt5Core version to act accordingly -+ -+FIND_PACKAGE(Qt5Core) -+ -+IF(Qt5Core_VERSION VERSION_LESS 5.14) -+ # Legacy (< 5.14) -+ FIND_PROGRAM(PYSIDE2UICBINARY NAMES python2-pyside2-uic pyside2-uic pyside2-uic-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) -+ FIND_PROGRAM(PYSIDE2RCCBINARY NAMES pyside2-rcc pyside2-rcc-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} HINTS ${PYSIDE_BIN_DIR}) -+ set(UICOPTIONS "") -+ set(RCCOPTIONS "") -+ELSE(Qt5Core_VERSION VERSION_LESS 5.14) -+ # New (>= 5.14) -+ FIND_PROGRAM(PYSIDE2UICBINARY NAMES uic-qt5 uic) -+ set(UICOPTIONS "--generator=python") -+ FIND_PROGRAM(PYSIDE2RCCBINARY NAMES rcc-qt5 rcc) -+ set(RCCOPTIONS "--generator=python" "--compress-algo=zlib" "--compress=1") -+ENDIF(Qt5Core_VERSION VERSION_LESS 5.14) - - MACRO(PYSIDE_WRAP_UI outfiles) - FOREACH(it ${ARGN}) -@@ -33,7 +49,7 @@ - #) - if(WIN32 OR APPLE) - ADD_CUSTOM_COMMAND(OUTPUT ${outfile} -- COMMAND ${PYSIDE2UICBINARY} ${infile} -o ${outfile} -+ COMMAND ${PYSIDE2UICBINARY} ${UICOPTIONS} ${infile} -o ${outfile} - MAIN_DEPENDENCY ${infile} - ) - else() -@@ -41,7 +57,7 @@ - # pyside2-uic generates in comments at beginning., which is why - # we follow the tool command with in-place sed. - ADD_CUSTOM_COMMAND(OUTPUT ${outfile} -- COMMAND "${PYSIDE2UICBINARY}" "${infile}" -o "${outfile}" -+ COMMAND "${PYSIDE2UICBINARY}" ${UICOPTIONS} "${infile}" -o "${outfile}" - COMMAND sed -i "/^# /d" "${outfile}" - MAIN_DEPENDENCY "${infile}" - ) -@@ -60,7 +76,7 @@ - #) - if(WIN32 OR APPLE) - ADD_CUSTOM_COMMAND(OUTPUT ${outfile} -- COMMAND ${PYSIDE2RCCBINARY} ${infile} -o ${outfile} -+ COMMAND ${PYSIDE2RCCBINARY} ${RCCOPTIONS} ${infile} -o ${outfile} - MAIN_DEPENDENCY ${infile} - ) - else() -@@ -68,7 +84,7 @@ - # pyside-rcc generates in comments at beginning, which is why - # we follow the tool command with in-place sed. - ADD_CUSTOM_COMMAND(OUTPUT "${outfile}" -- COMMAND "${PYSIDE2RCCBINARY}" "${infile}" ${PY_ATTRIBUTE} -o "${outfile}" -+ COMMAND "${PYSIDE2RCCBINARY}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}" - COMMAND sed -i "/^# /d" "${outfile}" - MAIN_DEPENDENCY "${infile}" - ) diff --git a/srcpkgs/freecad/patches/102-qt5-5.15.0.patch b/srcpkgs/freecad/patches/102-qt5-5.15.0.patch deleted file mode 100644 index 9c4632d80a80..000000000000 --- a/srcpkgs/freecad/patches/102-qt5-5.15.0.patch +++ /dev/null @@ -1,14 +0,0 @@ -Source: @pullmoll -Upstream: no -Reason: qt5-5.15.0 requires explicit include for QPainterPath - ---- src/Mod/Image/Gui/OpenGLImageBox.cpp -+++ src/Mod/Image/Gui/OpenGLImageBox.cpp 2020-07-14 12:25:42.607075856 +0200 -@@ -26,6 +26,7 @@ - # include - # include - # include -+# include - #endif - - #if defined(__MINGW32__) diff --git a/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch b/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch deleted file mode 100644 index 5b7de514de4b..000000000000 --- a/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 04833a5f1cbc07f8f6ae94453c4535e13789aa05 Mon Sep 17 00:00:00 2001 -From: yopito -Date: Mon, 6 Jul 2020 06:54:07 +0200 -Subject: [PATCH] build: fix Coin 3d documentation discovering - -* coin3d 4.0.0 default location is /usr/share/doc/Coin/html/ -* misuses of find_files() if several candidates for filename -* export variable COIN3D_DOC_FOUND that is used by cMake/FreeCAD_Helpers/PrintFinalReport.cmake ---- - cMake/FindCoin3DDoc.cmake | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git cMake/FindCoin3DDoc.cmake cMake/FindCoin3DDoc.cmake -index 883368445..c6c92f260 100644 ---- cMake/FindCoin3DDoc.cmake -+++ cMake/FindCoin3DDoc.cmake -@@ -23,18 +23,19 @@ IF (COIN3D_FOUND) - find_path(COIN3D_DOC_PATH index.html - /usr/share/doc/libcoin80-doc/html - /usr/share/doc/coin/html -+ /usr/share/doc/Coin/html - ) - IF( EXISTS ${COIN3D_DOC_PATH}) - message(STATUS "Coin3D doc is installed") -- find_file(COIN3D_DOC_TAGFILE coin.tag Coin.tag -- ${COIN3D_DOC_PATH} -+ find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag -+ PATHS ${COIN3D_DOC_PATH} - ) - IF( EXISTS ${COIN3D_DOC_TAGFILE}) - SET( COIN3D_DOC_FOUND "YES" - ) - ELSE( EXISTS ${COIN3D_DOC_TAGFILE}) -- find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz Coin.tag.gz -- ${COIN3D_DOC_PATH} -+ find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz -+ PATHS ${COIN3D_DOC_PATH} - ) - IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ}) - message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}") -@@ -85,4 +86,5 @@ if(COIN3D_DOC_FOUND) - message(STATUS " Location: ${COIN3D_DOC_PATH}") - endif(COIN3D_DOC_FOUND) - -- -+# export for others -+SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available") --- -2.27.0 - diff --git a/srcpkgs/freecad/patches/150-vtk9.patch b/srcpkgs/freecad/patches/150-vtk9.patch index e8fb5ec14b7a..1ae8d43ac7af 100644 --- a/srcpkgs/freecad/patches/150-vtk9.patch +++ b/srcpkgs/freecad/patches/150-vtk9.patch @@ -263,7 +263,7 @@ diff --git src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp b/src/3rdParty/salome index 4ac6fd768..51b281699 100644 --- src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp +++ src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp -@@ -4763,7 +4763,11 @@ void SMDS_Mesh::dumpGrid(string ficdump) +@@ -4768,7 +4768,11 @@ void SMDS_Mesh::dumpGrid(string ficdump) ficcon << endl; } ficcon << "-------------------------------- connectivity " << nbPoints << endl; @@ -733,28 +733,4 @@ index a742702ff..1ff4d5eef 100644 grid->GetCellPoints(vtkId, npts, pts); for (int i=0; iGetPoints(); - pntData = pd->GetPointData(); + diff --git a/srcpkgs/freecad/patches/151-python-warning.patch b/srcpkgs/freecad/patches/151-python-warning.patch deleted file mode 100644 index e76c8b1c654b..000000000000 --- a/srcpkgs/freecad/patches/151-python-warning.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git src/Mod/Fem/feminout/importFenicsMesh.py src/Mod/Fem/feminout/importFenicsMesh.py -index 1bb40de..a0b5484 100644 ---- src/Mod/Fem/feminout/importFenicsMesh.py -+++ src/Mod/Fem/feminout/importFenicsMesh.py -@@ -154,7 +154,7 @@ def export(objectslist, fileString): - FreeCAD.Console.PrintWarning("Tri6 -> Tri3, Tet10 -> Tet4, etc.\n") - writeFenicsXML.write_fenics_mesh_xml(obj, fileString) - elif fileExtension.lower() == '.xdmf': -- if importToolsFem.get_FemMeshObjectMeshGroups(obj) is not (): -+ if importToolsFem.get_FemMeshObjectMeshGroups(obj): - # if there are groups found, make task panel available - panel = WriteXDMFTaskPanel(obj, fileString) - FreeCADGui.Control.showDialog(panel) -diff --git src/Mod/Fem/feminout/writeFenicsXDMF.py src/Mod/Fem/feminout/writeFenicsXDMF.py -index 9e7f01b..5a93823 100644 ---- src/Mod/Fem/feminout/writeFenicsXDMF.py -+++ src/Mod/Fem/feminout/writeFenicsXDMF.py -@@ -258,7 +258,7 @@ def write_fenics_mesh_xdmf(fem_mesh_obj, outputfile, group_values_dict={}, encod - fem_mesh = fem_mesh_obj.FemMesh - gmshgroups = get_FemMeshObjectMeshGroups(fem_mesh_obj) - -- if gmshgroups is not (): -+ if gmshgroups: - print('found mesh groups') - - for g in gmshgroups: -diff --git src/Mod/PartDesign/WizardShaft/Shaft.py src/Mod/PartDesign/WizardShaft/Shaft.py -index c519b97..8c20eb4 100644 ---- src/Mod/PartDesign/WizardShaft/Shaft.py -+++ src/Mod/PartDesign/WizardShaft/Shaft.py -@@ -88,7 +88,7 @@ class Shaft: - # We don't call equilibrium() here because the new segment has no constraints defined yet - # Fix face reference of fixed segment if it is the last one - for i in range(1, len(self.segments)): -- if self.segments[i].constraintType is not "Fixed": -+ if self.segments[i].constraintType != "Fixed": - continue - if i == len(self.segments) - 1: - self.segments[index].constraint.References = [( self.feature.feature, "Face%u" % (2 * (index+1) + 1) )] diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template index 6fe749b53d70..f1b96b4818c5 100644 --- a/srcpkgs/freecad/template +++ b/srcpkgs/freecad/template @@ -1,7 +1,7 @@ # Template file for 'freecad' pkgname=freecad -version=0.18.4 -revision=10 +version=0.19.1 +revision=1 wrksrc="FreeCAD-${version}" build_style=cmake @@ -21,7 +21,7 @@ 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-x11extras-devel coin3-doc glew-devel" + qt5-x11extras-devel qt5-xmlpatterns-devel coin3-doc glew-devel" # FreeCAD help: qt5/assistant with datas in SQLite format depends="python3-matplotlib python3-pyside2 qt5-plugin-sqlite python3-pivy" @@ -34,8 +34,7 @@ maintainer="yopito " license="LGPL-2.0-or-later" homepage="https://freecadweb.org/" distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz" -checksum=4e0cce447b31b8989a00cf68c49ae012ce8e5546a56c6e0874fbd8f7ddedffd2 - +checksum=5ec0003c18df204f7b449d4ac0a82f945b41613a0264127de3ef16f6b2efa60f if [ "$XBPS_TARGET_LIBC" = musl ]; then makedepends+=" libexecinfo-devel" LDFLAGS="-lexecinfo"