commit:     9f7d93e170a89429103972a6bcd03dea3e1f5295
Author:     Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
AuthorDate: Sat Jun  5 20:03:43 2021 +0000
Commit:     Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com>
CommitDate: Sat Jun  5 20:05:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9f7d93e1

media-libs/embree: New Package

Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Ross Charles Campbell <rossbridger.cc <AT> gmail.com>

 media-libs/embree/Manifest             |   1 +
 media-libs/embree/embree-3.13.0.ebuild | 111 +++++++++++++++++++++++++++++++++
 media-libs/embree/files/99embree3      |   1 +
 media-libs/embree/metadata.xml         |  26 ++++++++
 4 files changed, 139 insertions(+)

diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest
new file mode 100644
index 000000000..cc27e4a85
--- /dev/null
+++ b/media-libs/embree/Manifest
@@ -0,0 +1 @@
+DIST embree-3.13.0.tar.gz 13708421 BLAKE2B 
bace1866d9d6907308d38370347d23b4edb3fe287d093acf35367be1d4548d1df064ed9d46ef928f17af99e335d5fcd7b7285a2bd95707361440547544782080
 SHA512 
3fc4f00151cb9558810c643bf77f3135465d65c4523e08d5289a0fdcb18d4c63a8e805647e4ce208556c4679d44373d817761c1003b1e9dc65a39d5ebf17926f

diff --git a/media-libs/embree/embree-3.13.0.ebuild 
b/media-libs/embree/embree-3.13.0.ebuild
new file mode 100644
index 000000000..cfe9fd0d5
--- /dev/null
+++ b/media-libs/embree/embree-3.13.0.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake flag-o-matic linux-info toolchain-funcs
+
+DESCRIPTION="Collection of high-performance ray tracing kernels"
+HOMEPAGE="https://github.com/embree/embree";
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 -*"
+SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SLOT="3"
+ARM_CPU_FLAGS=( neon:neon )
+X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq )
+CPU_FLAGS=( ${ARM_CPU_FLAGS[@]/#/cpu_flags_arm_} 
${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} )
+IUSE="+compact-polys ispc raymask ssp static-libs +tbb tutorial 
${CPU_FLAGS[@]%:*}"
+
+BDEPEND="
+       virtual/pkgconfig
+"
+RDEPEND="
+       amd64? ( ispc? ( dev-lang/ispc ) )
+       x86? ( ispc? ( dev-lang/ispc ) )
+       media-libs/glfw
+       tbb? ( dev-cpp/tbb )
+       tutorial? (
+               media-libs/libpng:0=
+               media-libs/openimageio
+               virtual/jpeg:0
+       )
+       virtual/opengl
+"
+DEPEND="${RDEPEND}"
+REQUIRED_USE="
+       arm? ( !ispc )
+       arm64? ( !ispc )"
+
+DOCS=( CHANGELOG.md README.md readme.pdf )
+CMAKE_BUILD_TYPE=Release
+
+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() {
+       local mycmakeargs=(
+               -DBUILD_TESTING=OFF
+               -DCMAKE_SKIP_INSTALL_RPATH=ON
+               -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF
+               -DEMBREE_BACKFACE_CULLING=OFF                   # 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_TRIANGLE=ON                   # default
+               -DEMBREE_GEOMETRY_USER=ON                       # default
+               -DEMBREE_IGNORE_INVALID_RAYS=OFF                # default
+               -DEMBREE_ISPC_SUPPORT=$(usex ispc)
+               -DEMBREE_RAY_MASK=$(usex raymask)
+               -DEMBREE_RAY_PACKETS=ON                         # default
+               -DEMBREE_STACK_PROTECTOR=$(usex ssp)
+               -DEMBREE_STATIC_LIB=$(usex static-libs)
+               -DEMBREE_COMPACT_POLYS=$(usex compact-polys)
+               -DEMBREE_STAT_COUNTERS=OFF
+               -DEMBREE_TASKING_SYSTEM=$(usex tbb "TBB" "INTERNAL")
+               -DEMBREE_TUTORIALS=$(usex tutorial) )
+
+       if use tutorial; then
+               mycmakeargs+=(
+                       -DEMBREE_ISPC_ADDRESSING=64
+                       -DEMBREE_TUTORIALS_LIBJPEG=ON
+                       -DEMBREE_TUTORIALS_LIBPNG=ON
+                       -DEMBREE_TUTORIALS_OPENIMAGEIO=ON
+               )
+       fi
+
+       # Set supported ISA
+       mycmakeargs+=(
+               -DEMBREE_MAX_ISA=NONE
+               -DEMBREE_ISA_NEON=$(usex cpu_flags_arm_neon)
+               -DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq)
+               -DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2)
+               -DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx)
+               -DEMBREE_ISA_SSE42=$(usex cpu_flags_x86_sse4_2)
+               -DEMBREE_ISA_SSE2=$(usex cpu_flags_x86_sse2)
+       )
+
+       tc-export CC CXX
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       doenvd "${FILESDIR}"/99${PN}${SLOT}
+}

diff --git a/media-libs/embree/files/99embree3 
b/media-libs/embree/files/99embree3
new file mode 100644
index 000000000..762f8fd08
--- /dev/null
+++ b/media-libs/embree/files/99embree3
@@ -0,0 +1 @@
+CPATH="/usr/include/embree3"
\ No newline at end of file

diff --git a/media-libs/embree/metadata.xml b/media-libs/embree/metadata.xml
new file mode 100644
index 000000000..3ff2c9630
--- /dev/null
+++ b/media-libs/embree/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>rossbridger...@gmail.com</email>
+               <name>Ross Charles Campbell</name>
+       </maintainer>
+       <longdescription>
+Intel® Embree is a collection of high-performance ray tracing kernels, 
developed at Intel. The target users of Intel® Embree are graphics application
+engineers who want to improve the performance of their photo-realistic 
rendering application by leveraging Embree's performance-optimized ray tracing
+kernels. The kernels are optimized for the latest Intel® processors with 
support for SSE, AVX, AVX2, and AVX-512 instructions. Intel® Embree supports
+runtime code selection to choose the traversal and build algorithms that best 
matches the instruction set of your CPU. We recommend using Intel®
+Embree through its API to get the highest benefit from future improvements.
+       </longdescription>
+       <use>
+               <flag name="compact-polys">Enables compact tris/quads, i.e. 
only geomIDs and primIDs are stored inside the leaf nodes</flag>
+               <flag name="ispc">Enables ISPC support for Embree 
through<pkg>dev-lang/ispc</pkg></flag>
+               <flag name="raymask"> Enable the ray masking feature </flag>
+               <flag name="ssp">Enables protection of return address from 
buffer overwrites </flag>
+               <flag name="tbb">Use Intel's threading 
library<pkg>dev-cpp/tbb</pkg></flag>
+               <flag name="tutorial"> Compile and install the Embree tutorials 
</flag>
+       </use>
+       <upstream>
+               <remote-id type="github">embree/embree</remote-id>
+       </upstream>
+</pkgmetadata>

Reply via email to