]> git.sthu.org Git - shuber-gentoo-overlay.git/commitdiff
add blender-2.54_beta
authorStefan Huber <shuber2@gmail.com>
Thu, 30 Sep 2010 16:14:19 +0000 (18:14 +0200)
committerStefan Huber <shuber2@gmail.com>
Thu, 30 Sep 2010 20:15:15 +0000 (22:15 +0200)
 - copy version 2.49b from portage
 - adapt it for the new needs

media-gfx/blender/Manifest [new file with mode: 0644]
media-gfx/blender/README [new file with mode: 0644]
media-gfx/blender/blender-2.54_beta.ebuild [new file with mode: 0644]
media-gfx/blender/files/20blender [new file with mode: 0644]

diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
new file mode 100644 (file)
index 0000000..f15bfd8
--- /dev/null
@@ -0,0 +1,4 @@
+AUX 20blender 51 RMD160 3a25d41f0fbd3f4f6fa69d07606ea2a852ff858a SHA1 fe9e1f8a6badfc21774dd9985cd697b956b13a8e SHA256 b33016752d5985fa36a723e3c156691dd6a1f93d17356952a467335c335c107e
+DIST blender-2.54-beta.tar.gz 16813607 RMD160 88758f368ec510e6f3ea1baf3c8210f122fd1721 SHA1 e8d336b48c0d2c869b7dc34a59dab81a31c770f0 SHA256 8f51e3c9aee14b48a035fdcdeb2b893a56485e536072bbe59c08cad548fb0a5b
+EBUILD blender-2.54_beta.ebuild 4669 RMD160 9220a55a066a6b04422441a821f5d11693a7566d SHA1 0a4605062a6ac60012fe22fad30657a86568c147 SHA256 978456217cd4ad3a2e83c1a25ce46d075127fb6a0c34b9f5cc64b8614699a2f3
+MISC README 411 RMD160 4f317baf985a0a637374d7b5197fb377ac9ece72 SHA1 73bfc496d068899009207d1bb03eb27078ba55ab SHA256 16641e38553ea5a61ab0480ba5471af76c9640c944333e610ba1307924ec5190
diff --git a/media-gfx/blender/README b/media-gfx/blender/README
new file mode 100644 (file)
index 0000000..b4d21bb
--- /dev/null
@@ -0,0 +1,15 @@
+
+                                   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.
+
+
diff --git a/media-gfx/blender/blender-2.54_beta.ebuild b/media-gfx/blender/blender-2.54_beta.ebuild
new file mode 100644 (file)
index 0000000..eef8fff
--- /dev/null
@@ -0,0 +1,173 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $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
+
+inherit multilib eutils python
+
+IUSE="blender-game ffmpeg nls ogg openmp verse openal"
+
+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
+       media-libs/libpng
+       blender-game? ( >=media-libs/libsdl-1.2[joystick] )
+       >=media-libs/libsdl-1.2
+       ogg? ( media-libs/libogg )
+       virtual/opengl"
+
+DEPEND=">=dev-util/scons-0.98
+       sys-devel/gcc[openmp?]
+       x11-base/xorg-server
+       ${RDEPEND}"
+
+
+blend_with() {
+       local UWORD="$2"
+       if [ -z "${UWORD}" ]; then
+               UWORD="$1"
+       fi
+       if useq $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_prepare() {
+       rm -f "${S}/release/scripts/bpymodules/"*.pyc
+}
+
+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.
+#    cat <<- EOF >> "${S}"/user-config.py
+#        BF_OPENJPEG = "/usr"
+#        BF_OPENJPEG_INC = "/usr/include"
+#        BF_OPENJPEG_LIB = "openjpeg"
+#    EOF
+
+       #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
+
+       echo "CXXFLAGS= [`for i in ${CFLAGS[@]}; do printf "%s \'$i"\',; done`]" \
+                | sed -e "s:,]: ]:" >> "${S}"/user-config.py
+
+       # check for blender-game USE flag.
+       # blender-game will merge with blenderplayer.
+
+       for arg in \
+                       'openal'\
+                       'ffmpeg' \
+                       'blender-game player' \
+                       'blender-game gameengine' \
+                       'nls international' \
+                       'ogg' \
+                       'openmp' \
+                       'verse' ; do
+               blend_with ${arg}
+       done
+}
+
+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'
+
+       cd "${WORKDIR}"/install/linux2/plugins
+       chmod 755 bmake
+       emake || die
+}
+
+src_install() {
+
+       PVshort="${PV%_beta}"
+
+       exeinto /usr/bin/
+       doexe "${WORKDIR}"/install/linux2/blender
+       use blender-game && doexe "${WORKDIR}"/install/linux2/blenderplayer
+
+       dodir /usr/share/${PN}
+
+       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
+
+       insinto /usr/share/pixmaps
+       doins "${WORKDIR}"/install/linux2/icons/scalable/blender.svg
+       insinto /usr/share/applications
+       doins "${WORKDIR}"/blender-2.54-beta/release/freedesktop/blender.desktop
+
+       dodoc "${WORKDIR}"/install/linux2/readme.html
+
+       insinto /etc/env.d
+       doins "${FILESDIR}/20${PN}"
+}
+
+pkg_preinst(){
+       if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ];
+       then
+               rm -f "${ROOT}"/usr/$(get_libdir)/blender/plugins/include
+       fi
+}
+
+pkg_postinst(){
+       env-update
+
+       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 "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 "dragging the main menu down do display all paths."
+}
diff --git a/media-gfx/blender/files/20blender b/media-gfx/blender/files/20blender
new file mode 100644 (file)
index 0000000..3276c3b
--- /dev/null
@@ -0,0 +1,2 @@
+BLENDER_SYSTEM_SCRIPTS=/usr/share/blender/scripts
+