]> https://gitweb.dealii.org/ - candi.git/commitdiff
opencascade: fix isfinite error 276/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 11 Feb 2022 19:41:18 +0000 (14:41 -0500)
committerTimo Heister <timo.heister@gmail.com>
Fri, 11 Feb 2022 19:41:18 +0000 (14:41 -0500)
On M1 opencascade fails to compile, fix by adding a patch.

deal.II-toolchain/packages/opencascade.package
deal.II-toolchain/patches/oce-isfinite.patch [new file with mode: 0644]

index eae3068df00bb6a8001f08b5f977b6ed01fa84db..061504a5435a1320e763bc05f6823fcc8a50f719 100644 (file)
@@ -61,6 +61,8 @@ package_specific_patch () {
     cd ${UNPACK_PATH}/${EXTRACTSTO}
     cecho ${WARN} "applying patch for missing xlocale.h for glibc v2.26 and above"
     patch -p0 --forward < ${ORIG_DIR}/${PROJECT}/patches/oce-xlocale.patch || true
+    cecho ${WARN} "applying patch for isfinite"
+    patch -p0 --forward < ${ORIG_DIR}/${PROJECT}/patches/oce-isfinite.patch
 }
 
 package_specific_register () {
diff --git a/deal.II-toolchain/patches/oce-isfinite.patch b/deal.II-toolchain/patches/oce-isfinite.patch
new file mode 100644 (file)
index 0000000..1811187
--- /dev/null
@@ -0,0 +1,11 @@
+--- src/OSD/OSD.cxx     2022-02-11 14:34:21.726133403 -0500
++++ src.patched/OSD/OSD.cxx     2022-02-11 14:33:27.025817808 -0500
+@@ -18,7 +18,7 @@
+ #include <math.h>
+ #ifdef WNT
+ # define finite _finite
+-#elif defined(isfinite)
++#else
+ # define finite isfinite
+ #endif
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.