From 33cef266551eb903e339dce1d9d8a85b8312c3a2 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sat, 24 Nov 2018 17:10:37 +0100 Subject: [PATCH] embree: fix x86 build. --- media-libs/embree/embree-2.17.6.recipe | 2 +- .../embree/patches/embree-2.17.6.patchset | 120 ++++++++++++++++-- 2 files changed, 109 insertions(+), 13 deletions(-) diff --git a/media-libs/embree/embree-2.17.6.recipe b/media-libs/embree/embree-2.17.6.recipe index 0e287f39a..b3dec8dfa 100644 --- a/media-libs/embree/embree-2.17.6.recipe +++ b/media-libs/embree/embree-2.17.6.recipe @@ -10,7 +10,7 @@ algorithms that best matches the instruction set of your CPU" HOMEPAGE="https://embree.github.io" COPYRIGHT="2013-2017 Intel Corporation" LICENSE="Apache v2" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/embree/embree/archive/v$portVersion.tar.gz" CHECKSUM_SHA256="29b78b13728f81ced69ad24edb0bfe3f5e0298b83648371636394c9ecbc08752" PATCHES="embree-$portVersion.patchset" diff --git a/media-libs/embree/patches/embree-2.17.6.patchset b/media-libs/embree/patches/embree-2.17.6.patchset index c7e4c8ba7..a5f0fe2f4 100644 --- a/media-libs/embree/patches/embree-2.17.6.patchset +++ b/media-libs/embree/patches/embree-2.17.6.patchset @@ -1,14 +1,14 @@ -From d0f67235368636157455a59caf93246147fc3c5c Mon Sep 17 00:00:00 2001 +From dbe060fad2b764cbe49812864389fdbfb1323e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sat, 11 Nov 2017 10:59:41 +0100 Subject: Embree: Haiku platform support diff --git a/common/sys/alloc.cpp b/common/sys/alloc.cpp -index ae9d77d..0eaa7ce 100644 +index e24df4e..d51fd84 100644 --- a/common/sys/alloc.cpp +++ b/common/sys/alloc.cpp -@@ -263,6 +263,8 @@ namespace embree +@@ -262,6 +262,8 @@ namespace embree hugepages = true; return ptr; } @@ -18,7 +18,7 @@ index ae9d77d..0eaa7ce 100644 void* ptr = mmap(0, bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_HUGETLB, -1, 0); if (ptr != MAP_FAILED) { diff --git a/common/sys/platform.h b/common/sys/platform.h -index dfdc2c5..6b78f2f 100644 +index 4f834ef..eea43f2 100644 --- a/common/sys/platform.h +++ b/common/sys/platform.h @@ -85,6 +85,13 @@ @@ -36,10 +36,10 @@ index dfdc2c5..6b78f2f 100644 #if defined(__unix__) || defined (unix) || defined(__unix) || defined(_unix) # if !defined(__UNIX__) diff --git a/common/sys/sysinfo.cpp b/common/sys/sysinfo.cpp -index 0dc6198..f963a04 100644 +index 2a6dfed..9284cf6 100644 --- a/common/sys/sysinfo.cpp +++ b/common/sys/sysinfo.cpp -@@ -46,6 +46,10 @@ namespace embree +@@ -49,6 +49,10 @@ namespace embree return "Mac OS X (32bit)"; #elif defined(__MACOSX__) && defined(__X86_64__) return "Mac OS X (64bit)"; @@ -50,7 +50,7 @@ index 0dc6198..f963a04 100644 #elif defined(__UNIX__) && !defined(__X86_64__) return "Unix (32bit)"; #elif defined(__UNIX__) && defined(__X86_64__) -@@ -403,7 +407,7 @@ namespace embree +@@ -406,7 +410,7 @@ namespace embree /// Linux Platform //////////////////////////////////////////////////////////////////////////////// @@ -59,11 +59,8 @@ index 0dc6198..f963a04 100644 #include #include -diff --git a/include/embree2/rtcore_version.h b/include/embree2/rtcore_version.h -old mode 100755 -new mode 100644 diff --git a/tutorials/common/math/sampling.h b/tutorials/common/math/sampling.h -index d9a03e4..4a2977f 100644 +index 46444f0..1bec7b3 100644 --- a/tutorials/common/math/sampling.h +++ b/tutorials/common/math/sampling.h @@ -26,6 +26,18 @@ @@ -86,5 +83,104 @@ index d9a03e4..4a2977f 100644 inline Vec3fa cartesian(const float phi, const float sinTheta, const float cosTheta) { -- -2.15.0 +2.19.1 + + +From 3597bd1a386a817b7ddf7a3038c4e6523bc6132e Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 24 Nov 2018 17:07:38 +0100 +Subject: fix for Haiku x86 + + +diff --git a/common/math/math.h b/common/math/math.h +index bd66796..4bdfa05 100644 +--- a/common/math/math.h ++++ b/common/math/math.h +@@ -176,7 +176,10 @@ namespace embree + __forceinline int64_t min(int64_t a, int64_t b) { return a