1 |
commit: 0fbab484e8796340022f84f736a98fc45a79c116 |
2 |
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon May 2 15:10:55 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 20 11:25:12 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fbab484 |
7 |
|
8 |
media-gfx/blender: LTS version bump to 2.93.9 |
9 |
|
10 |
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com> |
11 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
12 |
|
13 |
media-gfx/blender/Manifest | 1 + |
14 |
media-gfx/blender/blender-2.93.9.ebuild | 405 ++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 406 insertions(+) |
16 |
|
17 |
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest |
18 |
index c7f739efe810..b76c95959615 100644 |
19 |
--- a/media-gfx/blender/Manifest |
20 |
+++ b/media-gfx/blender/Manifest |
21 |
@@ -2,6 +2,7 @@ DIST blender-2.93.0-tests.tar.bz2 286918586 BLAKE2B a2c2c2e900e401a470208e8e5d00 |
22 |
DIST blender-2.93.0.tar.xz 42967016 BLAKE2B 1e7b54f08415de8a8908a285ae35c1e18558bf7cab42c5c135323d10ac9a73ec69aa0addd536355a4d19262438a615e03f09dc123b697cbab484e33350bb5ee3 SHA512 660962e5368c8ff52ed095aba97d63c22aa8e2fdcb2042b1299b6d6edeb7eb1f702a9ee95ee7e47824681f9f48b971d2e32ec32cc6264165a4196b5f36c4a66d |
23 |
DIST blender-2.93.6.tar.xz 43031980 BLAKE2B 235b9a08d9eb4ba83c30a4de333cc5b56eefe16209a96e2aeadbfb4d99b0add0031bbf3c4e0059833433475f07c03711ca773e19d57849ae83beb52a750fac48 SHA512 0f8e7686a141ba55be29c73f9b2fcd43b03f7551ec91d226f389295f4866926f9a81ddf627aef54f6d762271ca05ccdea1f80efc00cc52315925ad626b283aea |
24 |
DIST blender-2.93.8.tar.xz 43024356 BLAKE2B f69edf2bff0e97897d03b123516a66037fc690f518801dbb5f6851aa743c768bb1a56df2cc3e036d8fbae4ca3cfca295f34c7ae33dd37f0e16513c56f5d46572 SHA512 75213907ef7969f30468ce959a1da9287334b6f8b6edbf4b65e02d57a8b306fad6f86646d088eee8fd6f53f3e7511554b9a963f7a15527b17c3353db24f58249 |
25 |
+DIST blender-2.93.9.tar.xz 43035004 BLAKE2B 3d3e316794d0ee5ec3500c84247f4d9cc37d9c490e82321a10e8b020eb148f8d71480ce45e5d2098ef8d6c6657eb5d9f8a34807f93e8ad25650bd4e65cc559d7 SHA512 605eedabd7f164138076c0c91ca9ee3a1e26616c2539602ebba07c014a989738b973a908cbc0a062b3942f3e36754b2f88e2abcabae18017749b409aeaa2f97e |
26 |
DIST blender-3.0.0-tests.tar.bz2 302064577 BLAKE2B c86a47231bb704124fe5ed59963176ca45ccc7e92bf8b00ce31d432cf6e35b9593ddb0d71f56aab0af6d1922f08eb158f9b7e355b5323d715b2b075ceafe9294 SHA512 e343f5da88aa7d2bc2a0758c01d3849b61c6ff3a0d65ac4d967aa02b701a5a02bfc8e7ed92b8f67af37e08f138987de8a27b8c7faa3cd8cfc3535adb8c624506 |
27 |
DIST blender-3.0.0.tar.xz 40169212 BLAKE2B 0dd8327cb92d1d5b00ede020fa2fe07fc3f4d02b249e0ed528c330d6423ce28c731055bc623cffa66f2824c3ae667b5b84be2d6c5e2b01baf490468c4b6f42a2 SHA512 727d722e7b750b77b0fe691605a84de58baf15a3cc01af267be0440bd0879772e14dbdfdb16209023df3c28b94d8009b0c389915097cdb0b49bdf42c8de1ef21 |
28 |
DIST blender-3.0.1-ffmpeg-5.0.patch.bz2 8198 BLAKE2B 2acb1e441bd17cf2d972f981358981d42742ad37656366a52b0adb52efb3f1a6cda0479e1c79d9327b51c8fd3d2c6cb291552adc7716e6a1938ac27b237186b9 SHA512 c09ca2d5a5b99652abcae827965304506e354fc6fc4d6d59c9433c8246e865a0622ddac3118009ad433292690212292a86f7e43e764583525555ca6d653da809 |
29 |
|
30 |
diff --git a/media-gfx/blender/blender-2.93.9.ebuild b/media-gfx/blender/blender-2.93.9.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..1fbf5df0e427 |
33 |
--- /dev/null |
34 |
+++ b/media-gfx/blender/blender-2.93.9.ebuild |
35 |
@@ -0,0 +1,405 @@ |
36 |
+# Copyright 1999-2022 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+ |
41 |
+PYTHON_COMPAT=( python3_9 python3_10 ) |
42 |
+ |
43 |
+inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 toolchain-funcs xdg-utils |
44 |
+ |
45 |
+DESCRIPTION="3D Creation/Animation/Publishing System" |
46 |
+HOMEPAGE="https://www.blender.org" |
47 |
+ |
48 |
+if [[ ${PV} = *9999* ]] ; then |
49 |
+ # Subversion is needed for downloading unit test files |
50 |
+ inherit git-r3 subversion |
51 |
+ EGIT_REPO_URI="https://git.blender.org/blender.git" |
52 |
+else |
53 |
+ SRC_URI="https://download.blender.org/source/${P}.tar.xz" |
54 |
+ SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-3.0.1-ffmpeg-5.0.patch.bz2" |
55 |
+ |
56 |
+ TEST_TARBALL_VERSION=2.93.0 |
57 |
+ SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )" |
58 |
+ KEYWORDS="~amd64 ~arm ~arm64" |
59 |
+fi |
60 |
+ |
61 |
+SLOT="${PV%.*}" |
62 |
+LICENSE="|| ( GPL-3 BL )" |
63 |
+IUSE="+bullet +dds +fluid +openexr +tbb \ |
64 |
+ alembic collada +color-management cuda +cycles \ |
65 |
+ debug doc +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \ |
66 |
+ man ndof nls openal opencl +oidn +openimageio +openmp +opensubdiv \ |
67 |
+ +openvdb +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile standalone test +tiff valgrind" |
68 |
+RESTRICT="!test? ( test )" |
69 |
+ |
70 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
71 |
+ alembic? ( openexr ) |
72 |
+ cuda? ( cycles ) |
73 |
+ cycles? ( openexr tiff openimageio ) |
74 |
+ fluid? ( tbb ) |
75 |
+ opencl? ( cycles ) |
76 |
+ openvdb? ( tbb ) |
77 |
+ osl? ( cycles ) |
78 |
+ standalone? ( cycles ) |
79 |
+ test? ( color-management )" |
80 |
+ |
81 |
+# Library versions for official builds can be found in the blender source directory in: |
82 |
+# build_files/build_environment/install_deps.sh |
83 |
+RDEPEND="${PYTHON_DEPS} |
84 |
+ dev-libs/boost:=[nls?,threads(+)] |
85 |
+ dev-libs/lzo:2= |
86 |
+ $(python_gen_cond_dep ' |
87 |
+ dev-python/cython[${PYTHON_USEDEP}] |
88 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
89 |
+ dev-python/requests[${PYTHON_USEDEP}] |
90 |
+ ') |
91 |
+ media-libs/freetype:= |
92 |
+ media-libs/glew:* |
93 |
+ media-libs/libpng:= |
94 |
+ media-libs/libsamplerate |
95 |
+ sys-libs/zlib:= |
96 |
+ virtual/glu |
97 |
+ virtual/jpeg |
98 |
+ virtual/libintl |
99 |
+ virtual/opengl |
100 |
+ alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] ) |
101 |
+ collada? ( >=media-libs/opencollada-1.6.68 ) |
102 |
+ color-management? ( >=media-libs/opencolorio-2.1.1-r7:= ) |
103 |
+ cuda? ( dev-util/nvidia-cuda-toolkit:= ) |
104 |
+ embree? ( >=media-libs/embree-3.10.0[raymask] ) |
105 |
+ ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] ) |
106 |
+ fftw? ( sci-libs/fftw:3.0= ) |
107 |
+ gmp? ( dev-libs/gmp ) |
108 |
+ !headless? ( |
109 |
+ x11-libs/libX11 |
110 |
+ x11-libs/libXi |
111 |
+ x11-libs/libXxf86vm |
112 |
+ ) |
113 |
+ jack? ( virtual/jack ) |
114 |
+ jemalloc? ( dev-libs/jemalloc:= ) |
115 |
+ jpeg2k? ( media-libs/openjpeg:2= ) |
116 |
+ ndof? ( |
117 |
+ app-misc/spacenavd |
118 |
+ dev-libs/libspnav |
119 |
+ ) |
120 |
+ nls? ( virtual/libiconv ) |
121 |
+ openal? ( media-libs/openal ) |
122 |
+ opencl? ( virtual/opencl ) |
123 |
+ oidn? ( >=media-libs/oidn-1.3.0 ) |
124 |
+ openimageio? ( >=media-libs/openimageio-2.3.12.0-r3:= ) |
125 |
+ openexr? ( |
126 |
+ >=dev-libs/imath-3.1.4-r2:= |
127 |
+ >=media-libs/openexr-3:0= |
128 |
+ ) |
129 |
+ opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] ) |
130 |
+ openvdb? ( |
131 |
+ >=media-gfx/openvdb-8.2.0-r2:= |
132 |
+ dev-libs/c-blosc:= |
133 |
+ ) |
134 |
+ osl? ( >=media-libs/osl-1.11.16.0-r3:= ) |
135 |
+ pdf? ( media-libs/libharu ) |
136 |
+ potrace? ( media-gfx/potrace ) |
137 |
+ pugixml? ( dev-libs/pugixml ) |
138 |
+ pulseaudio? ( media-sound/pulseaudio ) |
139 |
+ sdl? ( media-libs/libsdl2[sound,joystick] ) |
140 |
+ sndfile? ( media-libs/libsndfile ) |
141 |
+ tbb? ( <dev-cpp/tbb-2021.4.0:= ) |
142 |
+ tiff? ( media-libs/tiff ) |
143 |
+ valgrind? ( dev-util/valgrind ) |
144 |
+" |
145 |
+ |
146 |
+DEPEND="${RDEPEND} |
147 |
+ dev-cpp/eigen:= |
148 |
+" |
149 |
+ |
150 |
+BDEPEND=" |
151 |
+ virtual/pkgconfig |
152 |
+ doc? ( |
153 |
+ app-doc/doxygen[dot] |
154 |
+ dev-python/sphinx[latex] |
155 |
+ dev-texlive/texlive-bibtexextra |
156 |
+ dev-texlive/texlive-fontsextra |
157 |
+ dev-texlive/texlive-fontutils |
158 |
+ dev-texlive/texlive-latex |
159 |
+ dev-texlive/texlive-latexextra |
160 |
+ ) |
161 |
+ nls? ( sys-devel/gettext ) |
162 |
+" |
163 |
+ |
164 |
+PATCHES=( |
165 |
+ "${FILESDIR}"/${PN}-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch |
166 |
+ "${FILESDIR}"/${PN}-3.0.1-openexr.patch |
167 |
+ "${FILESDIR}"/${PN}-3.0.1-openimageio-2.3.patch |
168 |
+ "${WORKDIR}"/${PN}-3.0.1-ffmpeg-5.0.patch |
169 |
+) |
170 |
+ |
171 |
+blender_check_requirements() { |
172 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
173 |
+ |
174 |
+ if use doc; then |
175 |
+ CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend |
176 |
+ fi |
177 |
+} |
178 |
+ |
179 |
+blender_get_version() { |
180 |
+ # Get blender version from blender itself. |
181 |
+ BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert) |
182 |
+ if ((${BV:0:1} < 3)) ; then |
183 |
+ # Add period (290 -> 2.90). |
184 |
+ BV=${BV:0:1}.${BV:1} |
185 |
+ else |
186 |
+ # Add period and strip last number (300 -> 3.0) |
187 |
+ BV=${BV:0:1}.${BV:1:1} |
188 |
+ fi |
189 |
+} |
190 |
+ |
191 |
+pkg_pretend() { |
192 |
+ blender_check_requirements |
193 |
+} |
194 |
+ |
195 |
+pkg_setup() { |
196 |
+ blender_check_requirements |
197 |
+ python-single-r1_pkg_setup |
198 |
+} |
199 |
+ |
200 |
+src_unpack() { |
201 |
+ if [[ ${PV} = *9999* ]] ; then |
202 |
+ git-r3_src_unpack |
203 |
+ else |
204 |
+ default |
205 |
+ fi |
206 |
+ |
207 |
+ if use test; then |
208 |
+ mkdir -p lib || die |
209 |
+ mv "${WORKDIR}"/blender-${TEST_TARBALL_VERSION}-tests/tests lib || die |
210 |
+ fi |
211 |
+} |
212 |
+ |
213 |
+src_prepare() { |
214 |
+ cmake_src_prepare |
215 |
+ |
216 |
+ blender_get_version |
217 |
+ |
218 |
+ # Disable MS Windows help generation. The variable doesn't do what it |
219 |
+ # it sounds like. |
220 |
+ sed -e "s|GENERATE_HTMLHELP = YES|GENERATE_HTMLHELP = NO|" \ |
221 |
+ -i doc/doxygen/Doxyfile || die |
222 |
+ |
223 |
+ # Prepare icons and .desktop files for slotting. |
224 |
+ sed -e "s|blender.svg|blender-${BV}.svg|" -i source/creator/CMakeLists.txt || die |
225 |
+ sed -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" -i source/creator/CMakeLists.txt || die |
226 |
+ sed -e "s|blender.desktop|blender-${BV}.desktop|" -i source/creator/CMakeLists.txt || die |
227 |
+ sed -e "s|blender-thumbnailer.py|blender-${BV}-thumbnailer.py|" -i source/creator/CMakeLists.txt || die |
228 |
+ |
229 |
+ sed -e "s|Name=Blender|Name=Blender ${PV}|" -i release/freedesktop/blender.desktop || die |
230 |
+ sed -e "s|Exec=blender|Exec=blender-${BV}|" -i release/freedesktop/blender.desktop || die |
231 |
+ sed -e "s|Icon=blender|Icon=blender-${BV}|" -i release/freedesktop/blender.desktop || die |
232 |
+ |
233 |
+ mv release/freedesktop/icons/scalable/apps/blender.svg release/freedesktop/icons/scalable/apps/blender-${BV}.svg || die |
234 |
+ mv release/freedesktop/icons/symbolic/apps/blender-symbolic.svg release/freedesktop/icons/symbolic/apps/blender-${BV}-symbolic.svg || die |
235 |
+ mv release/freedesktop/blender.desktop release/freedesktop/blender-${BV}.desktop || die |
236 |
+ mv release/bin/blender-thumbnailer.py release/bin/blender-${BV}-thumbnailer.py || die |
237 |
+ |
238 |
+ if use test; then |
239 |
+ # Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests. |
240 |
+ sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i tests/CMakeLists.txt || die |
241 |
+ sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die |
242 |
+ fi |
243 |
+} |
244 |
+ |
245 |
+src_configure() { |
246 |
+ append-lfs-flags |
247 |
+ |
248 |
+ local mycmakeargs=( |
249 |
+ -DBUILD_SHARED_LIBS=OFF |
250 |
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" |
251 |
+ -DPYTHON_LIBRARY="$(python_get_library_path)" |
252 |
+ -DPYTHON_VERSION="${EPYTHON/python/}" |
253 |
+ -DWITH_ALEMBIC=$(usex alembic) |
254 |
+ -DWITH_ASSERT_ABORT=$(usex debug) |
255 |
+ -DWITH_BOOST=ON |
256 |
+ -DWITH_BULLET=$(usex bullet) |
257 |
+ -DWITH_CODEC_FFMPEG=$(usex ffmpeg) |
258 |
+ -DWITH_CODEC_SNDFILE=$(usex sndfile) |
259 |
+ -DWITH_CXX_GUARDEDALLOC=$(usex debug) |
260 |
+ -DWITH_CYCLES=$(usex cycles) |
261 |
+ -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE) |
262 |
+ -DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl) |
263 |
+ -DWITH_CYCLES_EMBREE=$(usex embree) |
264 |
+ -DWITH_CYCLES_OSL=$(usex osl) |
265 |
+ -DWITH_CYCLES_STANDALONE=$(usex standalone) |
266 |
+ -DWITH_CYCLES_STANDALONE_GUI=$(usex standalone) |
267 |
+ -DWITH_DOC_MANPAGE=$(usex man) |
268 |
+ -DWITH_FFTW3=$(usex fftw) |
269 |
+ -DWITH_GMP=$(usex gmp) |
270 |
+ -DWITH_GTESTS=$(usex test) |
271 |
+ -DWITH_HARU=$(usex pdf) |
272 |
+ -DWITH_HEADLESS=$(usex headless) |
273 |
+ -DWITH_INSTALL_PORTABLE=OFF |
274 |
+ -DWITH_IMAGE_DDS=$(usex dds) |
275 |
+ -DOPENEXR_ROOT_DIR="${ESYSROOT}/usr/$(get_libdir)/OpenEXR-3" |
276 |
+ -DWITH_IMAGE_OPENEXR=$(usex openexr) |
277 |
+ -DWITH_IMAGE_OPENJPEG=$(usex jpeg2k) |
278 |
+ -DWITH_IMAGE_TIFF=$(usex tiff) |
279 |
+ -DWITH_INPUT_NDOF=$(usex ndof) |
280 |
+ -DWITH_INTERNATIONAL=$(usex nls) |
281 |
+ -DWITH_JACK=$(usex jack) |
282 |
+ -DWITH_MEM_JEMALLOC=$(usex jemalloc) |
283 |
+ -DWITH_MEM_VALGRIND=$(usex valgrind) |
284 |
+ -DWITH_MOD_FLUID=$(usex fluid) |
285 |
+ -DWITH_MOD_OCEANSIM=$(usex fftw) |
286 |
+ -DWITH_NANOVDB=OFF |
287 |
+ -DWITH_OPENAL=$(usex openal) |
288 |
+ -DWITH_OPENCOLLADA=$(usex collada) |
289 |
+ -DWITH_OPENCOLORIO=$(usex color-management) |
290 |
+ -DWITH_OPENIMAGEDENOISE=$(usex oidn) |
291 |
+ -DWITH_OPENIMAGEIO=$(usex openimageio) |
292 |
+ -DWITH_OPENMP=$(usex openmp) |
293 |
+ -DWITH_OPENSUBDIV=$(usex opensubdiv) |
294 |
+ -DWITH_OPENVDB=$(usex openvdb) |
295 |
+ -DWITH_OPENVDB_BLOSC=$(usex openvdb) |
296 |
+ -DWITH_POTRACE=$(usex potrace) |
297 |
+ -DWITH_PUGIXML=$(usex pugixml) |
298 |
+ -DWITH_PULSEAUDIO=$(usex pulseaudio) |
299 |
+ -DWITH_PYTHON_INSTALL=OFF |
300 |
+ -DWITH_SDL=$(usex sdl) |
301 |
+ -DWITH_STATIC_LIBS=OFF |
302 |
+ -DWITH_SYSTEM_EIGEN3=ON |
303 |
+ -DWITH_SYSTEM_GLEW=ON |
304 |
+ -DWITH_SYSTEM_LZO=ON |
305 |
+ -DWITH_TBB=$(usex tbb) |
306 |
+ -DWITH_USD=OFF |
307 |
+ -DWITH_XR_OPENXR=OFF |
308 |
+ ) |
309 |
+ append-flags $(usex debug '-DDEBUG' '-DNDEBUG') |
310 |
+ |
311 |
+ if tc-is-gcc ; then |
312 |
+ # These options only exist when GCC is detected. |
313 |
+ # We disable these to respect the user's choice of linker. |
314 |
+ mycmakeargs+=( |
315 |
+ -DWITH_LINKER_GOLD=OFF |
316 |
+ -DWITH_LINKER_LLD=OFF |
317 |
+ ) |
318 |
+ fi |
319 |
+ |
320 |
+ cmake_src_configure |
321 |
+} |
322 |
+ |
323 |
+src_test() { |
324 |
+ # A lot of tests needs to have access to the installed data files. |
325 |
+ # So install them into the image directory now. |
326 |
+ cmake_src_install |
327 |
+ |
328 |
+ blender_get_version |
329 |
+ # Define custom blender data/script file paths not be able to find them otherwise during testing. |
330 |
+ # (Because the data is in the image directory and it will default to look in /usr/share) |
331 |
+ export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts |
332 |
+ export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles |
333 |
+ |
334 |
+ cmake_src_test |
335 |
+ |
336 |
+ # Clean up the image directory for src_install |
337 |
+ rm -fr ${ED}/* || die |
338 |
+} |
339 |
+ |
340 |
+src_install() { |
341 |
+ blender_get_version |
342 |
+ |
343 |
+ # Pax mark blender for hardened support. |
344 |
+ pax-mark m "${BUILD_DIR}"/bin/blender |
345 |
+ |
346 |
+ if use standalone; then |
347 |
+ dobin "${BUILD_DIR}"/bin/cycles |
348 |
+ fi |
349 |
+ |
350 |
+ cmake_src_install |
351 |
+ |
352 |
+ if use man; then |
353 |
+ # Slot the man page |
354 |
+ mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die |
355 |
+ fi |
356 |
+ |
357 |
+ if use doc; then |
358 |
+ # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building. |
359 |
+ # (Because the data is in the image directory and it will default to look in /usr/share) |
360 |
+ export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts |
361 |
+ export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles |
362 |
+ |
363 |
+ # Workaround for binary drivers. |
364 |
+ addpredict /dev/ati |
365 |
+ addpredict /dev/dri |
366 |
+ addpredict /dev/nvidiactl |
367 |
+ |
368 |
+ einfo "Generating Blender C/C++ API docs ..." |
369 |
+ cd "${CMAKE_USE_DIR}"/doc/doxygen || die |
370 |
+ doxygen -u Doxyfile || die |
371 |
+ doxygen || die "doxygen failed to build API docs." |
372 |
+ |
373 |
+ cd "${CMAKE_USE_DIR}" || die |
374 |
+ einfo "Generating (BPY) Blender Python API docs ..." |
375 |
+ "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed." |
376 |
+ |
377 |
+ cd "${CMAKE_USE_DIR}"/doc/python_api || die |
378 |
+ sphinx-build sphinx-in BPY_API || die "sphinx failed." |
379 |
+ |
380 |
+ docinto "html/API/python" |
381 |
+ dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/. |
382 |
+ |
383 |
+ docinto "html/API/blender" |
384 |
+ dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/. |
385 |
+ fi |
386 |
+ |
387 |
+ # Fix doc installdir |
388 |
+ docinto html |
389 |
+ dodoc "${CMAKE_USE_DIR}"/release/text/readme.html |
390 |
+ rm -r "${ED}"/usr/share/doc/blender || die |
391 |
+ |
392 |
+ python_fix_shebang "${ED}/usr/bin/blender-${BV}-thumbnailer.py" |
393 |
+ python_optimize "${ED}/usr/share/blender/${BV}/scripts" |
394 |
+ |
395 |
+ mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die |
396 |
+} |
397 |
+ |
398 |
+pkg_postinst() { |
399 |
+ elog |
400 |
+ elog "Blender uses python integration. As such, may have some" |
401 |
+ elog "inherent risks with running unknown python scripts." |
402 |
+ elog |
403 |
+ elog "It is recommended to change your blender temp directory" |
404 |
+ elog "from /tmp to /home/user/tmp or another tmp file under your" |
405 |
+ elog "home directory. This can be done by starting blender, then" |
406 |
+ elog "changing the 'Temporary Files' directory in Blender preferences." |
407 |
+ elog |
408 |
+ ewarn |
409 |
+ ewarn "This ebuild does not unbundle the massive amount of 3rd party" |
410 |
+ ewarn "libraries which are shipped with blender. Note that" |
411 |
+ ewarn "these have caused security issues in the past." |
412 |
+ ewarn "If you are concerned about security, file a bug upstream:" |
413 |
+ ewarn " https://developer.blender.org/" |
414 |
+ ewarn |
415 |
+ |
416 |
+ if ! use python_single_target_python3_9; then |
417 |
+ elog "You are building Blender with a newer python version than" |
418 |
+ elog "supported by this version upstream." |
419 |
+ elog "If you experience breakages with e.g. plugins, please switch to" |
420 |
+ elog "python_single_target_python3_9 instead." |
421 |
+ elog "Bug: https://bugs.gentoo.org/737388" |
422 |
+ elog |
423 |
+ fi |
424 |
+ |
425 |
+ xdg_icon_cache_update |
426 |
+ xdg_mimeinfo_database_update |
427 |
+ xdg_desktop_database_update |
428 |
+} |
429 |
+ |
430 |
+pkg_postrm() { |
431 |
+ xdg_icon_cache_update |
432 |
+ xdg_mimeinfo_database_update |
433 |
+ xdg_desktop_database_update |
434 |
+ |
435 |
+ ewarn "" |
436 |
+ ewarn "You may want to remove the following directory." |
437 |
+ ewarn "~/.config/${PN}/${SLOT}/cache/" |
438 |
+ ewarn "It may contain extra render kernels not tracked by portage" |
439 |
+ ewarn "" |
440 |
+} |