From 577717adeba53f21e01dc3f4de2a00a70e0354bb Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Fri, 25 Mar 2022 19:29:00 -0400 Subject: [PATCH 1/6] occt: update to 7.6.2. --- common/shlibs | 114 +++++++++--------- .../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 | 27 +++-- srcpkgs/occt/update | 2 - 6 files changed, 117 insertions(+), 95 deletions(-) delete mode 100644 srcpkgs/occt/update diff --git a/common/shlibs b/common/shlibs index 987cff25f146..a286a91ae9fa 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3352,63 +3352,63 @@ libvolume_key.so.1 volume_key-0.3.9_1 librand48_r.so.0 rand48_r-0.1_1 libxxhash.so.0 libxxHash-0.6.5_2 libcapnp_c.so.0 c-capnproto-0.3_1 -libTKBin.so.7 occt-7.2.0p1_1 -libTKDraw.so.7 occt-7.2.0p1_1 -libTKSTEP209.so.7 occt-7.2.0p1_1 -libTKOpenGl.so.7 occt-7.2.0p1_1 -libTKBinTObj.so.7 occt-7.2.0p1_1 -libTKSTL.so.7 occt-7.2.0p1_1 -libTKViewerTest.so.7 occt-7.2.0p1_1 -libTKCAF.so.7 occt-7.2.0p1_1 -libTKService.so.7 occt-7.2.0p1_1 -libTKV3d.so.7 occt-7.2.0p1_1 -libTKXCAF.so.7 occt-7.2.0p1_1 -libTKMesh.so.7 occt-7.2.0p1_1 -libTKSTEP.so.7 occt-7.2.0p1_1 -libTKMath.so.7 occt-7.2.0p1_1 -libTKLCAF.so.7 occt-7.2.0p1_1 -libTKShHealing.so.7 occt-7.2.0p1_1 -libTKGeomAlgo.so.7 occt-7.2.0p1_1 -libTKTObjDRAW.so.7 occt-7.2.0p1_1 -libTKTObj.so.7 occt-7.2.0p1_1 -libTKStd.so.7 occt-7.2.0p1_1 -libTKSTEPBase.so.7 occt-7.2.0p1_1 -libTKIGES.so.7 occt-7.2.0p1_1 -libTKGeomBase.so.7 occt-7.2.0p1_1 -libTKFillet.so.7 occt-7.2.0p1_1 -libTKFeat.so.7 occt-7.2.0p1_1 -libTKG2d.so.7 occt-7.2.0p1_1 -libTKXSBase.so.7 occt-7.2.0p1_1 -libTKDCAF.so.7 occt-7.2.0p1_1 -libTKXml.so.7 occt-7.2.0p1_1 -libTKTopTest.so.7 occt-7.2.0p1_1 -libTKG3d.so.7 occt-7.2.0p1_1 -libTKBRep.so.7 occt-7.2.0p1_1 -libTKVRML.so.7 occt-7.2.0p1_1 -libTKCDF.so.7 occt-7.2.0p1_1 -libTKXSDRAW.so.7 occt-7.2.0p1_1 -libTKXMesh.so.7 occt-7.2.0p1_1 -libTKernel.so.7 occt-7.2.0p1_1 -libTKTopAlgo.so.7 occt-7.2.0p1_1 -libTKHLR.so.7 occt-7.2.0p1_1 -libTKBinXCAF.so.7 occt-7.2.0p1_1 -libTKVCAF.so.7 occt-7.2.0p1_1 -libTKBinL.so.7 occt-7.2.0p1_1 -libTKXmlXCAF.so.7 occt-7.2.0p1_1 -libTKXDEIGES.so.7 occt-7.2.0p1_1 -libTKBO.so.7 occt-7.2.0p1_1 -libTKStdL.so.7 occt-7.2.0p1_1 -libTKXDEDRAW.so.7 occt-7.2.0p1_1 -libTKXmlTObj.so.7 occt-7.2.0p1_1 -libTKPrim.so.7 occt-7.2.0p1_1 -libTKMeshVS.so.7 occt-7.2.0p1_1 -libTKSTEPAttr.so.7 occt-7.2.0p1_1 -libTKBool.so.7 occt-7.2.0p1_1 -libTKOffset.so.7 occt-7.2.0p1_1 -libTKXDESTEP.so.7 occt-7.2.0p1_1 -libTKQADraw.so.7 occt-7.2.0p1_1 -libTKXmlL.so.7 occt-7.2.0p1_1 -libTKRWMesh.so.7 occt-7.4.0_1 +libTKBin.so.7 occt-7.6.2_1 +libTKDraw.so.7 occt-7.6.2_1 +libTKSTEP209.so.7 occt-7.6.2_1 +libTKOpenGl.so.7 occt-7.6.2_1 +libTKBinTObj.so.7 occt-7.6.2_1 +libTKSTL.so.7 occt-7.6.2_1 +libTKViewerTest.so.7 occt-7.6.2_1 +libTKCAF.so.7 occt-7.6.2_1 +libTKService.so.7 occt-7.6.2_1 +libTKV3d.so.7 occt-7.6.2_1 +libTKXCAF.so.7 occt-7.6.2_1 +libTKMesh.so.7 occt-7.6.2_1 +libTKSTEP.so.7 occt-7.6.2_1 +libTKMath.so.7 occt-7.6.2_1 +libTKLCAF.so.7 occt-7.6.2_1 +libTKShHealing.so.7 occt-7.6.2_1 +libTKGeomAlgo.so.7 occt-7.6.2_1 +libTKTObjDRAW.so.7 occt-7.6.2_1 +libTKTObj.so.7 occt-7.6.2_1 +libTKStd.so.7 occt-7.6.2_1 +libTKSTEPBase.so.7 occt-7.6.2_1 +libTKIGES.so.7 occt-7.6.2_1 +libTKGeomBase.so.7 occt-7.6.2_1 +libTKFillet.so.7 occt-7.6.2_1 +libTKFeat.so.7 occt-7.6.2_1 +libTKG2d.so.7 occt-7.6.2_1 +libTKXSBase.so.7 occt-7.6.2_1 +libTKDCAF.so.7 occt-7.6.2_1 +libTKXml.so.7 occt-7.6.2_1 +libTKTopTest.so.7 occt-7.6.2_1 +libTKG3d.so.7 occt-7.6.2_1 +libTKBRep.so.7 occt-7.6.2_1 +libTKVRML.so.7 occt-7.6.2_1 +libTKCDF.so.7 occt-7.6.2_1 +libTKXSDRAW.so.7 occt-7.6.2_1 +libTKXMesh.so.7 occt-7.6.2_1 +libTKernel.so.7 occt-7.6.2_1 +libTKTopAlgo.so.7 occt-7.6.2_1 +libTKHLR.so.7 occt-7.6.2_1 +libTKBinXCAF.so.7 occt-7.6.2_1 +libTKVCAF.so.7 occt-7.6.2_1 +libTKBinL.so.7 occt-7.6.2_1 +libTKXmlXCAF.so.7 occt-7.6.2_1 +libTKXDEIGES.so.7 occt-7.6.2_1 +libTKBO.so.7 occt-7.6.2_1 +libTKStdL.so.7 occt-7.6.2_1 +libTKXDEDRAW.so.7 occt-7.6.2_1 +libTKXmlTObj.so.7 occt-7.6.2_1 +libTKPrim.so.7 occt-7.6.2_1 +libTKMeshVS.so.7 occt-7.6.2_1 +libTKSTEPAttr.so.7 occt-7.6.2_1 +libTKBool.so.7 occt-7.6.2_1 +libTKOffset.so.7 occt-7.6.2_1 +libTKXDESTEP.so.7 occt-7.6.2_1 +libTKQADraw.so.7 occt-7.6.2_1 +libTKXmlL.so.7 occt-7.6.2_1 +libTKRWMesh.so.7 occt-7.6.2_1 libargon2.so.1 libargon2-20171227_1 libdazzle-1.0.so.0 libdazzle-3.28.0_1 libjsonrpc-glib-1.0.so.1 jsonrpc-glib-3.28.0_1 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..b17c91b0058b 100644 --- a/srcpkgs/occt/template +++ b/srcpkgs/occt/template @@ -1,26 +1,27 @@ # 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.2 +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=dea04077d71507c666aaa7ccaeacc73ab580d6572d7f75e90a1984c4c0302a7a conflicts="oce>=0" +if [ "$XBPS_TARGET_LIBC" = musl ]; then + makedepends+=" libexecinfo-devel" + LDFLAGS="-lexecinfo" +fi + 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]+(?=)" From 9437fc2078e42e5dd814d721761346a6471a4bc0 Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Sat, 1 Oct 2022 17:18:40 -0400 Subject: [PATCH 2/6] python3-occ: update to 7.6.2. --- srcpkgs/python3-occ/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/python3-occ/template b/srcpkgs/python3-occ/template index bee03373a3d1..4a1db0553c12 100644 --- a/srcpkgs/python3-occ/template +++ b/srcpkgs/python3-occ/template @@ -1,7 +1,7 @@ # Template file for 'python3-occ' pkgname=python3-occ -version=7.4.1 -revision=3 +version=7.6.2 +revision=1 archs="i686* x86_64* armv7l* aarch64* ppc*" wrksrc="pythonocc-core-${version}" build_style=cmake @@ -14,4 +14,4 @@ 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 +checksum=84b1dad3b262027efc3314ab1f7cc8167ac353a1ffeea081e741e4c60319b848 From 178bb57cb9f5263ca136f97faa12d2a2945eff9e Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Sat, 1 Oct 2022 17:34:34 -0400 Subject: [PATCH 3/6] freecad: revbump for occt 7.6.2 --- srcpkgs/freecad/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template index 6963278981fc..077710f262fa 100644 --- a/srcpkgs/freecad/template +++ b/srcpkgs/freecad/template @@ -1,7 +1,7 @@ # Template file for 'freecad' pkgname=freecad version=0.20.1 -revision=4 +revision=5 wrksrc="FreeCAD-${version}" build_style=cmake From 762c7b46513532b0815d4ef22ad8208991e24868 Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Sat, 1 Oct 2022 17:34:45 -0400 Subject: [PATCH 4/6] horizon: revbump for occt 7.6.2 --- srcpkgs/horizon/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/horizon/template b/srcpkgs/horizon/template index 7496696147c9..287bf6afde3e 100644 --- a/srcpkgs/horizon/template +++ b/srcpkgs/horizon/template @@ -1,7 +1,7 @@ # Template file for 'horizon' pkgname=horizon version=2.3.1 -revision=1 +revision=2 build_style=gnu-makefile make_build_args="GOLD=" make_install_target="install install-man" From dce6a96031b21538bfff8780719e1455b0eba86b Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Sat, 1 Oct 2022 17:34:56 -0400 Subject: [PATCH 5/6] kicad: revbump for occt 7.6.2 --- srcpkgs/kicad/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/kicad/template b/srcpkgs/kicad/template index 23b9ad9418d4..4db59d0bdd22 100644 --- a/srcpkgs/kicad/template +++ b/srcpkgs/kicad/template @@ -1,7 +1,7 @@ # Template file for 'kicad' pkgname=kicad version=6.0.7 -revision=1 +revision=2 build_style=cmake build_helper=cmake-wxWidgets-gtk3 configure_args="-DKICAD_SCRIPTING_WXPYTHON=ON From 2f970325cdc5f9343832181464fcd69387070bf4 Mon Sep 17 00:00:00 2001 From: Karl Nilsson Date: Sat, 1 Oct 2022 17:35:28 -0400 Subject: [PATCH 6/6] gmsh: revbump for occt 7.6.2 --- srcpkgs/gmsh/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/gmsh/template b/srcpkgs/gmsh/template index 616e140277b1..286c2fc91645 100644 --- a/srcpkgs/gmsh/template +++ b/srcpkgs/gmsh/template @@ -1,7 +1,7 @@ # Template file for 'gmsh' pkgname=gmsh version=4.8.4 -revision=1 +revision=2 wrksrc="${pkgname}-${version}-source" build_style=cmake configure_args="-DENABLE_SYSTEM_CONTRIB=ON