mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-31 09:52:57 +02:00
freecad: fix musl build (patch usage of execinfo)
Closes: #13615 [via git-merge-pr] Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
parent
8a0faaa961
commit
e91be7be35
3 changed files with 61 additions and 5 deletions
30
srcpkgs/freecad/patches/002-execinfo.patch
Normal file
30
srcpkgs/freecad/patches/002-execinfo.patch
Normal file
|
@ -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 <execinfo.h>
|
||||||
|
+#endif
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#include <cxxabi.h>
|
||||||
|
|
||||||
|
@@ -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
|
||||||
|
|
30
srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
Normal file
30
srcpkgs/freecad/patches/010-salomesmesh-execinfo.patch
Normal file
|
@ -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 <unistd.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
#include <execinfo.h>
|
||||||
|
+#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
|
|
@ -5,7 +5,7 @@
|
||||||
# - python3: freecad code not yet ready for it, probably at 0.18
|
# - python3: freecad code not yet ready for it, probably at 0.18
|
||||||
pkgname=freecad
|
pkgname=freecad
|
||||||
version=0.17
|
version=0.17
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="FreeCAD-${version}"
|
wrksrc="FreeCAD-${version}"
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
|
|
||||||
|
@ -34,10 +34,6 @@ homepage="https://freecadweb.org/"
|
||||||
distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz"
|
distfiles="https://github.com/FreeCAD/FreeCAD/archive/${version}.tar.gz"
|
||||||
checksum=ae017393476b6dc7f1192bcaf91ceedc2f9b791f2495307ce7c45efadb5266fb
|
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() {
|
post_install() {
|
||||||
# AppHomePath is computed with binary's realpath:
|
# AppHomePath is computed with binary's realpath:
|
||||||
# do not move binaries but symlink them instead.
|
# do not move binaries but symlink them instead.
|
||||||
|
|
Loading…
Add table
Reference in a new issue