[gentoo-commits] repo/gentoo:master commit in: media-libs/embree/files/, media-libs/embree/

2024-03-25 Thread Sam James
commit: 853f778d6113be2e57db1d9927b1ded860ff3580
Author: Sebastian Parborg  gmail  com>
AuthorDate: Wed Jan 17 11:39:14 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Mar 25 18:54:51 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=853f778d

media-libs/embree: Bump to 4.3.0

Closes: https://bugs.gentoo.org/912279

Signed-off-by: Sebastian Parborg  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 media-libs/embree/Manifest |   1 +
 media-libs/embree/embree-4.3.0.ebuild  | 118 
 .../embree-4.3.0-dont-install-tutorials.patch  | 203 +
 3 files changed, 322 insertions(+)

diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest
index 514a411dba17..3478edbe8dae 100644
--- a/media-libs/embree/Manifest
+++ b/media-libs/embree/Manifest
@@ -1,2 +1,3 @@
 DIST embree-3.13.4.tar.gz 13733908 BLAKE2B 
4c6c24f62ee88a09149bd930716c71e91d54563eea5cc103c0346d3808c693e8470fc7ea98651e0df9e4423bda565d7ab1a23e16c9d0441c79e9ec9c8571b0fa
 SHA512 
685c3935fabe1bfa7260ef148df26b686b085b75011d72011461471cbcef786a5ce7a0e85c57b2df05798489a2d4e80a8d3ee5df986029edad7df7511d99c0ca
 DIST embree-3.13.5.tar.gz 13739115 BLAKE2B 
52ad8e3520aa789f7987467c6979be06f883803757e842316ecf708deeed11214dd60570eda5708e701047b1a14ea37710d158df544817dc536bfda444a68218
 SHA512 
13ae19b1750197fb4887ba601c75d1b54b3c388224672b6561dd922bc9b9747139cf46ce554727e3afa13dcf152ce4d703935cb9105ced792b011f2d05fa3e95
+DIST embree-4.3.0.tar.gz 71028239 BLAKE2B 
7834ed7851d36c32ce3e88a3ddb02e8316422699ec78a662ef81ef0eb9f66b260ce2f7438739531e2b63f817a931a19ba35da156e8e09a42a78e6c077314e615
 SHA512 
8f61401175464b34243e899464f44a196b520c08e1c44a417bf980cfa7b191859bbaab1029278123654e5ffb91e2f8a85af1d881affddcc7e344a7e8a8066262

diff --git a/media-libs/embree/embree-4.3.0.ebuild 
b/media-libs/embree/embree-4.3.0.ebuild
new file mode 100644
index ..05a813da049f
--- /dev/null
+++ b/media-libs/embree/embree-4.3.0.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic linux-info toolchain-funcs
+
+DESCRIPTION="Collection of high-performance ray tracing kernels"
+HOMEPAGE="https://github.com/embree/embree";
+SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="3"
+KEYWORDS="-* ~amd64 ~arm64"
+X86_CPU_FLAGS=( sse2 sse4_2 avx avx2 avx512dq )
+CPU_FLAGS=( cpu_flags_arm_neon ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} )
+IUSE="compact-polys ispc +raymask ssp +tbb test ${CPU_FLAGS[@]}"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( ${CPU_FLAGS[@]} )"
+
+BDEPEND="
+   virtual/pkgconfig
+"
+RDEPEND="
+   ispc? ( dev-lang/ispc )
+   tbb? ( dev-cpp/tbb:= )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGELOG.md README.md readme.pdf )
+
+PATCHES=(
+   "${FILESDIR}"/embree-4.3.0-dont-install-tutorials.patch
+)
+
+pkg_setup() {
+   CONFIG_CHECK="~TRANSPARENT_HUGEPAGE"
+   WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages 
(CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance."
+
+   linux-info_pkg_setup
+}
+
+src_prepare() {
+   cmake_src_prepare
+
+   # disable RPM package building
+   sed -e 's|CPACK_RPM_PACKAGE_RELEASE 1|CPACK_RPM_PACKAGE_RELEASE 0|' \
+   -i CMakeLists.txt || die
+}
+
+src_configure() {
+   # NOTE: You can make embree accept custom CXXFLAGS by turning off
+   # EMBREE_IGNORE_CMAKE_CXX_FLAGS. However, the linking will fail if you 
use
+   # any "m*" compile flags. This is because embree builds modules for the
+   # different supported ISAs and picks the correct one at runtime.
+   # "m*" will pull in cpu instructions that shouldn't be in specific 
modules
+   # and it fails to link properly.
+   # https://github.com/embree/embree/issues/115
+
+   filter-flags -m*
+
+   # https://bugs.gentoo.org/910164
+   tc-is-clang && filter-lto
+
+   local mycmakeargs=(
+   -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON
+
+   # Default culling settings for Blender
+   # (Cycles will not render correctly without these)
+   # Some Embree tests will fail with these settings though...
+   -DEMBREE_BACKFACE_CULLING=OFF
+   -DEMBREE_BACKFACE_CULLING_CURVES=ON
+   -DEMBREE_BACKFACE_CULLING_SPHERES=ON
+
+   -DEMBREE_COMPACT_POLYS=$(usex compact-polys)
+
+   # Make sure that we are using our custom compilie flags
+   -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF
+
+   # Set to NONE so we can manually switch on ISAs below
+   -DEMBREE_MAX_ISA:STRING="NONE"
+   -DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx)
+   -DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2)
+   -DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq)
+  

[gentoo-commits] repo/gentoo:master commit in: media-libs/embree/files/, media-libs/embree/

2023-05-09 Thread Sam James
commit: 6e16952c578fdc0e662e2986bf8139df0d8c3530
Author: Sebastian Parborg  gmail  com>
AuthorDate: Mon May  8 12:59:51 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Tue May  9 17:50:56 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e16952c

media-libs/embree: Fix arches and REQUIRED_USE

Embree does not support anything else than amd64 and arm64.
The other arches will not compile.

arm64 needs a patch to work on linux in the current 3.x.x release

Closes: https://bugs.gentoo.org/851705
Signed-off-by: Sebastian Parborg  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 media-libs/embree/embree-3.13.5.ebuild | 12 ++---
 .../embree/files/embree-3.13.5-fix-arm64.patch | 53 ++
 2 files changed, 59 insertions(+), 6 deletions(-)

diff --git a/media-libs/embree/embree-3.13.5.ebuild 
b/media-libs/embree/embree-3.13.5.ebuild
index 7b1ffb2691e9..1f94e528f380 100644
--- a/media-libs/embree/embree-3.13.5.ebuild
+++ b/media-libs/embree/embree-3.13.5.ebuild
@@ -11,13 +11,11 @@ 
SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz"
 
 LICENSE="Apache-2.0"
 SLOT="3"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
-X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq )
+KEYWORDS="-* ~amd64 ~arm64"
+X86_CPU_FLAGS=( sse2 sse4_2 avx avx2 avx512dq )
 CPU_FLAGS=( cpu_flags_arm_neon ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} )
-IUSE="+compact-polys ispc +raymask ssp +tbb tutorial ${CPU_FLAGS[@]%:*}"
-# Let's be explicit here even though we could simplify it.
-REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 )
-   x86? ( cpu_flags_x86_sse2 )"
+IUSE="+compact-polys ispc +raymask ssp +tbb tutorial ${CPU_FLAGS[@]}"
+REQUIRED_USE="|| ( ${CPU_FLAGS[@]} )"
 
 BDEPEND="
virtual/pkgconfig
@@ -39,6 +37,7 @@ DOCS=( CHANGELOG.md README.md readme.pdf )
 
 PATCHES=(
"${FILESDIR}"/${PN}-3.13.5-fix-openimageio-test.patch
+   "${FILESDIR}"/${PN}-3.13.5-fix-arm64.patch
 )
 
 pkg_setup() {
@@ -106,6 +105,7 @@ src_configure() {
-DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx)
-DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2)
-DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq)
+   # TODO look into neon 2x support
-DEMBREE_ISA_NEON=$(usex cpu_flags_arm_neon)
-DEMBREE_ISA_SSE2=$(usex cpu_flags_x86_sse2)
-DEMBREE_ISA_SSE42=$(usex cpu_flags_x86_sse4_2)

diff --git a/media-libs/embree/files/embree-3.13.5-fix-arm64.patch 
b/media-libs/embree/files/embree-3.13.5-fix-arm64.patch
new file mode 100644
index ..ae6e39c43e75
--- /dev/null
+++ b/media-libs/embree/files/embree-3.13.5-fix-arm64.patch
@@ -0,0 +1,53 @@
+Based on: 
https://github.com/embree/embree/commit/82ca6b5ccb7abe0403a658a0e079926478f04cb1
+Tested in: https://bugs.gentoo.org/851705
+
+Without this patch, it will only build on ARM Mac computers
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e807351401..e8b08b1247 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -160,11 +160,13 @@ OPTION(EMBREE_MIN_WIDTH "Enables min-width feature to 
enlarge curve and point th
+ # Platform detection and defaults
+ ##
+ 
+-IF (APPLE)
+-  IF (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR 
STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64"))
+-MESSAGE(STATUS "Building for Apple silicon")
+-SET(EMBREE_ARM ON)
+-  ENDIF()
++# detect ARM compilation
++IF (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR 
STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64"))
++  MESSAGE(STATUS "Building for Apple silicon")
++  SET(EMBREE_ARM ON)
++ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
++  MESSAGE(STATUS "Building for AArch64")
++  SET(EMBREE_ARM ON)
+ ENDIF()
+ 
+ SET(EMBREE_TASKING_SYSTEM "TBB" CACHE STRING "Selects tasking system")
+diff --git a/common/cmake/gnu.cmake b/common/cmake/gnu.cmake
+index f36d79ca25..365212bdda 100644
+--- a/common/cmake/gnu.cmake
 b/common/cmake/gnu.cmake
+@@ -26,9 +26,12 @@ IF (EMBREE_IGNORE_CMAKE_CXX_FLAGS)
+ ENDIF()
+ 
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++
+ IF (EMBREE_ARM)
+   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char") # treat 
'char' as 'signed char'
++  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flax-vector-conversions")  # allow 
lax vector type conversions
+ ENDIF (EMBREE_ARM)
++
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")   # 
enables most warnings
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security")  # 
enables string format vulnerability warnings
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess")# 
disables clearing an object of type ‘XXX’ with no trivial copy-assignment; use 
assignment or value-initialization instead
+@@ -89,7 +92,6 @@ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO 
"${CMAKE_CXX_FLAGS_RELWITH

[gentoo-commits] repo/gentoo:master commit in: media-libs/embree/files/, media-libs/embree/

2023-05-01 Thread Sam James
commit: a745fa9c26344a753e39289694f72b9375aaba1f
Author: Sebastian Parborg  gmail  com>
AuthorDate: Mon May  1 11:48:53 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Mon May  1 15:14:22 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a745fa9c

media-libs/embree: Bump to 3.13.5

Signed-off-by: Sebastian Parborg  gmail.com>
Signed-off-by: Sam James  gentoo.org>

 media-libs/embree/Manifest |   1 +
 media-libs/embree/embree-3.13.5.ebuild | 134 +
 .../files/embree-3.13.5-fix-openimageio-test.patch |  71 +++
 3 files changed, 206 insertions(+)

diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest
index a056b4c9a819..514a411dba17 100644
--- a/media-libs/embree/Manifest
+++ b/media-libs/embree/Manifest
@@ -1 +1,2 @@
 DIST embree-3.13.4.tar.gz 13733908 BLAKE2B 
4c6c24f62ee88a09149bd930716c71e91d54563eea5cc103c0346d3808c693e8470fc7ea98651e0df9e4423bda565d7ab1a23e16c9d0441c79e9ec9c8571b0fa
 SHA512 
685c3935fabe1bfa7260ef148df26b686b085b75011d72011461471cbcef786a5ce7a0e85c57b2df05798489a2d4e80a8d3ee5df986029edad7df7511d99c0ca
+DIST embree-3.13.5.tar.gz 13739115 BLAKE2B 
52ad8e3520aa789f7987467c6979be06f883803757e842316ecf708deeed11214dd60570eda5708e701047b1a14ea37710d158df544817dc536bfda444a68218
 SHA512 
13ae19b1750197fb4887ba601c75d1b54b3c388224672b6561dd922bc9b9747139cf46ce554727e3afa13dcf152ce4d703935cb9105ced792b011f2d05fa3e95

diff --git a/media-libs/embree/embree-3.13.5.ebuild 
b/media-libs/embree/embree-3.13.5.ebuild
new file mode 100644
index ..7b1ffb2691e9
--- /dev/null
+++ b/media-libs/embree/embree-3.13.5.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic linux-info
+
+DESCRIPTION="Collection of high-performance ray tracing kernels"
+HOMEPAGE="https://github.com/embree/embree";
+SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="3"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq )
+CPU_FLAGS=( cpu_flags_arm_neon ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} )
+IUSE="+compact-polys ispc +raymask ssp +tbb tutorial ${CPU_FLAGS[@]%:*}"
+# Let's be explicit here even though we could simplify it.
+REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 )
+   x86? ( cpu_flags_x86_sse2 )"
+
+BDEPEND="
+   virtual/pkgconfig
+"
+RDEPEND="
+   >=media-libs/glfw-3.2.1
+   virtual/opengl
+   ispc? ( dev-lang/ispc )
+   tbb? ( dev-cpp/tbb:= )
+   tutorial? (
+   media-libs/libjpeg-turbo
+   >=media-libs/libpng-1.6.34:0=
+   >=media-libs/openimageio-1.8.7:0=
+   )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGELOG.md README.md readme.pdf )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-3.13.5-fix-openimageio-test.patch
+)
+
+pkg_setup() {
+   CONFIG_CHECK="~TRANSPARENT_HUGEPAGE"
+   WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages 
(CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance."
+
+   linux-info_pkg_setup
+}
+
+src_prepare() {
+   cmake_src_prepare
+
+   # disable RPM package building
+   sed -e 's|CPACK_RPM_PACKAGE_RELEASE 1|CPACK_RPM_PACKAGE_RELEASE 0|' \
+   -i CMakeLists.txt || die
+}
+
+src_configure() {
+   # NOTE: You can make embree accept custom CXXFLAGS by turning off
+   # EMBREE_IGNORE_CMAKE_CXX_FLAGS. However, the linking will fail if you 
use
+   # any "m*" compile flags. This is because embree builds modules for the
+   # different supported ISAs and picks the correct one at runtime.
+   # "m*" will pull in cpu instructions that shouldn't be in specific 
modules
+   # and it fails to link properly.
+   # https://github.com/embree/embree/issues/115
+
+   filter-flags -m*
+
+   local mycmakeargs=(
+   # Currently Intel only host their test files on their internal 
network.
+   # So it seems like users can't easily get a hold of these and do
+   # regression testing on their own.
+   -DBUILD_TESTING:BOOL=OFF
+   -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON
+
+   # default
+   -DEMBREE_BACKFACE_CULLING=OFF
+   -DEMBREE_COMPACT_POLYS=$(usex compact-polys)
+
+   # default
+   -DEMBREE_FILTER_FUNCTION=ON
+   # default
+   -DEMBREE_GEOMETRY_CURVE=ON
+   # default
+   -DEMBREE_GEOMETRY_GRID=ON
+   # default
+   -DEMBREE_GEOMETRY_INSTANCE=ON
+   # default
+   -DEMBREE_GEOMETRY_POINT=ON
+   # default
+   -DEMBREE_GEOMETRY_QUAD=ON
+   # default
+   -DEMBREE_GEOMETRY_SUBDIVISION=ON
+   # default
+   -DEMBREE_GEOMETRY_TRIANGL

[gentoo-commits] repo/gentoo:master commit in: media-libs/embree/files/, media-libs/embree/

2022-08-11 Thread Joonas Niilola
commit: 8736545cf858627f6f1725da4bcf375e7216a5bb
Author: Sebastian Parborg  gmail  com>
AuthorDate: Wed Jul 20 15:57:12 2022 +
Commit: Joonas Niilola  gentoo  org>
CommitDate: Thu Aug 11 07:33:18 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8736545c

media-libs/embree: Version bump to 3.13.4

Signed-off-by: Sebastian Parborg  gmail.com>
Signed-off-by: Joonas Niilola  gentoo.org>

 media-libs/embree/Manifest |   1 +
 media-libs/embree/embree-3.13.4.ebuild | 133 +
 .../files/embree-3.13.4-fix-openimageio-test.patch |  71 +++
 3 files changed, 205 insertions(+)

diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest
index 9807f5532831..cf510251420e 100644
--- a/media-libs/embree/Manifest
+++ b/media-libs/embree/Manifest
@@ -1,3 +1,4 @@
 DIST embree-3.13.0.tar.gz 13708421 BLAKE2B 
bace1866d9d6907308d38370347d23b4edb3fe287d093acf35367be1d4548d1df064ed9d46ef928f17af99e335d5fcd7b7285a2bd95707361440547544782080
 SHA512 
3fc4f00151cb9558810c643bf77f3135465d65c4523e08d5289a0fdcb18d4c63a8e805647e4ce208556c4679d44373d817761c1003b1e9dc65a39d5ebf17926f
 DIST embree-3.13.2.tar.gz 13716621 BLAKE2B 
8fd770ea9984a9f5b532f114c7901a67105f95c98a1bad45ed9dc2e312062e22aee26d54bd54ac3c9593fed14d34b03903ac186516682890cfaf9e0714743cce
 SHA512 
9e4912f52c503d8d1fe0c3c81bf8108f1af044bf08d76111e4c1ab434c6a38d33bae9aacfd60c874da76bcc2f909ad1f3f171d458adb7973644cdbfd3693dc0f
 DIST embree-3.13.3.tar.gz 13712462 BLAKE2B 
02edef26b4c4f3676e792c06490e5947d3a2cedd4ce1bbf4731e60feea0b3714bf4bbf9d859d464f179674e4e0c9462d1565869713c5612705df273baa41923f
 SHA512 
eef8d9101f0bf95d6706a495a9aa628c10749862aeb2baa6bba2f82fcc3a96467a28ca1f522d672eb5aa7b29824363674feda25832724da361b3334334a218cd
+DIST embree-3.13.4.tar.gz 13733908 BLAKE2B 
4c6c24f62ee88a09149bd930716c71e91d54563eea5cc103c0346d3808c693e8470fc7ea98651e0df9e4423bda565d7ab1a23e16c9d0441c79e9ec9c8571b0fa
 SHA512 
685c3935fabe1bfa7260ef148df26b686b085b75011d72011461471cbcef786a5ce7a0e85c57b2df05798489a2d4e80a8d3ee5df986029edad7df7511d99c0ca

diff --git a/media-libs/embree/embree-3.13.4.ebuild 
b/media-libs/embree/embree-3.13.4.ebuild
new file mode 100644
index ..7d71777f2596
--- /dev/null
+++ b/media-libs/embree/embree-3.13.4.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic linux-info toolchain-funcs
+
+DESCRIPTION="Collection of high-performance ray tracing kernels"
+HOMEPAGE="https://github.com/embree/embree";
+SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="3"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq )
+CPU_FLAGS=( cpu_flags_arm_neon ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} )
+IUSE="+compact-polys ispc +raymask ssp +tbb tutorial ${CPU_FLAGS[@]%:*}"
+# Let's be explicit here even though we could simplify it.
+REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 ) x86? ( cpu_flags_x86_sse2 )"
+
+BDEPEND="
+   virtual/pkgconfig
+"
+RDEPEND="
+   >=media-libs/glfw-3.2.1
+   virtual/opengl
+   ispc? ( dev-lang/ispc )
+   tbb? ( dev-cpp/tbb:= )
+   tutorial? (
+   media-libs/libjpeg-turbo
+   >=media-libs/libpng-1.6.34:0=
+   >=media-libs/openimageio-1.8.7:0=
+   )
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGELOG.md README.md readme.pdf )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-3.13.4-fix-openimageio-test.patch
+)
+
+pkg_setup() {
+   CONFIG_CHECK="~TRANSPARENT_HUGEPAGE"
+   WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages 
(CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance."
+
+   linux-info_pkg_setup
+}
+
+src_prepare() {
+   cmake_src_prepare
+
+   # disable RPM package building
+   sed -e 's|CPACK_RPM_PACKAGE_RELEASE 1|CPACK_RPM_PACKAGE_RELEASE 0|' \
+   -i CMakeLists.txt || die
+}
+
+src_configure() {
+   # NOTE: You can make embree accept custom CXXFLAGS by turning off
+   # EMBREE_IGNORE_CMAKE_CXX_FLAGS. However, the linking will fail if you 
use
+   # any "m*" compile flags. This is because embree builds modules for the
+   # different supported ISAs and picks the correct one at runtime.
+   # "m*" will pull in cpu instructions that shouldn't be in specific 
modules
+   # and it fails to link properly.
+   # https://github.com/embree/embree/issues/115
+
+   filter-flags -m*
+
+   local mycmakeargs=(
+   # Currently Intel only host their test files on their internal 
network.
+   # So it seems like users can't easily get a hold of these and do
+   # regression testing on their own.
+   -DBUILD_TESTING:BOOL=OFF
+   -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON
+
+   # default
+