summaryrefslogtreecommitdiff
path: root/media-gfx/blender
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/blender')
-rw-r--r--media-gfx/blender/Manifest4
-rw-r--r--media-gfx/blender/blender-3.2.2.ebuild5
-rw-r--r--media-gfx/blender/files/blender-3.2.2-musl-glibc-prereq.patch27
-rw-r--r--media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch177
4 files changed, 212 insertions, 1 deletions
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 74148c9073b0..f13010b46df2 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,6 +1,8 @@
AUX blender-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch 877 BLAKE2B 954cae23023e60ef38847927a8ddfc05a19f86c1b5f95a78227aba2af32707ca3490f815e370aa995944973d3ea44d58895817e3ac1ffbb006468ef33f3223a7 SHA512 f4d4e946ce177c82cbe63ab2beab05748e91786800885432f64c00b3ba93be3fec54f084663617dd1b877776d60c418da12cee9a3f4f59a447a3291d08eeba5e
AUX blender-3.0.1-openexr.patch 4868 BLAKE2B eccd615d26ba6963220dd9128294d996890f5909707cae5b8b39a0b1e35147618ff2d92348c8e8613cea45c974442665be5036884c33737ccf4041eec5f0135c SHA512 f44288212a3e8e2ed04ced2e574ac240a18f90c3f6e28fabc9dc855545c9b28b216f9cc3ad70721dca754a0d032100fe2aa430eff54049f672219747728d5657
AUX blender-3.0.1-openimageio-2.3.patch 927 BLAKE2B 02ed40bf291ac6ec935a7412c8c1681023fb1fac3bfe7a6ecdbaddfd895f48557274f466849f1aa35900c66dbba6724a29b7d5553fe914e5a3df0f93a9791acd SHA512 0edd3e3c3265694593b242db5c96d3c123630819ff07b906b7f86c15cdf60e4bf1e8b61d555241eadf842a2a33c1f4f1ad4cce0e7d07c8d7308d8a9d536bf512
+AUX blender-3.2.2-musl-glibc-prereq.patch 814 BLAKE2B 1ca7438618074fa270cdda530ab160b5ae648217a6ad58b27f9c4b9f3de53442dbcfc1c59f70c47a6190dc1cbea9a431078263b04e2fdc963e5831ae97171e3b SHA512 5053d0ada8f6bfafc9517e133c8ed2221040b9df6d47f6e31c958b4c061360940b1b155ea6bd413dc4673e899c18468498df1bef7ad88ca22b94895524044af1
+AUX blender-3.2.2-support-building-with-musl-libc.patch 5583 BLAKE2B 193548ea61608b6a355912cdd11eba60c58ac7975612890ff26b95b0d8974e3ed871e9e3d5437b7e36fc22b6a711e7af672b87a4e4f0b0765b95e4065dbcb934 SHA512 225065ac63344084918585272badfd58dc542e4b9370351fa4ff246fb8568d18027bd1d07fc139ac247236b75690578bb598731e00ea18767ed8e9d34d35b2fc
DIST blender-2.93.0-tests.tar.bz2 286918586 BLAKE2B a2c2c2e900e401a470208e8e5d0082d45e2f8db13b45213f31808d50ae5ea330360702b8e775bdb3307eb753aa7c3264803e9e470b3fb778f8bd87272cd72513 SHA512 0e5e4c67944c4f76df62cdbaf26ba284c415675074e66685c01ec9584a544c47f616bae8fb2ff2b7e03290620d54dc1033b4b0fc617acb1232a90439e96325fe
DIST blender-2.93.10.tar.xz 43036752 BLAKE2B c08560246fe9e494cf43df6afff2535d166f5faf920728b9b2d787a1029fabe027db3ef5ae5c55b0ec3ea2849c4948cc96f8f9243f19c66ff7b72c2ea81a6e5b SHA512 ff1cee2ab48a9409e3fb3ae73e60aa5514cc8060e31e9a1d9f5c1725dec6f583d482db4cdc765806da2c7529fdaaf7bebe714e148183d5ef16170160fb103ab7
DIST blender-2.93.9.tar.xz 43035004 BLAKE2B 3d3e316794d0ee5ec3500c84247f4d9cc37d9c490e82321a10e8b020eb148f8d71480ce45e5d2098ef8d6c6657eb5d9f8a34807f93e8ad25650bd4e65cc559d7 SHA512 605eedabd7f164138076c0c91ca9ee3a1e26616c2539602ebba07c014a989738b973a908cbc0a062b3942f3e36754b2f88e2abcabae18017749b409aeaa2f97e
@@ -16,6 +18,6 @@ EBUILD blender-2.93.9.ebuild 12567 BLAKE2B 4166c365ab82c29e822007467b3bb8f216a55
EBUILD blender-3.1.2.ebuild 12668 BLAKE2B b10fec9888760b4c74efc7075f0bad32f82355997cb0e56c3e1c4dc63d57429fca162d4dd2f37cf9b0e0aa8a82f0f163f6c18d8c13c3ee8966879b30925aab22 SHA512 2316b7f9001885af988d06c694852c10ac4614ce45860208bd8d3f8ccac5454fb7241aa1a4c8190665547eb57bcc62ec15898941df864212393d0af4d266dc22
EBUILD blender-3.2.0.ebuild 12667 BLAKE2B 9f88c5faa5c2b1ae38ab0d88bd3ed4857a0db03fc714c304fd6a367717fcdfb93daa4c53f91766f27a939cce6ea6e70fe0d6ee2065370916ecd46aae79851446 SHA512 6277f2e95cd08d3539f448086b018db3cdb67293183411a9b19f92a1b000de3030e2fd39600f773f22741dce7ac75717aef9e81e27c76fb6b8e91fdaa969a7d6
EBUILD blender-3.2.1.ebuild 12671 BLAKE2B 0809971af87433cf8169ffc0f70db1de113e50146d0709c291a97ef6759dcf6a6eb8a2d90876a6d3f3996494e9020d8b657e1ac49292af69316d93016d52caac SHA512 32b8e1b8653bc7d03b490987a38f5da4742c319c2f6de16be2fdc51384b67ccaf0025e40afc9f6411a24a6ba59897ea9927ce907aa953de275c33dd4d3a613af
-EBUILD blender-3.2.2.ebuild 12671 BLAKE2B 0809971af87433cf8169ffc0f70db1de113e50146d0709c291a97ef6759dcf6a6eb8a2d90876a6d3f3996494e9020d8b657e1ac49292af69316d93016d52caac SHA512 32b8e1b8653bc7d03b490987a38f5da4742c319c2f6de16be2fdc51384b67ccaf0025e40afc9f6411a24a6ba59897ea9927ce907aa953de275c33dd4d3a613af
+EBUILD blender-3.2.2.ebuild 12800 BLAKE2B c270ee8675e1ed9abd87c6e4327c3ce1b3ecf06f4c8e9a64b8421781c643b09b423edf63325f9ee0d80ce29ccb93d903e55d29fa00d39fed107ef9baf2ea9419 SHA512 b3ab80640ea1cf0f5c87ca6b5065e2468fff1ca38c8d7f4cd810393d37a2857e4a6fea4d9629d5e3268b0fb4e38fcb036ad675b5ddf79c774d75f70692726a6b
EBUILD blender-9999.ebuild 12675 BLAKE2B de44471779f56eba0784bddc62ec5abce8644fdea12fa528baa32a91b9bff60222cd004c36395eccbd1f6be5697a725a036e6016e4d3b5c2a9fbff0cd5cbb15d SHA512 fc71e655e86f4a041cfc6d2b3c974b1bbe69469278bf17d9a404fed216109a0eb3f4a9965431e41d9818a16423fae95f64828772da3a77bfdefe26db72447176
MISC metadata.xml 2998 BLAKE2B 46de114ec2a0f5ed454d9879e6c5c11f06c386a73f8f692635cea26fc813f1d8489bf9fbf5d45c3fd43502784e02047613420e9de8d17e0e637586194e369d8f SHA512 533fdfbe7ded02391d808b42edf26ba8218c086e279a67c168bf7c654075a9608aae46439a9a98e8d650cc429fb0f0d45d0dc584861ef13c39df4f288e93bfb1
diff --git a/media-gfx/blender/blender-3.2.2.ebuild b/media-gfx/blender/blender-3.2.2.ebuild
index 8c82138b1e5a..70024e231bf6 100644
--- a/media-gfx/blender/blender-3.2.2.ebuild
+++ b/media-gfx/blender/blender-3.2.2.ebuild
@@ -123,6 +123,11 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.2-support-building-with-musl-libc.patch
+ "${FILESDIR}"/${PN}-3.2.2-musl-glibc-prereq.patch
+)
+
blender_check_requirements() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
diff --git a/media-gfx/blender/files/blender-3.2.2-musl-glibc-prereq.patch b/media-gfx/blender/files/blender-3.2.2-musl-glibc-prereq.patch
new file mode 100644
index 000000000000..a572f25788de
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.2.2-musl-glibc-prereq.patch
@@ -0,0 +1,27 @@
+Fix build error in libc_compat when using musl libc
+
+Checking for the existence of and using __GLIBC_PREREQ can't be done in the
+same conditional.
+
+Please refer: https://github.com/blender/blender/commit/7be7280c5710f7831789cdde140d010722be9068
+--- a/intern/libc_compat/libc_compat.c
++++ b/intern/libc_compat/libc_compat.c
+@@ -13,7 +13,8 @@
+ # include <features.h>
+ # include <math.h>
+
+-# if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
++# if defined(__GLIBC_PREREQ)
++# if __GLIBC_PREREQ(2, 31)
+
+ double __exp_finite(double x);
+ double __exp2_finite(double x);
+@@ -112,5 +113,6 @@ float __powf_finite(float x, float y)
+ return powf(x, y);
+ }
+
+-# endif /* __GLIBC_PREREQ */
+-#endif /* __linux__ */
++# endif /* __GLIBC_PREREQ(2, 31) */
++# endif /* __GLIBC_PREREQ */
++#endif /* __linux__ */
diff --git a/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch b/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch
new file mode 100644
index 000000000000..fb3f2584f0fe
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch
@@ -0,0 +1,177 @@
+CMake: support building with musl libc
+
+Instead of using macros like GLIBC we can use the CMake build
+systems internal functions to check if some header or functions are
+present on the running system's libc.
+
+Add ./build_files/cmake/have_features.cmake to add checks for
+platform features which can be used to set defines for source
+files that require them.
+
+Please refer: https://github.com/blender/blender/commit/f197b1a1f1bbc0334310fb1c911327246767a1a3
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -112,6 +112,11 @@ blender_project_hack_post()
+
+ enable_testing()
+
++#-----------------------------------------------------------------------------
++# Test compiler/library features.
++
++include(build_files/cmake/have_features.cmake)
++
+ #-----------------------------------------------------------------------------
+ # Redirect output files
+
+--- /dev/null
++++ b/build_files/cmake/have_features.cmake
+@@ -0,0 +1,33 @@
++# SPDX-License-Identifier: GPL-2.0-or-later
++# Copyright 2022 Blender Foundation. All rights reserved.
++
++# This file is used to test the system for headers & symbols.
++# Variables should use the `HAVE_` prefix.
++# Defines should use the same name as the CMAKE variable.
++
++include(CheckSymbolExists)
++
++# Used for: `intern/guardedalloc/intern/mallocn_intern.h`.
++# Function `malloc_stats` is only available on GLIBC,
++# so check that before defining `HAVE_MALLOC_STATS`.
++check_symbol_exists(malloc_stats "malloc.h" HAVE_MALLOC_STATS_H)
++
++# Used for: `source/creator/creator_signals.c`.
++# The function `feenableexcept` is not present non-GLIBC systems,
++# hence we need to check if it's available in the `fenv.h` file.
++set(HAVE_FEENABLEEXCEPT OFF)
++if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++ check_symbol_exists(feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
++endif()
++
++# Used for: `source/blender/blenlib/intern/system.c`.
++# `execinfo` is not available on non-GLIBC systems (at least not on MUSL-LIBC),
++# so check the presence of the header before including it and using the it for back-trace.
++set(HAVE_EXECINFO_H OFF)
++if(NOT MSVC)
++ include(CheckIncludeFiles)
++ check_include_files("execinfo.h" HAVE_EXECINFO_H)
++ if(HAVE_EXECINFO_H)
++ add_definitions(-DHAVE_EXECINFO_H)
++ endif()
++endif()
+--- a/intern/guardedalloc/CMakeLists.txt
++++ b/intern/guardedalloc/CMakeLists.txt
+@@ -1,6 +1,10 @@
+ # SPDX-License-Identifier: GPL-2.0-or-later
+ # Copyright 2006 Blender Foundation. All rights reserved.
+
++if(HAVE_MALLOC_STATS_H)
++ add_definitions(-DHAVE_MALLOC_STATS_H)
++endif()
++
+ set(INC
+ .
+ ../atomic
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -17,8 +17,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__)) || \
+- defined(__GLIBC__)
++#if defined(HAVE_MALLOC_STATS_H)
+ # include <malloc.h>
+ # define HAVE_MALLOC_STATS
+ #elif defined(__FreeBSD__)
+--- a/source/blender/blenlib/CMakeLists.txt
++++ b/source/blender/blenlib/CMakeLists.txt
+@@ -1,6 +1,10 @@
+ # SPDX-License-Identifier: GPL-2.0-or-later
+ # Copyright 2006 Blender Foundation. All rights reserved.
+
++if(HAVE_EXECINFO_H)
++ add_definitions(-DHAVE_EXECINFO_H)
++endif()
++
+ set(INC
+ .
+ # ../blenkernel # don't add this back!
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -21,7 +21,9 @@
+
+ # include "BLI_winstuff.h"
+ #else
+-# include <execinfo.h>
++# if defined(HAVE_EXECINFO_H)
++# include <execinfo.h>
++# endif
+ # include <unistd.h>
+ #endif
+
+@@ -61,9 +63,9 @@ int BLI_cpu_support_sse2(void)
+ #if !defined(_MSC_VER)
+ void BLI_system_backtrace(FILE *fp)
+ {
+- /* ------------- */
+- /* Linux / Apple */
+-# if defined(__linux__) || defined(__APPLE__)
++ /* ----------------------- */
++ /* If system as execinfo.h */
++# if defined(HAVE_EXECINFO_H)
+
+ # define SIZE 100
+ void *buffer[SIZE];
+--- a/source/blender/makesdna/intern/CMakeLists.txt
++++ b/source/blender/makesdna/intern/CMakeLists.txt
+@@ -5,6 +5,11 @@
+
+ add_definitions(-DWITH_DNA_GHASH)
+
++# Needed for `mallocn.c`.
++if(HAVE_MALLOC_STATS_H)
++ add_definitions(-DHAVE_MALLOC_STATS_H)
++endif()
++
+ blender_include_dirs(
+ ../../../../intern/atomic
+ ../../../../intern/guardedalloc
+--- a/source/blender/makesrna/intern/CMakeLists.txt
++++ b/source/blender/makesrna/intern/CMakeLists.txt
+@@ -6,6 +6,11 @@ if(CMAKE_COMPILER_IS_GNUCC)
+ string(APPEND CMAKE_C_FLAGS " -Werror=implicit-function-declaration")
+ endif()
+
++# Needed for `mallocn.c`.
++if(HAVE_MALLOC_STATS_H)
++ add_definitions(-DHAVE_MALLOC_STATS_H)
++endif()
++
+ # files rna_access.c rna_define.c makesrna.c intentionally excluded.
+ set(DEFSRC
+ rna_ID.c
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -22,6 +22,10 @@ set(LIB
+ bf_windowmanager
+ )
+
++if(HAVE_FEENABLEEXCEPT)
++ add_definitions(-DHAVE_FEENABLEEXCEPT)
++endif()
++
+ if(WITH_TBB)
+ # Force TBB libraries to be in front of MKL (part of OpenImageDenoise), so
+ # that it is initialized before MKL and static library initialization order
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -258,7 +258,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)