Gentoo Archives: gentoo-commits

From: Jonathan Scruggs <dracwyrm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/
Date: Tue, 28 Aug 2018 14:43:12
Message-Id: 1535467372.04fbac6991b57a44e8899d0920b2a723a9d27329.dracwyrm@gentoo
1 commit: 04fbac6991b57a44e8899d0920b2a723a9d27329
2 Author: Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
3 AuthorDate: Tue Aug 28 13:23:18 2018 +0000
4 Commit: Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 28 14:42:52 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04fbac69
7
8 media-gfx/blender: revbump to 2.79b-r1
9
10 -Use OpenVDB ABI 4 instead of ABI 5
11
12 media-gfx/blender/blender-2.79b-r1.ebuild | 293 ++++++++++++++++++++++++++++++
13 media-gfx/blender/metadata.xml | 4 -
14 2 files changed, 293 insertions(+), 4 deletions(-)
15
16 diff --git a/media-gfx/blender/blender-2.79b-r1.ebuild b/media-gfx/blender/blender-2.79b-r1.ebuild
17 new file mode 100644
18 index 00000000000..1b9da6f8231
19 --- /dev/null
20 +++ b/media-gfx/blender/blender-2.79b-r1.ebuild
21 @@ -0,0 +1,293 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +PYTHON_COMPAT=( python{3_5,3_6} )
28 +
29 +inherit check-reqs cmake-utils xdg-utils flag-o-matic gnome2-utils \
30 + pax-utils python-single-r1 toolchain-funcs eapi7-ver
31 +
32 +DESCRIPTION="3D Creation/Animation/Publishing System"
33 +HOMEPAGE="http://www.blender.org"
34 +
35 +SRC_URI="http://download.blender.org/source/${P}.tar.gz"
36 +
37 +# Blender can have letters in the version string,
38 +# so strip off the letter if it exists.
39 +MY_PV="$(ver_cut 1-2)"
40 +
41 +SLOT="0"
42 +LICENSE="|| ( GPL-2 BL )"
43 +KEYWORDS="~amd64 ~x86"
44 +IUSE="+bullet +dds +elbeem +game-engine +openexr collada colorio \
45 + cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
46 + llvm man ndof nls openal opencl openimageio openmp opensubdiv openvdb \
47 + osl player sdl sndfile test tiff valgrind"
48 +
49 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
50 + cuda? ( cycles )
51 + cycles? ( openexr tiff openimageio )
52 + opencl? ( cycles )
53 + osl? ( cycles llvm )
54 + player? ( game-engine !headless )"
55 +
56 +RDEPEND="${PYTHON_DEPS}
57 + >=dev-libs/boost-1.62:=[nls?,threads(+)]
58 + dev-libs/lzo:2
59 + >=dev-python/numpy-1.10.1[${PYTHON_USEDEP}]
60 + dev-python/requests[${PYTHON_USEDEP}]
61 + media-libs/freetype
62 + media-libs/glew:*
63 + media-libs/libpng:0=
64 + media-libs/libsamplerate
65 + sys-libs/zlib
66 + virtual/glu
67 + virtual/jpeg:0=
68 + virtual/libintl
69 + virtual/opengl
70 + collada? ( >=media-libs/opencollada-1.6.18:= )
71 + colorio? ( media-libs/opencolorio )
72 + cuda? ( dev-util/nvidia-cuda-toolkit:= )
73 + ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
74 + libav? ( >=media-video/libav-11.3:=[x264,mp3,encode,theora,jpeg2k?] )
75 + fftw? ( sci-libs/fftw:3.0= )
76 + !headless? (
77 + x11-libs/libX11
78 + x11-libs/libXi
79 + x11-libs/libXxf86vm
80 + )
81 + jack? ( virtual/jack )
82 + jemalloc? ( dev-libs/jemalloc:= )
83 + jpeg2k? ( media-libs/openjpeg:0 )
84 + llvm? ( sys-devel/llvm:= )
85 + ndof? (
86 + app-misc/spacenavd
87 + dev-libs/libspnav
88 + )
89 + nls? ( virtual/libiconv )
90 + openal? ( media-libs/openal )
91 + opencl? ( virtual/opencl )
92 + openimageio? ( >=media-libs/openimageio-1.7.0 )
93 + openexr? (
94 + >=media-libs/ilmbase-2.2.0:=
95 + >=media-libs/openexr-2.2.0:=
96 + )
97 + opensubdiv? ( >=media-libs/opensubdiv-3.3.0:=[cuda=,opencl=] )
98 + openvdb? (
99 + media-gfx/openvdb[${PYTHON_USEDEP},-abi3-compat(-),abi4-compat(+)]
100 + dev-cpp/tbb
101 + >=dev-libs/c-blosc-1.5.2
102 + )
103 + osl? ( media-libs/osl:= )
104 + sdl? ( media-libs/libsdl2[sound,joystick] )
105 + sndfile? ( media-libs/libsndfile )
106 + tiff? ( media-libs/tiff:0 )
107 + valgrind? ( dev-util/valgrind )"
108 +
109 +DEPEND="${RDEPEND}
110 + >=dev-cpp/eigen-3.2.8:3
111 + virtual/pkgconfig
112 + doc? (
113 + app-doc/doxygen[-nodot(-),dot(+),latex]
114 + dev-python/sphinx[latex]
115 + )
116 + nls? ( sys-devel/gettext )"
117 +
118 +PATCHES=(
119 + "${FILESDIR}/${PN}-fix-install-rules.patch"
120 + "${FILESDIR}/${P}-gcc-8.patch"
121 + "${FILESDIR}/${P}-ffmpeg-4-compat.patch"
122 +)
123 +
124 +blender_check_requirements() {
125 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
126 +
127 + if use doc; then
128 + CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
129 + fi
130 +}
131 +
132 +pkg_pretend() {
133 + blender_check_requirements
134 +}
135 +
136 +pkg_setup() {
137 + blender_check_requirements
138 + python-single-r1_pkg_setup
139 +}
140 +
141 +src_prepare() {
142 + cmake-utils_src_prepare
143 +
144 + # we don't want static glew, but it's scattered across
145 + # multiple files that differ from version to version
146 + # !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
147 + local file
148 + while IFS="" read -d $'\0' -r file ; do
149 + sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
150 + done < <(find . -type f -name "CMakeLists.txt")
151 +
152 + # Disable MS Windows help generation. The variable doesn't do what it
153 + # it sounds like.
154 + sed -e "s|GENERATE_HTMLHELP = YES|GENERATE_HTMLHELP = NO|" \
155 + -i doc/doxygen/Doxyfile || die
156 +}
157 +
158 +src_configure() {
159 + # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
160 + # shadows, see bug #276338 for reference
161 + append-flags -funsigned-char
162 + append-lfs-flags
163 + # Blender is compatible ABI 4 or less, so use ABI 4.
164 + append-cppflags -DOPENVDB_ABI_VERSION_NUMBER=4
165 +
166 + local mycmakeargs=(
167 + -DPYTHON_VERSION="${EPYTHON/python/}"
168 + -DPYTHON_LIBRARY="$(python_get_library_path)"
169 + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
170 + -DWITH_INSTALL_PORTABLE=OFF
171 + -DWITH_PYTHON_INSTALL=OFF
172 + -DWITH_PYTHON_INSTALL_NUMPY=OFF
173 + -DWITH_STATIC_LIBS=OFF
174 + -DWITH_SYSTEM_GLEW=ON
175 + -DWITH_SYSTEM_OPENJPEG=ON
176 + -DWITH_SYSTEM_EIGEN3=ON
177 + -DWITH_SYSTEM_LZO=ON
178 + -DWITH_C11=ON
179 + -DWITH_CXX11=ON
180 + -DWITH_BOOST=ON
181 + -DWITH_BULLET=$(usex bullet)
182 + -DWITH_CODEC_FFMPEG=$(usex ffmpeg)
183 + -DWITH_CODEC_SNDFILE=$(usex sndfile)
184 + -DWITH_CUDA=$(usex cuda)
185 + -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
186 + -DWITH_CYCLES=$(usex cycles)
187 + -DWITH_CYCLES_OSL=$(usex osl)
188 + -DWITH_LLVM=$(usex llvm)
189 + -DWITH_FFTW3=$(usex fftw)
190 + -DWITH_GAMEENGINE=$(usex game-engine)
191 + -DWITH_HEADLESS=$(usex headless)
192 + -DWITH_X11=$(usex !headless)
193 + -DWITH_IMAGE_DDS=$(usex dds)
194 + -DWITH_IMAGE_OPENEXR=$(usex openexr)
195 + -DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
196 + -DWITH_IMAGE_TIFF=$(usex tiff)
197 + -DWITH_INPUT_NDOF=$(usex ndof)
198 + -DWITH_INTERNATIONAL=$(usex nls)
199 + -DWITH_JACK=$(usex jack)
200 + -DWITH_MOD_FLUID=$(usex elbeem)
201 + -DWITH_MOD_OCEANSIM=$(usex fftw)
202 + -DWITH_OPENAL=$(usex openal)
203 + -DWITH_OPENCL=$(usex opencl)
204 + -DWITH_OPENCOLORIO=$(usex colorio)
205 + -DWITH_OPENCOLLADA=$(usex collada)
206 + -DWITH_OPENIMAGEIO=$(usex openimageio)
207 + -DWITH_OPENMP=$(usex openmp)
208 + -DWITH_OPENSUBDIV=$(usex opensubdiv)
209 + -DWITH_OPENVDB=$(usex openvdb)
210 + -DWITH_OPENVDB_BLOSC=$(usex openvdb)
211 + -DWITH_PLAYER=$(usex player)
212 + -DWITH_SDL=$(usex sdl)
213 + -DWITH_CXX_GUARDEDALLOC=$(usex debug)
214 + -DWITH_ASSERT_ABORT=$(usex debug)
215 + -DWITH_GTESTS=$(usex test)
216 + -DWITH_DOC_MANPAGE=$(usex man)
217 + -DWITH_MEM_JEMALLOC=$(usex jemalloc)
218 + -DWITH_MEM_VALGRIND=$(usex valgrind)
219 + )
220 + cmake-utils_src_configure
221 +}
222 +
223 +src_compile() {
224 + cmake-utils_src_compile
225 +
226 + if use doc; then
227 + # Workaround for binary drivers.
228 + addpredict /dev/ati
229 + addpredict /dev/dri
230 + addpredict /dev/nvidiactl
231 +
232 + einfo "Generating Blender C/C++ API docs ..."
233 + cd "${CMAKE_USE_DIR}"/doc/doxygen || die
234 + doxygen -u Doxyfile || die
235 + doxygen || die "doxygen failed to build API docs."
236 +
237 + cd "${CMAKE_USE_DIR}" || die
238 + einfo "Generating (BPY) Blender Python API docs ..."
239 + "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
240 +
241 + cd "${CMAKE_USE_DIR}"/doc/python_api || die
242 + sphinx-build sphinx-in BPY_API || die "sphinx failed."
243 + fi
244 +}
245 +
246 +src_test() {
247 + if use test; then
248 + einfo "Running Blender Unit Tests ..."
249 + cd "${BUILD_DIR}"/bin/tests || die
250 + local f
251 + for f in *_test; do
252 + ./"${f}" || die
253 + done
254 + fi
255 +}
256 +
257 +src_install() {
258 + # Pax mark blender for hardened support.
259 + pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
260 +
261 + if use doc; then
262 + docinto "html/API/python"
263 + dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
264 +
265 + docinto "html/API/blender"
266 + dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
267 + fi
268 +
269 + cmake-utils_src_install
270 +
271 + # fix doc installdir
272 + docinto "html"
273 + dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
274 + rm -r "${ED%/}"/usr/share/doc/blender || die
275 +
276 + python_fix_shebang "${ED%/}/usr/bin/blender-thumbnailer.py"
277 + python_optimize "${ED%/}/usr/share/blender/${MY_PV}/scripts"
278 +}
279 +
280 +pkg_preinst() {
281 + gnome2_icon_savelist
282 +}
283 +
284 +pkg_postinst() {
285 + elog
286 + elog "Blender uses python integration. As such, may have some"
287 + elog "inherit risks with running unknown python scripts."
288 + elog
289 + elog "It is recommended to change your blender temp directory"
290 + elog "from /tmp to /home/user/tmp or another tmp file under your"
291 + elog "home directory. This can be done by starting blender, then"
292 + elog "dragging the main menu down do display all paths."
293 + elog
294 + ewarn
295 + ewarn "This ebuild does not unbundle the massive amount of 3rd party"
296 + ewarn "libraries which are shipped with blender. Note that"
297 + ewarn "these have caused security issues in the past."
298 + ewarn "If you are concerned about security, file a bug upstream:"
299 + ewarn " https://developer.blender.org/"
300 + ewarn
301 + gnome2_icon_cache_update
302 + xdg_mimeinfo_database_update
303 +}
304 +
305 +pkg_postrm() {
306 + gnome2_icon_cache_update
307 + xdg_mimeinfo_database_update
308 +
309 + ewarn ""
310 + ewarn "You may want to remove the following directory."
311 + ewarn "~/.config/${PN}/${MY_PV}/cache/"
312 + ewarn "It may contain extra render kernels not tracked by portage"
313 + ewarn ""
314 +}
315
316 diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
317 index 92c09eab0ec..685687e61af 100644
318 --- a/media-gfx/blender/metadata.xml
319 +++ b/media-gfx/blender/metadata.xml
320 @@ -9,10 +9,6 @@
321 <email>agrigo2001@×××××××××.au</email>
322 <name>Adrian Grigo</name>
323 </maintainer>
324 - <maintainer type="project">
325 - <email>proxy-maint@g.o</email>
326 - <name>Proxy Maintainers</name>
327 - </maintainer>
328 <maintainer type="project">
329 <email>graphics@g.o</email>
330 <name>Gentoo Graphics Project</name>