aboutsummaryrefslogtreecommitdiffstats
path: root/testing/blender/0001-musl-fixes.patch
diff options
context:
space:
mode:
authorLeon Marz <lmarz@cs.uni-frankfurt.de>2020-07-31 19:51:12 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-08-08 10:21:04 +0000
commitd9541847a250c6cdfa0d849f5d418b3421e1d533 (patch)
tree32db0bea35adf548757b828b02998ef5af6aa183 /testing/blender/0001-musl-fixes.patch
parent87b6b6871cbdd28b28acd269bd542667d8987f7a (diff)
downloadaports-d9541847a250c6cdfa0d849f5d418b3421e1d533.tar.gz
aports-d9541847a250c6cdfa0d849f5d418b3421e1d533.tar.bz2
aports-d9541847a250c6cdfa0d849f5d418b3421e1d533.tar.xz
testing/blender: upgrade to 2.83.4
Diffstat (limited to 'testing/blender/0001-musl-fixes.patch')
-rw-r--r--testing/blender/0001-musl-fixes.patch108
1 files changed, 108 insertions, 0 deletions
diff --git a/testing/blender/0001-musl-fixes.patch b/testing/blender/0001-musl-fixes.patch
new file mode 100644
index 0000000000..5308d7b7ce
--- /dev/null
+++ b/testing/blender/0001-musl-fixes.patch
@@ -0,0 +1,108 @@
+From 5c8801d48bb1c2d528df9d653fbf96f27ac263a9 Mon Sep 17 00:00:00 2001
+From: Leon Marz <lmarz@cs.uni-frankfurt.de>
+Date: Fri, 31 Jul 2020 15:30:32 +0200
+Subject: [PATCH 1/2] musl fixes
+
+Original Patch by Nathanael Copa
+---
+ CMakeLists.txt | 13 +++++++++++++
+ intern/guardedalloc/intern/mallocn_intern.h | 2 +-
+ intern/libc_compat/libc_compat.c | 2 --
+ source/blender/blenlib/intern/system.c | 4 +++-
+ source/creator/creator_signals.c | 2 +-
+ 5 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 83f547e..8ec3c86 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -138,6 +138,19 @@ get_blender_version()
+ #-----------------------------------------------------------------------------
+ # Options
+
++# musl-libc related checks (missing execinfo.h and feenableexcept())
++include(CheckIncludeFiles)
++check_include_files(execinfo.h HAVE_EXECINFO_H)
++if(HAVE_EXECINFO_H)
++ add_definitions(-DHAVE_EXECINFO_H)
++endif()
++
++include(CheckLibraryExists)
++check_library_exists(m feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
++if(HAVE_FEENABLEEXCEPT)
++ add_definitions(-DHAVE_FEENABLEEXCEPT)
++endif()
++
+ # First platform specific non-cached vars
+ if(UNIX AND NOT (APPLE OR HAIKU))
+ set(WITH_X11 ON)
+diff --git a/intern/guardedalloc/intern/mallocn_intern.h b/intern/guardedalloc/intern/mallocn_intern.h
+index 876607f..ed12118 100644
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -40,7 +40,7 @@
+ #undef HAVE_MALLOC_STATS
+ #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
+
+-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
++#if defined(__linux__) && defined(HAVE_EXECINFO_H) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
+ defined(__GLIBC__)
+ # include <malloc.h>
+ # define HAVE_MALLOC_STATS
+diff --git a/intern/libc_compat/libc_compat.c b/intern/libc_compat/libc_compat.c
+index 8da3ca2..be17416 100644
+--- a/intern/libc_compat/libc_compat.c
++++ b/intern/libc_compat/libc_compat.c
+@@ -25,7 +25,6 @@
+ # include <features.h>
+ # include <math.h>
+
+-# if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
+
+ double __exp_finite(double x);
+ double __acos_finite(double x);
+@@ -112,5 +111,4 @@ float __powf_finite(float x, float y)
+ return powf(x, y);
+ }
+
+-# endif /* __GLIBC_PREREQ */
+ #endif /* __linux__ */
+diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
+index 7d9ed25..71777e7 100644
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -38,7 +38,9 @@
+ # include <dbghelp.h>
+ # pragma warning(pop)
+ #else
++#if defined(HAVE_EXECINFO_H)
+ # include <execinfo.h>
++#endif
+ # include <unistd.h>
+ #endif
+
+@@ -81,7 +83,7 @@ void BLI_system_backtrace(FILE *fp)
+ {
+ /* ------------- */
+ /* Linux / Apple */
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__linux__) && defined(HAVE_EXECINFO_H)|| defined(__APPLE__)
+
+ # define SIZE 100
+ void *buffer[SIZE];
+diff --git a/source/creator/creator_signals.c b/source/creator/creator_signals.c
+index 7f7a03f..68ab04d 100644
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -332,7 +332,7 @@ void main_signal_setup_fpe(void)
+ * set breakpoints on sig_handle_fpe */
+ signal(SIGFPE, sig_handle_fpe);
+
+-# if defined(__linux__) && defined(__GNUC__)
++# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
+ feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
+ # endif /* defined(__linux__) && defined(__GNUC__) */
+ # if defined(OSX_SSE_FPE)
+--
+2.28.0
+