]> git.sthu.org Git - shuber-gentoo-overlay.git/commitdiff
blender: use bugs.gentoo.org svn version
authorStefan Huber <shuber2@gmail.com>
Sat, 2 Oct 2010 11:52:48 +0000 (13:52 +0200)
committerStefan Huber <shuber2@gmail.com>
Sat, 2 Oct 2010 12:20:35 +0000 (14:20 +0200)
Rebase blender-2.54_beta.ebuild to the svn version blender-9999.ebuild
from bugs.gentoo.org. Changed the ebuild on a few places in order to
make it working with the 2.54-beta version of the source code.

media-gfx/blender/Manifest
media-gfx/blender/README
media-gfx/blender/blender-2.54_beta.ebuild
media-gfx/blender/files/20blender [deleted file]
media-gfx/blender/files/blender-2.5-bmake.patch [new file with mode: 0644]
media-gfx/blender/files/blender-2.5-desktop.patch [new file with mode: 0644]
media-gfx/blender/files/blender-2.5-doxygen.patch [new file with mode: 0644]
media-gfx/blender/files/blender-2.5-eigen.patch [new file with mode: 0644]
media-gfx/blender/files/blender-2.5-glew.patch [new file with mode: 0644]

index c63331b51900ef9dc4b06352db12ac8356528766..fa83adbc61099c680c2876f2c866660b510f958b 100644 (file)
@@ -1,4 +1,9 @@
-AUX 20blender 51 RMD160 3a25d41f0fbd3f4f6fa69d07606ea2a852ff858a SHA1 fe9e1f8a6badfc21774dd9985cd697b956b13a8e SHA256 b33016752d5985fa36a723e3c156691dd6a1f93d17356952a467335c335c107e
+AUX blender-2.5-bmake.patch 438 RMD160 793bc3bf9ddca77f357d440b9ff78aefc16fadba SHA1 73b8f02a08141f7259da38f079a9e8abe4589c21 SHA256 ea7ca2ea55620143212f5844f0eecaebae5432557286c05447b8d6f928c3b6e4
+AUX blender-2.5-desktop.patch 643 RMD160 d1eabbecb79a6d753260b0487d201675a43db22c SHA1 9fe57905eb06979b05364e15577c42d5d8a9f491 SHA256 916307b215f80fef9686aea6d0c934aad55991733a284ac3f50b484563b04695
+AUX blender-2.5-doxygen.patch 1336 RMD160 b96cc6cf90ac677bd03e2cca8989bb3c3a0a63c2 SHA1 f4f4a34df9618b7d8817b666e7a679645e07b071 SHA256 8b5f244adc5f75ce1884555a05cb847593047df75b723ba8dcad97acf8400789
+AUX blender-2.5-eigen.patch 940 RMD160 9acf7cd0fadb1fac515a16535d82569d2adb110b SHA1 8f2ba202d10abb32bda7c220465f7db0d616b8c5 SHA256 a5bb17c7bd2f68dd44d439c0a72302654b204a8d3da9a4a6365a85396c4bc3ea
+AUX blender-2.5-glew.patch 475 RMD160 90d35c27521ac843410445c91d71d336b128a1b5 SHA1 aa5d5963d630d494ca282380c747314ff3a6eb08 SHA256 c6a3a7e9e2f07e5e126357fd0dcf7971830cd5ae12559bcecf238ff21db70f95
 DIST blender-2.54-beta.tar.gz 16813607 RMD160 88758f368ec510e6f3ea1baf3c8210f122fd1721 SHA1 e8d336b48c0d2c869b7dc34a59dab81a31c770f0 SHA256 8f51e3c9aee14b48a035fdcdeb2b893a56485e536072bbe59c08cad548fb0a5b
-EBUILD blender-2.54_beta.ebuild 4682 RMD160 14149358d614f897fca945b2869a4be05836b864 SHA1 4505a8df10ce8025e8d5b66e1eb308f3b199f427 SHA256 07f68803fb72e0ae00ca8221036383eccf433dcb3597030e71e7f4f8638db9fb
+EBUILD blender-2.54_beta.ebuild 11378 RMD160 3f815b75bef24d2dfb2d52d30b3662a4ede6538b SHA1 e028ee1b15e81937675fd9347dfff29ad1fc8838 SHA256 cbc43a340fc9e340c23f9f06c1d00080a640294ec0e64ad875dfe5f712cdbb79
+EBUILD blender-9999.ebuild 13088 RMD160 7f52516b4b0f1cb3793093708f1b8ddb37ec1511 SHA1 3988d894dfe0a2559dc1e7268248ebe3ae07d070 SHA256 3553204229f2484d1719df0c94934b8a0c911fd0f2b845480634513452572794
 MISC README 648 RMD160 c9645189424fb8eeb5651eebca446a4092f4f645 SHA1 4c8eae24c7bf6cf138c2e75b88d9f1d3c83f1fc9 SHA256 c97198f45964a1b36045842be1cb9169061bafb4b0560ee6c044057c13b0b3ea
index b4d21bb0ff58351f914ee40ad37cf34f5eecd605..ea7476f170ef9c6faa21054267facfdde0c686e5 100644 (file)
@@ -1,15 +1,7 @@
+The origin of blender-2.54_beta.ebuild is the 2.5 svn ebuild version form
+bugs.gentoo.org [1] from 2010-10-02. I modified the ebuild in order to work
+with the 2.54-beta source tarball from the blender website.
 
-                                   WARNING
-
-I only copied the ebuild version 2.49b from portage and altered it a bit in
-order to get it compiled. Please note that this ebuild is certainly not in
-perfect shape. I do not know what the 'rm' call in src_prepare is actually for
-(force to compile the python code?) and also adding all those BF_FFMPEG entries
-to user-config.py are not clear to me. (At least uncommenting them leads to
-compiler errors related to python.)
-
-Please feel free to write me a mail if you know a better ebuild -- and its very
-likely that there is one. Also, if you have some comments on how to improve the
-ebuild: do not hesitate and write me a mail.
+[1]  http://bugs.gentoo.org/show_bug.cgi?id=276338
 
 
index eef8fff3646a2ad71c883cbb8ff62648f3c055b7..46f570052fa343e21ed25aac3888fba8dc675708 100644 (file)
@@ -3,49 +3,77 @@
 # $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.49b.ebuild,v 1.3 2010/05/31 15:02:53 arfrever Exp $
 
 EAPI=2
+#NEED_PYTHON="3.1"
+PYTHON_DEPEND="3:3.1"
+inherit eutils python versionator flag-o-matic toolchain-funcs
 
-inherit multilib eutils python
 
-IUSE="blender-game ffmpeg nls ogg openmp verse openal"
+IUSE="+game-engine player +elbeem +openexr ffmpeg jpeg2k openal openmp \
+       +dds debug doc fftw jack apidoc sndfile lcms tweak-mode sdl sse \
+       redcode +zlib iconv"
+
+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/"
 MY_P=${P//_/-}
 SRC_URI="http://download.blender.org/source/${MY_P}.tar.gz"
-S="${S%_beta}"-beta
 
-SLOT="0"
-LICENSE="|| ( GPL-2 BL BSD )"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
 
-RDEPEND="ffmpeg? ( >=media-video/ffmpeg-0.5[encode,theora] )
-       media-libs/jpeg
-       media-libs/openjpeg
-       media-libs/tiff
-       >=dev-lang/python-2.5
-       nls? ( >=media-libs/freetype-2.0
-               virtual/libintl
-               >=media-libs/ftgl-2.1 )
-       openal? ( >=media-libs/openal-1.6.372
-               >=media-libs/freealut-1.1.0-r1 )
-       media-libs/openexr
+SLOT="2.5"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="media-libs/jpeg
        media-libs/libpng
-       blender-game? ( >=media-libs/libsdl-1.2[joystick] )
-       >=media-libs/libsdl-1.2
-       ogg? ( media-libs/libogg )
-       virtual/opengl"
+       x11-libs/libXi
+       x11-libs/libX11
+       media-libs/tiff
+       media-libs/libsamplerate
+       virtual/opengl
+       >=media-libs/freetype-2.0
+       virtual/libintl
+       media-libs/glew
+       dev-cpp/eigen:2
+       >=sci-physics/bullet-2.76
+       iconv? ( virtual/libiconv )
+       zlib? ( sys-libs/zlib )
+       sdl? ( media-libs/libsdl[audio,joystick] )
+       openexr? ( media-libs/openexr )
+       ffmpeg? (
+               >=media-video/ffmpeg-0.5[x264,xvid,mp3,encode,theora]
+               jpeg2k? ( >=media-video/ffmpeg-0.5[x264,xvid,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 )
+       lcms? ( media-libs/lcms )"
 
 DEPEND=">=dev-util/scons-0.98
-       sys-devel/gcc[openmp?]
+       apidoc? (
+               dev-python/sphinx
+               >=app-doc/doxygen-1.5.7[-nodot]
+       )
        x11-base/xorg-server
        ${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
+
+S="${WORKDIR}/${MY_P}"
 
 blend_with() {
        local UWORD="$2"
-       if [ -z "${UWORD}" ]; then
-               UWORD="$1"
-       fi
+       [ -z "${UWORD}" ] && UWORD="$1"
        if useq $1; then
                echo "WITH_BF_${UWORD}=1" | tr '[:lower:]' '[:upper:]' \
                        >> "${S}"/user-config.py
@@ -55,97 +83,268 @@ blend_with() {
        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
+}
+
 src_prepare() {
-       rm -f "${S}/release/scripts/bpymodules/"*.pyc
+
+       epatch "${FILESDIR}"/${PN}-${SLOT}-desktop.patch
+       epatch "${FILESDIR}"/${PN}-${SLOT}-doxygen.patch
+
+       # TODO: write a proper Makefile to replace the borked bmake script
+       epatch "${FILESDIR}"/${PN}-${SLOT}-bmake.patch
+
+       # OpenJPEG
+       einfo "Removing bundled OpenJPEG ..."
+       rm -r extern/libopenjpeg
+
+       # Glew
+       einfo "Removing bundled Glew ..."
+       rm -r extern/glew
+       epatch "${FILESDIR}"/${PN}-${SLOT}-glew.patch
+
+       # Eigen2
+       einfo "Removing bundled Eigen2 ..."
+       rm -r extern/Eigen2
+       epatch "${FILESDIR}"/${PN}-${SLOT}-eigen.patch
 }
 
 src_configure() {
 
-       # add ffmpeg info to the scons build info
-#    cat <<- EOF >> "${S}"/user-config.py
-#        BF_FFMPEG="/usr"
-#        BF_FFMPEG_LIB="avdevice avformat avcodec swscale avutil"
-#    EOF
-
-       #  set python version to current version in use
-#    cat <<- EOF >> "${S}"/user-config.py
-#        BF_PYTHON_VERSION="$(python_get_version)"
-#        BF_PYTHON_INC="$(python_get_includedir)"
-#        BF_PYTHON_BINARY="$(PYTHON -a)"
-#        BF_PYTHON_LIB="python$(python_get_version)"
-#    EOF
+       # 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
+
+       # FIX: littlecms includes path aren't specified
+       if use lcms; then
+               cat <<- EOF >> "${S}"/user-config.py
+                       BF_LCMS_INC="/usr/include/"
+                       BF_LCMS_LIB="lcms"
+                       BF_LCMS_LIBPATH="/usr/lib/"
+               EOF
+       fi
 
-       # add system openjpeg into scons build.
-#    cat <<- EOF >> "${S}"/user-config.py
-#        BF_OPENJPEG = "/usr"
-#        BF_OPENJPEG_INC = "/usr/include"
-#        BF_OPENJPEG_LIB = "openjpeg"
-#    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
 
-       #set CFLAGS used in /etc/make.conf correctly
+       # 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
 
-       echo "CFLAGS= [`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`] " \
-                 | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+       # configure Elbeem fluid system
+       use elbeem || echo "BF_NO_ELBEEM=1" >> "${S}"/user-config.py
 
-       echo "CXXFLAGS= [`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`]" \
-                | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+       # configure Tweak Mode
+       use tweak-mode && echo "BF_TWEAK_MODE=1" >> "${S}"/user-config.py
 
-       # check for blender-game USE flag.
-       # blender-game will merge with blenderplayer.
+       # 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"
+               WITHOUT_BF_PYTHON_INSTALL=1
+               BF_PYTHON="/usr"
+               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 \
-                       'openal'\
-                       'ffmpeg' \
-                       'blender-game player' \
-                       'blender-game gameengine' \
-                       'nls international' \
-                       'ogg' \
-                       'openmp' \
-                       'verse' ; do
+               'sdl' \
+               'apidoc docs' \
+               'lcms' \
+               'jack' \
+               'sndfile' \
+               'openexr' \
+               'dds' \
+               'fftw fftw3' \
+               'jpeg2k openjpeg' \
+               'openal'\
+               'ffmpeg' \
+               'ffmpeg ogg' \
+               'player' \
+               'collada' \
+               'sse rayoptimization' \
+               'redcode' \
+               'zlib' \
+               'verse' ; do
                blend_with ${arg}
        done
+
+       # 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
 }
 
 src_compile() {
-       # scons uses -l differently -> remove it
-       scons ${MAKEOPTS/-l[0-9]} || die \
-       '!!! Please add "${S}/scons.config" when filing bugs reports \
-       to bugs.gentoo.org'
+       scons || die \
+               '!!! Please add "${S}/scons.config" when filing bugs reports \
+               to bugs.gentoo.org'
 
-       cd "${WORKDIR}"/install/linux2/plugins
+       einfo "Building plugins ..."
+       cd "${WORKDIR}"/install/plugins/ \
+               || die "dir ${WORKDIR}/install/plugins/ does not exists"
        chmod 755 bmake
-       emake || die
+
+       # FIX: plugins are built without respecting user's LDFLAGS
+       emake \
+               CFLAGS="${CFLAGS} -fPIC" \
+               LDFLAGS="$(raw-ldflags) -Bshareable" \
+               > /dev/null \
+               || die "plugins compilation failed"
 }
 
 src_install() {
-
-       PVshort="${PV%_beta}"
-
+       # creating binary wrapper
+       cat <<- EOF >> "${WORKDIR}/install/blender-${SLOT}"
+               #!/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/${SLOT}/scripts"
+        export BLENDER_SYSTEM_DATAFILES="/usr/share/blender/${SLOT}/datafiles" 
+                       exec /usr/bin/blender-bin-${SLOT}
+       EOF
+
+       # install binaries
        exeinto /usr/bin/
-       doexe "${WORKDIR}"/install/linux2/blender
-       use blender-game && doexe "${WORKDIR}"/install/linux2/blenderplayer
+       mv "${WORKDIR}/install/blender" "${WORKDIR}/install/blender-bin-${SLOT}"
+       doexe "${WORKDIR}/install/blender-bin-${SLOT}"
+       doexe "${WORKDIR}/install/blender-${SLOT}"
+       if use player; then
+               mv "${WORKDIR}"/install/blenderplayer \
+                       "${WORKDIR}/install/blenderplayer-${SLOT}"
+               doexe "${WORKDIR}"/install/blenderplayer
+       fi
 
-       dodir /usr/share/${PN}
+       # install plugins
+       exeinto /usr/share/${PN}/${SLOT}/textures
+       doexe "${WORKDIR}"/install/plugins/texture/*.so
+       exeinto /usr/share/${PN}/${SLOT}/sequences
+       doexe "${WORKDIR}"/install/plugins/sequence/*.so
+       insinto /usr/include/${PN}/${SLOT}
+       doins "${WORKDIR}"/install/plugins/include/*.h
+       rm -r "${WORKDIR}"/install/plugins || die
 
-       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
 
-       insinto /usr/share/${PN}
-       doins -r "${WORKDIR}"/install/linux2/${PVshort}/scripts
 
+       # install desktop file
        insinto /usr/share/pixmaps
-       doins "${WORKDIR}"/install/linux2/icons/scalable/blender.svg
+       cp release/freedesktop/icons/scalable/blender.svg \
+               release/freedesktop/icons/scalable/blender-${SLOT}.svg
+       doins release/freedesktop/icons/scalable/blender-${SLOT}.svg
        insinto /usr/share/applications
-       doins "${WORKDIR}"/blender-2.54-beta/release/freedesktop/blender.desktop
+       cp release/freedesktop/blender.desktop \
+               release/freedesktop/blender-${SLOT}.desktop
+       doins release/freedesktop/blender-${SLOT}.desktop
+
+       # install docs
+       use doc && dodoc release/text/BlenderQuickStart.pdf
+       if use apidoc; then
+
+               einfo "Generating (BGE) Blender Game Engine API docs ..."
+               docinto "API/BGE_API"
+               dohtml -r "${WORKDIR}"/install/share/${PN}/${SLOT}/doc/*
+               rm -r "${WORKDIR}"/install/share/${PN}/${SLOT}/doc
+
+               einfo "Generating Blender C/C++ API docs ..."
+               pushd "${S}"/doc > /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}
 
-       dodoc "${WORKDIR}"/install/linux2/readme.html
+       # installing blender
+       insinto /usr/share/${PN}/${SLOT}
+       doins -r "${WORKDIR}"/install/2.54/*
+       doins release/VERSION
+
+       # 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 750 -R "${D}/usr/share/${PN}/${SLOT}/scripts" || die
 
-       insinto /etc/env.d
-       doins "${FILESDIR}/20${PN}"
 }
 
 pkg_preinst(){
@@ -156,18 +355,29 @@ pkg_preinst(){
 }
 
 pkg_postinst(){
-       env-update
-
-       elog "blender uses python integration.  As such, may have some"
+       echo
+       elog "Blender uses python integration. As such, may have some"
        elog "inherit risks with running unknown python scripting."
-       elog " "
-       elog "CVE-2008-1103-1.patch has been removed as it interferes"
-       elog "with autosave undo features. Up stream blender coders"
-       elog "have not addressed the CVE issue as the status is still"
-       elog "a CANDIDATE and not CONFIRMED."
-       elog " "
+       elog
        elog "It is recommended to change your blender temp directory"
-       elog "from /tmp to ~tmp or another tmp file under your home"
-       elog "directory. This can be done by starting blender, then"
+       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
+       elog "Blender has its own internal rendering engine but you"
+       elog "can export to external renderers for image computation"
+       elog "like: YafRay[1], sunflow[2], PovRay[3] and luxrender[4]"
+       elog
+       elog "If you need one of them just emerge it:"
+       elog "  [1] emerge -av media-gfx/yafray"
+       elog "  [2] emerge -av media-gfx/sunflow"
+       elog "  [3] emerge -av media-gfx/povray"
+       elog "  [4] emerge -av media-gfx/luxrender"
+       elog
+       elog "When setting the Blender paths with the User Preferences"
+       elog "dialog box, remember to NOT declare your home's paths as:"
+       elog "~/.blender, but as: /home/user/.blender; in other words,"
+       elog "DO NOT USE the tilde inside the paths, as Blender is not"
+       elog "able to handle it, ignoring your customizations."
+
 }
diff --git a/media-gfx/blender/files/20blender b/media-gfx/blender/files/20blender
deleted file mode 100644 (file)
index 3276c3b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-BLENDER_SYSTEM_SCRIPTS=/usr/share/blender/scripts
-
diff --git a/media-gfx/blender/files/blender-2.5-bmake.patch b/media-gfx/blender/files/blender-2.5-bmake.patch
new file mode 100644 (file)
index 0000000..9f4c5ab
--- /dev/null
@@ -0,0 +1,15 @@
+--- blender/release/plugins/bmake      2010-03-21 17:44:20.500741049 +0100
++++ blender/release/plugins/bmake      2010-03-21 17:44:33.659740173 +0100
+@@ -57,10 +57,10 @@
+       LDFLAGS="-Bshareable";
+ elif ( test $UNAME = "Linux" ) then
+       CC="gcc";
+-      CFLAGS="-fPIC -funsigned-char -O2";
++#     CFLAGS="-fPIC -funsigned-char -O2";
+       LD="ld";
+-      LDFLAGS="-Bshareable";
++#     LDFLAGS="-Bshareable";
+ elif ( test $UNAME = "SunOS" ) then
+       CC="cc";
+       CFLAGS="-O";
diff --git a/media-gfx/blender/files/blender-2.5-desktop.patch b/media-gfx/blender/files/blender-2.5-desktop.patch
new file mode 100644 (file)
index 0000000..ac83ad9
--- /dev/null
@@ -0,0 +1,20 @@
+--- release/freedesktop/blender.desktop        2010-09-12 00:05:51.000000000 -0700
++++ release/freedesktop/blender.desktop        2010-09-12 00:07:32.000000000 -0700
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Name=Blender
++Name=Blender-2.5
+ GenericName=3D modeller
+ GenericName[es]=modelador 3D
+ GenericName[de]=3D Modellierer
+@@ -7,8 +7,8 @@
+ GenericName[ru]=Редактор 3D-моделей
+ Comment=3D modeling, animation, rendering and post-production
+ Comment[es]=modelado 3D, animación, renderizado y post-producción
+-Exec=blender
+-Icon=blender.svg
++Exec=blender-2.5
++Icon=blender-2.5.svg
+ Terminal=false
+ Type=Application
+ Categories=Graphics;3DGraphics;
diff --git a/media-gfx/blender/files/blender-2.5-doxygen.patch b/media-gfx/blender/files/blender-2.5-doxygen.patch
new file mode 100644 (file)
index 0000000..05ae702
--- /dev/null
@@ -0,0 +1,35 @@
+--- doc/Doxyfile       2009-08-29 18:14:48.752493755 +0200
++++ doc/Doxyfile       2009-08-29 18:16:03.509492729 +0200
+@@ -23,7 +23,7 @@
+ # This could be handy for archiving the generated documentation or 
+ # if some version control system is used.
+-PROJECT_NUMBER         = V2.27
++PROJECT_NUMBER         = 2.50
+ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+ # base path where the generated documentation will be put. 
+@@ -272,19 +272,20 @@
+ # The QUIET tag can be used to turn on/off the messages that are generated 
+ # by doxygen. Possible values are YES and NO. If left blank NO is used.
+-QUIET                  = NO
++QUIET                  = YES
+ # The WARNINGS tag can be used to turn on/off the warning messages that are 
+ # generated by doxygen. Possible values are YES and NO. If left blank 
+ # NO is used.
+-WARNINGS               = YES
++WARNINGS               = NO
+ # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+ # for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+ # automatically be disabled.
+-WARN_IF_UNDOCUMENTED   = YES
++WARN_IF_UNDOCUMENTED   = NO
++WARN_IF_DOC_ERROR      = NO
+ # The WARN_FORMAT tag determines the format of the warning messages that 
+ # doxygen can produce. The string should contain the $file, $line, and $text 
diff --git a/media-gfx/blender/files/blender-2.5-eigen.patch b/media-gfx/blender/files/blender-2.5-eigen.patch
new file mode 100644 (file)
index 0000000..91d8af4
--- /dev/null
@@ -0,0 +1,22 @@
+--- intern/itasc/SConscript    2009-09-26 09:14:02.000000000 +0200
++++ intern/itasc/SConscript    2009-09-26 09:14:54.000000000 +0200
+@@ -5,7 +5,8 @@
+ sources += env.Glob('kdl/*.cpp')
+ sources += env.Glob('kdl/utilities/*.cpp')
+-incs = '. ../../extern/Eigen2'
++#incs = '. ../../extern/Eigen2'
++incs = '. /usr/include/eigen2'
+ env.BlenderLib ('bf_ITASC', sources, Split(incs), [], libtype=['intern','player'], priority=[20,100] )
+--- source/blender/ikplugin/SConscript
++++ source/blender/ikplugin/SConscript
+@@ -4,6 +4,6 @@
+ sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp')
+ incs = '#/intern/guardedalloc #/intern/iksolver/extern ../makesdna ../blenlib'
+-incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc #/extern/Eigen2'
++incs += ' ../blenkernel ../include ../ikplugin #/intern/itasc /usr/include/eigen2'
+ env.BlenderLib ( 'bf_ikplugin', sources, Split(incs), [], libtype=['core','player'], priority=[180, 190] )
diff --git a/media-gfx/blender/files/blender-2.5-glew.patch b/media-gfx/blender/files/blender-2.5-glew.patch
new file mode 100644 (file)
index 0000000..db982c7
--- /dev/null
@@ -0,0 +1,22 @@
+--- extern/SConscript
++++ extern/SConscript
+@@ -2,8 +2,6 @@
+ Import('env')
+-SConscript(['glew/SConscript'])
+-
+ if env['WITH_BF_BULLET']:
+     SConscript(['bullet2/src/SConscript'])
+--- source/blender/editors/include/BIF_gl.h
++++ source/blender/editors/include/BIF_gl.h
+@@ -31,7 +31,7 @@
+ #ifndef BIF_GL_H
+ #define BIF_GL_H
+-#include "../../../../extern/glew/include/GL/glew.h"
++#include <GL/glew.h>
+       /*
+        * these should be phased out. cpack should be replaced in