diff --git a/srcpkgs/freecad/patches/002-execinfo.patch b/srcpkgs/freecad/patches/002-execinfo.patch new file mode 100644 index 00000000000..6e96b89169b --- /dev/null +++ b/srcpkgs/freecad/patches/002-execinfo.patch @@ -0,0 +1,30 @@ +--- src/App/Application.cpp ++++ src/App/Application.cpp +@@ -1063,7 +1063,9 @@ + #endif + + #if defined(FC_OS_LINUX) ++#ifdef __GLIBC__ + #include ++#endif + #include + #include + +@@ -1075,6 +1077,7 @@ + // This function produces a stack backtrace with demangled function & method names. + void printBacktrace(size_t skip=0) + { ++#ifdef __GLIBC__ + void *callstack[128]; + size_t nMaxFrames = sizeof(callstack) / sizeof(callstack[0]); + size_t nFrames = backtrace(callstack, nMaxFrames); +@@ -1105,6 +1108,9 @@ + } + + free(symbols); ++#else ++ std::cerr << "sorry, no backtrace on musl libc"; ++#endif + } + #endif + diff --git a/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch new file mode 100644 index 00000000000..2b46616ad7a --- /dev/null +++ b/srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch @@ -0,0 +1,30 @@ +--- src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp ++++ src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp +@@ -29,7 +29,9 @@ + #ifndef WIN32 + #include + #include ++#ifdef __GLIBC__ + #include ++#endif + #endif + + +@@ -109,6 +111,7 @@ + #ifndef WIN32 + void print_traceback() + { ++#ifdef __GLIBC__ + void *array[50]; + size_t size; + char **strings; +@@ -123,6 +126,9 @@ + } + + free (strings); ++#else ++ std::cerr << "sorry, no backtrace on musl libc"; ++#endif + } + #else + #if (_MSC_VER >= 1400) // Visual Studio 2005 diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template index a62e4845613..d2cc163b980 100644 --- a/srcpkgs/freecad/template +++ b/srcpkgs/freecad/template @@ -5,7 +5,7 @@ # - python3: freecad code not yet ready for it, probably at 0.18 pkgname=freecad version=0.17 -revision=1 +revision=2 wrksrc="FreeCAD-${version}" build_style=cmake @@ -34,10 +34,6 @@ homepage="https://freecadweb.org/" distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz" checksum=ae017393476b6dc7f1192bcaf91ceedc2f9b791f2495307ce7c45efadb5266fb -case "$XBPS_TARGET_MACHINE" in - *-musl) broken="https://build.voidlinux.eu/builders/x86_64-musl_builder/builds/9439/steps/shell_3/logs/stdio";; -esac - post_install() { # AppHomePath is computed with binary's realpath: # do not move binaries but symlink them instead.