diff options
Diffstat (limited to 'media-libs/embree')
-rw-r--r-- | media-libs/embree/Manifest | 3 | ||||
-rw-r--r-- | media-libs/embree/embree-3.13.0.ebuild | 107 | ||||
-rw-r--r-- | media-libs/embree/metadata.xml | 42 |
3 files changed, 152 insertions, 0 deletions
diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest new file mode 100644 index 000000000000..1e82bbc6dba3 --- /dev/null +++ b/media-libs/embree/Manifest @@ -0,0 +1,3 @@ +DIST embree-3.13.0.tar.gz 13708421 BLAKE2B bace1866d9d6907308d38370347d23b4edb3fe287d093acf35367be1d4548d1df064ed9d46ef928f17af99e335d5fcd7b7285a2bd95707361440547544782080 SHA512 3fc4f00151cb9558810c643bf77f3135465d65c4523e08d5289a0fdcb18d4c63a8e805647e4ce208556c4679d44373d817761c1003b1e9dc65a39d5ebf17926f +EBUILD embree-3.13.0.ebuild 3465 BLAKE2B b5e4e31760538f51c50ba1526ee29eebdab8c5ee720267ec65457d31112ac481c45fc76413460bb327975a79e7c89023b8d3c40bd14855e994d6bf3aabbeba11 SHA512 a9fee50a34340c78b0c21c6128fcb53f1f59e351557ede13bea0e9f2b54641b639911b2850c707f2248357bbcc54bb00b712af07263f17f7f2276a9bbe4d42a2 +MISC metadata.xml 1613 BLAKE2B 916b6146240c4615a8baa634e74b5548bc9bb3951754e29fcc1c7bbde5e0bf149b78aa188ae90f96e6f5635c849bdcddb53c71207f5404f3b13f919824026129 SHA512 0b12bb93ffa005da30ee1c7106d2adffd82fafe66d5fded8b199ab77392773db03cd88e380a2b861bcf502275deb1e2467c7637b7548356c8487387b532cb7e1 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 000000000000..7fb5564741fa --- /dev/null +++ b/media-libs/embree/embree-3.13.0.ebuild @@ -0,0 +1,107 @@ +# 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 ~x86" +SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SLOT="3" +X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq ) +CPU_FLAGS=( ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} ) +IUSE="+compact-polys ispc +raymask ssp +tbb tutorial static-libs ${CPU_FLAGS[@]%:*}" +BDEPEND=" + virtual/pkgconfig +" +RDEPEND=" + ispc? ( dev-lang/ispc ) + >=media-libs/glfw-3.2.1 + tbb? ( dev-cpp/tbb ) + tutorial? ( + >=media-libs/libpng-1.6.34:0= + >=media-libs/openimageio-1.8.7 + virtual/jpeg:0 + ) + virtual/opengl +" +DEPEND="${RDEPEND}" +RESTRICT="mirror" +DOCS=( CHANGELOG.md README.md readme.pdf ) + +pkg_setup() { + CONFIG_CHECK="~TRANSPARENT_HUGEPAGE" + WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages (CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance." + linux-info_pkg_setup + + if ! ( cat /proc/cpuinfo | grep sse2 > /dev/null ) ; then + die "You need a CPU with at least sse2 support" + fi +} + +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 "march" compile flags. This is because embree builds modules for the + # different supported ISAs and picks the correct one at runtime. + # "march" 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 -march=* + + local mycmakeargs=( + -DBUILD_TESTING:BOOL=OFF + -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON + -DEMBREE_BACKFACE_CULLING=OFF # default + -DEMBREE_COMPACT_POLYS=$(usex compact-polys) + -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_CMAKE_CXX_FLAGS=OFF + -DEMBREE_IGNORE_INVALID_RAYS=OFF # default + -DEMBREE_MAX_ISA:STRING="NONE" # Set to NONE so we can manually switch on ISAs below + -DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx) + -DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2) + -DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq) + -DEMBREE_ISA_SSE2=$(usex cpu_flags_x86_sse2) + -DEMBREE_ISA_SSE42=$(usex cpu_flags_x86_sse4_2) + -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_STAT_COUNTERS=OFF + -DEMBREE_TASKING_SYSTEM:STRING=$(usex tbb "TBB" "INTERNAL") + -DEMBREE_TUTORIALS=$(usex tutorial) ) + + # Disable asserts + append-flags -DNDEBUG + + if use tutorial; then + mycmakeargs+=( + -DEMBREE_ISPC_ADDRESSING:STRING="64" + -DEMBREE_TUTORIALS_LIBJPEG=ON + -DEMBREE_TUTORIALS_LIBPNG=ON + -DEMBREE_TUTORIALS_OPENIMAGEIO=ON ) + fi + + cmake_src_configure +} diff --git a/media-libs/embree/metadata.xml b/media-libs/embree/metadata.xml new file mode 100644 index 000000000000..9fb89375a782 --- /dev/null +++ b/media-libs/embree/metadata.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>darkdefende@gmail.com</email> + <name>Sebastian Parborg</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</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. + </longdescription> + <use> + <flag restrict=">=media-libs/embree-3.12.2" name="compact-polys"> + Enables double indexed poly layout. + </flag> + <flag restrict=">=media-libs/embree-3.12.2" name="ssp"> + When enabled, Embree compiles with stack protection against return address overrides. + </flag> + <flag restrict=">=media-libs/embree-3.12.2" name="ispc"> + Build Embree with support for ISPC applications. + </flag> + <flag restrict=">=media-libs/embree-3.12.2" name="raymask"> + Enables ray mask support. + </flag> + <flag restrict=">=media-libs/embree-3.12.2" name="tbb"> + Use TBB instead of the built-in Embree tasking system. + </flag> + <flag restrict=">=media-libs/embree-3.12.2" name="tutorial"> + Enable to build Embree tutorials programs. + </flag> + </use> + <upstream> + <remote-id type="github">embree/embree</remote-id> + </upstream> +</pkgmetadata> |