1 |
commit: 9f7d93e170a89429103972a6bcd03dea3e1f5295 |
2 |
Author: Ross Charles Campbell <rossbridger.cc <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jun 5 20:03:43 2021 +0000 |
4 |
Commit: Jian Lin <jlin.gentoo <AT> outlook <DOT> com> |
5 |
CommitDate: Sat Jun 5 20:05:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9f7d93e1 |
7 |
|
8 |
media-libs/embree: New Package |
9 |
|
10 |
Package-Manager: Portage-3.0.19, Repoman-3.0.3 |
11 |
Signed-off-by: Ross Charles Campbell <rossbridger.cc <AT> gmail.com> |
12 |
|
13 |
media-libs/embree/Manifest | 1 + |
14 |
media-libs/embree/embree-3.13.0.ebuild | 111 +++++++++++++++++++++++++++++++++ |
15 |
media-libs/embree/files/99embree3 | 1 + |
16 |
media-libs/embree/metadata.xml | 26 ++++++++ |
17 |
4 files changed, 139 insertions(+) |
18 |
|
19 |
diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000..cc27e4a85 |
22 |
--- /dev/null |
23 |
+++ b/media-libs/embree/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST embree-3.13.0.tar.gz 13708421 BLAKE2B bace1866d9d6907308d38370347d23b4edb3fe287d093acf35367be1d4548d1df064ed9d46ef928f17af99e335d5fcd7b7285a2bd95707361440547544782080 SHA512 3fc4f00151cb9558810c643bf77f3135465d65c4523e08d5289a0fdcb18d4c63a8e805647e4ce208556c4679d44373d817761c1003b1e9dc65a39d5ebf17926f |
26 |
|
27 |
diff --git a/media-libs/embree/embree-3.13.0.ebuild b/media-libs/embree/embree-3.13.0.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000..cfe9fd0d5 |
30 |
--- /dev/null |
31 |
+++ b/media-libs/embree/embree-3.13.0.ebuild |
32 |
@@ -0,0 +1,111 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+inherit cmake flag-o-matic linux-info toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="Collection of high-performance ray tracing kernels" |
41 |
+HOMEPAGE="https://github.com/embree/embree" |
42 |
+LICENSE="Apache-2.0" |
43 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 -*" |
44 |
+SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+SLOT="3" |
46 |
+ARM_CPU_FLAGS=( neon:neon ) |
47 |
+X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq ) |
48 |
+CPU_FLAGS=( ${ARM_CPU_FLAGS[@]/#/cpu_flags_arm_} ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} ) |
49 |
+IUSE="+compact-polys ispc raymask ssp static-libs +tbb tutorial ${CPU_FLAGS[@]%:*}" |
50 |
+ |
51 |
+BDEPEND=" |
52 |
+ virtual/pkgconfig |
53 |
+" |
54 |
+RDEPEND=" |
55 |
+ amd64? ( ispc? ( dev-lang/ispc ) ) |
56 |
+ x86? ( ispc? ( dev-lang/ispc ) ) |
57 |
+ media-libs/glfw |
58 |
+ tbb? ( dev-cpp/tbb ) |
59 |
+ tutorial? ( |
60 |
+ media-libs/libpng:0= |
61 |
+ media-libs/openimageio |
62 |
+ virtual/jpeg:0 |
63 |
+ ) |
64 |
+ virtual/opengl |
65 |
+" |
66 |
+DEPEND="${RDEPEND}" |
67 |
+REQUIRED_USE=" |
68 |
+ arm? ( !ispc ) |
69 |
+ arm64? ( !ispc )" |
70 |
+ |
71 |
+DOCS=( CHANGELOG.md README.md readme.pdf ) |
72 |
+CMAKE_BUILD_TYPE=Release |
73 |
+ |
74 |
+pkg_setup() { |
75 |
+ CONFIG_CHECK="~TRANSPARENT_HUGEPAGE" |
76 |
+ WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages (CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance." |
77 |
+ linux-info_pkg_setup |
78 |
+} |
79 |
+ |
80 |
+src_prepare() { |
81 |
+ cmake_src_prepare |
82 |
+ |
83 |
+ # disable RPM package building |
84 |
+ sed -e 's|CPACK_RPM_PACKAGE_RELEASE 1|CPACK_RPM_PACKAGE_RELEASE 0|' \ |
85 |
+ -i CMakeLists.txt || die |
86 |
+} |
87 |
+ |
88 |
+src_configure() { |
89 |
+ local mycmakeargs=( |
90 |
+ -DBUILD_TESTING=OFF |
91 |
+ -DCMAKE_SKIP_INSTALL_RPATH=ON |
92 |
+ -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF |
93 |
+ -DEMBREE_BACKFACE_CULLING=OFF # default |
94 |
+ -DEMBREE_FILTER_FUNCTION=ON # default |
95 |
+ -DEMBREE_GEOMETRY_CURVE=ON # default |
96 |
+ -DEMBREE_GEOMETRY_GRID=ON # default |
97 |
+ -DEMBREE_GEOMETRY_INSTANCE=ON # default |
98 |
+ -DEMBREE_GEOMETRY_POINT=ON # default |
99 |
+ -DEMBREE_GEOMETRY_QUAD=ON # default |
100 |
+ -DEMBREE_GEOMETRY_SUBDIVISION=ON # default |
101 |
+ -DEMBREE_GEOMETRY_TRIANGLE=ON # default |
102 |
+ -DEMBREE_GEOMETRY_USER=ON # default |
103 |
+ -DEMBREE_IGNORE_INVALID_RAYS=OFF # default |
104 |
+ -DEMBREE_ISPC_SUPPORT=$(usex ispc) |
105 |
+ -DEMBREE_RAY_MASK=$(usex raymask) |
106 |
+ -DEMBREE_RAY_PACKETS=ON # default |
107 |
+ -DEMBREE_STACK_PROTECTOR=$(usex ssp) |
108 |
+ -DEMBREE_STATIC_LIB=$(usex static-libs) |
109 |
+ -DEMBREE_COMPACT_POLYS=$(usex compact-polys) |
110 |
+ -DEMBREE_STAT_COUNTERS=OFF |
111 |
+ -DEMBREE_TASKING_SYSTEM=$(usex tbb "TBB" "INTERNAL") |
112 |
+ -DEMBREE_TUTORIALS=$(usex tutorial) ) |
113 |
+ |
114 |
+ if use tutorial; then |
115 |
+ mycmakeargs+=( |
116 |
+ -DEMBREE_ISPC_ADDRESSING=64 |
117 |
+ -DEMBREE_TUTORIALS_LIBJPEG=ON |
118 |
+ -DEMBREE_TUTORIALS_LIBPNG=ON |
119 |
+ -DEMBREE_TUTORIALS_OPENIMAGEIO=ON |
120 |
+ ) |
121 |
+ fi |
122 |
+ |
123 |
+ # Set supported ISA |
124 |
+ mycmakeargs+=( |
125 |
+ -DEMBREE_MAX_ISA=NONE |
126 |
+ -DEMBREE_ISA_NEON=$(usex cpu_flags_arm_neon) |
127 |
+ -DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq) |
128 |
+ -DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2) |
129 |
+ -DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx) |
130 |
+ -DEMBREE_ISA_SSE42=$(usex cpu_flags_x86_sse4_2) |
131 |
+ -DEMBREE_ISA_SSE2=$(usex cpu_flags_x86_sse2) |
132 |
+ ) |
133 |
+ |
134 |
+ tc-export CC CXX |
135 |
+ |
136 |
+ cmake_src_configure |
137 |
+} |
138 |
+ |
139 |
+src_install() { |
140 |
+ cmake_src_install |
141 |
+ |
142 |
+ doenvd "${FILESDIR}"/99${PN}${SLOT} |
143 |
+} |
144 |
|
145 |
diff --git a/media-libs/embree/files/99embree3 b/media-libs/embree/files/99embree3 |
146 |
new file mode 100644 |
147 |
index 000000000..762f8fd08 |
148 |
--- /dev/null |
149 |
+++ b/media-libs/embree/files/99embree3 |
150 |
@@ -0,0 +1 @@ |
151 |
+CPATH="/usr/include/embree3" |
152 |
\ No newline at end of file |
153 |
|
154 |
diff --git a/media-libs/embree/metadata.xml b/media-libs/embree/metadata.xml |
155 |
new file mode 100644 |
156 |
index 000000000..3ff2c9630 |
157 |
--- /dev/null |
158 |
+++ b/media-libs/embree/metadata.xml |
159 |
@@ -0,0 +1,26 @@ |
160 |
+<?xml version="1.0" encoding="UTF-8"?> |
161 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
162 |
+<pkgmetadata> |
163 |
+ <maintainer type="person"> |
164 |
+ <email>rossbridger.cc@×××××.com</email> |
165 |
+ <name>Ross Charles Campbell</name> |
166 |
+ </maintainer> |
167 |
+ <longdescription> |
168 |
+Intel® Embree is a collection of high-performance ray tracing kernels, developed at Intel. The target users of Intel® Embree are graphics application |
169 |
+engineers who want to improve the performance of their photo-realistic rendering application by leveraging Embree's performance-optimized ray tracing |
170 |
+kernels. The kernels are optimized for the latest Intel® processors with support for SSE, AVX, AVX2, and AVX-512 instructions. Intel® Embree supports |
171 |
+runtime code selection to choose the traversal and build algorithms that best matches the instruction set of your CPU. We recommend using Intel® |
172 |
+Embree through its API to get the highest benefit from future improvements. |
173 |
+ </longdescription> |
174 |
+ <use> |
175 |
+ <flag name="compact-polys">Enables compact tris/quads, i.e. only geomIDs and primIDs are stored inside the leaf nodes</flag> |
176 |
+ <flag name="ispc">Enables ISPC support for Embree through<pkg>dev-lang/ispc</pkg></flag> |
177 |
+ <flag name="raymask"> Enable the ray masking feature </flag> |
178 |
+ <flag name="ssp">Enables protection of return address from buffer overwrites </flag> |
179 |
+ <flag name="tbb">Use Intel's threading library<pkg>dev-cpp/tbb</pkg></flag> |
180 |
+ <flag name="tutorial"> Compile and install the Embree tutorials </flag> |
181 |
+ </use> |
182 |
+ <upstream> |
183 |
+ <remote-id type="github">embree/embree</remote-id> |
184 |
+ </upstream> |
185 |
+</pkgmetadata> |