From 330f1a6511259207ecd527e00e9c11bb68292bbf Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Fri, 25 Mar 2022 20:24:49 -0400 Subject: [PATCH 1/2] python3-occ: remove package * upstream is well behind occt --- srcpkgs/python3-occ/patches/python3.10.patch | 15 --------------- srcpkgs/python3-occ/template | 17 ----------------- srcpkgs/removed-packages/template | 3 ++- 3 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 srcpkgs/python3-occ/patches/python3.10.patch delete mode 100644 srcpkgs/python3-occ/template diff --git a/srcpkgs/python3-occ/patches/python3.10.patch b/srcpkgs/python3-occ/patches/python3.10.patch deleted file mode 100644 index e192608fd3b3..000000000000 --- a/srcpkgs/python3-occ/patches/python3.10.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/Display/SimpleGui.py b/src/Display/SimpleGui.py -index 42705a82..6a274c16 100644 ---- a/src/Display/SimpleGui.py -+++ b/src/Display/SimpleGui.py -@@ -161,8 +161,8 @@ def init_display(backend_str: Optional[str]=None, - def centerOnScreen(self) -> None: - '''Centers the window on the screen.''' - resolution = QtWidgets.QApplication.desktop().screenGeometry() -- x = (resolution.width() - self.frameSize().width()) / 2 -- y = (resolution.height() - self.frameSize().height()) / 2 -+ x = (resolution.width() - self.frameSize().width()) // 2 -+ y = (resolution.height() - self.frameSize().height()) // 2 - self.move(x, y) - - def add_menu(self, menu_name: str) -> None: diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template deleted file mode 100644 index bee03373a3d1..000000000000 --- a/srcpkgs/python3-occ/template +++ /dev/null @@ -1,17 +0,0 @@ -# Template file for 'python3-occ' -pkgname=python3-occ -version=7.4.1 -revision=3 -archs="i686* x86_64* armv7l* aarch64* ppc*" -wrksrc="pythonocc-core-${version}" -build_style=cmake -configure_args="-DPYTHONOCC_BUILD_TYPE=None -DCMAKE_BUILD_TYPE=None" -hostmakedepends="python3 swig" -makedepends="python3-devel occt-devel freetype-devel swig" -depends="python3 occt freetype" -short_desc="Industrial strength 3D CAD Python3 package" -maintainer="Karl Nilsson " -license="LGPL-3.0-or-later" -homepage="http://pythonocc.org" -distfiles="https://github.com/tpaviot/pythonocc-core/archive/${version}.tar.gz" -checksum=6d62002244a0e7f4e5c1ad590d332a60601c44b2501ad017361443b54371e667 diff --git a/srcpkgs/removed-packages/template b/srcpkgs/removed-packages/template index df264c9d7501..dc8107f36e09 100644 --- a/srcpkgs/removed-packages/template +++ b/srcpkgs/removed-packages/template @@ -1,7 +1,7 @@ # Template file for 'removed-packages' pkgname=removed-packages version=0.1 -revision=67 +revision=68 build_style=meta short_desc="Uninstalls packages removed from repository" maintainer="Piotr Wójcik " @@ -327,6 +327,7 @@ replaces=" python3-keepalive<=0.5_6 python3-pgpdump<=1.5_10 python3-lockfile<=0.12.2_7 + python3-occ<=7.4.1_3 python3-pyPEG2<=2.15.2_7 python3-pyenet<=5.15.0_2 python3-pyside-phonon<=5.15.0_2 From 1275e700b5c66f51fa4525dc8c86ffe9cf5d1797 Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Fri, 25 Mar 2022 19:29:00 -0400 Subject: [PATCH 2/2] occt: update to 7.6.1. --- .../occt/patches/cmake-build-type-none.patch | 6 +-- srcpkgs/occt/patches/musl-fenv.patch | 18 ++++---- srcpkgs/occt/patches/musl-mallinfo.patch | 45 ++++++++++++++----- srcpkgs/occt/template | 26 +++++------ srcpkgs/occt/update | 2 - 5 files changed, 59 insertions(+), 38 deletions(-) delete mode 100644 srcpkgs/occt/update diff --git a/srcpkgs/occt/patches/cmake-build-type-none.patch b/srcpkgs/occt/patches/cmake-build-type-none.patch index ecb0e3da3929..d2caec8c4e87 100644 --- a/srcpkgs/occt/patches/cmake-build-type-none.patch +++ b/srcpkgs/occt/patches/cmake-build-type-none.patch @@ -1,8 +1,8 @@ -Index: CMakeLists.txt -=================================================================== +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f4ec871f5..9b0644e94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_D +@@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/adm/cmake") set (CMAKE_SUPPRESS_REGENERATION TRUE) diff --git a/srcpkgs/occt/patches/musl-fenv.patch b/srcpkgs/occt/patches/musl-fenv.patch index 09da8d0afeae..06a8e3a89cfd 100644 --- a/srcpkgs/occt/patches/musl-fenv.patch +++ b/srcpkgs/occt/patches/musl-fenv.patch @@ -5,18 +5,20 @@ is probably wrong, but I don't have a replacement for the non-posix functions fegetexcept(3) and feenableexcept(3). """ +diff --git a/src/OSD/OSD_signal.cxx b/src/OSD/OSD_signal.cxx +index 007f5ccaa..fe39e07ac 100644 --- a/src/OSD/OSD_signal.cxx +++ b/src/OSD/OSD_signal.cxx -@@ -703,7 +703,7 @@ - +@@ -761,7 +761,7 @@ typedef void (* SIG_PFV) (int); + #include - --#if !defined(__ANDROID__) && !defined(__QNX__) -+#if !defined(__ANDROID__) && !defined(__QNX__) && defined(__GLIBC__) + +-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) ++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__) #include #endif - -@@ -914,7 +914,7 @@ + +@@ -977,7 +977,7 @@ static void SegvHandler(const int theSignal, //======================================================================= void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal) { @@ -25,7 +27,7 @@ non-posix functions fegetexcept(3) and feenableexcept(3). feclearexcept (FE_ALL_EXCEPT); if (theFloatingSignal) { -@@ -947,7 +947,7 @@ +@@ -1010,7 +1010,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal) //======================================================================= Standard_Boolean OSD::ToCatchFloatingSignals() { diff --git a/srcpkgs/occt/patches/musl-mallinfo.patch b/srcpkgs/occt/patches/musl-mallinfo.patch index 4e5825bf1cb0..6ae94992eaf8 100644 --- a/srcpkgs/occt/patches/musl-mallinfo.patch +++ b/srcpkgs/occt/patches/musl-mallinfo.patch @@ -1,17 +1,38 @@ -In musl libc there is no struct mallinfo and no function mallinf() +Adapted from alpine's patch +diff --git a/src/OSD/OSD_MemInfo.cxx b/src/OSD/OSD_MemInfo.cxx +index d9bb91398..d608e04fc 100644 --- a/src/OSD/OSD_MemInfo.cxx +++ b/src/OSD/OSD_MemInfo.cxx -@@ -147,8 +147,12 @@ - } - aFile.close(); +@@ -35,6 +35,9 @@ + #include + #include + ++#include ++#include ++ + #include -+ #if defined(__GLIBC__) - struct mallinfo aMI = mallinfo(); - myCounters[MemHeapUsage] = aMI.uordblks; -+ #else /* XXX not yet coded */ -+ myCounters[MemHeapUsage] = 0; -+ #endif + #if defined(__EMSCRIPTEN__) +@@ -182,18 +185,9 @@ void OSD_MemInfo::Update() + #elif (defined(__linux__) || defined(__linux)) + if (IsActive (MemHeapUsage)) + { +- #if defined(__GLIBC__) && defined(__GLIBC_PREREQ) +- #if __GLIBC_PREREQ(2,33) +- #define HAS_MALLINFO2 +- #endif +- #endif +- +- #ifdef HAS_MALLINFO2 +- const struct mallinfo2 aMI = mallinfo2(); +- #else +- const struct mallinfo aMI = mallinfo(); +- #endif +- myCounters[MemHeapUsage] = aMI.uordblks; ++ struct rusage ru = { .ru_maxrss = 0 }; ++ getrusage(RUSAGE_SELF, &ru); ++ myCounters[MemHeapUsage] = ru.ru_maxrss; + } - #elif (defined(__APPLE__)) - struct task_basic_info aTaskInfo; + if (!IsActive (MemVirtual) diff --git a/srcpkgs/occt/template b/srcpkgs/occt/template index 6624fea8b53f..569e0f738bcb 100644 --- a/srcpkgs/occt/template +++ b/srcpkgs/occt/template @@ -1,26 +1,26 @@ # Template file for 'occt' pkgname=occt -reverts=7.5.0_1 -version=7.4.0p1 -revision=5 -_gittag="V${version//./_}" -wrksrc=occt-${_gittag} +version=7.6.1 +revision=1 +_ver="${version//./_}" +wrksrc=OCCT-${_ver} build_style=cmake -# XXX: re-enable -DUSE_TBB=ON if possible when updating -configure_args="-DUSE_FREEIMAGE=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF +configure_args="-DUSE_FREEIMAGE=ON -DUSE_TBB=ON -DUSE_GL2PS=ON -DUSE_VTK=OFF -DINSTALL_SAMPLES=ON" -makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tcl-devel - tk-devel" +makedepends="freetype-devel glu-devel freeimage-devel gl2ps-devel tbb-devel + tcl-devel tk-devel" short_desc="OpenCASCADE Technology - library for CAD/CAM/CAE applications" maintainer="Piraty " license="custom:LGPL-2.1-only-with-exceptions" homepage="https://www.opencascade.com" -# distfile: use git instead of official tarball, which requires registration -# see https://www.opencascade.com/content/packaging-again-debian -distfiles="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/${_gittag};sf=tgz>occt-${_gittag}.tar.gz" -checksum=e00fedc221560fda31653c23a8f3d0eda78095c87519f338d4f4088e2ee9a9c0 +distfiles="https://github.com/Open-Cascade-SAS/OCCT/archive/V${_ver}.tar.gz" +checksum=48969bf9130966a30b370b335133f87e8614b7cbc077b0df9d895bbefc5cfeae conflicts="oce>=0" +case "$XBPS_TARGET_MACHINE" in + *-musl) makedepends+=" libexecinfo-devel";; +esac + post_install() { rm ${PKGDESTDIR}/usr/share/doc/opencascade/*_LGPL_*.txt vlicense OCCT_LGPL_EXCEPTION.txt diff --git a/srcpkgs/occt/update b/srcpkgs/occt/update deleted file mode 100644 index c128eec6d9c9..000000000000 --- a/srcpkgs/occt/update +++ /dev/null @@ -1,2 +0,0 @@ -site="https://git.dev.opencascade.org/gitweb/?p=occt.git;a=tags" -pattern=">V\K[\d_p]+(?=)"