1 # Copyright 1999-2010 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.49b.ebuild,v 1.3 2010/05/31 15:02:53 arfrever Exp $
7 inherit multilib eutils python
9 IUSE="blender-game ffmpeg nls ogg openmp verse openal"
11 DESCRIPTION="3D Creation/Animation/Publishing System"
12 HOMEPAGE="http://www.blender.org/"
14 SRC_URI="http://download.blender.org/source/${MY_P}.tar.gz"
18 LICENSE="|| ( GPL-2 BL BSD )"
19 KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
21 RDEPEND="ffmpeg? ( >=media-video/ffmpeg-0.5[encode,theora] )
26 nls? ( >=media-libs/freetype-2.0
28 >=media-libs/ftgl-2.1 )
29 openal? ( >=media-libs/openal-1.6.372
30 >=media-libs/freealut-1.1.0-r1 )
33 blender-game? ( >=media-libs/libsdl-1.2[joystick] )
34 >=media-libs/libsdl-1.2
35 ogg? ( media-libs/libogg )
38 DEPEND=">=dev-util/scons-0.98
39 sys-devel/gcc[openmp?]
46 if [ -z "${UWORD}" ]; then
50 echo "WITH_BF_${UWORD}=1" | tr '[:lower:]' '[:upper:]' \
51 >> "${S}"/user-config.py
53 echo "WITH_BF_${UWORD}=0" | tr '[:lower:]' '[:upper:]' \
54 >> "${S}"/user-config.py
59 rm -f "${S}/release/scripts/bpymodules/"*.pyc
64 # add ffmpeg info to the scons build info
65 # cat <<- EOF >> "${S}"/user-config.py
67 # BF_FFMPEG_LIB="avdevice avformat avcodec swscale avutil"
70 # set python version to current version in use
71 # cat <<- EOF >> "${S}"/user-config.py
72 # BF_PYTHON_VERSION="$(python_get_version)"
73 # BF_PYTHON_INC="$(python_get_includedir)"
74 # BF_PYTHON_BINARY="$(PYTHON -a)"
75 # BF_PYTHON_LIB="python$(python_get_version)"
78 # add system openjpeg into scons build.
79 # cat <<- EOF >> "${S}"/user-config.py
80 # BF_OPENJPEG = "/usr"
81 # BF_OPENJPEG_INC = "/usr/include"
82 # BF_OPENJPEG_LIB = "openjpeg"
85 #set CFLAGS used in /etc/make.conf correctly
87 echo "CFLAGS= [`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`] " \
88 | sed -e "s:,]: ]:" >> "${S}"/user-config.py
90 echo "CXXFLAGS= [`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`]" \
91 | sed -e "s:,]: ]:" >> "${S}"/user-config.py
93 # check for blender-game USE flag.
94 # blender-game will merge with blenderplayer.
99 'blender-game player' \
100 'blender-game gameengine' \
101 'nls international' \
110 # scons uses -l differently -> remove it
111 scons ${MAKEOPTS/-l[0-9]} || die \
112 '!!! Please add "${S}/scons.config" when filing bugs reports \
115 cd "${WORKDIR}"/install/linux2/plugins
122 PVshort="${PV%_beta}"
125 doexe "${WORKDIR}"/install/linux2/blender
126 use blender-game && doexe "${WORKDIR}"/install/linux2/blenderplayer
128 dodir /usr/share/${PN}
130 exeinto /usr/$(get_libdir)/${PN}/textures
131 doexe "${WORKDIR}"/install/linux2/plugins/texture/*.so
132 exeinto /usr/$(get_libdir)/${PN}/sequences
133 doexe "${WORKDIR}"/install/linux2/plugins/sequence/*.so
134 insinto /usr/include/${PN}
135 doins "${WORKDIR}"/install/linux2/plugins/include/*.h
137 insinto /usr/share/${PN}
138 doins -r "${WORKDIR}"/install/linux2/${PVshort}/scripts
140 insinto /usr/share/pixmaps
141 doins "${WORKDIR}"/install/linux2/icons/scalable/blender.svg
142 insinto /usr/share/applications
143 doins "${WORKDIR}"/blender-2.54-beta/release/freedesktop/blender.desktop
145 dodoc "${WORKDIR}"/install/linux2/readme.html
148 doins "${FILESDIR}/20${PN}"
152 if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ];
154 rm -f "${ROOT}"/usr/$(get_libdir)/blender/plugins/include
161 elog "blender uses python integration. As such, may have some"
162 elog "inherit risks with running unknown python scripting."
164 elog "CVE-2008-1103-1.patch has been removed as it interferes"
165 elog "with autosave undo features. Up stream blender coders"
166 elog "have not addressed the CVE issue as the status is still"
167 elog "a CANDIDATE and not CONFIRMED."
169 elog "It is recommended to change your blender temp directory"
170 elog "from /tmp to ~tmp or another tmp file under your home"
171 elog "directory. This can be done by starting blender, then"
172 elog "dragging the main menu down do display all paths."