1 |
commit: 565f433814df4712da679f7da2ad4f94c7d643b4 |
2 |
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Sep 29 13:12:54 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 23:52:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=565f4338 |
7 |
|
8 |
media-gfx/blender: Version bumps to 3.3.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/869713 |
11 |
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com> |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
media-gfx/blender/Manifest | 1 + |
15 |
media-gfx/blender/blender-3.3.0.ebuild | 416 +++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 417 insertions(+) |
17 |
|
18 |
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest |
19 |
index 1ce457d54060..92cb67f8c203 100644 |
20 |
--- a/media-gfx/blender/Manifest |
21 |
+++ b/media-gfx/blender/Manifest |
22 |
@@ -8,3 +8,4 @@ DIST blender-3.2.0-tests.tar.xz 213772908 BLAKE2B 7a4713a3c1bb9f6bfe80b154b913a5 |
23 |
DIST blender-3.2.0.tar.xz 41520000 BLAKE2B ff68c18bfef1ca6a989e46c8c9d3afa1cc13d6d70dfb6311d9d0742829af0a525531077f48c6a390667e266963e1e8671e370c475a9a8a21bc936d4feb04d248 SHA512 2e9c502fad6bbad7618caad393dfd21d2adc6df0a2de8581cea904cfe3588d783564f2d7ec5600d99d10307a81eb6bb56b31209bf34aae072fbc9a0d8ce54f81 |
24 |
DIST blender-3.2.1.tar.xz 41497540 BLAKE2B bb9651a7135c3b8ebe03a6dee31b8681d548fc12c56d9de076510f22ff0c94e88b814b57d888ee83a6749c4c79a89288a6717f5fd50f430c88edd3c8411457b8 SHA512 fb496c47b2aebd403e00954d55d140ee9f0dc7733e1013b1665f9db83a132ad63a09226edc662871c8c1b6e2fbd8870954d86cb1324d0c44230f79d2b46aecef |
25 |
DIST blender-3.2.2.tar.xz 41510144 BLAKE2B 3859ad2625822a8b73009c4aa6e7ae41d6d9032d0e80027e9bc7c1d71225eebfd3ff539cd4ce6766ef90a5e3672a80b5fc0d44ac9b5e2100116a55b173c53d62 SHA512 963c8f6510503f861c55d900480c5e4cd643974fc88439a62c672c96e049ff222422ddb20d8e82932fd829c078aafd9ea6a7fcc16434d115f49f61b4943c0c04 |
26 |
+DIST blender-3.3.0.tar.xz 41887484 BLAKE2B ed370be06c12e11c08c3c1aea5074a2e162bc901dd457ed7582a580ae9bf894ec50e12dddcad3c6e736f2d59bcf13ea1a54009384050ac7a6e1ec2d6de079f5d SHA512 5257cbb410a26652077c4ccbfbe949ca9daf7d5f8cde5d518ac175dda6b103c56de08e1643fea1988296e04fa3232f21a9eec566c3eef5436960cdc88de19243 |
27 |
|
28 |
diff --git a/media-gfx/blender/blender-3.3.0.ebuild b/media-gfx/blender/blender-3.3.0.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000000..36150d4272cd |
31 |
--- /dev/null |
32 |
+++ b/media-gfx/blender/blender-3.3.0.ebuild |
33 |
@@ -0,0 +1,416 @@ |
34 |
+# Copyright 1999-2022 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=8 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_10 ) |
40 |
+ |
41 |
+inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 toolchain-funcs xdg-utils |
42 |
+ |
43 |
+DESCRIPTION="3D Creation/Animation/Publishing System" |
44 |
+HOMEPAGE="https://www.blender.org" |
45 |
+ |
46 |
+if [[ ${PV} = *9999* ]] ; then |
47 |
+ # Subversion is needed for downloading unit test files |
48 |
+ inherit git-r3 subversion |
49 |
+ EGIT_REPO_URI="https://git.blender.org/blender.git" |
50 |
+else |
51 |
+ SRC_URI="https://download.blender.org/source/${P}.tar.xz" |
52 |
+ # Update these between major releases. |
53 |
+ TEST_TARBALL_VERSION="$(ver_cut 1-2).0" |
54 |
+ #SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )" |
55 |
+ KEYWORDS="~amd64 ~arm ~arm64" |
56 |
+fi |
57 |
+ |
58 |
+SLOT="${PV%.*}" |
59 |
+LICENSE="|| ( GPL-3 BL )" |
60 |
+IUSE="+bullet +dds +fluid +openexr +tbb \ |
61 |
+ alembic collada +color-management cuda +cycles \ |
62 |
+ debug doc +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \ |
63 |
+ man +nanovdb ndof nls openal +oidn +openimageio +openmp +opensubdiv \ |
64 |
+ +openvdb optix +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \ |
65 |
+ test +tiff valgrind" |
66 |
+RESTRICT="!test? ( test )" |
67 |
+ |
68 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
69 |
+ alembic? ( openexr ) |
70 |
+ cuda? ( cycles ) |
71 |
+ cycles? ( openexr tiff openimageio ) |
72 |
+ fluid? ( tbb ) |
73 |
+ openvdb? ( tbb ) |
74 |
+ optix? ( cuda ) |
75 |
+ osl? ( cycles ) |
76 |
+ test? ( color-management )" |
77 |
+ |
78 |
+# Library versions for official builds can be found in the blender source directory in: |
79 |
+# build_files/build_environment/install_deps.sh |
80 |
+RDEPEND="${PYTHON_DEPS} |
81 |
+ dev-libs/boost:=[nls?] |
82 |
+ dev-libs/lzo:2= |
83 |
+ $(python_gen_cond_dep ' |
84 |
+ dev-python/cython[${PYTHON_USEDEP}] |
85 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
86 |
+ dev-python/requests[${PYTHON_USEDEP}] |
87 |
+ dev-python/zstandard[${PYTHON_USEDEP}] |
88 |
+ ') |
89 |
+ media-libs/freetype:=[brotli] |
90 |
+ media-libs/glew:* |
91 |
+ media-libs/libjpeg-turbo:= |
92 |
+ media-libs/libpng:= |
93 |
+ media-libs/libsamplerate |
94 |
+ sys-libs/zlib:= |
95 |
+ virtual/glu |
96 |
+ virtual/libintl |
97 |
+ virtual/opengl |
98 |
+ alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] ) |
99 |
+ collada? ( >=media-libs/opencollada-1.6.68 ) |
100 |
+ color-management? ( >=media-libs/opencolorio-2.1.1-r7:= ) |
101 |
+ cuda? ( dev-util/nvidia-cuda-toolkit:= ) |
102 |
+ embree? ( >=media-libs/embree-3.10.0[raymask] ) |
103 |
+ ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] ) |
104 |
+ fftw? ( sci-libs/fftw:3.0= ) |
105 |
+ gmp? ( dev-libs/gmp ) |
106 |
+ !headless? ( |
107 |
+ x11-libs/libX11 |
108 |
+ x11-libs/libXi |
109 |
+ x11-libs/libXxf86vm |
110 |
+ ) |
111 |
+ jack? ( virtual/jack ) |
112 |
+ jemalloc? ( dev-libs/jemalloc:= ) |
113 |
+ jpeg2k? ( media-libs/openjpeg:2= ) |
114 |
+ ndof? ( |
115 |
+ app-misc/spacenavd |
116 |
+ dev-libs/libspnav |
117 |
+ ) |
118 |
+ nls? ( virtual/libiconv ) |
119 |
+ openal? ( media-libs/openal ) |
120 |
+ oidn? ( >=media-libs/oidn-1.4.1 ) |
121 |
+ openimageio? ( >=media-libs/openimageio-2.3.12.0-r3:= ) |
122 |
+ openexr? ( |
123 |
+ >=dev-libs/imath-3.1.4-r2:= |
124 |
+ >=media-libs/openexr-3:0= |
125 |
+ ) |
126 |
+ opensubdiv? ( >=media-libs/opensubdiv-3.4.0 ) |
127 |
+ openvdb? ( |
128 |
+ >=media-gfx/openvdb-9.0.0:=[nanovdb?] |
129 |
+ dev-libs/c-blosc:= |
130 |
+ ) |
131 |
+ optix? ( <dev-libs/optix-7.5.0 ) |
132 |
+ osl? ( >=media-libs/osl-1.11.16.0-r3:= ) |
133 |
+ pdf? ( media-libs/libharu ) |
134 |
+ potrace? ( media-gfx/potrace ) |
135 |
+ pugixml? ( dev-libs/pugixml ) |
136 |
+ pulseaudio? ( media-sound/pulseaudio ) |
137 |
+ sdl? ( media-libs/libsdl2[sound,joystick] ) |
138 |
+ sndfile? ( media-libs/libsndfile ) |
139 |
+ tbb? ( dev-cpp/tbb:= ) |
140 |
+ tiff? ( media-libs/tiff ) |
141 |
+ valgrind? ( dev-util/valgrind ) |
142 |
+" |
143 |
+ |
144 |
+DEPEND="${RDEPEND} |
145 |
+ dev-cpp/eigen:= |
146 |
+" |
147 |
+ |
148 |
+BDEPEND=" |
149 |
+ virtual/pkgconfig |
150 |
+ doc? ( |
151 |
+ app-doc/doxygen[dot] |
152 |
+ dev-python/sphinx[latex] |
153 |
+ dev-texlive/texlive-bibtexextra |
154 |
+ dev-texlive/texlive-fontsextra |
155 |
+ dev-texlive/texlive-fontutils |
156 |
+ dev-texlive/texlive-latex |
157 |
+ dev-texlive/texlive-latexextra |
158 |
+ ) |
159 |
+ nls? ( sys-devel/gettext ) |
160 |
+" |
161 |
+ |
162 |
+PATCHES=( |
163 |
+ "${FILESDIR}"/${PN}-3.2.2-support-building-with-musl-libc.patch |
164 |
+ "${FILESDIR}"/${PN}-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch |
165 |
+ "${FILESDIR}"/${PN}-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch |
166 |
+) |
167 |
+ |
168 |
+blender_check_requirements() { |
169 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
170 |
+ |
171 |
+ if use doc; then |
172 |
+ CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend |
173 |
+ fi |
174 |
+} |
175 |
+ |
176 |
+blender_get_version() { |
177 |
+ # Get blender version from blender itself. |
178 |
+ BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert) |
179 |
+ if ((${BV:0:1} < 3)) ; then |
180 |
+ # Add period (290 -> 2.90). |
181 |
+ BV=${BV:0:1}.${BV:1} |
182 |
+ else |
183 |
+ # Add period and skip the middle number (301 -> 3.1) |
184 |
+ BV=${BV:0:1}.${BV:2} |
185 |
+ fi |
186 |
+} |
187 |
+ |
188 |
+pkg_pretend() { |
189 |
+ blender_check_requirements |
190 |
+} |
191 |
+ |
192 |
+pkg_setup() { |
193 |
+ blender_check_requirements |
194 |
+ python-single-r1_pkg_setup |
195 |
+} |
196 |
+ |
197 |
+src_unpack() { |
198 |
+ if [[ ${PV} = *9999* ]] ; then |
199 |
+ git-r3_src_unpack |
200 |
+ if use test; then |
201 |
+ TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests |
202 |
+ subversion_fetch ${TESTS_SVN_URL} ../lib/tests |
203 |
+ fi |
204 |
+ else |
205 |
+ default |
206 |
+ if use test; then |
207 |
+ #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests |
208 |
+ mkdir -p lib || die |
209 |
+ mv "${WORKDIR}"/blender-${TEST_TARBALL_VERSION}-tests/tests lib || die |
210 |
+ fi |
211 |
+ fi |
212 |
+ |
213 |
+} |
214 |
+ |
215 |
+src_prepare() { |
216 |
+ cmake_src_prepare |
217 |
+ |
218 |
+ blender_get_version |
219 |
+ |
220 |
+ # Disable MS Windows help generation. The variable doesn't do what it |
221 |
+ # it sounds like. |
222 |
+ sed -e "s|GENERATE_HTMLHELP = YES|GENERATE_HTMLHELP = NO|" \ |
223 |
+ -i doc/doxygen/Doxyfile || die |
224 |
+ |
225 |
+ # Prepare icons and .desktop files for slotting. |
226 |
+ sed -e "s|blender.svg|blender-${BV}.svg|" -i source/creator/CMakeLists.txt || die |
227 |
+ sed -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" -i source/creator/CMakeLists.txt || die |
228 |
+ sed -e "s|blender.desktop|blender-${BV}.desktop|" -i source/creator/CMakeLists.txt || die |
229 |
+ |
230 |
+ sed -e "s|Name=Blender|Name=Blender ${PV}|" -i release/freedesktop/blender.desktop || die |
231 |
+ sed -e "s|Exec=blender|Exec=blender-${BV}|" -i release/freedesktop/blender.desktop || die |
232 |
+ sed -e "s|Icon=blender|Icon=blender-${BV}|" -i release/freedesktop/blender.desktop || die |
233 |
+ |
234 |
+ mv release/freedesktop/icons/scalable/apps/blender.svg release/freedesktop/icons/scalable/apps/blender-${BV}.svg || die |
235 |
+ mv release/freedesktop/icons/symbolic/apps/blender-symbolic.svg release/freedesktop/icons/symbolic/apps/blender-${BV}-symbolic.svg || die |
236 |
+ mv release/freedesktop/blender.desktop release/freedesktop/blender-${BV}.desktop || 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_OPTIX=$(usex optix) |
263 |
+ -DWITH_CYCLES_EMBREE=$(usex embree) |
264 |
+ -DWITH_CYCLES_OSL=$(usex osl) |
265 |
+ -DWITH_CYCLES_STANDALONE=OFF |
266 |
+ -DWITH_CYCLES_STANDALONE_GUI=OFF |
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 |
+ -DWITH_IMAGE_OPENEXR=$(usex openexr) |
276 |
+ -DWITH_IMAGE_OPENJPEG=$(usex jpeg2k) |
277 |
+ -DWITH_IMAGE_TIFF=$(usex tiff) |
278 |
+ -DWITH_INPUT_NDOF=$(usex ndof) |
279 |
+ -DWITH_INTERNATIONAL=$(usex nls) |
280 |
+ -DWITH_JACK=$(usex jack) |
281 |
+ -DWITH_MEM_JEMALLOC=$(usex jemalloc) |
282 |
+ -DWITH_MEM_VALGRIND=$(usex valgrind) |
283 |
+ -DWITH_MOD_FLUID=$(usex fluid) |
284 |
+ -DWITH_MOD_OCEANSIM=$(usex fftw) |
285 |
+ -DWITH_NANOVDB=$(usex nanovdb) |
286 |
+ -DWITH_OPENAL=$(usex openal) |
287 |
+ -DWITH_OPENCOLLADA=$(usex collada) |
288 |
+ -DWITH_OPENCOLORIO=$(usex color-management) |
289 |
+ -DWITH_OPENIMAGEDENOISE=$(usex oidn) |
290 |
+ -DWITH_OPENIMAGEIO=$(usex openimageio) |
291 |
+ -DWITH_OPENMP=$(usex openmp) |
292 |
+ -DWITH_OPENSUBDIV=$(usex opensubdiv) |
293 |
+ -DWITH_OPENVDB=$(usex openvdb) |
294 |
+ -DWITH_OPENVDB_BLOSC=$(usex openvdb) |
295 |
+ -DWITH_POTRACE=$(usex potrace) |
296 |
+ -DWITH_PUGIXML=$(usex pugixml) |
297 |
+ -DWITH_PULSEAUDIO=$(usex pulseaudio) |
298 |
+ -DWITH_PYTHON_INSTALL=OFF |
299 |
+ -DWITH_SDL=$(usex sdl) |
300 |
+ -DWITH_STATIC_LIBS=OFF |
301 |
+ -DWITH_SYSTEM_EIGEN3=ON |
302 |
+ -DWITH_SYSTEM_FREETYPE=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 |
+ |
310 |
+ if use optix; then |
311 |
+ mycmakeargs+=( |
312 |
+ -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix |
313 |
+ -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix |
314 |
+ ) |
315 |
+ fi |
316 |
+ |
317 |
+ append-flags $(usex debug '-DDEBUG' '-DNDEBUG') |
318 |
+ |
319 |
+ if tc-is-gcc ; then |
320 |
+ # These options only exist when GCC is detected. |
321 |
+ # We disable these to respect the user's choice of linker. |
322 |
+ mycmakeargs+=( |
323 |
+ -DWITH_LINKER_GOLD=OFF |
324 |
+ -DWITH_LINKER_LLD=OFF |
325 |
+ ) |
326 |
+ fi |
327 |
+ |
328 |
+ cmake_src_configure |
329 |
+} |
330 |
+ |
331 |
+src_test() { |
332 |
+ # A lot of tests needs to have access to the installed data files. |
333 |
+ # So install them into the image directory now. |
334 |
+ cmake_src_install |
335 |
+ |
336 |
+ blender_get_version |
337 |
+ # Define custom blender data/script file paths not be able to find them otherwise during testing. |
338 |
+ # (Because the data is in the image directory and it will default to look in /usr/share) |
339 |
+ export BLENDER_SYSTEM_SCRIPTS="${ED}"/usr/share/blender/${BV}/scripts |
340 |
+ export BLENDER_SYSTEM_DATAFILES="${ED}"/usr/share/blender/${BV}/datafiles |
341 |
+ |
342 |
+ # Sanity check that the script and datafile path is valid. |
343 |
+ # If they are not vaild, blender will fallback to the default path which is not what we want. |
344 |
+ [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!" |
345 |
+ [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!" |
346 |
+ |
347 |
+ cmake_src_test |
348 |
+ |
349 |
+ # Clean up the image directory for src_install |
350 |
+ rm -fr "${ED}"/* || die |
351 |
+} |
352 |
+ |
353 |
+src_install() { |
354 |
+ blender_get_version |
355 |
+ |
356 |
+ # Pax mark blender for hardened support. |
357 |
+ pax-mark m "${BUILD_DIR}"/bin/blender |
358 |
+ |
359 |
+ cmake_src_install |
360 |
+ |
361 |
+ if use man; then |
362 |
+ # Slot the man page |
363 |
+ mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die |
364 |
+ fi |
365 |
+ |
366 |
+ if use doc; then |
367 |
+ # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building. |
368 |
+ # (Because the data is in the image directory and it will default to look in /usr/share) |
369 |
+ export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts |
370 |
+ export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles |
371 |
+ |
372 |
+ # Workaround for binary drivers. |
373 |
+ addpredict /dev/ati |
374 |
+ addpredict /dev/dri |
375 |
+ addpredict /dev/nvidiactl |
376 |
+ |
377 |
+ einfo "Generating Blender C/C++ API docs ..." |
378 |
+ cd "${CMAKE_USE_DIR}"/doc/doxygen || die |
379 |
+ doxygen -u Doxyfile || die |
380 |
+ doxygen || die "doxygen failed to build API docs." |
381 |
+ |
382 |
+ cd "${CMAKE_USE_DIR}" || die |
383 |
+ einfo "Generating (BPY) Blender Python API docs ..." |
384 |
+ "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed." |
385 |
+ |
386 |
+ cd "${CMAKE_USE_DIR}"/doc/python_api || die |
387 |
+ sphinx-build sphinx-in BPY_API || die "sphinx failed." |
388 |
+ |
389 |
+ docinto "html/API/python" |
390 |
+ dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/. |
391 |
+ |
392 |
+ docinto "html/API/blender" |
393 |
+ dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/. |
394 |
+ fi |
395 |
+ |
396 |
+ # Fix doc installdir |
397 |
+ docinto html |
398 |
+ dodoc "${CMAKE_USE_DIR}"/release/text/readme.html |
399 |
+ rm -r "${ED}"/usr/share/doc/blender || die |
400 |
+ |
401 |
+ python_optimize "${ED}/usr/share/blender/${BV}/scripts" |
402 |
+ |
403 |
+ mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die |
404 |
+ mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die |
405 |
+} |
406 |
+ |
407 |
+pkg_postinst() { |
408 |
+ elog |
409 |
+ elog "Blender uses python integration. As such, may have some" |
410 |
+ elog "inherent risks with running unknown python scripts." |
411 |
+ elog |
412 |
+ elog "It is recommended to change your blender temp directory" |
413 |
+ elog "from /tmp to /home/user/tmp or another tmp file under your" |
414 |
+ elog "home directory. This can be done by starting blender, then" |
415 |
+ elog "changing the 'Temporary Files' directory in Blender preferences." |
416 |
+ elog |
417 |
+ ewarn |
418 |
+ ewarn "This ebuild does not unbundle the massive amount of 3rd party" |
419 |
+ ewarn "libraries which are shipped with blender. Note that" |
420 |
+ ewarn "these have caused security issues in the past." |
421 |
+ ewarn "If you are concerned about security, file a bug upstream:" |
422 |
+ ewarn " https://developer.blender.org/" |
423 |
+ ewarn |
424 |
+ |
425 |
+ if ! use python_single_target_python3_10; then |
426 |
+ elog "You are building Blender with a newer python version than" |
427 |
+ elog "supported by this version upstream." |
428 |
+ elog "If you experience breakages with e.g. plugins, please switch to" |
429 |
+ elog "python_single_target_python3_10 instead." |
430 |
+ elog "Bug: https://bugs.gentoo.org/737388" |
431 |
+ elog |
432 |
+ fi |
433 |
+ |
434 |
+ xdg_icon_cache_update |
435 |
+ xdg_mimeinfo_database_update |
436 |
+ xdg_desktop_database_update |
437 |
+} |
438 |
+ |
439 |
+pkg_postrm() { |
440 |
+ xdg_icon_cache_update |
441 |
+ xdg_mimeinfo_database_update |
442 |
+ xdg_desktop_database_update |
443 |
+ |
444 |
+ ewarn "" |
445 |
+ ewarn "You may want to remove the following directory." |
446 |
+ ewarn "~/.config/${PN}/${SLOT}/cache/" |
447 |
+ ewarn "It may contain extra render kernels not tracked by portage" |
448 |
+ ewarn "" |
449 |
+} |