summaryrefslogtreecommitdiff
path: root/graphics/appleseed/files
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/appleseed/files')
-rw-r--r--graphics/appleseed/files/patch-CMakeLists.txt31
-rw-r--r--graphics/appleseed/files/patch-cmake_config_linux-gcc-clang.txt15
-rw-r--r--graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_project_texturecollectionitem.cpp19
-rw-r--r--graphics/appleseed/files/patch-src_appleseed_foundation_platform_path.h10
-rw-r--r--graphics/appleseed/files/patch-src_appleseed_foundation_platform_system.cpp82
-rw-r--r--graphics/appleseed/files/patch-src_appleseed_foundation_utility_benchmark_benchmarkaggregator.cpp10
-rw-r--r--graphics/appleseed/files/pkg-message.in6
7 files changed, 173 insertions, 0 deletions
diff --git a/graphics/appleseed/files/patch-CMakeLists.txt b/graphics/appleseed/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..e400f28c1464
--- /dev/null
+++ b/graphics/appleseed/files/patch-CMakeLists.txt
@@ -0,0 +1,31 @@
+--- CMakeLists.txt.orig 2019-08-31 15:49:01 UTC
++++ CMakeLists.txt
+@@ -732,9 +732,16 @@ install (
+ sandbox/share
+ sandbox/stylesheets
+ DESTINATION .
++ PATTERN "cmake" EXCLUDE
+ )
+
+ install (
++ DIRECTORY
++ sandbox/share/cmake
++ DESTINATION ../share
++)
++
++install (
+ FILES
+ scripts/cleanmany.py
+ scripts/convertmany.py
+@@ -754,11 +761,6 @@ install (
+ sandbox/schemas/settings.xsd
+ sandbox/schemas/project.xsd
+ DESTINATION schemas
+-)
+-
+-install (
+- CODE "FILE (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/images)"
+- CODE "FILE (MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/images/autosave)"
+ )
+
+ if (INSTALL_HEADERS)
diff --git a/graphics/appleseed/files/patch-cmake_config_linux-gcc-clang.txt b/graphics/appleseed/files/patch-cmake_config_linux-gcc-clang.txt
new file mode 100644
index 000000000000..239885b5b40d
--- /dev/null
+++ b/graphics/appleseed/files/patch-cmake_config_linux-gcc-clang.txt
@@ -0,0 +1,15 @@
+--- cmake/config/linux-gcc-clang.txt.orig 2019-08-31 15:49:01 UTC
++++ cmake/config/linux-gcc-clang.txt
+@@ -150,12 +150,6 @@ if (HIDE_SYMBOLS)
+ )
+ endif ()
+
+-# Release configuration.
+-set (c_compiler_flags_release
+- -O3 # optimization level
+- -fgcse-las # Eliminates stores followed by a load to the same positions.
+- -fgcse-sm # Moves load/save instructions out of loops, if possible.
+-)
+
+
+ #--------------------------------------------------------------------------------------------------
diff --git a/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_project_texturecollectionitem.cpp b/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_project_texturecollectionitem.cpp
new file mode 100644
index 000000000000..b2ff1793384c
--- /dev/null
+++ b/graphics/appleseed/files/patch-src_appleseed.studio_mainwindow_project_texturecollectionitem.cpp
@@ -0,0 +1,19 @@
+--- src/appleseed.studio/mainwindow/project/texturecollectionitem.cpp.orig 2015-06-13 09:38:53 UTC
++++ src/appleseed.studio/mainwindow/project/texturecollectionitem.cpp
+@@ -108,11 +108,15 @@ namespace
+ texture_params.insert("filename", path);
+ texture_params.insert("color_space", "srgb");
+
++ // Workaround for GCC 4.2.1: we cannot construct object in .create() below
++ // because GCC will attempt to invoke copy ctor which is private of course.
++ SearchPaths paths;
++
+ return
+ DiskTexture2dFactory().create(
+ texture_name.c_str(),
+ texture_params,
+- SearchPaths());
++ paths);
+ }
+
+ auto_release_ptr<TextureInstance> create_texture_instance(const string& texture_name)
diff --git a/graphics/appleseed/files/patch-src_appleseed_foundation_platform_path.h b/graphics/appleseed/files/patch-src_appleseed_foundation_platform_path.h
new file mode 100644
index 000000000000..50af8e0ac84b
--- /dev/null
+++ b/graphics/appleseed/files/patch-src_appleseed_foundation_platform_path.h
@@ -0,0 +1,10 @@
+--- src/appleseed/foundation/platform/path.h.orig 2019-08-31 15:49:01 UTC
++++ src/appleseed/foundation/platform/path.h
+@@ -40,6 +40,7 @@
+ #include "main/dllsymbol.h"
+
+ // Boost headers.
++#include "boost/filesystem/exception.hpp"
+ #include "boost/filesystem/operations.hpp"
+ #include "boost/filesystem/path.hpp"
+
diff --git a/graphics/appleseed/files/patch-src_appleseed_foundation_platform_system.cpp b/graphics/appleseed/files/patch-src_appleseed_foundation_platform_system.cpp
new file mode 100644
index 000000000000..eba46ae41e78
--- /dev/null
+++ b/graphics/appleseed/files/patch-src_appleseed_foundation_platform_system.cpp
@@ -0,0 +1,82 @@
+--- src/appleseed/foundation/platform/system.cpp.orig 2019-08-31 15:49:01 UTC
++++ src/appleseed/foundation/platform/system.cpp
+@@ -548,6 +548,13 @@ namespace
+ "=d" (regs[edx]));
+ }
+
++ uint64 xgetbv(const int32 index)
++ {
++ uint32 eax, edx;
++ __asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index));
++ return (static_cast<uint64>(edx) << 32) | eax;
++ }
++
+ #define BIT(n) (1UL << (n))
+ #define BITMASK(h, l) ((BIT(h) | (BIT(h) - 1)) & ~(BIT(l) - 1))
+ #define BITFIELD(x, h, l) (((x) & BITMASK(h, l)) >> l)
+@@ -1077,7 +1084,8 @@ namespace
+ // Reference: http://stackoverflow.com/a/22521619/922184
+
+ uint32 cpuinfo[4];
+- cpuid(cpuinfo, 1);
++ cpuinfo[0] = 1;
++ cpuid(cpuinfo);
+
+ const bool os_uses_xsave_xrstor = (cpuinfo[2] & (1UL << 27)) != 0;
+ const bool cpu_avx_support = (cpuinfo[2] & (1UL << 28)) != 0;
+@@ -1105,7 +1113,8 @@ namespace
+ char vendor[13];
+
+ uint32 cpuinfo[4];
+- cpuid(cpuinfo, 0);
++ cpuinfo[0] = 0;
++ cpuid(cpuinfo);
+
+ memcpy(vendor + 0, &cpuinfo[1], 4);
+ memcpy(vendor + 4, &cpuinfo[3], 4);
+@@ -1134,13 +1143,15 @@ void System::detect_x86_cpu_features(X86CPUFeatures& f
+
+ // EAX=0: Get vendor ID.
+ uint32 cpuinfo[4];
+- cpuid(cpuinfo, 0x00000000);
++ cpuinfo[0] = 0;
++ cpuid(cpuinfo);
+ const uint32 highest_function_id = cpuinfo[0];
+
+ if (highest_function_id >= 0x00000001)
+ {
+ // EAX=1: Processor Info and Feature Bits.
+- cpuid(cpuinfo, 0x00000001);
++ cpuinfo[0] = 1;
++ cpuid(cpuinfo);
+ features.m_hw_mmx = (cpuinfo[3] & (1UL << 23)) != 0;
+ features.m_hw_sse = (cpuinfo[3] & (1UL << 25)) != 0;
+ features.m_hw_sse2 = (cpuinfo[3] & (1UL << 26)) != 0;
+@@ -1158,7 +1169,8 @@ void System::detect_x86_cpu_features(X86CPUFeatures& f
+ if (highest_function_id >= 0x00000007)
+ {
+ // EAX=7: Extended Features.
+- cpuid(cpuinfo, 0x00000007);
++ cpuinfo[0] = 7;
++ cpuid(cpuinfo);
+ features.m_hw_avx2 = (cpuinfo[1] & (1UL << 5)) != 0;
+ features.m_hw_bmi1 = (cpuinfo[1] & (1UL << 3)) != 0;
+ features.m_hw_bmi2 = (cpuinfo[1] & (1UL << 8)) != 0;
+@@ -1178,13 +1190,15 @@ void System::detect_x86_cpu_features(X86CPUFeatures& f
+ }
+
+ // EAX=0x80000000: Get Highest Extended Function Supported.
+- cpuid(cpuinfo, 0x80000000);
++ cpuinfo[0] = 0x80000000;
++ cpuid(cpuinfo);
+ const uint32 highest_ext_function_id = cpuinfo[0];
+
+ if (highest_ext_function_id >= 0x80000001)
+ {
+ // EAX=0x80000001: Extended Processor Info and Feature Bits.
+- cpuid(cpuinfo, 0x80000001);
++ cpuinfo[0] = 0x80000001;
++ cpuid(cpuinfo);
+ features.m_hw_x64 = (cpuinfo[3] & (1UL << 29)) != 0;
+ features.m_hw_abm = (cpuinfo[2] & (1UL << 5)) != 0;
+ features.m_hw_sse4a = (cpuinfo[2] & (1UL << 6)) != 0;
diff --git a/graphics/appleseed/files/patch-src_appleseed_foundation_utility_benchmark_benchmarkaggregator.cpp b/graphics/appleseed/files/patch-src_appleseed_foundation_utility_benchmark_benchmarkaggregator.cpp
new file mode 100644
index 000000000000..4cd37f37d946
--- /dev/null
+++ b/graphics/appleseed/files/patch-src_appleseed_foundation_utility_benchmark_benchmarkaggregator.cpp
@@ -0,0 +1,10 @@
+--- src/appleseed/foundation/utility/benchmark/benchmarkaggregator.cpp.orig 2019-08-31 15:49:01 UTC
++++ src/appleseed/foundation/utility/benchmark/benchmarkaggregator.cpp
+@@ -40,6 +40,7 @@
+
+ // Boost headers.
+ #include "boost/date_time/posix_time/posix_time.hpp"
++#include "boost/filesystem/directory.hpp"
+ #include "boost/filesystem/operations.hpp"
+ #include "boost/filesystem/path.hpp"
+ #include "boost/regex.hpp"
diff --git a/graphics/appleseed/files/pkg-message.in b/graphics/appleseed/files/pkg-message.in
new file mode 100644
index 000000000000..2cfd586ec48d
--- /dev/null
+++ b/graphics/appleseed/files/pkg-message.in
@@ -0,0 +1,6 @@
+appleseed currently requires itself to be installed under common prefix:
+%%APPHOME%%. To run CLI or GUI version, execute the following
+commands, respectively:
+
+ %%APPHOME%%/bin/appleseed.cli
+ %%APPHOME%%/bin/appleseed.studio