diff options
author | Anthoine Bourgeois <anthoine.bourgeois@gmail.com> | 2012-01-22 00:58:18 +0100 |
---|---|---|
committer | Anthoine Bourgeois <anthoine.bourgeois@gmail.com> | 2012-01-22 01:03:52 +0100 |
commit | b2f1e1ab756cb209c8343cfb2362dac8a154cc88 (patch) | |
tree | f4e69f48ad578d5d0874e3def34c5f79caf3d799 | |
parent | +blender-2.61-r2.ebuild (diff) | |
download | aluco-b2f1e1ab756cb209c8343cfb2362dac8a154cc88.tar.gz aluco-b2f1e1ab756cb209c8343cfb2362dac8a154cc88.tar.bz2 aluco-b2f1e1ab756cb209c8343cfb2362dac8a154cc88.zip |
+blender-2.61-r3.ebuild
- Add collada use flag.
- Remove colamd bundle library.
- Add pax-mark on blender binary.
-rw-r--r-- | media-gfx/blender/Manifest | 5 | ||||
-rw-r--r-- | media-gfx/blender/blender-2.61-r3.ebuild | 437 | ||||
-rw-r--r-- | media-gfx/blender/files/blender-2.60-colamd.patch | 204 | ||||
-rw-r--r-- | media-gfx/blender/files/blender-2.61-collada.patch | 11 | ||||
-rw-r--r-- | media-gfx/blender/metadata.xml | 3 |
5 files changed, 659 insertions, 1 deletions
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest index b1d348d..56835cc 100644 --- a/media-gfx/blender/Manifest +++ b/media-gfx/blender/Manifest @@ -1,5 +1,6 @@ AUX blender-2.60-bmake.patch 3429 RMD160 585fe2729d0756fbb80d62b35da96d7c7d07b78d SHA1 7832d676e4625ec139bfc9fe113604f4c810a614 SHA256 3432df1f780503ad34a96c83d3faea9fabe2fa58f1bcdf6a52a2d7ae33874f16 AUX blender-2.60-bullet.patch 7975 RMD160 3309d8ff9b5784963c85b0ec6fa5be29dab70015 SHA1 978d53a49fe76f107899432a4a88975cead1dddc SHA256 5b76da258eb6ce5533afa400838ee87819aece386911993de69a7864d0290467 +AUX blender-2.60-colamd.patch 8814 RMD160 e9b43b6a17c5328c5ca90cfec2bc2abcb53b2554 SHA1 eab44bd70212e4d029e0484b09cd7779e1ef751c SHA256 39432e50395c70f19f599cc35a35426fccc3b6675eec6a0696955e18d4f05f8d AUX blender-2.60-doxyfile.patch 595 RMD160 f4890f0ead6943f323bc61e7f6766c2133e8591b SHA1 0fd7c202f044224cf9944596cf36cfcd56b39067 SHA256 d267e0fab4ecb9be78b9238a9c2af60ac9d5ddb7b42f73f479b9266704605883 AUX blender-2.60-eigen.patch 13804 RMD160 67b2d444f35ac5b9f2e2fc1ee93a105feadc83db SHA1 943ba7ebd2f37102b62d790d7ad4795695fba268 SHA256 b973b07db667ab84eebae24c47805772f6f2694bb77cb8846431d502c56b54d8 AUX blender-2.60-glew.patch 1128 RMD160 392907190c8c970a1b2f0b20067d9f1bf108edbc SHA1 e9890bc4c420b16ce4f9c9c6cfc71c13852e4de3 SHA256 a43f0a0ac2a0cc5096e8488c926e7a32933a5910300440590a1cac5e1bb73f20 @@ -15,6 +16,7 @@ AUX blender-2.60a-libav-0.7.patch 1181 RMD160 66dc84d6ca37a97bb43886ed86b7249938 AUX blender-2.60a-linux-3.patch 414 RMD160 cb1cfc00e363e00c67a3c6d3567768418be78f39 SHA1 71f4701aa2e88de35843661cf5eecfe411ccd99b SHA256 4f1f8960e1b5706b426e272c17b70682b1eaa5903fa325e4d4db21efd540d732 AUX blender-2.61-CVE-2009-3850-v3.patch 7515 RMD160 0faf4de3a330fd2920bdf2b688d3bc5cb530d86f SHA1 77c637a4e6be816534887dab06614bb3dddad3af SHA256 f9d2eb3e09d30c21a3f51de34bc978d25c598a2fc420e809ea49293c55178139 AUX blender-2.61-CVE-2009-3850-v4.patch 9194 RMD160 cf5519882821c318f32ac3ff16f0a73998941228 SHA1 91e029b6bcdad6adec3034dc313604cae9f9d4dd SHA256 bcf6155d39ee3a31422ddfd21e729bce542a181ebdcfd9c4a6e40c37e06b9485 +AUX blender-2.61-collada.patch 1402 RMD160 89c91ad636614f06ab8b007c5064c06171943ebf SHA1 a2e444d6c25f07d07a9b77eee2a364015a57c28d SHA256 0b5d31b31e113053a998a8c16244b2d5801a8dac0f63fbd5905a51308981b4af AUX blender-2.61-desktop.patch 645 RMD160 ecba28ff2be0a72da11adf4f5b6a0dcdcb5af881 SHA1 d128fad9689e07758958915a74ba647b9a919bfd SHA256 e5936f45e1c0a1e0fa723609a66d8818c045cd56d3927ffbbd941d09cdbe4878 AUX blender-2.61-eigen.patch 27106 RMD160 3042ba69913c98531ad60bd3a7fadf7817c5b062 SHA1 cde414399438b7d9ea7e756ef86aa08b5c9983e2 SHA256 e1e465f158a49287795d0f1a046d59b8d7ff8459c3ea8d57ee4b40518897d903 AUX blender-2.61-enable_site_module.patch 1061 RMD160 60ba42b15c490776200fa0eea38ae7c856a1f567 SHA1 a9e5bf42d9b6ade5fb595009c6fde7412b002a8f SHA256 3d7b7c0814d97ed5db76828e243120782a0fb0a5304b90d978c3a20e1fb37a83 @@ -26,5 +28,6 @@ DIST blender-2.61.tar.gz 25087312 RMD160 fb3b368144d31cd850a0602b7b5e746fca17d7f EBUILD blender-2.60a.ebuild 13760 RMD160 bc4458ccf226e20c140ed022325c35bda09a1add SHA1 95a5894363e730db0a66a16f9e8fcb775ea6896a SHA256 146e61d01da115d202f5c77b17ae938a4c2e92344b71b5422bcf6165d4d71d29 EBUILD blender-2.61-r1.ebuild 12982 RMD160 a4c10e2cde47bc97742e3efbbff2fbe0839bf1be SHA1 5492736f268813bf11841ae44cfcc3ba655ba04e SHA256 90d8e092d353ff35d8966ed4e3dc01d6514fc5dc41850ea5cd72c2f0e88bd215 EBUILD blender-2.61-r2.ebuild 12243 RMD160 088c95922bc6d4ab8242fba88aae562c5e40369b SHA1 b12e3f8a164bcf08a4f01370371bca61a0907653 SHA256 06853bb84b49eb7e725875635c1ef1ed1ca4465442a6a001163ec60ee8a4929c +EBUILD blender-2.61-r3.ebuild 13127 RMD160 7517357f9eeb20d741e9e689c98b9ea588a0d8b3 SHA1 1e3d01bf86ee13e9ec2b95848e5668fbe2dfc7bb SHA256 e166622430e74df56dbaae0017fac729a5d9dd99e944256e42b09047d56dd17a EBUILD blender-2.61.ebuild 13767 RMD160 dfe843c6b2cff607f1215faea2eb805d03d689a7 SHA1 8b43d751d3c2b0d1c0dad0d47c0cdb202674b65b SHA256 0e4929b08a6e1da7c46ff57b12aa27c21c2f7071933d7b2002d26d15407511d8 -MISC metadata.xml 1950 RMD160 4f655c5a2b1655cfd7dadefd6b2339e377754c95 SHA1 572f149d0db5c14f59bc1e1b81a6c5b05ec64d75 SHA256 4092dd599e75006e9403a3db51ec0b2813094fe59a96ccffe360c007782019f1 +MISC metadata.xml 2031 RMD160 7cef28cc97256936c8420d9399c5469dc917f7d1 SHA1 734027d18091dc859e24ec436f7ac992521223d7 SHA256 2aec9b99fcd11925094c06634d41af4cd3681cb81b404cc170b230dd4e337d13 diff --git a/media-gfx/blender/blender-2.61-r3.ebuild b/media-gfx/blender/blender-2.61-r3.ebuild new file mode 100644 index 0000000..c56ebbd --- /dev/null +++ b/media-gfx/blender/blender-2.61-r3.ebuild @@ -0,0 +1,437 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.60a.ebuild,v 1.4 2011/11/13 22:43:48 sping Exp $ + +PYTHON_DEPEND="3:3.2" +EAPI=4 + +if [[ ${PV} == *9999 ]] ; then +SCM="subversion" +ESVN_REPO_URI="https://svn.blender.org/svnroot/bf-blender/trunk/blender" +fi + +inherit multilib scons-utils eutils python versionator flag-o-matic toolchain-funcs pax-utils ${SCM} + +IUSE="cycles +game-engine player +elbeem +openexr ffmpeg jpeg2k openal openmp \ + +dds debug doc fftw jack apidoc sndfile tweak-mode sdl sse \ + redcode +zlib iconv contrib collada 3dmouse" + +LANGS="en ar bg ca cs de el es fi fr hr it ja ko nl pl pt_BR ro ru sr sv uk zh_CN" +for X in ${LANGS} ; do + IUSE="${IUSE} linguas_${X}" +done + +DESCRIPTION="3D Creation/Animation/Publishing System" +HOMEPAGE="http://www.blender.org" +if [[ ${PV} == *9999 ]] ; then + SRC_URI="" +elif [[ ${PV%_p*} != ${PV} ]] ; then # Gentoo snapshot + SRC_URI="mirror://gentoo/${P}.tar.xz" +else # Official release + SRC_URI="http://download.blender.org/source/${P}.tar.gz" +fi + +#SLOT="$(get_version_component_range 1-2)" +SLOT="2.60" +LICENSE="|| ( GPL-2 BL )" +KEYWORDS="~amd64 ~x86" + +RDEPEND="virtual/jpeg + media-libs/libpng + x11-libs/libXi + x11-libs/libX11 + media-libs/tiff + media-libs/libsamplerate + virtual/opengl + >=media-libs/freetype-2.0 + virtual/libintl + media-libs/glew + >=sci-physics/bullet-2.78 + dev-cpp/eigen:3 + sci-libs/colamd + cycles? ( + media-libs/openimageio + dev-libs/boost + ) + iconv? ( virtual/libiconv ) + zlib? ( sys-libs/zlib ) + sdl? ( media-libs/libsdl[audio,joystick] ) + openexr? ( media-libs/openexr ) + ffmpeg? ( + >=virtual/ffmpeg-0.6.90[x264,mp3,encode,theora] + jpeg2k? ( >=virtual/ffmpeg-0.6.90[x264,mp3,encode,theora,jpeg2k] ) + ) + openal? ( >=media-libs/openal-1.6.372 ) + fftw? ( sci-libs/fftw:3.0 ) + jack? ( media-sound/jack-audio-connection-kit ) + sndfile? ( media-libs/libsndfile ) + collada? ( media-libs/opencollada ) + 3dmouse? ( media-libs/libspnav )" + +DEPEND="dev-util/scons + apidoc? ( + dev-python/sphinx + app-doc/doxygen[-nodot] + game-engine? ( dev-python/epydoc ) + ) + ${RDEPEND}" + +# configure internationalization only if LINGUAS have more +# languages than 'en', otherwise must be disabled +if [[ ${LINGUAS} != "en" && -n ${LINGUAS} ]]; then + DEPEND="${DEPEND} + sys-devel/gettext" +fi + +blend_with() { + local UWORD="$2" + [ -z "${UWORD}" ] && UWORD="$1" + if use $1; then + echo "WITH_BF_${UWORD}=1" | tr '[:lower:]' '[:upper:]' \ + >> "${S}"/user-config.py + else + echo "WITH_BF_${UWORD}=0" | tr '[:lower:]' '[:upper:]' \ + >> "${S}"/user-config.py + fi +} + +src_unpack() { +if [[ ${PV} == *9999 ]] ; then + subversion_fetch + if use contrib; then + S="${S}"/release/scripts/addons_contrib subversion_fetch \ + "https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/" + fi +else + unpack ${A} +fi +} + +pkg_setup() { + enable_openmp=0 + if use openmp; then + if tc-has-openmp; then + enable_openmp=1 + else + ewarn "You are using gcc built without 'openmp' USE." + ewarn "Switch CXX to an OpenMP capable compiler." + die "Need openmp" + fi + fi + python_set_active_version 3 +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-desktop.patch + epatch "${FILESDIR}"/${P}-collada.patch + + # OpenJPEG + einfo "Removing bundled OpenJPEG ..." + rm -r extern/libopenjpeg + epatch "${FILESDIR}"/${PN}-${SLOT}-openjpeg.patch + + # Glew + einfo "Removing bundled Glew ..." + rm -r extern/glew + epatch "${FILESDIR}"/${P}-glew.patch + + # Eigen3 + einfo "Removing bundled Eigen3 ..." + rm -r extern/Eigen3 + epatch "${FILESDIR}"/${P}-eigen.patch + + # Bullet2 + einfo "Removing bundled Bullet2 ..." + rm -r extern/bullet2 + epatch "${FILESDIR}"/${PN}-${SLOT}-bullet.patch + + # Colamd + einfo "Removing bundled Colamd ..." + rm -r extern/colamd + epatch "${FILESDIR}"/${PN}-${SLOT}-colamd.patch + + ewarn "$(echo "Remaining bundled dependencies:"; + find extern -mindepth 1 -maxdepth 1 -type d | sed 's|^|- |')" + + # Linux 3.x (bug #381099) + epatch "${FILESDIR}"/${PN}-${SLOT}-linux-3.patch + + epatch "${FILESDIR}"/${PN}-${SLOT}-libav-0.7.patch + epatch "${FILESDIR}"/${P}-CVE-2009-3850-v4.patch + epatch "${FILESDIR}"/${P}-enable_site_module.patch +} + +src_configure() { + # add system openjpeg into Scons build options. + cat <<- EOF >> "${S}"/user-config.py + BF_OPENJPEG="/usr" + BF_OPENJPEG_INC="/usr/include" + BF_OPENJPEG_LIB="openjpeg" + EOF + + # add system sci-physic/bullet into Scons build options. + cat <<- EOF >> "${S}"/user-config.py + WITH_BF_BULLET=1 + BF_BULLET="/usr/include" + BF_BULLET_INC="/usr/include/bullet /usr/include/bullet/BulletCollision /usr/include/bullet/BulletDynamics /usr/include/bullet/LinearMath /usr/include/bullet/BulletSoftBody" + BF_BULLET_LIB="BulletSoftBody BulletDynamics BulletCollision LinearMath" + EOF + + # add system sci-libs/colamd into Scons build options. + cat <<- EOF >> "${S}"/user-config.py + WITH_BF_COLAMD=1 + BF_COLAMD="/usr" + BF_COLAMD_INC="/usr/include" + BF_COLAMD_LIB="colamd" + EOF + + #add iconv into Scons build options. + if use !elibc_glibc && use !elibc_uclibc && use iconv; then + cat <<- EOF >> "${S}"/user-config.py + WITH_BF_ICONV=1 + BF_ICONV="/usr" + EOF + fi + + # configure internationalization only if LINGUAS have more + # languages than 'en', otherwise must be disabled + [[ -z ${LINGUAS} ]] || [[ ${LINGUAS} == "en" ]] && echo "WITH_BF_INTERNATIONAL=0" >> "${S}"/user-config.py + + # configure Elbeem fluid system + use elbeem || echo "BF_NO_ELBEEM=1" >> "${S}"/user-config.py + + # configure Tweak Mode + use tweak-mode && echo "BF_TWEAK_MODE=1" >> "${S}"/user-config.py + + # FIX: Game Engine module needs to be active to build the Blender Player + if ! use game-engine && use player; then + elog "Forcing Game Engine [+game-engine] as required by Blender Player [+player]" + echo "WITH_BF_GAMEENGINE=1" >> "${S}"/user-config.py + else + blend_with game-engine gameengine + fi + + # set CFLAGS used in /etc/make.conf correctly + echo "CFLAGS=[`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`] " \ + | sed -e "s:,]: ]:" >> "${S}"/user-config.py + + # set CXXFLAGS used in /etc/make.conf correctly + local FILTERED_CXXFLAGS="`for i in ${CXXFLAGS[@]}; do printf "%s \'$i"\',; done`" + echo "CXXFLAGS=[${FILTERED_CXXFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + echo "BGE_CXXFLAGS=[${FILTERED_CXXFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + + # reset general options passed to the C/C++ compilers (useless hardcoded flags) + # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu + # shadows, see bug #276338 for reference + echo "CCFLAGS= ['-funsigned-char', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']" >> "${S}"/user-config.py + + # set LDFLAGS used in /etc/make.conf correctly + local FILTERED_LDFLAGS="`for i in ${LDFLAGS[@]}; do printf "%s \'$i"\',; done`" + echo "LINKFLAGS=[${FILTERED_LDFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + echo "PLATFORM_LINKFLAGS=[${FILTERED_LDFLAGS}]" | sed -e "s:,]: ]:" >> "${S}"/user-config.py + + # reset REL_* variables (useless hardcoded flags) + cat <<- EOF >> "${S}"/user-config.py + REL_CFLAGS=[] + REL_CXXFLAGS=[] + REL_CCFLAGS=[] + EOF + + # reset warning flags (useless for NON blender developers) + cat <<- EOF >> "${S}"/user-config.py + C_WARN =[ '-w', '-g0' ] + CC_WARN =[ '-w', '-g0' ] + CXX_WARN=[ '-w', '-g0' ] + EOF + + # detecting -j value from MAKEOPTS + local NUMJOBS="$( echo "${MAKEOPTS}" | sed -ne 's,.*-j\([[:digit:]]\+\).*,\1,p' )" + [[ -z "${NUMJOBS}" ]] && NUMJOBS=1 # resetting to -j1 for empty MAKEOPTS + + # generic settings which differ from the defaults from linux2-config.py + cat <<- EOF >> "${S}"/user-config.py + BF_OPENGL_LIB='GL GLU X11 Xi GLEW' + BF_INSTALLDIR="../install" + WITH_PYTHON_SECURITY=1 + WITHOUT_BF_PYTHON_INSTALL=1 + BF_PYTHON="/usr" + BF_PYTHON_VERSION="3.2" + BF_PYTHON_ABI_FLAGS="" + BF_BUILDINFO=0 + BF_QUIET=1 + BF_NUMJOBS=${NUMJOBS} + BF_LINE_OVERWRITE=0 + WITH_BF_FHS=1 + WITH_BF_BINRELOC=0 + WITH_BF_STATICOPENGL=0 + WITH_BF_OPENMP=${enable_openmp} + EOF + + # configure WITH_BF* Scons build options + for arg in \ + 'sdl' \ + 'apidoc docs' \ + 'jack' \ + 'sndfile' \ + 'openexr' \ + 'dds' \ + 'fftw fftw3' \ + 'jpeg2k openjpeg' \ + 'openal'\ + 'ffmpeg' \ + 'ffmpeg ogg' \ + 'player' \ + 'sse rayoptimization' \ + 'redcode' \ + 'zlib' \ + 'collada' \ + '3dmouse' ; do + blend_with ${arg} + done + + # add system media-libs/opencollada into Scons build options. + echo 'BF_OPENCOLLADA_INC="/usr/include/opencollada/"' >> "${S}"/user-config.py + echo 'BF_OPENCOLLADA_LIBPATH="/usr/'$(get_libdir)'/opencollada/"' >> "${S}"/user-config.py + + # enable debugging/testing support + use debug && echo "BF_DEBUG=1" >> "${S}"/user-config.py + use test && echo "BF_UNIT_TEST=1" >> "${S}"/user-config.py + + # enables Cycles render engine + if use cycles; then + cat <<- EOF >> "${S}"/user-config.py + WITH_BF_CYCLES=1 + WITH_BF_OIIO=1 + BF_OIIO="/usr" + BF_OIIO_INC="/usr/include" + BF_OIIO_LIB="OpenImageIO" + WITH_BF_BOOST=1 + BF_BOOST="/usr" + BF_BOOST_INC="/usr/include/boost" + EOF + fi + +} + +src_compile() { + escons || die \ + '!!! Please add "${S}/scons.config" when filing bugs reports \ + to bugs.gentoo.org' +} + +src_install() { + # creating binary wrapper + cat <<- EOF >> "${WORKDIR}/install/blender-${PV}" + #!/bin/sh + + # stop this script if the local blender path is a symlink + if [ -L \${HOME}/.blender ]; then + echo "Detected a symbolic link for \${HOME}/.blender" + echo "Sorry, to avoid dangerous situations, the Blender binary can" + echo "not be started until you have removed the symbolic link:" + echo " # rm -i \${HOME}/.blender" + exit 1 + fi + + export BLENDER_SYSTEM_SCRIPTS="/usr/share/blender/${PV}/scripts" + export BLENDER_SYSTEM_DATAFILES="/usr/share/blender/${PV}/datafiles" + export BLENDER_SYSTEM_PLUGINS="/usr/lib/blender/${PV}/plugins" + exec /usr/bin/blender-bin-${PV} \$* + EOF + + # Pax mark blender for hardened support. + pax-mark m "${WORKDIR}/install/blender" + + # install binaries + exeinto /usr/bin/ + cp "${WORKDIR}/install/blender" "${WORKDIR}/install/blender-bin-${PV}" + doexe "${WORKDIR}/install/blender-bin-${PV}" + doexe "${WORKDIR}/install/blender-${PV}" + if use player; then + cp "${WORKDIR}/install/blenderplayer" \ + "${WORKDIR}/install/blenderplayer-${PV}" + doexe "${WORKDIR}/install/blenderplayer-${PV}" + fi + + # install plugin headers + insinto /usr/include/${PN}/${PV} + doins "${WORKDIR}"/${P}/source/blender/blenpluginapi/*.h + + # install contrib scripts addons + insinto /usr/share/${PN}/${PV}/scripts + use contrib && doins -r "${WORKDIR}"/${P}/release/scripts/addons_contrib + + # install desktop file + insinto /usr/share/pixmaps + cp release/freedesktop/icons/scalable/apps/blender.svg \ + release/freedesktop/icons/scalable/apps/blender-${PV}.svg + doins release/freedesktop/icons/scalable/apps/blender-${PV}.svg + insinto /usr/share/applications + cp release/freedesktop/blender.desktop \ + release/freedesktop/blender-${PV}.desktop + doins release/freedesktop/blender-${PV}.desktop + newins "${FILESDIR}"/${P}-insecure.desktop ${P}-insecure.desktop + + # install docs + doman "${WORKDIR}"/${P}/doc/manpage/blender.1 + use doc && dodoc -r "${WORKDIR}"/${P}/doc/guides/* + if use apidoc; then + + einfo "Generating (BGE) Blender Game Engine API docs ..." + epydoc source/gameengine/PyDoc/*.py -v \ + -o doc/BGE_API \ + --quiet --quiet --quiet \ + --simple-term \ + --url "http://www.blender.org" \ + --top API_intro \ + --name "Blender GameEngine" \ + --no-private --no-sourcecode \ + --inheritance=included \ + --graph=all \ + --dotpath /usr/bin/dot \ + || die "epydoc failed." + docinto "API/gameengine" + dohtml -r "${WORKDIR}"/${P}/doc/BGE_API/* + + #einfo "Generating (BPY) Blender Python API docs ..." + "${D}"/usr/bin/blender-bin-${PV} --background --python doc/python_api/sphinx_doc_gen.py || die "blender failed." + pushd doc/python_api > /dev/null + sphinx-build sphinx-in BPY_API || die "sphinx failed." + popd > /dev/null + docinto "API/python" + dohtml -r doc/python_api/BPY_API/* + + einfo "Generating Blender C/C++ API docs ..." + pushd "${WORKDIR}"/${P}/doc/doxygen > /dev/null + doxygen -u Doxyfile + doxygen || die "doxygen failed to build API docs." + docinto "API/blender" + dohtml -r html/* + popd > /dev/null + fi + + # final cleanup + rm -r "${WORKDIR}"/install/{Python-license.txt,icons,GPL-license.txt,copyright.txt} + + # installing blender + insinto /usr/share/${PN}/${PV} + doins -r "${WORKDIR}"/install/${PV}/* + + # FIX: making all python scripts readable only by group 'users', + # so nobody can modify scripts apart root user, but python + # cache (*.pyc) can be written and shared across the users. +# chown root:users -R "${D}/usr/share/${PN}/${SLOT}/scripts" || die +# chmod 755 -R "${D}/usr/share/${PN}/${SLOT}/scripts" || die +} + +pkg_postinst() { + echo + elog "Blender uses python integration. As such, may have some" + elog "inherit risks with running unknown python scripting." + elog + elog "It is recommended to change your blender temp directory" + elog "from /tmp to /home/user/tmp or another tmp file under your" + elog "home directory. This can be done by starting blender, then" + elog "dragging the main menu down do display all paths." + elog +} diff --git a/media-gfx/blender/files/blender-2.60-colamd.patch b/media-gfx/blender/files/blender-2.60-colamd.patch new file mode 100644 index 0000000..8afb5cb --- /dev/null +++ b/media-gfx/blender/files/blender-2.60-colamd.patch @@ -0,0 +1,204 @@ +diff -Npur blender-2.61.orig/build_files/scons/config/linux-config.py blender-2.61/build_files/scons/config/linux-config.py +--- blender-2.61.orig/build_files/scons/config/linux-config.py 2012-01-22 00:59:55.201475928 +0100 ++++ blender-2.61/build_files/scons/config/linux-config.py 2012-01-22 01:00:24.211475415 +0100 +@@ -189,6 +189,11 @@ BF_EXPAT = '/usr' + BF_EXPAT_LIB = 'expat' + BF_EXPAT_LIBPATH = '/usr/lib' + ++WITH_BF_COLAMD = True ++BF_COLAMD = '#extern/colamd' ++BF_COLAMD_INC = '${BF_COLAMD}/include' ++BF_COLAMD_LIB = 'extern_colamd' ++ + WITH_BF_JEMALLOC = False + WITH_BF_STATICJEMALLOC = False + BF_JEMALLOC = '/usr' +diff -Npur blender-2.61.orig/build_files/scons/tools/Blender.py blender-2.61/build_files/scons/tools/Blender.py +--- blender-2.61.orig/build_files/scons/tools/Blender.py 2012-01-22 00:59:55.201475928 +0100 ++++ blender-2.61/build_files/scons/tools/Blender.py 2012-01-22 01:00:24.193475419 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++ + + """ + tools.BlenderEnvironment +@@ -281,6 +281,8 @@ def setup_syslibs(lenv): + else: + syslibs += Split(lenv['BF_OPENCOLLADA_LIB']) + syslibs.append(lenv['BF_EXPAT_LIB']) ++ if lenv['WITH_BF_COLAMD']: ++ syslibs += Split(lenv['BF_COLAMD_LIB']) + + if lenv['WITH_BF_JEMALLOC']: + if not lenv['WITH_BF_STATICJEMALLOC']: +diff -Npur blender-2.61.orig/build_files/scons/tools/btools.py blender-2.61/build_files/scons/tools/btools.py +--- blender-2.61.orig/build_files/scons/tools/btools.py 2012-01-22 00:59:55.201475928 +0100 ++++ blender-2.61/build_files/scons/tools/btools.py 2012-01-22 01:01:11.974474571 +0100 +@@ -125,6 +125,7 @@ def validate_arguments(args, bc): + 'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC', + 'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC', + 'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH', ++ 'WITH_BF_COLAMD', 'BF_COLAMD', 'BF_COLAMD_INC', 'BF_COLAMD_LIB', + 'WITH_BF_PLAYER', + 'WITH_BF_NOBLENDER', + 'WITH_BF_BINRELOC', +@@ -447,6 +448,11 @@ def read_opts(env, cfg, args): + ('BF_EXPAT_LIB', 'Expat library', ''), + ('BF_EXPAT_LIBPATH', 'Expat library path', ''), + ++ (BoolVariable('WITH_BF_COLAMD', 'Use Colamd if true', True)), ++ ('BF_COLAMD', 'Colamd base dir', ''), ++ ('BF_COLAMD_INC', 'Colamd include path', ''), ++ ('BF_COLAMD_LIB', 'Colamd library', ''), ++ + (BoolVariable('WITH_BF_JEMALLOC', 'Use jemalloc if true', False)), + (BoolVariable('WITH_BF_STATICJEMALLOC', 'Staticly link to jemalloc', False)), + ('BF_JEMALLOC', 'jemalloc base path', ''), +diff -Npur blender-2.61.orig/extern/CMakeLists.txt blender-2.61/extern/CMakeLists.txt +--- blender-2.61.orig/extern/CMakeLists.txt 2012-01-22 00:59:55.198475928 +0100 ++++ blender-2.61/extern/CMakeLists.txt 2012-01-22 01:00:24.193475419 +0100 +@@ -26,8 +26,6 @@ + # Otherwise we get warnings here that we cant fix in external projects + remove_strict_flags() + +-add_subdirectory(colamd) +- + if(WITH_MOD_CLOTH_ELTOPO) + add_subdirectory(eltopo) + endif() +diff -Npur blender-2.61.orig/extern/libmv/bundle.sh blender-2.61/extern/libmv/bundle.sh +--- blender-2.61.orig/extern/libmv/bundle.sh 2012-01-22 00:59:55.194475928 +0100 ++++ blender-2.61/extern/libmv/bundle.sh 2012-01-22 01:00:24.194475416 +0100 +@@ -118,13 +118,13 @@ set(INC + . + ./third_party/ssba + ./third_party/ldl/Include +- ../colamd/Include + ) + + set(INC_SYS + /usr/include/eigen3 + ${PNG_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIRS} ++ ${COLAMD_INCULDE_DIRS} + ) + + set(SRC +@@ -227,6 +227,7 @@ $src + incs = '. /usr/include/eigen3' + incs += ' ' + env['BF_PNG_INC'] + incs += ' ' + env['BF_ZLIB_INC'] ++incs += ' ' + env['BF_COLAMD_INC'] + + if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' +@@ -257,7 +258,7 @@ else: + ccflags_libmv = Split(env['REL_CCFLAGS']) + cxxflags_libmv = Split(env['REL_CXXFLAGS']) + +-incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include' ++incs += ' ./third_party/ssba ./third_party/ldl/Include' + + env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv ) + EOF +diff -Npur blender-2.61.orig/extern/libmv/CMakeLists.txt blender-2.61/extern/libmv/CMakeLists.txt +--- blender-2.61.orig/extern/libmv/CMakeLists.txt 2012-01-22 00:59:55.190475928 +0100 ++++ blender-2.61/extern/libmv/CMakeLists.txt 2012-01-22 01:00:24.209475415 +0100 +@@ -26,13 +26,13 @@ set(INC + . + third_party/ssba + third_party/ldl/Include +- ../colamd/Include + ) + + set(INC_SYS + /usr/include/eigen3 + ${PNG_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIRS} ++ ${COLAMD_INCLUDE_DIRS} + ) + + set(SRC +diff -Npur blender-2.61.orig/extern/libmv/SConscript blender-2.61/extern/libmv/SConscript +--- blender-2.61.orig/extern/libmv/SConscript 2012-01-22 00:59:55.190475928 +0100 ++++ blender-2.61/extern/libmv/SConscript 2012-01-22 01:00:24.210475415 +0100 +@@ -28,6 +28,7 @@ src += env.Glob('third_party/ssba/Math/* + incs = '. /usr/include/eigen3' + incs += ' ' + env['BF_PNG_INC'] + incs += ' ' + env['BF_ZLIB_INC'] ++incs += ' ' + env['BF_COLAMD_INC'] + + if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): + incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog' +@@ -57,6 +58,6 @@ else: + ccflags_libmv += Split(env['REL_CCFLAGS']) + cxxflags_libmv += Split(env['REL_CXXFLAGS']) + +-incs += ' ./third_party/ssba ./third_party/ldl/Include ../colamd/Include' ++incs += ' ./third_party/ssba ./third_party/ldl/Include' + + env.BlenderLib ( libname = 'extern_libmv', sources=src, includes=Split(incs), defines=defs, libtype=['extern', 'player'], priority=[20,137], compileflags=cflags_libmv, cc_compileflags=ccflags_libmv, cxx_compileflags=cxxflags_libmv ) +diff -Npur blender-2.61.orig/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp blender-2.61/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp +--- blender-2.61.orig/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp 2012-01-22 00:59:55.191475928 +0100 ++++ blender-2.61/extern/libmv/third_party/ssba/Math/v3d_optimization.cpp 2012-01-22 01:00:24.210475415 +0100 +@@ -21,7 +21,7 @@ with SSBA. If not, see <http://www.gnu.o + + #if defined(V3DLIB_ENABLE_SUITESPARSE) + //# include "COLAMD/Include/colamd.h" +-# include "colamd.h" ++# include <colamd.h> + extern "C" + { + //# include "LDL/Include/ldl.h" +diff -Npur blender-2.61.orig/extern/SConscript blender-2.61/extern/SConscript +--- blender-2.61.orig/extern/SConscript 2012-01-22 00:59:55.197475928 +0100 ++++ blender-2.61/extern/SConscript 2012-01-22 01:00:24.210475415 +0100 +@@ -2,8 +2,6 @@ + + Import('env') + +-SConscript(['colamd/SConscript']) +- + if env['WITH_BF_GAMEENGINE']: + SConscript(['recastnavigation/SConscript']) + +diff -Npur blender-2.61.orig/intern/opennl/CMakeLists.txt blender-2.61/intern/opennl/CMakeLists.txt +--- blender-2.61.orig/intern/opennl/CMakeLists.txt 2012-01-22 00:59:55.482475922 +0100 ++++ blender-2.61/intern/opennl/CMakeLists.txt 2012-01-22 01:00:24.210475415 +0100 +@@ -40,11 +40,10 @@ add_definitions( + set(INC + extern + superlu +- ../../extern/colamd/Include + ) + + set(INC_SYS +- ++ /usr/include + ) + + set(SRC +diff -Npur blender-2.61.orig/intern/opennl/SConscript blender-2.61/intern/opennl/SConscript +--- blender-2.61.orig/intern/opennl/SConscript 2012-01-22 00:59:55.482475922 +0100 ++++ blender-2.61/intern/opennl/SConscript 2012-01-22 01:00:24.210475415 +0100 +@@ -3,7 +3,7 @@ Import ('env') + + sources = env.Glob('intern/*.c') + env.Glob('superlu/*.c') + +-incs = 'extern superlu ../../extern/colamd/Include' ++incs = 'extern superlu /usr/include' + + if (env['OURPLATFORM'] == 'win32-mingw'): + env.BlenderLib ('bf_intern_opennl', sources, Split(incs), [], libtype=['core','intern'], priority=[1,80] ) +diff -Npur blender-2.61.orig/intern/opennl/superlu/get_perm_c.c blender-2.61/intern/opennl/superlu/get_perm_c.c +--- blender-2.61.orig/intern/opennl/superlu/get_perm_c.c 2012-01-22 00:59:55.482475922 +0100 ++++ blender-2.61/intern/opennl/superlu/get_perm_c.c 2012-01-22 01:00:24.210475415 +0100 +@@ -10,7 +10,7 @@ + */ + + #include "ssp_defs.h" +-#include "colamd.h" ++#include <colamd.h> + + extern int genmmd_(int *, int *, int *, int *, int *, int *, int *, + int *, int *, int *, int *, int *); diff --git a/media-gfx/blender/files/blender-2.61-collada.patch b/media-gfx/blender/files/blender-2.61-collada.patch new file mode 100644 index 0000000..980b640 --- /dev/null +++ b/media-gfx/blender/files/blender-2.61-collada.patch @@ -0,0 +1,11 @@ +--- source/blender/collada/SConscript 2012-01-16 19:04:02.438027832 +0100 ++++ source/blender/collada/SConscript 2012-01-16 19:03:59.787060970 +0100 +@@ -35,7 +35,7 @@ + if env['OURPLATFORM']=='darwin': + incs = '../blenlib ../blenkernel ../windowmanager ../blenloader ../makesdna ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter [OPENCOLLADA]/COLLADABaseUtils [OPENCOLLADA]/COLLADAFramework [OPENCOLLADA]/COLLADASaxFrameworkLoader [OPENCOLLADA]/GeneratedSaxParser '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) + else: +- incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter/include [OPENCOLLADA]/COLLADABaseUtils/include [OPENCOLLADA]/COLLADAFramework/include [OPENCOLLADA]/COLLADASaxFrameworkLoader/include [OPENCOLLADA]/GeneratedSaxParser/include '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) ++ incs = '../blenlib ../blenkernel ../windowmanager ../makesdna ../blenloader ../makesrna ../editors/include ../../../intern/guardedalloc [OPENCOLLADA]/COLLADAStreamWriter [OPENCOLLADA]/COLLADABaseUtils [OPENCOLLADA]/COLLADAFramework [OPENCOLLADA]/COLLADASaxFrameworkLoader [OPENCOLLADA]/GeneratedSaxParser '.replace('[OPENCOLLADA]', env['BF_OPENCOLLADA_INC']) + + if env['BF_BUILDINFO']: + defs.append('WITH_BUILDINFO') diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml index 9641c91..3cb3c70 100644 --- a/media-gfx/blender/metadata.xml +++ b/media-gfx/blender/metadata.xml @@ -33,6 +33,9 @@ <flag name="openexr"> Support for the OpenEXR graphics file format. </flag> + <flag name="collada"> + Add support for Collada interchange format. + </flag> <flag name="cycles"> Enables Cycles render engine. </flag> |