aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAiden Grossman <agrossman154@yahoo.com>2021-11-12 04:54:03 +0000
committerLeo <thinkabit.ukim@gmail.com>2021-11-25 07:24:01 +0000
commit075120fd462e11a2a901693d2d0a3d05625b438f (patch)
treec967868f570e1f9a17999f8b74534135ba65e5a6
parent6c747bfd40bce1e293b8a71a02be4df02a87fc28 (diff)
downloadaports-075120fd462e11a2a901693d2d0a3d05625b438f.tar.gz
aports-075120fd462e11a2a901693d2d0a3d05625b438f.tar.bz2
aports-075120fd462e11a2a901693d2d0a3d05625b438f.tar.xz
testing/opencascade: upgrade to 7.6.0
-rw-r--r--testing/opencascade/APKBUILD10
-rw-r--r--testing/opencascade/no_backtrace.patch63
-rw-r--r--testing/opencascade/no_mallinfo.patch24
3 files changed, 85 insertions, 12 deletions
diff --git a/testing/opencascade/APKBUILD b/testing/opencascade/APKBUILD
index 7935251d68..ce8a0a243e 100644
--- a/testing/opencascade/APKBUILD
+++ b/testing/opencascade/APKBUILD
@@ -1,8 +1,8 @@
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=opencascade
-pkgver=7.5.0
-pkgrel=1
+pkgver=7.6.0
+pkgrel=0
pkgdesc="An SDK for development of applications dealing with 3D CAD data"
url="https://dev.opencascade.org/"
# riscv64 blocked by libkml -> gdal -> pdal -> vtk
@@ -31,6 +31,7 @@ source="
no_feenableexcept.patch
cmake_fix_install_dir.patch
cmake_add_buildtype_none.patch
+ no_backtrace.patch
"
builddir="$srcdir/occt-V${pkgver//./_}"
options="!check" # No tests provided :-/
@@ -56,9 +57,10 @@ package() {
}
sha512sums="
-90cd49acbfb4b2d896676239650da0d2c8cee6bc1d940dde98da0e6f49d2e37936ff8924bdf98f20a2dd281342e441186839be084ef910cc4baab34e7235ec16 opencascade-7.5.0.tar.gz
-e31be16775fbc316112d970e652df361a7b91d6d1c852c06fa283b441839b21115d274be981b9bdd4cf5c7a27181bc7d5c24faa75d4bb6d13593614574f8900e no_mallinfo.patch
+6839eb6641b9e0752474fce11cf1756223067febe0f5bcd5db249e3eccef29517a6952c124aae818220b6360070a792dacd1b0b4ce970b8351ce38598f31b4be opencascade-7.6.0.tar.gz
+e04cb898ec16c57ea5f2e9e79f6616153b7f6e4ddcad815f5d28898a692e26e1054a8f3321e6ee8616a915b10d45927f5e596c4f096c5333be910eaea751cce3 no_mallinfo.patch
b039b8fce696bfd0f53309a72adab4065780bf1755da6208040157e9383deb0061ad8927a6f160730f431cbebe3fdd1eaa7967b38da4a245a8d9306042d97629 no_feenableexcept.patch
10481f153adf1db55111d68da49dae1885a50e745d3a978f6316b5b13a3f2d7de6a2ed6a3c60c20ef967ea65c16b372da03bf2665ffe4493ad6fe329a3abf368 cmake_fix_install_dir.patch
4bdedc8f0e011530115777cddeeb898750242999725347c3392d8858e5cc9543c791814aa41e1543c575a6a79b0b32fd72970bb83c8948fe42f33993244db1cf cmake_add_buildtype_none.patch
+86dceb6e8309e18f5ea72ce2e3524ff08dc761ffe76557d62a1a4f2824ca0e2f9dfc194cae22164aaaf5ad9a15a6ec0f1fef443241aa2ccb0a2140de217c8a90 no_backtrace.patch
"
diff --git a/testing/opencascade/no_backtrace.patch b/testing/opencascade/no_backtrace.patch
new file mode 100644
index 0000000000..efa47ba076
--- /dev/null
+++ b/testing/opencascade/no_backtrace.patch
@@ -0,0 +1,63 @@
+--- ./src/Standard/Standard_StackTrace.cxx
++++ ./src/Standard/Standard_StackTrace.cxx
+@@ -30,7 +30,6 @@
+ #elif defined(__QNX__)
+ //#include <backtrace.h> // requires linking to libbacktrace
+ #elif !defined(_WIN32) && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
+- #include <execinfo.h>
+ #elif defined(_WIN32) && !defined(OCCT_UWP)
+
+ #include <Standard_WarningsDisable.hxx>
+@@ -314,51 +313,6 @@
+ return false;
+ #endif
+ #else
+- const int aTopSkip = theNbTopSkip + 1; // skip this function call and specified extra number
+- int aNbTraces = theNbTraces + aTopSkip;
+- void** aStackArr = (void** )alloca (sizeof(void*) * aNbTraces);
+- if (aStackArr == NULL)
+- {
+- return false;
+- }
+-
+- aNbTraces = ::backtrace (aStackArr, aNbTraces);
+- if (aNbTraces <= 1)
+- {
+- return false;
+- }
+-
+- aNbTraces -= aTopSkip;
+- char** aStrings = ::backtrace_symbols (aStackArr + aTopSkip, aNbTraces);
+- if (aStrings == NULL)
+- {
+- return false;
+- }
+-
+- const size_t aLenInit = strlen (theBuffer);
+- size_t aLimit = (size_t) theBufferSize - aLenInit - 1;
+- if (aLimit > 14)
+- {
+- strcat (theBuffer, "\n==Backtrace==");
+- aLimit -= 14;
+- }
+- for (int aLineIter = 0; aLineIter < aNbTraces; ++aLineIter)
+- {
+- const size_t aLen = strlen (aStrings[aLineIter]);
+- if (aLen + 1 >= aLimit)
+- {
+- break;
+- }
+-
+- strcat (theBuffer, "\n");
+- strcat (theBuffer, aStrings[aLineIter]);
+- aLimit -= aLen + 1;
+- }
+- free (aStrings);
+- if (aLimit > 14)
+- {
+- strcat (theBuffer, "\n=============");
+- }
+- return true;
++ return false;
+ #endif
+ }
diff --git a/testing/opencascade/no_mallinfo.patch b/testing/opencascade/no_mallinfo.patch
index ac0ebd7e3c..12301ab090 100644
--- a/testing/opencascade/no_mallinfo.patch
+++ b/testing/opencascade/no_mallinfo.patch
@@ -1,16 +1,14 @@
-mallinfo() is not provided in musl. This patch uses getrusage() instead to use
-the maximum resident set size as a (poor) approximation of the heap usage.
---- occt-V7_3_0p3.bin/src/OSD/OSD_MemInfo.cxx
-+++ occt-V7_3_0p3/src/OSD/OSD_MemInfo.cxx
+--- ./src/OSD/OSD_MemInfo.cxx.old
++++ ./src/OSD/OSD_MemInfo.cxx
@@ -35,6 +35,9 @@
#include <sstream>
#include <fstream>
-
+
+#include <sys/time.h>
+#include <sys/resource.h>
+
#include <OSD_MemInfo.hxx>
-
+
#if defined(__EMSCRIPTEN__)
@@ -161,18 +164,22 @@
|| IsActive (MemWorkingSetPeak))
@@ -39,15 +37,25 @@ the maximum resident set size as a (poor) approximation of the heap usage.
}
}
if (IsActive (MemVirtual))
-@@ -182,8 +189,9 @@
+@@ -182,18 +189,9 @@
#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;
}
-
+
if (!IsActive (MemVirtual)