From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] freecad: update to 1.0.0.
Date: Thu, 21 Nov 2024 03:52:30 +0100 [thread overview]
Message-ID: <20241121025230.467DB30696@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-53154@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages freecad-1.0
https://github.com/void-linux/void-packages/pull/53154
freecad: update to 1.0.0.
- **New package: python3-pyside6-6.7.2**
- **freecad: update to 1.0.0.**
WIP
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/53154.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-freecad-1.0-53154.patch --]
[-- Type: text/x-diff, Size: 31863 bytes --]
From 910023ce712b53c1ef4ada23bfacb9ad810c027d Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Tue, 21 May 2024 11:12:14 +0300
Subject: [PATCH 1/2] New package: python3-pyside6-6.7.2
closes: #50452
---
common/shlibs | 3 +
srcpkgs/libpyside6 | 1 +
srcpkgs/libpyside6-devel | 1 +
srcpkgs/libshiboken6 | 1 +
srcpkgs/libshiboken6-devel | 1 +
srcpkgs/python3-pyside6-webengine | 1 +
.../python3-pyside6/patches/fix-build.patch | 14 ++
.../patches/no-python-suffix.patch | 60 ++++++++
srcpkgs/python3-pyside6/template | 136 ++++++++++++++++++
srcpkgs/python3-pyside6/update | 3 +
srcpkgs/python3-shiboken6 | 1 +
srcpkgs/shiboken6 | 1 +
12 files changed, 223 insertions(+)
create mode 120000 srcpkgs/libpyside6
create mode 120000 srcpkgs/libpyside6-devel
create mode 120000 srcpkgs/libshiboken6
create mode 120000 srcpkgs/libshiboken6-devel
create mode 120000 srcpkgs/python3-pyside6-webengine
create mode 100644 srcpkgs/python3-pyside6/patches/fix-build.patch
create mode 100644 srcpkgs/python3-pyside6/patches/no-python-suffix.patch
create mode 100644 srcpkgs/python3-pyside6/template
create mode 100644 srcpkgs/python3-pyside6/update
create mode 120000 srcpkgs/python3-shiboken6
create mode 120000 srcpkgs/shiboken6
diff --git a/common/shlibs b/common/shlibs
index 8503c3e4bb7729..828c6aa855e040 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4542,3 +4542,6 @@ libsfdo-desktop-file.so.0 libsfdo-0.1.3_1
libsfdo-icon.so.0 libsfdo-0.1.3_1
libKMahjongg6.so.6 libkmahjongg-24.08.2_1
libflashrom.so.1 flashrom-1.4.0_1
+libpyside6.so.6.7 libpyside6-6.7.2_1
+libpyside6qml.so.6.7 libpyside6-6.7.2_1
+libshiboken6.so.6.7 libshiboken6-6.7.2_1
diff --git a/srcpkgs/libpyside6 b/srcpkgs/libpyside6
new file mode 120000
index 00000000000000..6491748d6ac687
--- /dev/null
+++ b/srcpkgs/libpyside6
@@ -0,0 +1 @@
+python3-pyside6
\ No newline at end of file
diff --git a/srcpkgs/libpyside6-devel b/srcpkgs/libpyside6-devel
new file mode 120000
index 00000000000000..6491748d6ac687
--- /dev/null
+++ b/srcpkgs/libpyside6-devel
@@ -0,0 +1 @@
+python3-pyside6
\ No newline at end of file
diff --git a/srcpkgs/libshiboken6 b/srcpkgs/libshiboken6
new file mode 120000
index 00000000000000..6491748d6ac687
--- /dev/null
+++ b/srcpkgs/libshiboken6
@@ -0,0 +1 @@
+python3-pyside6
\ No newline at end of file
diff --git a/srcpkgs/libshiboken6-devel b/srcpkgs/libshiboken6-devel
new file mode 120000
index 00000000000000..6491748d6ac687
--- /dev/null
+++ b/srcpkgs/libshiboken6-devel
@@ -0,0 +1 @@
+python3-pyside6
\ No newline at end of file
diff --git a/srcpkgs/python3-pyside6-webengine b/srcpkgs/python3-pyside6-webengine
new file mode 120000
index 00000000000000..6491748d6ac687
--- /dev/null
+++ b/srcpkgs/python3-pyside6-webengine
@@ -0,0 +1 @@
+python3-pyside6
\ No newline at end of file
diff --git a/srcpkgs/python3-pyside6/patches/fix-build.patch b/srcpkgs/python3-pyside6/patches/fix-build.patch
new file mode 100644
index 00000000000000..bb3f763ef0dfcd
--- /dev/null
+++ b/srcpkgs/python3-pyside6/patches/fix-build.patch
@@ -0,0 +1,14 @@
+diff --git a/sources/pyside6/qtexampleicons/CMakeLists.txt b/sources/pyside6/qtexampleicons/CMakeLists.txt
+index 1562f7b27..58ecc7c17 100644
+--- a/sources/pyside6/qtexampleicons/CMakeLists.txt
++++ b/sources/pyside6/qtexampleicons/CMakeLists.txt
+@@ -32,6 +32,9 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
+ target_compile_definitions(QtExampleIcons PRIVATE "-DNDEBUG")
+ endif()
+
++get_property(SHIBOKEN_PYTHON_LIBRARIES GLOBAL PROPERTY shiboken_python_libraries)
++get_property(SHIBOKEN_PYTHON_INCLUDE_DIRS GLOBAL PROPERTY shiboken_python_include_dirs)
++
+ target_include_directories(QtExampleIcons PRIVATE ${SHIBOKEN_PYTHON_INCLUDE_DIRS})
+
+ get_property(SHIBOKEN_PYTHON_LIBRARIES GLOBAL PROPERTY shiboken_python_libraries)
diff --git a/srcpkgs/python3-pyside6/patches/no-python-suffix.patch b/srcpkgs/python3-pyside6/patches/no-python-suffix.patch
new file mode 100644
index 00000000000000..d7f2072d012f96
--- /dev/null
+++ b/srcpkgs/python3-pyside6/patches/no-python-suffix.patch
@@ -0,0 +1,60 @@
+no python suffix like ".cpython-36m-x86_64-linux-gnu": provides a consistent
+naming across architecture.
+
+Also don't overwrite the "real" cmake file with the generic wrapper's one: they
+have the same name if no python suffix.
+
+--- a/sources/shiboken6/cmake/ShibokenSetup.cmake.ORIG
++++ b/sources/shiboken6/cmake/ShibokenSetup.cmake
+@@ -73,6 +73,11 @@
+ "PYTHON_CONFIG_SUFFIX is empty. It should never be empty. Please file a bug report.")
+ endif()
+
++# no suffix like '.cpython-36m-x86_64-linux-gnu'
++set(PYTHON_EXTENSION_SUFFIX "")
++set(PYTHON_CONFIG_SUFFIX "")
++set(PYTHON_SHARED_LIBRARY_SUFFIX "")
++
+ message(STATUS "PYTHON_EXTENSION_SUFFIX: ${PYTHON_EXTENSION_SUFFIX}")
+ message(STATUS "PYTHON_CONFIG_SUFFIX: ${PYTHON_CONFIG_SUFFIX}")
+ message(STATUS "PYTHON_SHARED_LIBRARY_SUFFIX: ${PYTHON_SHARED_LIBRARY_SUFFIX}")
+--- a/sources/shiboken6/data/CMakeLists.txt.ORIG
++++ b/sources/shiboken6/data/CMakeLists.txt
+@@ -36,16 +36,11 @@
+ PATH_VARS SHIBOKEN_PYTHON_MODULE_DIR SHIBOKEN_SHARED_LIBRARY_DIR
+ )
+
+-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Shiboken6Config.cmake.in"
+- "${CMAKE_CURRENT_BINARY_DIR}/Shiboken6Config.cmake" @ONLY)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Shiboken6ConfigVersion.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/Shiboken6ConfigVersion.cmake" @ONLY)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shiboken6.pc.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/shiboken6${shiboken6_SUFFIX}.pc" @ONLY)
+
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Shiboken6Config.cmake"
+- DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6")
+-
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/Shiboken6Config${PYTHON_CONFIG_SUFFIX}.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken6")
+
+--- a/sources/pyside6/libpyside/CMakeLists.txt
++++ b/sources/pyside6/libpyside/CMakeLists.txt
+@@ -166,8 +166,6 @@
+ PATH_VARS PYSIDE_PYTHONPATH PYSIDE_TYPESYSTEMS PYSIDE_GLUE
+ )
+
+-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide6Config.cmake.in"
+- "${CMAKE_CURRENT_BINARY_DIR}/PySide6Config.cmake" @ONLY)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySide6ConfigVersion.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/PySide6ConfigVersion.cmake" @ONLY)
+
+@@ -184,9 +182,6 @@
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside6${pyside6_SUFFIX}.pc"
+ DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+
+-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySide6Config.cmake"
+- DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6")
+-
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/install/PySide6Config${SHIBOKEN_PYTHON_CONFIG_SUFFIX}.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide6")
+
diff --git a/srcpkgs/python3-pyside6/template b/srcpkgs/python3-pyside6/template
new file mode 100644
index 00000000000000..2ca7efaaffae3a
--- /dev/null
+++ b/srcpkgs/python3-pyside6/template
@@ -0,0 +1,136 @@
+# Template file for 'python3-pyside6'
+# NOTE: keep in sync with Qt6
+pkgname=python3-pyside6
+version=6.7.2
+revision=1
+build_style=cmake
+configure_args="-DBUILD_TESTS=OFF -DFORCE_LIMITED_API=no -DNO_QT_TOOLS=yes
+ -DNUMPY_INCLUDE_DIR=/${py3_sitelib}/numpy/_core/include
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 -Wno-dev"
+hostmakedepends="python3-numpy python3-setuptools qt6-base"
+makedepends="libedit-devel libxslt-devel llvm17-devel python3-devel qt6-3d-devel
+ qt6-base-private-devel qt6-charts-devel qt6-connectivity-devel
+ qt6-declarative-private-devel qt6-location-devel qt6-multimedia-devel
+ qt6-networkauth-devel qt6-position-devel qt6-quick3d-devel
+ qt6-remoteobjects-devel qt6-scxml-devel qt6-sensors-devel qt6-serialport-devel
+ qt6-shadertools-devel qt6-speech-devel qt6-speech-plugin-flite
+ qt6-speech-plugin-mock qt6-speech-plugin-speechd qt6-svg-devel qt6-tools-devel
+ qt6-webchannel-devel qt6-websockets-devel $(vopt_if pdf qt6-pdf-devel)
+ $(vopt_if webengine qt6-webengine-devel)"
+depends="python3-shiboken6"
+short_desc="Python bindings of Qt6-based libraries"
+maintainer="chrysos349 <chrysostom349@gmail.com>"
+license="LGPL-3.0-only, GPL-2.0-only"
+homepage="https://doc.qt.io/qtforpython-6"
+distfiles="https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-${version}-src/pyside-setup-everywhere-src-${version}.tar.xz"
+checksum=3a2b0d0d6e78c9aa5ddc7f06ca4b6f11a3fe14560baeb148eea53b5d98e368c7
+conflicts="pyside2-tools"
+
+build_options="pdf webengine"
+
+subpackages="libpyside6 libpyside6-devel libshiboken6 libshiboken6-devel python3-shiboken6"
+
+case "$XBPS_TARGET_MACHINE" in
+ armv5*|armv6*) build_options_default="" ;;
+ *) build_options_default="pdf" ;;
+esac
+
+export LLVM_INSTALL_DIR=${XBPS_CROSS_BASE}/usr
+export PYTHONPATH=$PYTHONPATH:${XBPS_BUILDDIR}/${pkgname}-${version}/build/sources
+
+if [ "$XBPS_WORDSIZE$XBPS_WORDSIZE" = "64$XBPS_TARGET_WORDSIZE" ]; then
+ build_options_default+=" webengine"
+ subpackages+=" python3-pyside6-webengine"
+fi
+
+if [ "$CROSS_BUILD" ]; then
+ hostmakedepends+=" libglvnd-devel libshiboken6-devel shiboken6"
+
+ case "$XBPS_TARGET_MACHINE" in
+ x86_64*|aarch64*) makedepends+=" libomp-devel" ;;
+ esac
+
+ configure_args+="
+ -DQFP_PYTHON_HOST_PATH=/usr/bin/python3
+ -DQFP_PYTHON_SITE_PACKAGES=/${py3_sitelib}"
+else
+ subpackages+=" shiboken6"
+fi
+
+post_patch() {
+ if [ "$CROSS_BUILD" ]; then
+ # fix pkg-config file on cross
+ vsed -i sources/shiboken6/data/shiboken6.pc.in \
+ -e "s/Python_EXECUTABLE/QFP_PYTHON_HOST_PATH/"
+ fi
+}
+
+post_install() {
+ # remove extraneous scripts/files
+ find "$DESTDIR"/usr/bin -not -name shiboken6 -type f -delete
+}
+
+libpyside6_package() {
+ short_desc+=" - shared library"
+ pkg_install() {
+ vmove "usr/lib/libpyside*.so.*"
+ }
+}
+
+libpyside6-devel_package() {
+ depends="libpyside6-${version}_${revision} python3-pyside6-${version}_${revision}
+ libshiboken6-devel-${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/lib/cmake/PySide*"
+ vmove "usr/lib/libpyside*.so"
+ vmove usr/lib/qt6
+ vmove usr/include/PySide6
+ vmove usr/lib/pkgconfig/pyside6.pc
+ vmove usr/share
+ }
+}
+
+libshiboken6_package() {
+ short_desc="CPython bindings generator for C++ libraries - shared library"
+ pkg_install() {
+ vmove "usr/lib/libshiboken6.so.*"
+ }
+}
+
+libshiboken6-devel_package() {
+ depends="libshiboken6-${version}_${revision} python3-shiboken6-${version}_${revision}"
+ short_desc="CPython bindings generator for C++ libraries - development files"
+ pkg_install() {
+ vmove "usr/lib/cmake/Shiboken*"
+ vmove usr/include/shiboken6
+ vmove usr/lib/libshiboken6.so
+ vmove usr/lib/pkgconfig/shiboken6.pc
+ }
+}
+
+python3-shiboken6_package() {
+ short_desc="Python shiboken6 bindings"
+ depends="python3"
+ pkg_install() {
+ vmove ${py3_sitelib}/shiboken6
+ }
+}
+
+shiboken6_package() {
+ short_desc="CPython bindings generator for C++ libraries"
+ depends="python3"
+ conflicts="shiboken2"
+ pkg_install() {
+ vmove "usr/bin/shiboken*"
+ vmove ${py3_sitelib}/shiboken6_generator
+ }
+}
+
+python3-pyside6-webengine_package() {
+ depends="python3-pyside6-${version}_${revision}"
+ short_desc+=" - WebEngine component"
+ pkg_install() {
+ vmove "${py3_sitelib}/PySide6/QtWebEngine*"
+ }
+}
diff --git a/srcpkgs/python3-pyside6/update b/srcpkgs/python3-pyside6/update
new file mode 100644
index 00000000000000..38f0b57b82d932
--- /dev/null
+++ b/srcpkgs/python3-pyside6/update
@@ -0,0 +1,3 @@
+pkgname=pyside-setup-everywhere
+vdprefix=PySide6-
+vdsuffix=-src
diff --git a/srcpkgs/python3-shiboken6 b/srcpkgs/python3-shiboken6
new file mode 120000
index 00000000000000..6491748d6ac687
--- /dev/null
+++ b/srcpkgs/python3-shiboken6
@@ -0,0 +1 @@
+python3-pyside6
\ No newline at end of file
diff --git a/srcpkgs/shiboken6 b/srcpkgs/shiboken6
new file mode 120000
index 00000000000000..6491748d6ac687
--- /dev/null
+++ b/srcpkgs/shiboken6
@@ -0,0 +1 @@
+python3-pyside6
\ No newline at end of file
From 52b15c817ca4cc536d7f5c5ecb5b73b625dfff9f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Wed, 20 Nov 2024 01:04:16 -0500
Subject: [PATCH 2/2] freecad: update to 1.0.0.
---
srcpkgs/freecad/patches/pyregex.patch | 273 ++------------------------
srcpkgs/freecad/patches/vtk.patch | 32 ---
srcpkgs/freecad/template | 72 +++----
3 files changed, 55 insertions(+), 322 deletions(-)
delete mode 100644 srcpkgs/freecad/patches/vtk.patch
diff --git a/srcpkgs/freecad/patches/pyregex.patch b/srcpkgs/freecad/patches/pyregex.patch
index 7eb032a13037a2..0c9484d4fcc8d0 100644
--- a/srcpkgs/freecad/patches/pyregex.patch
+++ b/srcpkgs/freecad/patches/pyregex.patch
@@ -1,81 +1,6 @@
---- a/src/Mod/Arch/ArchAxis.py
-+++ b/src/Mod/Arch/ArchAxis.py
-@@ -451,7 +451,7 @@ class _ViewProviderAxis:
- except Exception:
- # workaround for pivy SoInput.setBuffer() bug
- buf = buf.replace("\n","")
-- pts = re.findall("point \[(.*?)\]",buf)[0]
-+ pts = re.findall(r"point \[(.*?)\]",buf)[0]
- pts = pts.split(",")
- pc = []
- for point in pts:
---- a/src/Mod/Arch/ArchRebar.py
-+++ b/src/Mod/Arch/ArchRebar.py
-@@ -556,7 +556,7 @@ class _ViewProviderRebar(ArchComponent.ViewProviderComponent):
- import re
- self.centerline = coin.SoSeparator()
- comp = Part.makeCompound(obj.Proxy.wires)
-- pts = re.findall("point \[(.*?)\]",comp.writeInventor().replace("\n",""))
-+ pts = re.findall(r"point \[(.*?)\]",comp.writeInventor().replace("\n",""))
- pts = [p.split(",") for p in pts]
- for pt in pts:
- ps = coin.SoSeparator()
---- a/src/Mod/Arch/ArchSectionPlane.py
-+++ b/src/Mod/Arch/ArchSectionPlane.py
-@@ -748,7 +748,7 @@ def getCoinSVG(cutplane,objs,cameradata=None,linewidth=0.2,singleface=False,face
- wp.alignToPointAndAxis_SVG(Vector(0,0,0),cutplane.normalAt(0,0),0)
- p = wp.getLocalCoords(markervec)
- orlength = FreeCAD.Vector(p.x,p.y,0).Length
-- marker = re.findall("<line x1=.*?stroke=\"\#ffffff\".*?\/>",svg)
-+ marker = re.findall(r'<line x1=.*?stroke="#ffffff".*?/>',svg)
- if marker:
- marker = marker[0].split("\"")
- x1 = float(marker[1])
-@@ -764,7 +764,7 @@ def getCoinSVG(cutplane,objs,cameradata=None,linewidth=0.2,singleface=False,face
- scaledp1 = FreeCAD.Vector(p1.x*factor,p1.y*factor,0)
- trans = orig.sub(scaledp1)
- # remove marker
-- svg = re.sub("<line x1=.*?stroke=\"\#ffffff\".*?\/>","",svg,count=1)
-+ svg = re.sub(r'<line x1=.*?stroke="#ffffff".*?/>',"",svg,count=1)
-
- # remove background rectangle
- svg = re.sub("<path.*?>","",svg,count=1,flags=re.MULTILINE|re.DOTALL)
-@@ -792,9 +792,9 @@ def getCoinSVG(cutplane,objs,cameradata=None,linewidth=0.2,singleface=False,face
- QtCore.QTimer.singleShot(1,lambda: closeViewer(view_window_name))
-
- # strip svg tags (needed for TD Arch view)
-- svg = re.sub("<\?xml.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
-- svg = re.sub("<svg.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
-- svg = re.sub("<\/svg>","",svg,flags=re.MULTILINE|re.DOTALL)
-+ svg = re.sub(r"<\?xml.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
-+ svg = re.sub(r"<svg.*?>","",svg,flags=re.MULTILINE|re.DOTALL)
-+ svg = re.sub(r"<\/svg>","",svg,flags=re.MULTILINE|re.DOTALL)
-
- ISRENDERING = False
-
---- a/src/Mod/Arch/ArchSite.py
-+++ b/src/Mod/Arch/ArchSite.py
-@@ -92,7 +92,7 @@ def toNode(shape):
- from pivy import coin
- buf = shape.writeInventor(2,0.01)
- buf = buf.replace("\n","")
-- buf = re.findall("point \[(.*?)\]",buf)
-+ buf = re.findall(r"point \[(.*?)\]",buf)
- pts = []
- for c in buf:
- pts.extend(c.split(","))
---- a/src/Mod/Arch/importIFClegacy.py
-+++ b/src/Mod/Arch/importIFClegacy.py
-@@ -39,7 +39,7 @@ SCHEMA = "http://www.steptools.com/support/stdev_docs/ifcbim/ifc4.exp" # only fo
- MAKETEMPFILES = False # if True, shapes are passed from ifcopenshell to freecad through temp files
- DEBUG = True # this is only for the python console, this value is overridden when importing through the GUI
- SKIP = ["IfcBuildingElementProxy","IfcFlowTerminal","IfcFurnishingElement"] # default. overwritten by the GUI options
--IFCLINE_RE = re.compile("#(\d+)[ ]?=[ ]?(.*?)\((.*)\);[\\r]?$")
-+IFCLINE_RE = re.compile(r"#(\d+)[ ]?=[ ]?(.*?)\((.*)\);[\r]?$")
- PRECISION = 4 # rounding value, in number of digits
- APPLYFIX = True # if true, the ifcopenshell bug-fixing function is applied when saving files
- # end config
-@@ -1440,9 +1440,9 @@ class IfcSchema:
+--- a/src/Mod/BIM/importers/importIFClegacy.py
++++ b/src/Mod/BIM/importers/importIFClegacy.py
+@@ -1433,9 +1433,9 @@
entity = {}
raw_entity_str = m.groups()[0]
@@ -87,172 +12,21 @@
entity["supertype"] = subtypeofmatch.groups()[0].upper() if subtypeofmatch else None
# find the shortest string matched from the end of the entity type header to the
---- a/src/Mod/Draft/draftguitools/gui_trackers.py
-+++ b/src/Mod/Draft/draftguitools/gui_trackers.py
-@@ -423,7 +423,7 @@ class bsplineTracker(Tracker):
- except Exception:
- # workaround for pivy SoInput.setBuffer() bug
- buf = buf.replace("\n", "")
-- pts = re.findall("point \[(.*?)\]", buf)[0]
-+ pts = re.findall(r"point \[(.*?)\]", buf)[0]
- pts = pts.split(",")
- pc = []
- for p in pts:
-@@ -501,7 +501,7 @@ class bezcurveTracker(Tracker):
- except Exception:
- # workaround for pivy SoInput.setBuffer() bug
- buf = buf.replace("\n","")
-- pts = re.findall("point \[(.*?)\]", buf)[0]
-+ pts = re.findall(r"point \[(.*?)\]", buf)[0]
- pts = pts.split(",")
- pc = []
- for p in pts:
-@@ -636,7 +636,7 @@ class arcTracker(Tracker):
- except Exception:
- # workaround for pivy SoInput.setBuffer() bug
- buf = buf.replace("\n", "")
-- pts = re.findall("point \[(.*?)\]", buf)[0]
-+ pts = re.findall(r"point \[(.*?)\]", buf)[0]
- pts = pts.split(",")
- pc = []
- for p in pts:
---- a/src/Mod/Draft/importAirfoilDAT.py
-+++ b/src/Mod/Draft/importAirfoilDAT.py
-@@ -4,12 +4,6 @@
- # \brief Airfoil (.dat) file importer
- #
- # This module provides support for importing airfoil .dat files
--'''@package importAirfoilDAT
--\ingroup DRAFT
--\brief Airfoil (.dat) file importer
--
--This module provides support for importing airfoil .dat files.
--'''
- # Check code with
- # flake8 --ignore=E226,E266,E401,W503
-
---- a/src/Mod/Draft/importDXF.py
-+++ b/src/Mod/Draft/importDXF.py
-@@ -233,9 +233,9 @@ def deformat(text):
- # t = re.sub('{([^!}]([^}]|\n)*)}', '', text)
- # print("input text: ",text)
- t = text.strip("{}")
-- t = re.sub("\\\.*?;", "", t)
-+ t = re.sub(r"\\.*?;", "", t)
- # replace UTF codes by utf chars
-- sts = re.split("\\\\(U\+....)", t)
-+ sts = re.split(r"\\(U\+....)", t)
- t = u"".join(sts)
- # replace degrees, diameters chars
- t = re.sub('%%d', u'°', t)
-@@ -3863,7 +3863,7 @@ def exportPage(page, filename):
- blocks = ""
- entities = ""
- r12 = False
-- ver = re.findall("\$ACADVER\n.*?\n(.*?)\n", template)
-+ ver = re.findall(r"\$ACADVER\n.*?\n(.*?)\n", template)
- if ver:
- # at the moment this is not used.
- # TODO: if r12, do not print ellipses or splines
---- a/src/Mod/Draft/importOCA.py
-+++ b/src/Mod/Draft/importOCA.py
-@@ -2,17 +2,14 @@
- ## @package importOCA
- # \ingroup DRAFT
- # \brief OCA (Open CAD Format) file importer & exporter
--'''@package importOCA
--\ingroup DRAFT
--\brief OCA (Open CAD Format) file importer & exporter
-+#
-+# This module provides support for importing from and exporting to
-+# the OCA format or GCAD format from GCAD3D (http://www.gcad3d.org/).
-+# See: https://groups.google.com/forum/#!forum/open_cad_format
-+#
-+# As of 2019 this file format is practically obsolete, and this module is not
-+# maintained.
-
--This module provides support for importing from and exporting to
--the OCA format or GCAD format from GCAD3D (http://www.gcad3d.org/).
--See: https://groups.google.com/forum/#!forum/open_cad_format
--
--As of 2019 this file format is practically obsolete, and this module is not
--maintained.
--'''
- # Check code with
- # flake8 --ignore=E226,E266,E401,W503
+--- a/src/Mod/CAM/CAMTests/TestPathPost.py
++++ b/src/Mod/CAM/CAMTests/TestPathPost.py
+@@ -40,7 +40,7 @@
---- a/src/Mod/Draft/importSVG.py
-+++ b/src/Mod/Draft/importSVG.py
-@@ -73,8 +73,7 @@ else:
- draftui = None
- # Save the native open function to avoid collisions
--if open.__module__ in ['__builtin__', 'io']:
-- pythonopen = open
-+pythonopen = open
-
- svgcolors = {
- 'Pink': (255, 192, 203),
-@@ -413,8 +412,8 @@ def getsize(length, mode='discard', base=1):
- }
-
- # Extract a number from a string like '+56215.14565E+6mm'
-- _num = '([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)'
-- _unit = '(px|pt|pc|mm|cm|in|em|ex|%)?'
-+ _num = r"([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)"
-+ _unit = r"(px|pt|pc|mm|cm|in|em|ex|%)?"
- _full_num = _num + _unit
- number, exponent, unit = re.findall(_full_num, length)[0]
- if mode == 'discard':
-@@ -729,7 +728,7 @@ class svgHandler(xml.sax.ContentHandler):
- if 'inkscape:version' in data:
- inks_doc_name = attrs.getValue('sodipodi:docname')
- inks_full_ver = attrs.getValue('inkscape:version')
-- inks_ver_pars = re.search("\d+\.\d+", inks_full_ver)
-+ inks_ver_pars = re.search(r"\d+\.\d+", inks_full_ver)
- if inks_ver_pars is not None:
- inks_ver_f = float(inks_ver_pars.group(0))
- else:
-@@ -930,13 +929,13 @@ class svgHandler(xml.sax.ContentHandler):
- self.lastdim = obj
- data['d'] = []
-
-- _op = '([mMlLhHvVaAcCqQsStTzZ])'
-- _op2 = '([^mMlLhHvVaAcCqQsStTzZ]*)'
-- _command = '\s*?' + _op + '\s*?' + _op2 + '\s*?'
-+ _op = r"([mMlLhHvVaAcCqQsStTzZ])"
-+ _op2 = r"([^mMlLhHvVaAcCqQsStTzZ]*)"
-+ _command = r"\s*?" + _op + r"\s*?" + _op2 + r"\s*?"
- pathcommandsre = re.compile(_command, re.DOTALL)
-
-- _num = '[-+]?[0-9]*\.?[0-9]+'
-- _exp = '([eE][-+]?[0-9]+)?'
-+ _num = r"[-+]?[0-9]*\.?[0-9]+"
-+ _exp = r"([eE][-+]?[0-9]+)?"
- _point = '(' + _num + _exp + ')'
- pointsre = re.compile(_point, re.DOTALL)
- _commands = pathcommandsre.findall(' '.join(data['d']))
-@@ -1616,9 +1615,9 @@ class svgHandler(xml.sax.ContentHandler):
- Base::Matrix4D
- The translated matrix.
- """
-- _op = '(matrix|translate|scale|rotate|skewX|skewY)'
-- _val = '\((.*?)\)'
-- _transf = _op + '\s*?' + _val
-+ _op = r"(matrix|translate|scale|rotate|skewX|skewY)"
-+ _val = r"\((.*?)\)"
-+ _transf = _op + r"\s*?" + _val
- transformre = re.compile(_transf, re.DOTALL)
- m = FreeCAD.Matrix()
- for transformation, arguments in transformre.findall(tr):
---- a/src/Mod/Path/Path/Post/scripts/gcode_pre.py
-+++ b/src/Mod/Path/Path/Post/scripts/gcode_pre.py
-@@ -191,10 +191,10 @@ def _identifygcodeByToolNumberList(filename):
- gfile.close()
-
- # Regular expression to match tool changes in the format 'M6 Tn'
-- p = re.compile("[mM]+?\s?0?6\s?T\d*\s")
-+ p = re.compile(r"[mM]+?\s?0?6\s?T\d*\s")
+ class TestFileNameGenerator(unittest.TestCase):
+- """
++ r"""
+ String substitution allows the following:
+ %D ... directory of the active document
+ %d ... name of the active document (with extension)
+--- a/src/Mod/CAM/Path/Post/scripts/gcode_pre.py
++++ b/src/Mod/CAM/Path/Post/scripts/gcode_pre.py
+@@ -191,7 +191,7 @@
+ p = re.compile(r"[mM]+?\s?0?6\s?T\d*\s")
# split the gcode on tool changes
- paths = re.split("([mM]+?\s?0?6\s?T\d*\s)", gcode)
@@ -260,20 +34,9 @@
# iterate the gcode sections and add customs for each
toolnumber = 0
---- a/src/Mod/Path/PathTests/TestPathPost.py
-+++ b/src/Mod/Path/PathTests/TestPathPost.py
-@@ -352,7 +352,7 @@ class TestBuildPostList(unittest.TestCase):
-
- class TestOutputNameSubstitution(unittest.TestCase):
-
-- """
-+ r"""
- String substitution allows the following:
- %D ... directory of the active document
- %d ... name of the active document (with extension)
--- a/src/Mod/Robot/KukaExporter.py
+++ b/src/Mod/Robot/KukaExporter.py
-@@ -21,7 +21,7 @@ DECL FDAT FP4={TOOL_NO 1,BASE_NO 0,IPO_FRAME #BASE,POINT2[] " "}
+@@ -21,7 +21,7 @@
DECL LDAT LCPDAT1={VEL 2.0,ACC 100.0,APO_DIST 100.0,APO_FAC 50.0,ORI_TYP #VAR}
"""
@@ -281,4 +44,4 @@
+HeaderSrc = r"""&ACCESS RVP
&REL 1
&PARAM TEMPLATE = C:\KRC\Roboter\Template\ExpertVorgabe
- &PARAM EDITMASK = *
+ &PARAM EDITMASK = *
diff --git a/srcpkgs/freecad/patches/vtk.patch b/srcpkgs/freecad/patches/vtk.patch
deleted file mode 100644
index bcaf68d0855e65..00000000000000
--- a/srcpkgs/freecad/patches/vtk.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx b/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx
-index 7f89573efd..47a52fe585 100644
---- a/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx
-+++ b/src/3rdParty/salomesmesh/inc/SMESH_SMDS.hxx
-@@ -39,10 +39,6 @@
- #define SMDS_EXPORT
- #endif
-
--#ifdef VTK_HAS_MTIME_TYPE
- #define VTK_MTIME_TYPE vtkMTimeType
--#else
--#define VTK_MTIME_TYPE unsigned long
--#endif
-
- #endif
-diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-index 7e3de0070a..e9895d6157 100644
---- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-+++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_UnstructuredGrid.cpp
-@@ -1026,7 +1026,12 @@ void SMDS_UnstructuredGrid::BuildLinks()
- GetLinks()->Allocate(this->GetNumberOfPoints());
- GetLinks()->Register(this);
- //FIXME: vtk9
-+ #if VTK_VERSION_NUMBER < VTK_VERSION_CHECK(9,3,0)
- GetLinks()->BuildLinks(this);
-+ #else
-+ GetLinks()->SetDataSet(this);
-+ GetLinks()->BuildLinks();
-+ #endif
- GetLinks()->Delete();
- #else
- this->Links = SMDS_CellLinks::New();
diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template
index 3d5e31790bb62b..7fe70c0d5c0f78 100644
--- a/srcpkgs/freecad/template
+++ b/srcpkgs/freecad/template
@@ -1,58 +1,60 @@
# Template file for 'freecad'
pkgname=freecad
-version=0.21.2
-revision=2
-build_wrksrc="FreeCAD-${version}"
+version=1.0.0
+revision=1
+_pycxx_ver=7.1.8
+_ondsel_ver=91f70382beeb58b32432b5a82da3802e4c19199c
build_style=cmake
pycompile_dirs="usr/lib/${pkgname}/Mod"
_inst_prefix=/usr/lib/${pkgname}
-configure_args="
- -DPYTHON_EXECUTABLE=/usr/bin/python3
- -DBUILD_QT5=ON
- -DBUILD_FEM_NETGEN=OFF
- -DBUILD_FLAT_MESH=ON
- -DCMAKE_INSTALL_PREFIX=${_inst_prefix}
- -DCMAKE_INSTALL_DATAROOTDIR=/usr/share
- -DCMAKE_INSTALL_DATADIR=/usr/share/${pkgname}
- -DMEDFILE_INCLUDE_DIRS=/usr/include/med
- -DPYSIDE2RCCBINARY=/usr/bin/rcc-qt5
- -DPYSIDE2UICBINARY=/usr/bin/uic-qt5
-"
+configure_args="-DPYTHON_EXECUTABLE=/usr/bin/python3 -DBUILD_GUI=ON
+ -DFREECAD_QT_VERSION=6 -DBUILD_FEM_NETGEN=OFF -DBUILD_FLAT_MESH=ON
+ -DFREECAD_USE_EXTERNAL_PIVY=ON -DCMAKE_INSTALL_PREFIX=${_inst_prefix}
+ -DCMAKE_INSTALL_DATAROOTDIR=/usr/share -DCMAKE_INSTALL_DATADIR=/usr/share/${pkgname}
+ -DMEDFILE_INCLUDE_DIRS=/usr/include/med -DCOIN3D_INCLUDE_DIRS=/usr/include/Coin3"
hostmakedepends="pkg-config swig doxygen graphviz python3-setuptools
python3-matplotlib"
makedepends="boost-devel libxerces-c-devel zlib-devel occt-devel vtk-devel
hdf5-devel openmpi-devel libmed-devel eigen double-conversion-devel
- coin3-devel libshiboken2-devel libspnav-devel liblz4-devel netcdf-devel
- jsoncpp-devel coin3-doc glew-devel python3-devel pyside2-tools
- libpyside2-python3-devel qt5-devel qt5-svg-devel qt5-tools-devel
- qt5-declarative-devel qt5-webengine-devel qt5-webchannel-devel
- qt5-location-devel qt5-xmlpatterns-devel"
-depends="python3-matplotlib python3-pyside2-webengine python3-pivy
- python3-GitPython python3-Markdown"
+ coin3-devel libspnav-devel liblz4-devel netcdf-devel jsoncpp-devel
+ glew-devel python3-devel yaml-cpp-devel guidelines-support-library
+ qt6-base-devel qt6-svg-devel qt6-tools-devel libpyside6-devel"
+depends="python3-matplotlib python3-pivy python3-GitPython python3-Markdown
+ python3-pyside6"
+checkdepends="gtest-devel"
short_desc="General purpose 3D CAD modeler"
maintainer="yopito <pierre.bourgin@free.fr>"
license="LGPL-2.0-or-later"
homepage="https://freecadweb.org/"
-_pycxxver=7.1.8
-distfiles="
- https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz
- ${SOURCEFORGE_SITE}/cxx/pycxx-${_pycxxver}.tar.gz
-"
-checksum="ceaf77cd12e8ad533d1535cc27ae4ca2a6e80778502dc9cdec906415d674b674
- 4b91e1e1141c23fbd5039df635c4bb6e75632168548f56b83ce177193c0c98c6"
+distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz
+ ${SOURCEFORGE_SITE}/cxx/pycxx-${_pycxx_ver}.tar.gz
+ https://github.com/Ondsel-Development/OndselSolver/archive/${_ondsel_ver}.tar.gz>OndselSolver-${_ondsel_ver}.tar.gz"
+checksum="51115afd8e3b89f4bac343b986b0800d8e1c68fc1e322c3cd179cfe1033ef937
+ 4b91e1e1141c23fbd5039df635c4bb6e75632168548f56b83ce177193c0c98c6
+ 061f651f503f1ec5a9814e174cdb8a9ba84d511a3b8be3d94852e84976c6b158"
python_version=3
-patch_args="-Np1 -d ${build_wrksrc}"
+
+skip_extraction="pycxx-${_pycxx_ver}.tar.gz
+ OndselSolver-${_ondsel_ver}.tar.gz"
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" libexecinfo-devel"
LDFLAGS="-lexecinfo"
fi
+if [ "$XBPS_CHECK_PKGS" ]; then
+ configure_args+=" -DENABLE_DEVELOPER_TESTS=ON"
+else
+ configure_args+=" -DENABLE_DEVELOPER_TESTS=OFF"
+fi
+
CXXFLAGS="-DPYCXX_PYTHON_2TO3"
post_extract() {
- rm -r "${build_wrksrc}/src/CXX"
- ln -Tsr "./pycxx-${_pycxxver}/CXX" "${build_wrksrc}/src/CXX"
+ vsrcextract -C src/3rdParty/OndselSolver "OndselSolver-${_ondsel_ver}.tar.gz"
+ vsrcextract -C pycxx "pycxx-${_pycxx_ver}.tar.gz"
+ rm -r src/CXX
+ ln -Tsr ./pycxx/CXX src/CXX
}
post_patch() {
@@ -65,13 +67,13 @@ post_patch() {
# SubWCRev.py (SCM check) reports "unknown" for these fields
vsed -e "s,\${PACKAGE_WCREF},${revision}_voidlinux," \
-e "s,\${PACKAGE_WCDATE},(from release)," \
- -e "s,\${PACKAGE_WCURL},VoidLinux package ${pkgname}," \
+ -e "s,\${PACKAGE_WCURL},Void Linux package ${pkgname}," \
-i src/Build/Version.h.cmake
}
pre_configure() {
- configure_args+=" -DPYCXX_INCLUDE_DIR=${wrksrc}/pycxx-${_pycxxver}"
- configure_args+=" -DPYCXX_SOURCE_DIR=${wrksrc}/pycxx-${_pycxxver}/Src"
+ configure_args+=" -DPYCXX_INCLUDE_DIR=${wrksrc}/pycxx
+ -DPYCXX_SOURCE_DIR=${wrksrc}/pycxx/Src"
}
post_install() {
prev parent reply other threads:[~2024-11-21 2:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 6:04 [PR PATCH] " classabbyamp
2024-11-21 0:54 ` [PR PATCH] [Updated] " classabbyamp
2024-11-21 0:54 ` classabbyamp
2024-11-21 2:52 ` classabbyamp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241121025230.467DB30696@inbox.vuxu.org \
--to=classabbyamp@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).