mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 22:27:17 -08:00
media-gfx/blender: Set Build Type for Blender
Blender requires that the build type is set to None, Debug, Release, RelWithDebInfo or MinSizeRel. This requires it to be overridden. If this is not done, then it is set to Gentoo by cmake.eclass, and the scripts in CMakeLists fail to set one of DEBUG or NDEBUG. In blender 2.91, this results in not defining GPU_vertex_buffer._data_end, but also attempting to execute an assert which requires it to be defined. Setting CMAKE_BUILD_TYPE to Release resolves the issue by setting NDEBUG to prevent compilation of the assert, and unsetting DEBUG so that the _data_end is not compiled. This means that the patch to prevent the compilation of the assert is no longer required. Older version of blender in the tree also have the same requirement for the value of CMAKE_BUILD_TYPE, but so far compiled correctly even when it was set to Gentoo. Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au> Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
@@ -114,6 +114,8 @@ BDEPEND="
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
CMAKE_BUILD_TYPE="Release"
|
||||
|
||||
blender_check_requirements() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
||||
|
||||
|
||||
@@ -114,6 +114,8 @@ BDEPEND="
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
CMAKE_BUILD_TYPE="Release"
|
||||
|
||||
blender_check_requirements() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
||||
|
||||
|
||||
@@ -118,9 +118,7 @@ BDEPEND="
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-define-data-end.patch"
|
||||
)
|
||||
CMAKE_BUILD_TYPE="Release"
|
||||
|
||||
blender_check_requirements() {
|
||||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
diff -Naur a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h
|
||||
--- a/source/blender/gpu/GPU_vertex_buffer.h 2020-11-26 16:36:36.226883721 +1100
|
||||
+++ b/source/blender/gpu/GPU_vertex_buffer.h 2020-11-26 16:38:08.691212985 +1100
|
||||
@@ -118,7 +118,10 @@
|
||||
{
|
||||
unsigned char *data = a->data;
|
||||
a->data += a->stride;
|
||||
+#ifdef DEBUG
|
||||
+ /* Assert only compiles if _data_end exists */
|
||||
BLI_assert(data < a->_data_end);
|
||||
+#endif
|
||||
return (void *)data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user