1 |
commit: b3c1f19a681667a0ed090285f039ec6425eb38d8 |
2 |
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Apr 28 00:50:48 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 10 00:19:19 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3c1f19a |
7 |
|
8 |
media-libs/embree: New package |
9 |
|
10 |
Embree is a collection of high-performance ray tracing kernels, |
11 |
developed at Intel. The target users of Embree are graphics application |
12 |
engineers who want to improve the performance of their photo-realistic |
13 |
rendering application by leveraging Embree's performance-optimized ray |
14 |
tracing kernels. |
15 |
|
16 |
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com> |
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
|
19 |
media-libs/embree/Manifest | 1 + |
20 |
media-libs/embree/embree-3.13.0.ebuild | 107 +++++++++++++++++++++++++++++++++ |
21 |
media-libs/embree/metadata.xml | 42 +++++++++++++ |
22 |
3 files changed, 150 insertions(+) |
23 |
|
24 |
diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest |
25 |
new file mode 100644 |
26 |
index 00000000000..cc27e4a85af |
27 |
--- /dev/null |
28 |
+++ b/media-libs/embree/Manifest |
29 |
@@ -0,0 +1 @@ |
30 |
+DIST embree-3.13.0.tar.gz 13708421 BLAKE2B bace1866d9d6907308d38370347d23b4edb3fe287d093acf35367be1d4548d1df064ed9d46ef928f17af99e335d5fcd7b7285a2bd95707361440547544782080 SHA512 3fc4f00151cb9558810c643bf77f3135465d65c4523e08d5289a0fdcb18d4c63a8e805647e4ce208556c4679d44373d817761c1003b1e9dc65a39d5ebf17926f |
31 |
|
32 |
diff --git a/media-libs/embree/embree-3.13.0.ebuild b/media-libs/embree/embree-3.13.0.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..548f969a2cf |
35 |
--- /dev/null |
36 |
+++ b/media-libs/embree/embree-3.13.0.ebuild |
37 |
@@ -0,0 +1,107 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+ |
43 |
+inherit cmake flag-o-matic linux-info toolchain-funcs |
44 |
+ |
45 |
+DESCRIPTION="Collection of high-performance ray tracing kernels" |
46 |
+HOMEPAGE="https://github.com/embree/embree" |
47 |
+LICENSE="Apache-2.0" |
48 |
+KEYWORDS="~amd64 ~x86" |
49 |
+SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
50 |
+SLOT="3" |
51 |
+X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq ) |
52 |
+CPU_FLAGS=( ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} ) |
53 |
+IUSE="+compact-polys ispc raymask ssp +tbb tutorial static-libs ${CPU_FLAGS[@]%:*}" |
54 |
+BDEPEND=" |
55 |
+ virtual/pkgconfig |
56 |
+" |
57 |
+RDEPEND=" |
58 |
+ ispc? ( dev-lang/ispc ) |
59 |
+ >=media-libs/glfw-3.2.1 |
60 |
+ tbb? ( dev-cpp/tbb ) |
61 |
+ tutorial? ( |
62 |
+ >=media-libs/libpng-1.6.34:0= |
63 |
+ >=media-libs/openimageio-1.8.7 |
64 |
+ virtual/jpeg:0 |
65 |
+ ) |
66 |
+ virtual/opengl |
67 |
+" |
68 |
+DEPEND="${RDEPEND}" |
69 |
+RESTRICT="mirror" |
70 |
+DOCS=( CHANGELOG.md README.md readme.pdf ) |
71 |
+ |
72 |
+pkg_setup() { |
73 |
+ CONFIG_CHECK="~TRANSPARENT_HUGEPAGE" |
74 |
+ WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages (CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance." |
75 |
+ linux-info_pkg_setup |
76 |
+ |
77 |
+ if ! ( cat /proc/cpuinfo | grep sse2 > /dev/null ) ; then |
78 |
+ die "You need a CPU with at least sse2 support" |
79 |
+ fi |
80 |
+} |
81 |
+ |
82 |
+src_prepare() { |
83 |
+ cmake_src_prepare |
84 |
+ |
85 |
+ # disable RPM package building |
86 |
+ sed -e 's|CPACK_RPM_PACKAGE_RELEASE 1|CPACK_RPM_PACKAGE_RELEASE 0|' \ |
87 |
+ -i CMakeLists.txt || die |
88 |
+} |
89 |
+ |
90 |
+src_configure() { |
91 |
+ # NOTE: You can make embree accept custom CXXFLAGS by turning off |
92 |
+ # EMBREE_IGNORE_CMAKE_CXX_FLAGS. However, the linking will fail if you use |
93 |
+ # any "march" compile flags. This is because embree builds modules for the |
94 |
+ # different supported ISAs and picks the correct one at runtime. |
95 |
+ # "march" will pull in cpu instructions that shouldn't be in specific modules |
96 |
+ # and it fails to link properly. |
97 |
+ # https://github.com/embree/embree/issues/115 |
98 |
+ |
99 |
+ filter-flags -march=* |
100 |
+ |
101 |
+ local mycmakeargs=( |
102 |
+ -DBUILD_TESTING:BOOL=OFF |
103 |
+ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON |
104 |
+ -DEMBREE_BACKFACE_CULLING=OFF # default |
105 |
+ -DEMBREE_COMPACT_POLYS=$(usex compact-polys) |
106 |
+ -DEMBREE_FILTER_FUNCTION=ON # default |
107 |
+ -DEMBREE_GEOMETRY_CURVE=ON # default |
108 |
+ -DEMBREE_GEOMETRY_GRID=ON # default |
109 |
+ -DEMBREE_GEOMETRY_INSTANCE=ON # default |
110 |
+ -DEMBREE_GEOMETRY_POINT=ON # default |
111 |
+ -DEMBREE_GEOMETRY_QUAD=ON # default |
112 |
+ -DEMBREE_GEOMETRY_SUBDIVISION=ON # default |
113 |
+ -DEMBREE_GEOMETRY_TRIANGLE=ON # default |
114 |
+ -DEMBREE_GEOMETRY_USER=ON # default |
115 |
+ -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF |
116 |
+ -DEMBREE_IGNORE_INVALID_RAYS=OFF # default |
117 |
+ -DEMBREE_MAX_ISA:STRING="NONE" # Set to NONE so we can manually switch on ISAs below |
118 |
+ -DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx) |
119 |
+ -DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2) |
120 |
+ -DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq) |
121 |
+ -DEMBREE_ISA_SSE2=$(usex cpu_flags_x86_sse2) |
122 |
+ -DEMBREE_ISA_SSE42=$(usex cpu_flags_x86_sse4_2) |
123 |
+ -DEMBREE_ISPC_SUPPORT=$(usex ispc) |
124 |
+ -DEMBREE_RAY_MASK=$(usex raymask) |
125 |
+ -DEMBREE_RAY_PACKETS=ON # default |
126 |
+ -DEMBREE_STACK_PROTECTOR=$(usex ssp) |
127 |
+ -DEMBREE_STATIC_LIB=$(usex static-libs) |
128 |
+ -DEMBREE_STAT_COUNTERS=OFF |
129 |
+ -DEMBREE_TASKING_SYSTEM:STRING=$(usex tbb "TBB" "INTERNAL") |
130 |
+ -DEMBREE_TUTORIALS=$(usex tutorial) ) |
131 |
+ |
132 |
+ # Disable asserts |
133 |
+ append-flags -DNDEBUG |
134 |
+ |
135 |
+ if use tutorial; then |
136 |
+ mycmakeargs+=( |
137 |
+ -DEMBREE_ISPC_ADDRESSING:STRING="64" |
138 |
+ -DEMBREE_TUTORIALS_LIBJPEG=ON |
139 |
+ -DEMBREE_TUTORIALS_LIBPNG=ON |
140 |
+ -DEMBREE_TUTORIALS_OPENIMAGEIO=ON ) |
141 |
+ fi |
142 |
+ |
143 |
+ cmake_src_configure |
144 |
+} |
145 |
|
146 |
diff --git a/media-libs/embree/metadata.xml b/media-libs/embree/metadata.xml |
147 |
new file mode 100644 |
148 |
index 00000000000..9fb89375a78 |
149 |
--- /dev/null |
150 |
+++ b/media-libs/embree/metadata.xml |
151 |
@@ -0,0 +1,42 @@ |
152 |
+<?xml version="1.0" encoding="UTF-8"?> |
153 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
154 |
+<pkgmetadata> |
155 |
+ <maintainer type="person" proxied="yes"> |
156 |
+ <email>darkdefende@×××××.com</email> |
157 |
+ <name>Sebastian Parborg</name> |
158 |
+ </maintainer> |
159 |
+ <maintainer type="project" proxied="proxy"> |
160 |
+ <email>proxy-maint@g.o</email> |
161 |
+ <name>Proxy Maintainers</name> |
162 |
+ </maintainer> |
163 |
+ <longdescription> |
164 |
+ Intel® Embree is a collection of high-performance ray tracing kernels, |
165 |
+ developed at Intel. The target users of Intel® Embree are graphics |
166 |
+ application engineers who want to improve the performance of their |
167 |
+ photo-realistic rendering application by leveraging Embree's |
168 |
+ performance-optimized ray tracing kernels. |
169 |
+ </longdescription> |
170 |
+ <use> |
171 |
+ <flag restrict=">=media-libs/embree-3.12.2" name="compact-polys"> |
172 |
+ Enables double indexed poly layout. |
173 |
+ </flag> |
174 |
+ <flag restrict=">=media-libs/embree-3.12.2" name="ssp"> |
175 |
+ When enabled, Embree compiles with stack protection against return address overrides. |
176 |
+ </flag> |
177 |
+ <flag restrict=">=media-libs/embree-3.12.2" name="ispc"> |
178 |
+ Build Embree with support for ISPC applications. |
179 |
+ </flag> |
180 |
+ <flag restrict=">=media-libs/embree-3.12.2" name="raymask"> |
181 |
+ Enables ray mask support. |
182 |
+ </flag> |
183 |
+ <flag restrict=">=media-libs/embree-3.12.2" name="tbb"> |
184 |
+ Use TBB instead of the built-in Embree tasking system. |
185 |
+ </flag> |
186 |
+ <flag restrict=">=media-libs/embree-3.12.2" name="tutorial"> |
187 |
+ Enable to build Embree tutorials programs. |
188 |
+ </flag> |
189 |
+ </use> |
190 |
+ <upstream> |
191 |
+ <remote-id type="github">embree/embree</remote-id> |
192 |
+ </upstream> |
193 |
+</pkgmetadata> |