1 |
commit: a610f8dcd1293282cd6548172fbc4c501ecc4027 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 23 21:35:34 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 23 21:35:49 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a610f8dc |
7 |
|
8 |
media-libs/embree: add 3.13.2 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
media-libs/embree/Manifest | 1 + |
13 |
media-libs/embree/embree-3.13.2.ebuild | 132 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 133 insertions(+) |
15 |
|
16 |
diff --git a/media-libs/embree/Manifest b/media-libs/embree/Manifest |
17 |
index cc27e4a85af7..f7fae53b125f 100644 |
18 |
--- a/media-libs/embree/Manifest |
19 |
+++ b/media-libs/embree/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST embree-3.13.0.tar.gz 13708421 BLAKE2B bace1866d9d6907308d38370347d23b4edb3fe287d093acf35367be1d4548d1df064ed9d46ef928f17af99e335d5fcd7b7285a2bd95707361440547544782080 SHA512 3fc4f00151cb9558810c643bf77f3135465d65c4523e08d5289a0fdcb18d4c63a8e805647e4ce208556c4679d44373d817761c1003b1e9dc65a39d5ebf17926f |
22 |
+DIST embree-3.13.2.tar.gz 13716621 BLAKE2B 8fd770ea9984a9f5b532f114c7901a67105f95c98a1bad45ed9dc2e312062e22aee26d54bd54ac3c9593fed14d34b03903ac186516682890cfaf9e0714743cce SHA512 9e4912f52c503d8d1fe0c3c81bf8108f1af044bf08d76111e4c1ab434c6a38d33bae9aacfd60c874da76bcc2f909ad1f3f171d458adb7973644cdbfd3693dc0f |
23 |
|
24 |
diff --git a/media-libs/embree/embree-3.13.2.ebuild b/media-libs/embree/embree-3.13.2.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..94efef93e9b9 |
27 |
--- /dev/null |
28 |
+++ b/media-libs/embree/embree-3.13.2.ebuild |
29 |
@@ -0,0 +1,132 @@ |
30 |
+# Copyright 1999-2021 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+inherit cmake flag-o-matic linux-info toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="Collection of high-performance ray tracing kernels" |
38 |
+HOMEPAGE="https://github.com/embree/embree" |
39 |
+SRC_URI="https://github.com/embree/embree/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="Apache-2.0" |
42 |
+SLOT="3" |
43 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
44 |
+X86_CPU_FLAGS=( sse2:sse2 sse4_2:sse4_2 avx:avx avx2:avx2 avx512dq:avx512dq ) |
45 |
+CPU_FLAGS=( cpu_flags_arm_neon ${X86_CPU_FLAGS[@]/#/cpu_flags_x86_} ) |
46 |
+IUSE="+compact-polys ispc +raymask ssp +tbb tutorial static-libs ${CPU_FLAGS[@]%:*}" |
47 |
+# Let's be explicit here even though we could simplify it. |
48 |
+REQUIRED_USE="amd64? ( cpu_flags_x86_sse2 ) x86? ( cpu_flags_x86_sse2 )" |
49 |
+ |
50 |
+RESTRICT="mirror" |
51 |
+ |
52 |
+BDEPEND=" |
53 |
+ virtual/pkgconfig |
54 |
+" |
55 |
+RDEPEND=" |
56 |
+ >=media-libs/glfw-3.2.1 |
57 |
+ virtual/opengl |
58 |
+ ispc? ( dev-lang/ispc ) |
59 |
+ tbb? ( dev-cpp/tbb:= ) |
60 |
+ tutorial? ( |
61 |
+ >=media-libs/libpng-1.6.34:0= |
62 |
+ >=media-libs/openimageio-1.8.7:0= |
63 |
+ virtual/jpeg:0 |
64 |
+ ) |
65 |
+" |
66 |
+DEPEND="${RDEPEND}" |
67 |
+ |
68 |
+DOCS=( CHANGELOG.md README.md readme.pdf ) |
69 |
+ |
70 |
+pkg_setup() { |
71 |
+ CONFIG_CHECK="~TRANSPARENT_HUGEPAGE" |
72 |
+ WARNING_TRANSPARENT_HUGEPAGE="Not enabling Transparent Hugepages (CONFIG_TRANSPARENT_HUGEPAGE) will impact rendering performance." |
73 |
+ |
74 |
+ linux-info_pkg_setup |
75 |
+} |
76 |
+ |
77 |
+src_prepare() { |
78 |
+ cmake_src_prepare |
79 |
+ |
80 |
+ # disable RPM package building |
81 |
+ sed -e 's|CPACK_RPM_PACKAGE_RELEASE 1|CPACK_RPM_PACKAGE_RELEASE 0|' \ |
82 |
+ -i CMakeLists.txt || die |
83 |
+} |
84 |
+ |
85 |
+src_configure() { |
86 |
+ # NOTE: You can make embree accept custom CXXFLAGS by turning off |
87 |
+ # EMBREE_IGNORE_CMAKE_CXX_FLAGS. However, the linking will fail if you use |
88 |
+ # any "march" compile flags. This is because embree builds modules for the |
89 |
+ # different supported ISAs and picks the correct one at runtime. |
90 |
+ # "march" will pull in cpu instructions that shouldn't be in specific modules |
91 |
+ # and it fails to link properly. |
92 |
+ # https://github.com/embree/embree/issues/115 |
93 |
+ |
94 |
+ filter-flags -march=* |
95 |
+ |
96 |
+ local mycmakeargs=( |
97 |
+ # Currently Intel only host their test files on their internal network. |
98 |
+ # So it seems like users can't easily get a hold of these and do |
99 |
+ # regression testing on their own. |
100 |
+ -DBUILD_TESTING:BOOL=OFF |
101 |
+ -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON |
102 |
+ |
103 |
+ # default |
104 |
+ -DEMBREE_BACKFACE_CULLING=OFF |
105 |
+ -DEMBREE_COMPACT_POLYS=$(usex compact-polys) |
106 |
+ |
107 |
+ # default |
108 |
+ -DEMBREE_FILTER_FUNCTION=ON |
109 |
+ # default |
110 |
+ -DEMBREE_GEOMETRY_CURVE=ON |
111 |
+ # default |
112 |
+ -DEMBREE_GEOMETRY_GRID=ON |
113 |
+ # default |
114 |
+ -DEMBREE_GEOMETRY_INSTANCE=ON |
115 |
+ # default |
116 |
+ -DEMBREE_GEOMETRY_POINT=ON |
117 |
+ # default |
118 |
+ -DEMBREE_GEOMETRY_QUAD=ON |
119 |
+ # default |
120 |
+ -DEMBREE_GEOMETRY_SUBDIVISION=ON |
121 |
+ # default |
122 |
+ -DEMBREE_GEOMETRY_TRIANGLE=ON |
123 |
+ # default |
124 |
+ -DEMBREE_GEOMETRY_USER=ON |
125 |
+ # default |
126 |
+ -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF |
127 |
+ # default |
128 |
+ -DEMBREE_IGNORE_INVALID_RAYS=OFF |
129 |
+ |
130 |
+ # Set to NONE so we can manually switch on ISAs below |
131 |
+ -DEMBREE_MAX_ISA:STRING="NONE" |
132 |
+ -DEMBREE_ISA_AVX=$(usex cpu_flags_x86_avx) |
133 |
+ -DEMBREE_ISA_AVX2=$(usex cpu_flags_x86_avx2) |
134 |
+ -DEMBREE_ISA_AVX512=$(usex cpu_flags_x86_avx512dq) |
135 |
+ -DEMBREE_ISA_NEON=$(usex cpu_flags_arm_neon) |
136 |
+ -DEMBREE_ISA_SSE2=$(usex cpu_flags_x86_sse2) |
137 |
+ -DEMBREE_ISA_SSE42=$(usex cpu_flags_x86_sse4_2) |
138 |
+ -DEMBREE_ISPC_SUPPORT=$(usex ispc) |
139 |
+ -DEMBREE_RAY_MASK=$(usex raymask) |
140 |
+ # default |
141 |
+ -DEMBREE_RAY_PACKETS=ON |
142 |
+ -DEMBREE_STACK_PROTECTOR=$(usex ssp) |
143 |
+ -DEMBREE_STATIC_LIB=$(usex static-libs) |
144 |
+ -DEMBREE_STAT_COUNTERS=OFF |
145 |
+ -DEMBREE_TASKING_SYSTEM:STRING=$(usex tbb "TBB" "INTERNAL") |
146 |
+ -DEMBREE_TUTORIALS=$(usex tutorial)) |
147 |
+ |
148 |
+ # Disable asserts |
149 |
+ append-cppflags -DNDEBUG |
150 |
+ |
151 |
+ if use tutorial; then |
152 |
+ mycmakeargs+=( |
153 |
+ -DEMBREE_ISPC_ADDRESSING:STRING="64" |
154 |
+ -DEMBREE_TUTORIALS_LIBJPEG=ON |
155 |
+ -DEMBREE_TUTORIALS_LIBPNG=ON |
156 |
+ -DEMBREE_TUTORIALS_OPENIMAGEIO=ON |
157 |
+ ) |
158 |
+ fi |
159 |
+ |
160 |
+ cmake_src_configure |
161 |
+} |