/[gentoo-x86]/media-gfx/blender/blender-2.64a.ebuild
Gentoo

Contents of /media-gfx/blender/blender-2.64a.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Dec 31 16:02:50 2012 UTC (20 months, 2 weeks ago) by flameeyes
Branch: MAIN
Changes since 1.1: +2 -2 lines
Remove 2.63a ebuild as no stable is coming to them at this point. Add a missing REQUIRED_USE for redcode/openjpeg (bug #446932).

(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.64a.ebuild,v 1.1 2012/11/18 01:06:23 flameeyes Exp $
4
5 EAPI=4
6 PYTHON_DEPEND="3:3.2"
7
8 PATCHSET="1"
9
10 inherit multilib scons-utils eutils python versionator flag-o-matic toolchain-funcs pax-utils check-reqs
11
12 IUSE="cycles +game-engine player +elbeem +openexr ffmpeg jpeg2k openal
13 openmp +dds fftw jack doc sndfile tweak-mode sdl sse redcode
14 iconv collada 3dmouse debug nls"
15 REQUIRED_USE="player? ( game-engine ) redcode? ( jpeg2k )"
16
17 LANGS="en ar bg ca cs de el es es_ES fa fi fr he hr hu id it ja ky ne nl pl pt pt_BR ru sr sr@latin sv tr uk zh_CN zh_TW"
18 for X in ${LANGS} ; do
19 IUSE+=" linguas_${X}"
20 REQUIRED_USE+=" linguas_${X}? ( nls )"
21 done
22
23 DESCRIPTION="3D Creation/Animation/Publishing System"
24 HOMEPAGE="http://www.blender.org"
25
26 case ${PV} in
27 *_p*)
28 SRC_URI="http://dev.gentoo.org/~lu_zero/${P}.tar.gz" ;;
29 *)
30 SRC_URI="http://download.blender.org/source/${P}.tar.gz" ;;
31 esac
32
33 if [[ -n ${PATCHSET} ]]; then
34 SRC_URI+=" http://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz"
35 fi
36
37 SLOT="0"
38 LICENSE="|| ( GPL-2 BL )"
39 KEYWORDS="~amd64 ~x86"
40
41 RDEPEND="virtual/jpeg
42 media-libs/libpng:0
43 x11-libs/libXi
44 x11-libs/libX11
45 media-libs/tiff:0
46 media-libs/libsamplerate
47 virtual/opengl
48 virtual/glu
49 >=media-libs/freetype-2.0
50 virtual/libintl
51 media-libs/glew
52 >=sci-physics/bullet-2.78[-double-precision]
53 dev-cpp/eigen:3
54 sci-libs/colamd
55 sci-libs/ldl
56 dev-cpp/glog[gflags]
57 sys-libs/zlib
58 cycles? (
59 media-libs/openimageio
60 >=dev-libs/boost-1.44[threads(+)]
61 )
62 iconv? ( dev-libs/libiconv )
63 sdl? ( media-libs/libsdl[audio,joystick] )
64 openexr? ( media-libs/openexr )
65 ffmpeg? (
66 >=virtual/ffmpeg-0.6.90[x264,mp3,encode,theora,jpeg2k?]
67 )
68 openal? ( >=media-libs/openal-1.6.372 )
69 fftw? ( sci-libs/fftw:3.0 )
70 jack? ( media-sound/jack-audio-connection-kit )
71 sndfile? ( media-libs/libsndfile )
72 collada? ( media-libs/opencollada )
73 3dmouse? ( dev-libs/libspnav )"
74
75 DEPEND="dev-util/scons
76 doc? (
77 dev-python/sphinx
78 app-doc/doxygen[-nodot(-),dot(+)]
79 )
80 nls? ( sys-devel/gettext )
81 ${RDEPEND}"
82
83 pkg_pretend() {
84 if use openmp && ! tc-has-openmp; then
85 eerror "You are using gcc built without 'openmp' USE."
86 eerror "Switch CXX to an OpenMP capable compiler."
87 die "Need openmp"
88 fi
89
90 if use doc; then
91 CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
92 fi
93 }
94
95 pkg_setup() {
96 python_set_active_version 3
97 }
98
99 src_prepare() {
100 epatch "${WORKDIR}"/${PV}/*.patch
101
102 # remove some bundled deps
103 rm -r \
104 extern/libopenjpeg \
105 extern/glew \
106 extern/Eigen3 \
107 extern/bullet2 \
108 extern/colamd \
109 extern/binreloc \
110 extern/libmv/third_party/{ldl,glog,gflags} \
111 || die
112
113 ewarn "$(echo "Remaining bundled dependencies:";
114 ( find extern -mindepth 1 -maxdepth 1 -type d; find extern/libmv/third_party -mindepth 1 -maxdepth 1 -type d; ) | sed 's|^|- |')"
115 }
116
117 src_configure() {
118 # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
119 # shadows, see bug #276338 for reference
120 append-flags -funsigned-char
121 append-lfs-flags
122
123 local mycflags=$(printf "'%s'," ${CPPFLAGS} ${CFLAGS} | sed -e 's:,$::')
124 local mycxxflags=$(printf "'%s'," ${CPPFLAGS} ${CXXFLAGS} | sed -e 's:,$::')
125 local myldflags=$(printf "'%s'," ${LDFLAGS} | sed -e 's:,$::')
126 cat << EOF >> "${S}"/user-config.py
127 CC="$(tc-getCC)"
128 CXX="$(tc-getCXX)"
129 CFLAGS=[${mycflags}]
130 CXXFLAGS=[${mycxxflags}]
131 BGE_CXXFLAGS=[${mycxxflags}]
132 LINKFLAGS=[${myldflags}]
133 PLATFORM_LINKFLAGS=[${myldflags}]
134 CCFLAGS=[]
135 REL_CFLAGS=[]
136 REL_CXXFLAGS=[]
137 REL_CCFLAGS=[]
138 C_WARN=[]
139 CC_WARN=[]
140 CXX_WARN=[]
141
142 BF_OPENJPEG="/usr"
143 BF_OPENJPEG_INC="/usr/include"
144 BF_OPENJPEG_LIB="openjpeg"
145
146 WITH_BF_BULLET=1
147 BF_BULLET="/usr/include"
148 BF_BULLET_INC="/usr/include/bullet /usr/include/bullet/BulletCollision /usr/include/bullet/BulletDynamics /usr/include/bullet/LinearMath /usr/include/bullet/BulletSoftBody"
149 BF_BULLET_LIB="BulletSoftBody BulletDynamics BulletCollision LinearMath"
150
151 WITH_BF_COLAMD=1
152 BF_COLAMD="/usr"
153 BF_COLAMD_INC="/usr/include"
154 BF_COLAMD_LIB="colamd"
155
156 BF_OPENCOLLADA_INC="/usr/include/opencollada/"
157 BF_OPENCOLLADA_LIBPATH="/usr/$(get_libdir)/opencollada/"
158
159 BF_OIIO="/usr"
160 BF_OIIO_INC="/usr/include"
161 BF_OIIO_LIB="OpenImageIO"
162
163 BF_BOOST="/usr"
164 BF_BOOST_INC="/usr/include/boost"
165
166 BF_ICONV="/usr"
167
168 BF_TWEAK_MODE=$(usex tweak-mode 1 0)
169 BF_DEBUG=$(usex debug 1 0)
170
171 BF_OPENGL_LIB='GL GLU X11 Xi GLEW'
172 BF_INSTALLDIR="../install"
173 WITH_PYTHON_SECURITY=1
174 WITHOUT_BF_PYTHON_INSTALL=1
175 BF_PYTHON="/usr"
176 BF_PYTHON_VERSION="3.2"
177 BF_PYTHON_ABI_FLAGS=""
178 BF_BUILDINFO=0
179 BF_QUIET=0
180 BF_LINE_OVERWRITE=0
181 WITH_BF_FHS=1
182 WITH_BF_BINRELOC=0
183 WITH_BF_STATICOPENGL=0
184 EOF
185
186 blend_with() {
187 echo "WITH_BF_${2:-$1}=$(usex $1 1 0)" | tr '[:lower:]' '[:upper:]' \
188 >> "${S}"/user-config.py
189 }
190
191 # configure WITH_BF* Scons build options
192 blend_with 3dmouse
193 blend_with collada
194 blend_with cycles boost
195 blend_with cycles oiio
196 blend_with cycles
197 blend_with dds
198 blend_with doc docs
199 blend_with elbeem fluid
200 blend_with ffmpeg ogg
201 blend_with ffmpeg
202 blend_with fftw fftw3
203 blend_with fftw oceansim
204 blend_with game-engine gameengine
205 blend_with iconv
206 blend_with jack
207 blend_with jpeg2k openjpeg
208 blend_with nls international
209 blend_with openal
210 blend_with openexr
211 blend_with openmp
212 blend_with player
213 blend_with redcode
214 blend_with sdl
215 blend_with sndfile
216 blend_with sse rayoptimization
217 }
218
219 src_compile() {
220 escons
221
222 cat - > "${T}"/${PN}.env <<EOF
223 BLENDER_SYSTEM_SCRIPTS="/usr/share/blender/scripts"
224 BLENDER_SYSTEM_DATAFILES="/usr/share/blender/datafiles"
225 BLENDER_SYSTEM_PLUGINS="/usr/$(get_libdir)/plugins"
226 EOF
227
228 if use doc; then
229 einfo "Generating Blender C/C++ API docs ..."
230 cd "${S}"/doc/doxygen
231 doxygen -u Doxyfile
232 doxygen || die "doxygen failed to build API docs."
233
234 cd "${S}"
235 einfo "Generating (BPY) Blender Python API docs ..."
236 "${WORKDIR}"/install/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "blender failed."
237
238 cd "${S}"/doc/python_api
239 sphinx-build sphinx-in BPY_API || die "sphinx failed."
240 fi
241 }
242
243 src_test() { :; }
244
245 src_install() {
246 # Pax mark blender for hardened support.
247 pax-mark m "${WORKDIR}/install/blender"
248
249 newenvd "${T}"/${PN}.env 60${PN}
250
251 # install binaries
252 dobin "${WORKDIR}/install/blender"
253 use player && newbin "${WORKDIR}/install/blenderplayer" blenderplayer
254
255 # install desktop file and icons
256 domenu release/freedesktop/blender.desktop
257 insinto /usr/share/icons/hicolor
258 doins -r release/freedesktop/icons/{*x*,scalable}
259
260 # install docs
261 doman "${WORKDIR}"/${P}/doc/manpage/blender.1
262 dodoc -r "${WORKDIR}"/${P}/doc/guides/*
263
264 if use doc; then
265 docinto "API/python"
266 dohtml -r "${S}"/doc/python_api/BPY_API/*
267
268 docinto "API/blender"
269 dohtml -r "${S}"/doc/doxygen/html/*
270 fi
271
272 # final cleanup
273 rm -r "${WORKDIR}"/install/{Python-license.txt,icons,GPL-license.txt,copyright.txt}
274 if ! use nls; then
275 rm -r "${WORKDIR}/install/${PV/a}/datafiles/locale"
276 else
277 for x in "${WORKDIR}"/install/${PV/a}/datafiles/locale/* ; do
278 mylang=${x##*/}
279 use linguas_${mylang} || rm -r ${x}
280 done
281 fi
282
283 # installing blender
284 insinto /usr/share/${PN}
285 doins -r "${WORKDIR}"/install/${PV/a}/*
286 }
287
288 pkg_postinst() {
289 elog
290 elog "Blender uses python integration. As such, may have some"
291 elog "inherit risks with running unknown python scripting."
292 elog
293 elog "It is recommended to change your blender temp directory"
294 elog "from /tmp to /home/user/tmp or another tmp file under your"
295 elog "home directory. This can be done by starting blender, then"
296 elog "dragging the main menu down do display all paths."
297 elog
298 ewarn "If you're updating from blender before 2.63a, please make"
299 ewarn "sure to log out and then back in before launching it, so"
300 ewarn "that the new environment variables are picked up."
301 }

  ViewVC Help
Powered by ViewVC 1.1.20