From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/opencascade/, sci-libs/opencascade/files/
Date: Mon, 31 Jul 2023 08:43:11 +0000 (UTC) [thread overview]
Message-ID: <1690792988.5e2d9cb1e3a5ae5e530bef03d12b6b44d7a8c252.juippis@gentoo> (raw)
commit: 5e2d9cb1e3a5ae5e530bef03d12b6b44d7a8c252
Author: Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Tue Jul 11 20:24:57 2023 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Jul 31 08:43:08 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e2d9cb1
sci-libs/opencascade: Fix build on musl
Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/31496
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
.../opencascade/files/opencascade-7.7.0-musl.patch | 97 ++++++++++++++++++++++
...7.6.3-r1.ebuild => opencascade-7.6.3-r2.ebuild} | 3 +-
...7.7.0-r1.ebuild => opencascade-7.7.0-r2.ebuild} | 1 +
3 files changed, 100 insertions(+), 1 deletion(-)
diff --git a/sci-libs/opencascade/files/opencascade-7.7.0-musl.patch b/sci-libs/opencascade/files/opencascade-7.7.0-musl.patch
new file mode 100644
index 000000000000..45aeb449ac73
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.7.0-musl.patch
@@ -0,0 +1,97 @@
+From 4351ac37b19bf43ff9a8f21e5126deb7f43f751e Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Tue, 11 Jul 2023 16:13:32 -0400
+Subject: [PATCH] Fix building with musl
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -554,6 +554,10 @@ OCCT_IS_PRODUCT_REQUIRED (CSF_EIGEN CAN_USE_EIGEN)
+ # define CSF variable
+ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_csf")
+
++# Check for execinfo.h
++include(CheckIncludeFile)
++CHECK_INCLUDE_FILE("execinfo.h" HAS_EXECINFO_H)
++
+ # Tcl (mandatory for Draw Harness)
+ if (USE_TCL)
+ message (STATUS "Info: TCL is used by OCCT")
+--- a/src/OSD/OSD_MemInfo.cxx
++++ b/src/OSD/OSD_MemInfo.cxx
+@@ -184,12 +184,16 @@ void OSD_MemInfo::Update()
+ #endif
+ #endif
+
++ #if defined(__GLIBC__)
+ #ifdef HAS_MALLINFO2
+ const struct mallinfo2 aMI = mallinfo2();
+ #else
+ const struct mallinfo aMI = mallinfo();
+ #endif
+ myCounters[MemHeapUsage] = aMI.uordblks;
++ #else
++ myCounters[MemHeapUsage] = 0;
++ #endif
+ }
+
+ if (!IsActive (MemVirtual)
+--- a/src/OSD/OSD_signal.cxx
++++ b/src/OSD/OSD_signal.cxx
+@@ -758,7 +758,7 @@ typedef void (* SIG_PFV) (int);
+
+ #include <signal.h>
+
+-#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
++#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
+ #include <sys/signal.h>
+ #endif
+
+@@ -974,7 +974,7 @@ static void SegvHandler(const int theSignal,
+ //=======================================================================
+ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
+ {
+-#if defined (__linux__)
++#if defined (__linux__) && defined(__GLIBC__)
+ feclearexcept (FE_ALL_EXCEPT);
+ if (theFloatingSignal)
+ {
+@@ -1007,7 +1007,7 @@ void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal)
+ //=======================================================================
+ Standard_Boolean OSD::ToCatchFloatingSignals()
+ {
+-#if defined (__linux__)
++#if defined (__linux__) && defined(__GLIBC__)
+ return (fegetexcept() & _OSD_FPX) != 0;
+ #else
+ return Standard_False;
+--- a/src/Standard/Standard_StackTrace.cxx
++++ b/src/Standard/Standard_StackTrace.cxx
+@@ -29,7 +29,7 @@
+ //#include <unwind.h>
+ #elif defined(__QNX__)
+ //#include <backtrace.h> // requires linking to libbacktrace
+-#elif !defined(_WIN32) && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
++#elif defined (HAS_EXECINFO_H)
+ #include <execinfo.h>
+ #elif defined(_WIN32) && !defined(OCCT_UWP)
+
+@@ -313,7 +313,7 @@ Standard_Boolean Standard::StackTrace (char* theBuffer,
+ Message::SendTrace ("Standard::StackTrace() is not implemented for this CPU architecture");
+ return false;
+ #endif
+-#else
++#elif defined (HAS_EXECINFO_H)
+ const int aTopSkip = theNbTopSkip + 1; // skip this function call and specified extra number
+ int aNbTraces = theNbTraces + aTopSkip;
+ void** aStackArr = (void** )alloca (sizeof(void*) * aNbTraces);
+@@ -360,5 +360,7 @@ Standard_Boolean Standard::StackTrace (char* theBuffer,
+ strcat (theBuffer, "\n=============");
+ }
+ return true;
++#else
++ return false;
+ #endif
+ }
+--
+2.41.0
+
diff --git a/sci-libs/opencascade/opencascade-7.6.3-r1.ebuild b/sci-libs/opencascade/opencascade-7.6.3-r2.ebuild
similarity index 98%
rename from sci-libs/opencascade/opencascade-7.6.3-r1.ebuild
rename to sci-libs/opencascade/opencascade-7.6.3-r2.ebuild
index 82352ba3e3a2..0ea3c5736c42 100644
--- a/sci-libs/opencascade/opencascade-7.6.3-r1.ebuild
+++ b/sci-libs/opencascade/opencascade-7.6.3-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -69,6 +69,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-7.6.2-avoid-pre-stripping-binaries.patch
"${FILESDIR}"/${PN}-7.5.3-tbb-2021.patch
"${FILESDIR}"/${PN}-7.7.0-build-against-vtk-9.2.patch
+ "${FILESDIR}"/${PN}-7.7.0-musl.patch
)
src_prepare() {
diff --git a/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild b/sci-libs/opencascade/opencascade-7.7.0-r2.ebuild
similarity index 99%
rename from sci-libs/opencascade/opencascade-7.7.0-r1.ebuild
rename to sci-libs/opencascade/opencascade-7.7.0-r2.ebuild
index c22348558869..076a308ee9ba 100644
--- a/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild
+++ b/sci-libs/opencascade/opencascade-7.7.0-r2.ebuild
@@ -64,6 +64,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-7.7.0-fix-installation-of-cmake-config-files.patch
"${FILESDIR}"/${PN}-7.7.0-avoid-pre-stripping-binaries.patch
"${FILESDIR}"/${PN}-7.7.0-build-against-vtk-9.2.patch
+ "${FILESDIR}"/${PN}-7.7.0-musl.patch
)
src_prepare() {
next reply other threads:[~2023-07-31 8:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 8:43 Joonas Niilola [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-12 11:47 [gentoo-commits] repo/gentoo:master commit in: sci-libs/opencascade/, sci-libs/opencascade/files/ Sam James
2024-11-25 15:32 Andreas Sturmlechner
2024-04-14 14:28 Andrew Ammerlaan
2023-01-28 22:48 Andreas Sturmlechner
2022-12-31 15:36 Sam James
2022-06-25 23:33 Sam James
2022-06-14 16:01 Joonas Niilola
2022-01-13 1:25 Sam James
2021-10-31 2:23 Sam James
2021-05-04 22:02 Sam James
2021-03-01 8:26 Joonas Niilola
2020-04-01 14:38 Joonas Niilola
2019-11-17 7:46 Joonas Niilola
2018-11-29 20:19 Andreas Sturmlechner
2018-11-29 20:19 Andreas Sturmlechner
2018-04-05 12:31 Andreas Sturmlechner
2017-06-07 7:09 Michael Weber
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=1690792988.5e2d9cb1e3a5ae5e530bef03d12b6b44d7a8c252.juippis@gentoo \
--to=juippis@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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