Compare commits
2 Commits
792e1b937a
...
f9dff3a415
| Author | SHA1 | Date | |
|---|---|---|---|
| f9dff3a415 | |||
| 19984c4b4f |
16
.gitmodules
vendored
16
.gitmodules
vendored
@@ -102,3 +102,19 @@
|
||||
path = oneTBB
|
||||
url = https://github.com/uxlfoundation/oneTBB
|
||||
branch = master
|
||||
[submodule "pugixml"]
|
||||
path = pugixml
|
||||
url = https://github.com/zeux/pugixml
|
||||
branch = master
|
||||
[submodule "pybind11"]
|
||||
path = pybind11
|
||||
url = https://github.com/pybind/pybind11
|
||||
branch = master
|
||||
[submodule "blender-deps/libdeflate"]
|
||||
path = blender-deps/libdeflate
|
||||
url = https://github.com/ebiggers/libdeflate
|
||||
branch = master
|
||||
[submodule "libtiff"]
|
||||
path = libtiff
|
||||
url = https://gitlab.com/libtiff/libtiff
|
||||
branch = master
|
||||
|
||||
Submodule OpenImageIO updated: 691acac172...a3ac757956
1
blender-deps/libdeflate
Submodule
1
blender-deps/libdeflate
Submodule
Submodule blender-deps/libdeflate added at 6bb493615b
25
blender-patches/0001-install_in_usr_share.patch
Normal file
25
blender-patches/0001-install_in_usr_share.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From: "Matteo F. Vescovi" <mfv@debian.org>
|
||||
Date: Sun, 28 Jul 2019 14:54:30 +0200
|
||||
Subject: install_in_usr_share
|
||||
|
||||
* Arch-specific files go to /usr/share
|
||||
* Make blender look for systemdir into /usr/share
|
||||
---
|
||||
source/creator/CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
|
||||
index 816d3a6..ed03aac 100644
|
||||
--- a/source/creator/CMakeLists.txt
|
||||
+++ b/source/creator/CMakeLists.txt
|
||||
@@ -383,8 +383,8 @@ if(WITH_PYTHON)
|
||||
endif()
|
||||
|
||||
install(
|
||||
- DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
|
||||
- DESTINATION ${TARGETDIR_VER}
|
||||
+ DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/
|
||||
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/blender/scripts/
|
||||
PATTERN ".git" EXCLUDE
|
||||
PATTERN ".gitignore" EXCLUDE
|
||||
PATTERN ".arcconfig" EXCLUDE
|
||||
@@ -0,0 +1,42 @@
|
||||
From: "Matteo F. Vescovi" <mfv@debian.org>
|
||||
Date: Tue, 18 Jan 2022 23:50:42 +0100
|
||||
Subject: do_not_use_version_number_in_system_path
|
||||
|
||||
Global installation expects system path to be
|
||||
something like /usr/share/blender/scripts/
|
||||
without version numbers.
|
||||
|
||||
Contributions by:
|
||||
Antonio Ospite <ospite@studenti.unina.it>
|
||||
---
|
||||
intern/ghost/intern/GHOST_SystemPathsUnix.cpp | 3 +++
|
||||
source/creator/CMakeLists.txt | 2 +-
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp b/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
|
||||
index 7239678..174696e 100644
|
||||
--- a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
|
||||
+++ b/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
|
||||
@@ -57,6 +57,9 @@ GHOST_SystemPathsUnix::~GHOST_SystemPathsUnix()
|
||||
|
||||
const char *GHOST_SystemPathsUnix::getSystemDir(int, const char *versionstr) const
|
||||
{
|
||||
+ /* XXX On Debian ignore versionstr when building the system path */
|
||||
+ versionstr = "";
|
||||
+
|
||||
/* no prefix assumes a portable build which only uses bundled scripts */
|
||||
if (static_path) {
|
||||
static string system_path = string(static_path) + "/blender/" + versionstr;
|
||||
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
|
||||
index ed03aac..83779a8 100644
|
||||
--- a/source/creator/CMakeLists.txt
|
||||
+++ b/source/creator/CMakeLists.txt
|
||||
@@ -328,7 +328,7 @@ if(UNIX AND NOT APPLE)
|
||||
if(WITH_INSTALL_PORTABLE)
|
||||
set(TARGETDIR_VER ${BLENDER_VERSION})
|
||||
else()
|
||||
- set(TARGETDIR_VER share/blender/${BLENDER_VERSION})
|
||||
+ set(TARGETDIR_VER share/blender)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
98
blender-patches/0003-locales_directory_install.patch
Normal file
98
blender-patches/0003-locales_directory_install.patch
Normal file
@@ -0,0 +1,98 @@
|
||||
From: "Matteo F. Vescovi" <mfv@debian.org>
|
||||
Date: Thu, 5 Aug 2021 22:53:36 +0200
|
||||
Subject: locales_directory_install
|
||||
|
||||
Change where locales are installed.
|
||||
|
||||
Contributions by:
|
||||
Antonio Ospite <ao2@ao2.it>
|
||||
Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
|
||||
---
|
||||
source/blender/blenkernel/BKE_appdir.h | 1 +
|
||||
source/blender/blenkernel/intern/appdir.c | 3 +++
|
||||
source/blender/blentranslation/intern/blt_lang.c | 10 +++++-----
|
||||
source/creator/CMakeLists.txt | 2 +-
|
||||
4 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/source/blender/blenkernel/BKE_appdir.h b/source/blender/blenkernel/BKE_appdir.h
|
||||
index 6548505..69e4b5c 100644
|
||||
--- a/source/blender/blenkernel/BKE_appdir.h
|
||||
+++ b/source/blender/blenkernel/BKE_appdir.h
|
||||
@@ -94,6 +94,7 @@ enum {
|
||||
BLENDER_SYSTEM_DATAFILES = 52,
|
||||
BLENDER_SYSTEM_SCRIPTS = 53,
|
||||
BLENDER_SYSTEM_PYTHON = 54,
|
||||
+ BLENDER_SYSTEM_LOCALE = 55,
|
||||
};
|
||||
|
||||
/* for BKE_appdir_folder_id_version only */
|
||||
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c
|
||||
index 08a3b7d..a9b7d38 100644
|
||||
--- a/source/blender/blenkernel/intern/appdir.c
|
||||
+++ b/source/blender/blenkernel/intern/appdir.c
|
||||
@@ -721,6 +721,9 @@ bool BKE_appdir_folder_id_ex(const int folder_id,
|
||||
}
|
||||
return false;
|
||||
|
||||
+ case BLENDER_SYSTEM_LOCALE:
|
||||
+ BLI_strncpy(path, "/usr/share/locale", FILE_MAX); break;
|
||||
+
|
||||
default:
|
||||
BLI_assert_unreachable();
|
||||
break;
|
||||
diff --git a/source/blender/blentranslation/intern/blt_lang.c b/source/blender/blentranslation/intern/blt_lang.c
|
||||
index 91e8a81..6574810 100644
|
||||
--- a/source/blender/blentranslation/intern/blt_lang.c
|
||||
+++ b/source/blender/blentranslation/intern/blt_lang.c
|
||||
@@ -78,9 +78,9 @@ static void free_locales(void)
|
||||
num_locales = num_locales_menu = 0;
|
||||
}
|
||||
|
||||
-static void fill_locales(void)
|
||||
+static void fill_locales(char *locale_path)
|
||||
{
|
||||
- const char *const languages_path = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale");
|
||||
+ const char * const languages_path = locale_path;
|
||||
char languages[FILE_MAX];
|
||||
LinkNode *lines = NULL, *line;
|
||||
char *str;
|
||||
@@ -88,7 +88,7 @@ static void fill_locales(void)
|
||||
|
||||
free_locales();
|
||||
|
||||
- BLI_join_dirfile(languages, FILE_MAX, languages_path, "languages");
|
||||
+ BLI_join_dirfile(languages, FILE_MAX, locale_path, "languages");
|
||||
line = lines = BLI_file_read_as_lines(languages);
|
||||
|
||||
/* This whole "parsing" code is a bit weak, in that it expects strictly formatted input file...
|
||||
@@ -195,7 +195,7 @@ EnumPropertyItem *BLT_lang_RNA_enum_properties(void)
|
||||
void BLT_lang_init(void)
|
||||
{
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
- const char *const messagepath = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale");
|
||||
+ const char * const messagepath = BKE_appdir_folder_id(BLENDER_SYSTEM_LOCALE, NULL);
|
||||
#endif
|
||||
|
||||
/* Make sure LANG is correct and wouldn't cause #std::runtime_error. */
|
||||
@@ -228,7 +228,7 @@ void BLT_lang_init(void)
|
||||
#ifdef WITH_INTERNATIONAL
|
||||
if (messagepath) {
|
||||
bl_locale_init(messagepath, TEXT_DOMAIN_NAME);
|
||||
- fill_locales();
|
||||
+ fill_locales(messagepath);
|
||||
}
|
||||
else {
|
||||
printf("%s: 'locale' data path for translations not found, continuing\n", __func__);
|
||||
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
|
||||
index 83779a8..9836c8f 100644
|
||||
--- a/source/creator/CMakeLists.txt
|
||||
+++ b/source/creator/CMakeLists.txt
|
||||
@@ -407,7 +407,7 @@ install(
|
||||
# localization
|
||||
if(WITH_INTERNATIONAL)
|
||||
set(_locale_dir "${CMAKE_SOURCE_DIR}/release/datafiles/locale")
|
||||
- set(_locale_target_dir ${TARGETDIR_VER}/datafiles/locale)
|
||||
+ set(_locale_target_dir ${CMAKE_INSTALL_PREFIX}/share/locale)
|
||||
|
||||
file(GLOB _po_files "${_locale_dir}/po/*.po")
|
||||
foreach(_po_file ${_po_files})
|
||||
@@ -0,0 +1,27 @@
|
||||
From: Aurelien Jarno <aurelien@aurel32.net>
|
||||
Date: Mon, 18 Oct 2021 23:02:51 +0200
|
||||
Subject: fix_linking_with_WITH_X11_XF86VMODE_and_bfd
|
||||
|
||||
Fix typos in the variables of the Xxf86vm libray to fix link failure
|
||||
with bfd. These variables are defined in platform_unix.cmake.
|
||||
---
|
||||
intern/ghost/CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
|
||||
index 4164231..84f1569 100644
|
||||
--- a/intern/ghost/CMakeLists.txt
|
||||
+++ b/intern/ghost/CMakeLists.txt
|
||||
@@ -245,10 +245,10 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
|
||||
if(WITH_X11_XF86VMODE)
|
||||
add_definitions(-DWITH_X11_XF86VMODE)
|
||||
list(APPEND INC_SYS
|
||||
- ${X11_xf86vmode_INCLUDE_PATH}
|
||||
+ ${X11_Xxf86vmode_INCLUDE_PATH}
|
||||
)
|
||||
list(APPEND LIB
|
||||
- ${X11_Xf86vmode_LIB}
|
||||
+ ${X11_Xxf86vmode_LIB}
|
||||
)
|
||||
endif()
|
||||
|
||||
120
blender-patches/0005-fix_round_trip_in_Cycles.patch
Normal file
120
blender-patches/0005-fix_round_trip_in_Cycles.patch
Normal file
@@ -0,0 +1,120 @@
|
||||
From: Sergey Sharybin <sergey@blender.org>
|
||||
Date: Wed, 2 Feb 2022 11:17:13 +0100
|
||||
Subject: fix_round_trip_in_Cycles
|
||||
|
||||
There are two things achieved by this change:
|
||||
|
||||
- No possible downcast of size_t to int when calculating motion steps.
|
||||
- Disambiguate call to min() which was for some reason considered
|
||||
ambiguous on 32bit platforms `min(int, unsigned int)`.
|
||||
|
||||
Differential Revision: https://developer.blender.org/D13992
|
||||
---
|
||||
intern/cycles/bvh/embree.cpp | 6 +++---
|
||||
intern/cycles/scene/hair.cpp | 8 ++++----
|
||||
intern/cycles/scene/mesh.cpp | 2 +-
|
||||
intern/cycles/util/math.h | 7 ++++++-
|
||||
4 files changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/intern/cycles/bvh/embree.cpp b/intern/cycles/bvh/embree.cpp
|
||||
index 944a84c..386c6f4 100644
|
||||
--- a/intern/cycles/bvh/embree.cpp
|
||||
+++ b/intern/cycles/bvh/embree.cpp
|
||||
@@ -418,7 +418,7 @@ void BVHEmbree::add_instance(Object *ob, int i)
|
||||
assert(instance_bvh != NULL);
|
||||
|
||||
const size_t num_object_motion_steps = ob->use_motion() ? ob->get_motion().size() : 1;
|
||||
- const size_t num_motion_steps = min(num_object_motion_steps, RTC_MAX_TIME_STEP_COUNT);
|
||||
+ const size_t num_motion_steps = min(num_object_motion_steps, (size_t)RTC_MAX_TIME_STEP_COUNT);
|
||||
assert(num_object_motion_steps <= RTC_MAX_TIME_STEP_COUNT);
|
||||
|
||||
RTCGeometry geom_id = rtcNewGeometry(rtc_device, RTC_GEOMETRY_TYPE_INSTANCE);
|
||||
@@ -469,7 +469,7 @@ void BVHEmbree::add_triangles(const Object *ob, const Mesh *mesh, int i)
|
||||
}
|
||||
|
||||
assert(num_motion_steps <= RTC_MAX_TIME_STEP_COUNT);
|
||||
- num_motion_steps = min(num_motion_steps, RTC_MAX_TIME_STEP_COUNT);
|
||||
+ num_motion_steps = min(num_motion_steps, (size_t)RTC_MAX_TIME_STEP_COUNT);
|
||||
|
||||
const size_t num_triangles = mesh->num_triangles();
|
||||
|
||||
@@ -638,7 +638,7 @@ void BVHEmbree::add_curves(const Object *ob, const Hair *hair, int i)
|
||||
}
|
||||
|
||||
assert(num_motion_steps <= RTC_MAX_TIME_STEP_COUNT);
|
||||
- num_motion_steps = min(num_motion_steps, RTC_MAX_TIME_STEP_COUNT);
|
||||
+ num_motion_steps = min(num_motion_steps, (size_t)RTC_MAX_TIME_STEP_COUNT);
|
||||
|
||||
const size_t num_curves = hair->num_curves();
|
||||
size_t num_segments = 0;
|
||||
diff --git a/intern/cycles/scene/hair.cpp b/intern/cycles/scene/hair.cpp
|
||||
index 2951a60..0fd9c70 100644
|
||||
--- a/intern/cycles/scene/hair.cpp
|
||||
+++ b/intern/cycles/scene/hair.cpp
|
||||
@@ -119,7 +119,7 @@ void Hair::Curve::motion_keys(const float3 *curve_keys,
|
||||
{
|
||||
/* Figure out which steps we need to fetch and their interpolation factor. */
|
||||
const size_t max_step = num_steps - 1;
|
||||
- const size_t step = min((int)(time * max_step), max_step - 1);
|
||||
+ const size_t step = std::min((size_t)(time * max_step), max_step - 1);
|
||||
const float t = time * max_step - step;
|
||||
/* Fetch vertex coordinates. */
|
||||
float4 curr_keys[2];
|
||||
@@ -147,7 +147,7 @@ void Hair::Curve::cardinal_motion_keys(const float3 *curve_keys,
|
||||
{
|
||||
/* Figure out which steps we need to fetch and their interpolation factor. */
|
||||
const size_t max_step = num_steps - 1;
|
||||
- const size_t step = min((int)(time * max_step), max_step - 1);
|
||||
+ const size_t step = min((size_t)(time * max_step), max_step - 1);
|
||||
const float t = time * max_step - step;
|
||||
/* Fetch vertex coordinates. */
|
||||
float4 curr_keys[4];
|
||||
@@ -192,7 +192,7 @@ void Hair::Curve::keys_for_step(const float3 *curve_keys,
|
||||
float4 r_keys[2]) const
|
||||
{
|
||||
k0 = max(k0, 0);
|
||||
- k1 = min(k1, num_keys - 1);
|
||||
+ k1 = min(k1, (size_t)(num_keys - 1));
|
||||
const size_t center_step = ((num_steps - 1) / 2);
|
||||
if (step == center_step) {
|
||||
/* Center step: regular key location. */
|
||||
@@ -238,7 +238,7 @@ void Hair::Curve::cardinal_keys_for_step(const float3 *curve_keys,
|
||||
float4 r_keys[4]) const
|
||||
{
|
||||
k0 = max(k0, 0);
|
||||
- k3 = min(k3, num_keys - 1);
|
||||
+ k3 = min(k3, (size_t)(num_keys - 1));
|
||||
const size_t center_step = ((num_steps - 1) / 2);
|
||||
if (step == center_step) {
|
||||
/* Center step: regular key location. */
|
||||
diff --git a/intern/cycles/scene/mesh.cpp b/intern/cycles/scene/mesh.cpp
|
||||
index f47dab3..e6c8d9b 100644
|
||||
--- a/intern/cycles/scene/mesh.cpp
|
||||
+++ b/intern/cycles/scene/mesh.cpp
|
||||
@@ -53,7 +53,7 @@ void Mesh::Triangle::motion_verts(const float3 *verts,
|
||||
{
|
||||
/* Figure out which steps we need to fetch and their interpolation factor. */
|
||||
const size_t max_step = num_steps - 1;
|
||||
- const size_t step = min((int)(time * max_step), max_step - 1);
|
||||
+ const size_t step = min((size_t)(time * max_step), max_step - 1);
|
||||
const float t = time * max_step - step;
|
||||
/* Fetch vertex coordinates. */
|
||||
float3 curr_verts[3];
|
||||
diff --git a/intern/cycles/util/math.h b/intern/cycles/util/math.h
|
||||
index e4c7df6..4e0e97f 100644
|
||||
--- a/intern/cycles/util/math.h
|
||||
+++ b/intern/cycles/util/math.h
|
||||
@@ -122,7 +122,12 @@ ccl_device_inline int min(int a, int b)
|
||||
return (a < b) ? a : b;
|
||||
}
|
||||
|
||||
-ccl_device_inline uint min(uint a, uint b)
|
||||
+ccl_device_inline uint32_t min(uint32_t a, uint32_t b)
|
||||
+{
|
||||
+ return (a < b) ? a : b;
|
||||
+}
|
||||
+
|
||||
+ccl_device_inline uint64_t min(uint64_t a, uint64_t b)
|
||||
{
|
||||
return (a < b) ? a : b;
|
||||
}
|
||||
40
blender-patches/0006-fix_Cycles_compilation_on_ARM.patch
Normal file
40
blender-patches/0006-fix_Cycles_compilation_on_ARM.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From: Sergey Sharybin <sergey@blender.org>
|
||||
Date: Wed, 9 Feb 2022 23:15:50 +0100
|
||||
Subject: fix_Cycles_compilation_on_ARM
|
||||
|
||||
The rbit instruction is only available starting with ARMv6T2 and
|
||||
the register prefix is different from what AARCH64 uses.
|
||||
|
||||
Separate the 32 and 64 bit ARM branches, add missing ISA checks.
|
||||
|
||||
Made sure the code works as intended on macMini with Apple silicon,
|
||||
and on Raspberry Pi 4 B running 32bit Raspbian OS.
|
||||
|
||||
Differential Revision: https://developer.blender.org/D14056
|
||||
|
||||
Signed-off-by: Matteo F. Vescovi <mfv@debian.org>
|
||||
---
|
||||
intern/cycles/util/math.h | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/intern/cycles/util/math.h b/intern/cycles/util/math.h
|
||||
index 4e0e97f..7fc829f 100644
|
||||
--- a/intern/cycles/util/math.h
|
||||
+++ b/intern/cycles/util/math.h
|
||||
@@ -849,9 +849,15 @@ ccl_device_inline uint prev_power_of_two(uint x)
|
||||
ccl_device_inline uint32_t reverse_integer_bits(uint32_t x)
|
||||
{
|
||||
/* Use a native instruction if it exists. */
|
||||
-#if defined(__arm__) || defined(__aarch64__)
|
||||
+#if defined(__aarch64__) || defined(_M_ARM64)
|
||||
+ /* Assume the rbit is always available on 64bit ARM architecture. */
|
||||
__asm__("rbit %w0, %w1" : "=r"(x) : "r"(x));
|
||||
return x;
|
||||
+#elif defined(__arm__) && ((__ARM_ARCH > 7) || __ARM_ARCH == 6 && __ARM_ARCH_ISA_THUMB >= 2)
|
||||
+ /* This ARM instruction is available in ARMv6T2 and above.
|
||||
+ * This 32-bit Thumb instruction is available in ARMv6T2 and above. */
|
||||
+ __asm__("rbit %0, %1" : "=r"(x) : "r"(x));
|
||||
+ return x;
|
||||
#elif defined(__KERNEL_CUDA__)
|
||||
return __brev(x);
|
||||
#elif __has_builtin(__builtin_bitreverse32)
|
||||
@@ -0,0 +1,64 @@
|
||||
From: Sergey Sharybin <sergey@blender.org>
|
||||
Date: Fri, 11 Feb 2022 11:10:53 +0100
|
||||
Subject: fix_compilation_on_certain_platforms
|
||||
|
||||
Atomic operations performed by the C++ standard library might require
|
||||
libatomic on platforms which do not have hardware support for those
|
||||
operations.
|
||||
|
||||
This change makes it that such configurations are automatically detected
|
||||
and -latomic is added when needed.
|
||||
---
|
||||
build_files/cmake/platform/platform_unix.cmake | 42 ++++++++++++++++++++++++++
|
||||
1 file changed, 42 insertions(+)
|
||||
|
||||
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
|
||||
index fc0c37e..e7c6509 100644
|
||||
--- a/build_files/cmake/platform/platform_unix.cmake
|
||||
+++ b/build_files/cmake/platform/platform_unix.cmake
|
||||
@@ -741,3 +741,45 @@ if(WITH_COMPILER_CCACHE)
|
||||
set(WITH_COMPILER_CCACHE OFF)
|
||||
endif()
|
||||
endif()
|
||||
+
|
||||
+# On some platforms certain atomic operations are not possible with assembly and/or intrinsics and
|
||||
+# they are emulated in software with locks. For example, on armel there is no intrinsics to grant
|
||||
+# 64 bit atomic operations and STL library uses libatomic to offload software emulation of atomics
|
||||
+# to.
|
||||
+# This function will check whether libatomic is required and if so will configure linker flags.
|
||||
+# If atomic operations are possible without libatomic then linker flags are left as-is.
|
||||
+function(CONFIGURE_ATOMIC_LIB_IF_NEEDED)
|
||||
+ # Source which is used to enforce situation when software emulation of atomics is required.
|
||||
+ # Assume that using 64bit integer gives a definitive asnwer (as in, if 64bit atomic operations
|
||||
+ # are possible using assembly/intrinsics 8, 16, and 32 bit operations will also be possible.
|
||||
+ set(_source
|
||||
+ "#include <atomic>
|
||||
+ #include <cstdint>
|
||||
+ int main(int argc, char **argv) {
|
||||
+ std::atomic<uint64_t> uint64; uint64++;
|
||||
+ return 0;
|
||||
+ }")
|
||||
+
|
||||
+ include(CheckCXXSourceCompiles)
|
||||
+ check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITHOUT_LIBATOMIC)
|
||||
+
|
||||
+ if(NOT ATOMIC_OPS_WITHOUT_LIBATOMIC)
|
||||
+ # Compilation of the test program has failed.
|
||||
+ # Try it again with -latomic to see if this is what is needed, or whether something else is
|
||||
+ # going on.
|
||||
+
|
||||
+ set(CMAKE_REQUIRED_LIBRARIES atomic)
|
||||
+ check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITH_LIBATOMIC)
|
||||
+
|
||||
+ if(ATOMIC_OPS_WITH_LIBATOMIC)
|
||||
+ set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -latomic" PARENT_SCOPE)
|
||||
+ else()
|
||||
+ # Atomic operations are required part of Blender and it is not possible to process forward.
|
||||
+ # We expect that either standard library or libatomic will make atomics to work. If both
|
||||
+ # cases has failed something fishy o na bigger scope is going on.
|
||||
+ message(FATAL_ERROR "Failed to detect required configuration for atomic operations")
|
||||
+ endif()
|
||||
+ endif()
|
||||
+endfunction()
|
||||
+
|
||||
+CONFIGURE_ATOMIC_LIB_IF_NEEDED()
|
||||
1
blender-patches/series
Normal file
1
blender-patches/series
Normal file
@@ -0,0 +1 @@
|
||||
0008-Fixed-wayland-compilation.patch
|
||||
200
build-ogre.sh
200
build-ogre.sh
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
OGRE_INSTALL_PATH=$(pwd)/ogre-sdk
|
||||
BLENDER_INSTALL_PATH=$(pwd)/blender-base
|
||||
QT_PATH=/usr/lib/qt
|
||||
# -DQt5_ROOT=/Path/To/QtInstallationFolder/5.12.5
|
||||
set -e
|
||||
@@ -20,6 +21,9 @@ set -e
|
||||
|
||||
build_cmake_stuff() {
|
||||
set -e
|
||||
EXTRA_FLAGS=
|
||||
BBLENDER=false
|
||||
BBLENDERSTATIC=false
|
||||
NOINSTALL=false
|
||||
BSTATIC=false
|
||||
BCLEAN=false
|
||||
@@ -51,6 +55,14 @@ build_cmake_stuff() {
|
||||
shift
|
||||
BRELEASE=true
|
||||
;;
|
||||
blender)
|
||||
shift
|
||||
BBLENDER=true
|
||||
;;
|
||||
blender-static)
|
||||
shift
|
||||
BBLENDERSTATIC=true
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
@@ -60,6 +72,7 @@ build_cmake_stuff() {
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo Package: $1 ...
|
||||
if [ x$BDEBUG = xtrue -a x$BRELEASE = xtrue ]; then
|
||||
BTYPE="-DCMAKE_BUILD_TYPE=RelWidthDebInfo"
|
||||
elif [ x$BDEBUG = xtrue ]; then
|
||||
@@ -68,11 +81,21 @@ build_cmake_stuff() {
|
||||
BTYPE="-DCMAKE_BUILD_TYPE=Release"
|
||||
fi
|
||||
BUILD_DIR=$1/build
|
||||
if [ x$BSTATIC = xtrue ]; then
|
||||
if [ x${BSTATIC} = xtrue ]; then
|
||||
BUILD_DIR=$1/build-static
|
||||
EXTRA_FLAGS="-DBUILD_SHARED_LIBS=OFF ${EXTRA_FLAGS}"
|
||||
INSTALL_PATH=${OGRE_INSTALL_PATH}-static
|
||||
fi
|
||||
if [ x${BBLENDERSTATIC} = xtrue ]; then
|
||||
BUILD_DIR=$1/build-blender
|
||||
EXTRA_FLAGS="-DBUILD_SHARED_LIBS=OFF ${EXTRA_FLAGS}"
|
||||
INSTALL_PATH=${BLENDER_INSTALL_PATH}
|
||||
fi
|
||||
if [ x${BBLENDER} = xtrue ]; then
|
||||
BUILD_DIR=$1/build-blender
|
||||
EXTRA_FLAGS="${EXTRA_FLAGS}"
|
||||
INSTALL_PATH=${BLENDER_INSTALL_PATH}
|
||||
fi
|
||||
if [ x$1 = xogre ]; then
|
||||
EXTRA_FLAGS="-DASSIMP_BUILD_ASSIMP_TOOLS=ON ${EXTRA_FLAGS}"
|
||||
if [ x$BSTATIC = xtrue ]; then
|
||||
@@ -96,32 +119,180 @@ build_cmake_stuff() {
|
||||
cd $MDIR
|
||||
}
|
||||
|
||||
#rm -Rf assimp/build assimp/build-static
|
||||
#rm -Rf ogre/build ogre/build-static ogre-sdk ogre-sdk-static
|
||||
#rm -Rf ogre-procedural/build ogre-procedural/build-static
|
||||
#rm -Rf ogre-projects/world2/build ogre-projects/world2/build-static
|
||||
build_ffmpeg() {
|
||||
set -e
|
||||
EXTRA_FLAGS=
|
||||
NOINSTALL=false
|
||||
BSTATIC=false
|
||||
BCLEAN=false
|
||||
BBLENDER=false
|
||||
INSTALL_PATH=${OGRE_INSTALL_PATH}
|
||||
while true; do
|
||||
case $1 in
|
||||
noinstall)
|
||||
shift
|
||||
NOINSTALL=true
|
||||
;;
|
||||
static)
|
||||
shift
|
||||
BSTATIC=true
|
||||
;;
|
||||
clean)
|
||||
shift
|
||||
BCLEAN=true
|
||||
;;
|
||||
debug)
|
||||
shift
|
||||
;;
|
||||
release)
|
||||
shift
|
||||
;;
|
||||
blender)
|
||||
BBLENDER=true
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo Package: $1
|
||||
BUILD_DIR=$1/build
|
||||
if [ x$BSTATIC = xtrue ]; then
|
||||
BUILD_DIR=$1/build-static
|
||||
EXTRA_FLAGS="--disable-pic --enable-static --disable-shared ${EXTRA_FLAGS}"
|
||||
INSTALL_PATH=${OGRE_INSTALL_PATH}-static
|
||||
elif [ x$BBLENDER = xtrue ]; then
|
||||
BUILD_DIR=$1/build-blender
|
||||
EXTRA_FLAGS="--enable-pic --enable-shared --disable-static ${EXTRA_FLAGS}"
|
||||
INSTALL_PATH=${BLENDER_INSTALL_PATH}
|
||||
else
|
||||
EXTRA_FLAGS="--enable-pic --disable-shared --enable-static ${EXTRA_FLAGS}"
|
||||
fi
|
||||
MDIR=$(pwd)
|
||||
if [ x$BCLEAN = xtrue ]; then
|
||||
rm -Rf ${BUILD_DIR}
|
||||
fi
|
||||
mkdir -p ${BUILD_DIR}
|
||||
cd ${BUILD_DIR}
|
||||
export PKG_CONFIG_PATH=${INSTALL_PATH}/lib/pkgconfig
|
||||
../configure --prefix=${INSTALL_PATH} ${EXTRA_FLAGS} --disable-programs \
|
||||
--extra-libs="$(pkg-config wayland-client wayland-protocols x11 libdrm --libs)"
|
||||
DISPLAY= make -j10
|
||||
if [ x$NOINSTALL = xfalse ]; then
|
||||
DISPLAY= make install
|
||||
fi
|
||||
cd $MDIR
|
||||
}
|
||||
CLEAN=false
|
||||
while true; do
|
||||
case $1 in
|
||||
clean)
|
||||
shift
|
||||
CLEAN=true
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x$CLEAN = xtrue ]; then
|
||||
rm -Rf assimp/build assimp/build-static
|
||||
rm -Rf ogre/build ogre/build-static ogre-sdk ogre-sdk-static
|
||||
rm -Rf ogre-procedural/build ogre-procedural/build-static
|
||||
rm -Rf ogre-projects/world2/build ogre-projects/world2/build-static
|
||||
fi
|
||||
#(cd bzip2-1.0.8 && make all && make install PREFIX=${OGRE_INSTALL_PATH})
|
||||
#(cd bzip2-1.0.8 && make all && make install PREFIX=${OGRE_INSTALL_PATH}-static)
|
||||
build_cmake_stuff clean debug release SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
#set -x
|
||||
|
||||
rm -Rf blender-base
|
||||
|
||||
# blender
|
||||
#blender dependencies
|
||||
build_cmake_stuff blender-static clean release zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=OFF"
|
||||
build_cmake_stuff blender-static clean release blender-deps/libdeflate "-DLIBDEFLATE_BUILD_SHARED_LIB=OFF"
|
||||
build_cmake_stuff blender-static clean release libjpeg-turbo ""
|
||||
build_cmake_stuff blender-static clean release libpng "-DPNG_SHARED=OFF"
|
||||
build_cmake_stuff blender-static clean release libtiff ""
|
||||
build_cmake_stuff blender-static clean release pugixml ""
|
||||
build_ffmpeg blender clean ffmpeg
|
||||
build_cmake_stuff blender-static clean release assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
|
||||
build_cmake_stuff blender-static clean release Imath ""
|
||||
build_cmake_stuff blender-static clean release openexr ""
|
||||
build_cmake_stuff blender-static clean release oneTBB "-DTBB_TEST=OFF"
|
||||
build_cmake_stuff blender-static clean release pybind11 "-DPYBIND11_TEST=OFF"
|
||||
build_cmake_stuff blender-static clean release fftw-3.3.10 ""
|
||||
build_cmake_stuff blender-static clean release OpenColorIO "-DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYTHON=OFF"
|
||||
build_cmake_stuff blender-static clean release OpenImageIO "-DOIIO_BUILD_TESTS=OFF -DOIIO_BUILD_DOCS=OFF -DOIIO_BUILD_TOOLS=OFF -DOpenImageIO_BUILD_MISSING_DEPS=all -DUSE_PYTHON=0"
|
||||
build_cmake_stuff blender-static clean release OpenColorIO "-DOCIO_BUILD_TESTS=OFF -DOCIO_BUILD_PYTHON=OFF"
|
||||
build_cmake_stuff blender clean release embree ""
|
||||
if [ ! -d blender-tree ]; then
|
||||
cp -a blender blender-tree
|
||||
cp -a blender-patches blender-tree/patches
|
||||
cd blender-tree
|
||||
quilt push -a
|
||||
cd ..
|
||||
fi
|
||||
|
||||
cd blender-tree
|
||||
make update
|
||||
cd ..
|
||||
# "-C$(pwd)/blender/build_files/cmake/config/blender_release.cmake \
|
||||
#
|
||||
build_cmake_stuff blender clean debug release blender-tree \
|
||||
"-DCMAKE_SKIP_RPATH=OFF \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DWITH_CODEC_FFMPEG=ON \
|
||||
-DWITH_CODEC_SNDFILE=ON \
|
||||
-DWITH_CPU_SSE=OFF \
|
||||
-DWITH_CYCLES=ON -DWITH_CYCLES_EMBREE=OFF -DWITH_DOC_MANPAGE=OFF -DWITH_FFTW3=ON -DWITH_GAMEENGINE=ON -DWITH_IMAGE_OPENJPEG=ON \
|
||||
-DWITH_INPUT_NDOF=ON -DWITH_INSTALL_PORTABLE=OFF -DWITH_MOD_OCEANSIM=ON -DWITH_OPENCOLLADA=ON -DWITH_OPENCOLORIO=ON \
|
||||
-DWITH_OPENSUBDIV=ON -DWITH_OPENVDB=OFF -DWITH_PLAYER=ON -DWITH_PYTHON_INSTALL=ON -DWITH_SYSTEM_GLEW=ON \
|
||||
-DWITH_GHOST_SDL=ON -DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_X11=ON \
|
||||
-DWITH_STATIC_LIBS=OFF"
|
||||
|
||||
exit 0
|
||||
|
||||
build_cmake_stuff debug release zlib "-DZLIB_BUILD_STATIC=OFF -DZLIB_BUILD_SHARED=ON -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=ON -DMINIZIP_BUILD_STATIC=OFF -DMINIZIP_ENABLE_BZIP2=OFF"
|
||||
build_cmake_stuff debug release static zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=OFF -DMINIZIP_BUILD_STATIC=ON -DMINIZIP_ENABLE_BZIP2=OFF"
|
||||
|
||||
build_cmake_stuff release debug libjpeg-turbo ""
|
||||
build_cmake_stuff release debug static libjpeg-turbo ""
|
||||
build_cmake_stuff release debug libpng "-DPNG_SHARED=ON"
|
||||
build_cmake_stuff release debug static libpng "-DPNG_SHARED=OFF"
|
||||
build_cmake_stuff release debug pugixml ""
|
||||
build_cmake_stuff release debug static pugixml ""
|
||||
|
||||
build_ffmpeg ffmpeg
|
||||
build_ffmpeg static ffmpeg
|
||||
|
||||
build_cmake_stuff debug release assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
|
||||
build_cmake_stuff debug release static assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
|
||||
|
||||
build_cmake_stuff debug release SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_STATIC_PIC=ON -DSDL_X11=ON \
|
||||
-DSDL_X11_SHARED=OFF -DSDL_X11_XCURSOR=ON -DSDL_X11_XDBE=ON \
|
||||
-DSDL_X11_XINPUT=ON -DSDL_X11_XRANDR=ON -DSDL_X11_XSCRNSAVER=ON -DSDL_X11_XSHAPE=ON -DSDL_WAYLAND=ON \
|
||||
-DSDL_WAYLAND_SHARED=OFF -DSDL_WAYLAND_LIBDECOR=ON -DSDL_WAYLAND_LIBDECOR_SHARED=OFF -DSDL_KMSDRM=ON -DSDL_KMSDRM_SHARED=OFF -DSDL_OPENGL=ON \
|
||||
-DSDL_OPENGLES=ON -DSDL_VULKAN=ON-DSDL_ALSA=ON -DSDL_ALSA_SHARED=OFF -DSDL_PIPEWIRE=ON -DSDL_PIPEWIRE_SHARED=OFF \
|
||||
-DSDL_PULSEAUDIO=ON -DSDL_PULSEAUDIO_SHARED=OFF -DSDL_RPATH=OFF -DSDL_HIDAPI=ON -DSDL_HIDAPI_JOYSTICK=ON"
|
||||
build_cmake_stuff clean debug release static SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
build_cmake_stuff debug release static SDL "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_X11=ON \
|
||||
-DSDL_X11_SHARED=OFF -DSDL_X11_XCURSOR=ON -DSDL_X11_XDBE=ON \
|
||||
-DSDL_X11_XINPUT=ON -DSDL_X11_XRANDR=ON -DSDL_X11_XSCRNSAVER=ON -DSDL_X11_XSHAPE=ON -DSDL_WAYLAND=ON \
|
||||
-DSDL_WAYLAND_SHARED=OFF -DSDL_WAYLAND_LIBDECOR=ON -DSDL_WAYLAND_LIBDECOR_SHARED=OFF -DSDL_KMSDRM=ON -DSDL_KMSDRM_SHARED=OFF -DSDL_OPENGL=ON \
|
||||
-DSDL_OPENGLES=ON -DSDL_VULKAN=ON-DSDL_ALSA=ON -DSDL_ALSA_SHARED=OFF -DSDL_PIPEWIRE=ON -DSDL_PIPEWIRE_SHARED=OFF \
|
||||
-DSDL_PULSEAUDIO=ON -DSDL_PULSEAUDIO_SHARED=OFF -DSDL_RPATH=OFF -DSDL_HIDAPI=ON -DSDL_HIDAPI_JOYSTICK=ON"
|
||||
build_cmake_stuff clean debug release zlib "-DZLIB_BUILD_STATIC=OFF -DZLIB_BUILD_SHARED=ON -DZLIB_BUILD_MINIZIP=OFF"
|
||||
build_cmake_stuff clean debug release static zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=OFF"
|
||||
build_cmake_stuff clean debug release zlib "-DZLIB_BUILD_STATIC=OFF -DZLIB_BUILD_SHARED=ON -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=ON -DMINIZIP_BUILD_STATIC=OFF -DMINIZIP_ENABLE_BZIP2=OFF"
|
||||
build_cmake_stuff clean debug release static zlib "-DZLIB_BUILD_STATIC=ON -DZLIB_BUILD_SHARED=OFF -DZLIB_BUILD_MINIZIP=ON -DMINIZIP_BUILD_SHARED=OFF -DMINIZIP_BUILD_STATIC=ON -DMINIZIP_ENABLE_BZIP2=OFF"
|
||||
build_cmake_stuff debug release assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
|
||||
build_cmake_stuff debug release static assimp "-DASSIMP_BUILD_ZLIB=ON -DBUILD_SHARED_LIBS=OFF"
|
||||
build_cmake_stuff release SPIRV-Headers ""
|
||||
build_cmake_stuff release SPIRV-Tools "-DBUILD_SHARED_LIBS=OFF -DSPIRV_TOOLS_BUILD_STATIC=ON -DSPIRV_TOOLS_LIBRARY_TYPE=STATIC"
|
||||
cd glslang
|
||||
@@ -139,6 +310,9 @@ build_cmake_stuff ogre "-DOGRE_GLSUPPORT_USE_EGL:BOOL=FALSE -DOGRE_BUILD_RENDERS
|
||||
build_cmake_stuff static ogre "-DOGRE_GLSUPPORT_USE_EGL:BOOL=FALSE -DOGRE_BUILD_RENDERSYSTEM_VULKAN:BOOL=TRUE -DOGRE_INSTALL_DEPENDENCIES:BOOL=TRUE"
|
||||
build_cmake_stuff debug release ogre-procedural "-DOgreProcedural_BUILD_DOCS:BOOL=FALSE"
|
||||
build_cmake_stuff debug release static ogre-procedural "-DOgreProcedural_BUILD_DOCS:BOOL=FALSE -DOgreProcedural_STATIC=TRUE -DOgreProcedural_BUILD_SAMPLES=FALSE"
|
||||
build_cmake_stuff clean debug release ogre-pagedgeometry ""
|
||||
build_cmake_stuff clean debug release static ogre-pagedgeometry ""
|
||||
#build_cmake_stuff clean debug release OgreCrowd "-DBUILD_DEMO=OFF"
|
||||
build_cmake_stuff debug release noinstall clean ogrewater ""
|
||||
build_cmake_stuff debug release noinstall clean static ogrewater ""
|
||||
build_cmake_stuff debug noinstall clean ogre-projects/world2 ""
|
||||
|
||||
2
ffmpeg
2
ffmpeg
Submodule ffmpeg updated: 2e503a9b94...78690eba61
1
libtiff
Submodule
1
libtiff
Submodule
Submodule libtiff added at e92f761ea4
1
pugixml
Submodule
1
pugixml
Submodule
Submodule pugixml added at 5a1892b321
1
pybind11
Submodule
1
pybind11
Submodule
Submodule pybind11 added at cc69a3789c
Reference in New Issue
Block a user