# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="2" NEED_PYTHON=3.1 inherit subversion multilib eutils python cmake-utils IUSE="blender-game nls elbeem +openexr ffmpeg jpeg +openal web openmp verse physic \ +dds debug doc" DESCRIPTION="3D Creation/Animation/Publishing System" HOMEPAGE="http://www.blender.org/" ESVN_REPO_URI="https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender/" SLOT="0" LICENSE="|| ( GPL-2 BL )" KEYWORDS="" # NOTES: # - cmake 2.6.4-r2 is required to correctly detect python 3.1; RDEPEND="media-libs/jpeg media-libs/libpng >=media-libs/libsdl-1.2 x11-libs/libXi x11-libs/libX11 sys-libs/zlib media-libs/tiff virtual/opengl blender-game? ( >=media-libs/libsdl-1.2[joystick] ) nls? ( >=media-libs/freetype-2.0 virtual/libintl >=media-libs/ftgl-2.1 ) openexr? ( media-libs/openexr ) ffmpeg? ( >=media-video/ffmpeg-0.5 ) jpeg? ( media-libs/openjpeg ) openal? ( >=media-libs/openal-1.6.372 ) web? ( >=net-libs/xulrunner-1.9.0.10:1.9 )" DEPEND="sys-devel/gcc[openmp?] >=dev-util/cmake-2.6.4-r2[python3] ${RDEPEND}" S="${WORKDIR}/${PN}" src_unpack() { subversion_src_unpack } src_prepare() { epatch "${FILESDIR}"/${PN}-2.49a-sys-openjpeg.patch epatch "${FILESDIR}"/${PN}-desktop.patch } src_configure() { mycmakeargs="${mycmakeargs} \ $(cmake-utils_use debug CMAKE_VERBOSE_MAKEFILE) \ -DWITH_PLAYER:BOOL=OFF \ $(cmake-utils_use_with physic BULLET) \ $(cmake-utils_use_with nls INTERNATIONAL) \ $(cmake-utils_use_with elbeem ELBEEM) \ -DWITH_QUICKTIME:BOOL=OFF \ $(cmake-utils_use_with openexr OPENEXR) \ $(cmake-utils_use_with dds DDS) \ $(cmake-utils_use_with ffmpeg FFMPEG) \ -DWITH_PYTHON:BOOL=ON \ -DWITH_SDL:BOOL=ON \ $(cmake-utils_use_with jpeg OPENJPEG) \ $(cmake-utils_use_with openal OPENAL) \ $(cmake-utils_use_with openmp OPENMP) \ $(cmake-utils_use_with web WEBPLUGIN) \ $(cmake-utils_use_with blender-game GAMEENGINE)" cmake-utils_src_configure } # NOTE: blender lacks a CMake install target src_install() { exeinto /usr/bin/ doexe "${CMAKE_BUILD_DIR}"/bin/blender use blender-game && doexe "${CMAKE_BUILD_DIR}"/bin/blenderplayer dodir /usr/share/${PN} # NOTE: textures and plugins are missing from the SVN # exeinto /usr/$(get_libdir)/${PN}/textures # doexe "${WORKDIR}"/install/linux2/plugins/texture/*.so # exeinto /usr/$(get_libdir)/${PN}/sequences # doexe "${WORKDIR}"/install/linux2/plugins/sequence/*.so # insinto /usr/include/${PN} # doins "${WORKDIR}"/install/linux2/plugins/include/*.h if use nls ; then mv "${CMAKE_BUILD_DIR}"/bin/.blender/{.Blanguages,.bfont.ttf} \ "${D}"/usr/share/${PN} mv "${CMAKE_BUILD_DIR}"/bin/.blender/locale \ "${D}"/usr/share/locale fi mv "${CMAKE_BUILD_DIR}"/bin/.blender/scripts "${D}"/usr/share/${PN} insinto /usr/share/pixmaps doins release/freedesktop/icons/scalable/blender.svg insinto /usr/share/applications doins release/freedesktop/blender.desktop dodoc INSTALL README use doc && dodoc "${WORKDIR}"/install/linux2/BlenderQuickStart.pdf } pkg_preinst(){ if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ]; then rm "${ROOT}"/usr/$(get_libdir)/blender/plugins/include fi }