summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2008-03-26 08:56:09 +0000
committerLuca Barbato <lu_zero@gentoo.org>2008-03-26 08:56:09 +0000
commit38a769915c0ff2e6db1d87e8bce48875601d3e1e (patch)
treeb8227e8f75087ebf17016244ccf107f3c5d4457a /media-gfx
parentffmpeg new-includes p.mask (diff)
downloadgentoo-2-38a769915c0ff2e6db1d87e8bce48875601d3e1e.tar.gz
gentoo-2-38a769915c0ff2e6db1d87e8bce48875601d3e1e.tar.bz2
gentoo-2-38a769915c0ff2e6db1d87e8bce48875601d3e1e.zip
Support ffmpeg new header layout
(Portage version: 2.1.4.4)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/blender/ChangeLog8
-rw-r--r--media-gfx/blender/blender-2.45-r1.ebuild135
-rw-r--r--media-gfx/blender/files/blender-2.45-ffmpeg.patch88
3 files changed, 230 insertions, 1 deletions
diff --git a/media-gfx/blender/ChangeLog b/media-gfx/blender/ChangeLog
index fa559ae02d10..8b439ffb050a 100644
--- a/media-gfx/blender/ChangeLog
+++ b/media-gfx/blender/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-gfx/blender
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.129 2008/01/21 13:13:42 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.130 2008/03/26 08:56:08 lu_zero Exp $
+
+*blender-2.45-r1 (26 Mar 2008)
+
+ 26 Mar 2008; Luca Barbato <lu_zero@gentoo.org>
+ +files/blender-2.45-ffmpeg.patch, +blender-2.45-r1.ebuild:
+ Support ffmpeg new header layout
21 Jan 2008; Markus Meier <maekke@gentoo.org> -blender-2.41-r1.ebuild,
-blender-2.42.ebuild, -blender-2.42a-r1.ebuild, -blender-2.44.ebuild,
diff --git a/media-gfx/blender/blender-2.45-r1.ebuild b/media-gfx/blender/blender-2.45-r1.ebuild
new file mode 100644
index 000000000000..01acf6c44e3d
--- /dev/null
+++ b/media-gfx/blender/blender-2.45-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.45-r1.ebuild,v 1.1 2008/03/26 08:56:08 lu_zero Exp $
+
+inherit multilib flag-o-matic eutils python
+
+#IUSE="jpeg mozilla png sdl static truetype"
+IUSE="blender-game ffmpeg jpeg nls openal openexr png verse"
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org/"
+SRC_URI="http://download.blender.org/source/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+RDEPEND=">=dev-libs/openssl-0.9.6
+ ffmpeg? ( >=media-video/ffmpeg-0.4.9_p20080326 )
+ jpeg? ( media-libs/jpeg )
+ media-libs/tiff
+ >=dev-lang/python-2.4
+ nls? ( >=media-libs/freetype-2.0
+ virtual/libintl
+ >=media-libs/ftgl-2.1 )
+ openal? ( media-libs/openal
+ media-libs/freealut )
+ openexr? ( media-libs/openexr )
+ png? ( media-libs/libpng )
+ >=media-libs/libsdl-1.2
+ virtual/opengl"
+
+DEPEND="dev-util/scons
+ x11-libs/libXt
+ x11-proto/inputproto
+ ${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_unpack() {
+ unpack ${A}
+ cd "${S}"/release/plugins
+ chmod 755 bmake
+ cp -pPR "${S}"/source/blender/blenpluginapi include
+
+ cd "${S}"
+ epatch "${FILESDIR}"/blender-2.37-dirs.patch
+ epatch "${FILESDIR}"/blender-2.44-scriptsdir.patch
+ epatch "${FILESDIR}"/blender-2.44-swscale.patch
+
+ if use ffmpeg ; then
+ cd "${S}"/extern
+ rm -rf ffmpeg
+ fi
+ # pass compiler flags to the scons build system
+ # and set python version to current version in use
+ python_version
+ cat <<- EOF >> "${S}"/user-config.py
+ CFLAGS += '${CFLAGS}'
+ BF_PYTHON_VERSION="${PYVER}"
+ BF_PYTHON_INC="/usr/include/python${PYVER}"
+ BF_PYTHON_BINARY="/usr/bin/python${PYVER}"
+ BF_PYTHON_LIB="python${PYVER}"
+ EOF
+
+}
+
+src_compile() {
+ for arg in 'openal' \
+ 'openexr' \
+ 'jpeg' \
+ 'ffmpeg' \
+ 'png' \
+ 'verse' \
+ 'nls international' \
+ 'blender-game gameengine'; do
+ blend_with ${arg}
+ done
+
+ # scons uses -l differently -> remove it
+ scons ${MAKEOPTS/-l[0-9]} -h > scons.config
+ scons ${MAKEOPTS/-l[0-9]} || die \
+ "!!! Please add ${S}/scons.config when filing bugs reports to bugs.gentoo.org"
+
+ cd "${S}"/release/plugins
+ emake || die
+}
+
+src_install() {
+ exeinto /usr/bin/
+ doexe "${WORKDIR}"/install/linux2/blender
+
+ dodir /usr/share/${PN}
+
+ exeinto /usr/$(get_libdir)/${PN}/textures
+ doexe "${S}"/release/plugins/texture/*.so
+ exeinto /usr/$(get_libdir)/${PN}/sequences
+ doexe "${S}"/release/plugins/sequence/*.so
+ insinto /usr/include/${PN}
+ doins "${S}"/release/plugins/include/*.h
+
+ if use nls ; then
+ mv "${WORKDIR}"/install/linux2/.blender/{.Blanguages,.bfont.ttf} \
+ "${D}"/usr/share/${PN}
+ mv "${WORKDIR}"/install/linux2/.blender/locale \
+ "${D}"/usr/share/locale
+ fi
+
+ mv "${WORKDIR}"/install/linux2/.blender/scripts "${D}"/usr/share/${PN}
+
+ insinto /usr/share/pixmaps
+ doins "${FILESDIR}"/${PN}.png
+ insinto /usr/share/applications
+ doins "${FILESDIR}"/${PN}.desktop
+
+ dodoc INSTALL README
+}
+
+pkg_preinst(){
+ if [ -h "${ROOT}/usr/$(get_libdir)/blender/plugins/include" ];
+ then
+ rm -f "${ROOT}"/usr/$(get_libdir)/blender/plugins/include
+ fi
+}
diff --git a/media-gfx/blender/files/blender-2.45-ffmpeg.patch b/media-gfx/blender/files/blender-2.45-ffmpeg.patch
new file mode 100644
index 000000000000..085b9d938813
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.45-ffmpeg.patch
@@ -0,0 +1,88 @@
+--- ./source/blender/blenkernel/intern/writeffmpeg.c.old 2008-03-25 13:26:11.000000000 +0100
++++ ./source/blender/blenkernel/intern/writeffmpeg.c 2008-03-25 13:27:06.000000000 +0100
+@@ -29,10 +29,10 @@
+
+ #include <stdlib.h>
+
+-#include <ffmpeg/avformat.h>
+-#include <ffmpeg/avcodec.h>
+-#include <ffmpeg/rational.h>
+-#include <ffmpeg/swscale.h>
++#include <libavformat/avformat.h>
++#include <libavcodec/avcodec.h>
++#include <libavutil/rational.h>
++#include <libswscale/swscale.h>
+
+ #if LIBAVFORMAT_VERSION_INT < (49 << 16)
+ #define FFMPEG_OLD_FRAME_RATE 1
+--- source/blender/imbuf/intern/IMB_anim.h.old 2008-03-26 01:22:32.000000000 +0100
++++ source/blender/imbuf/intern/IMB_anim.h 2008-03-26 01:22:01.000000000 +0100
+@@ -79,8 +79,8 @@
+ #endif /* WITH_QUICKTIME */
+
+ #ifdef WITH_FFMPEG
+-#include <ffmpeg/avformat.h>
+-#include <ffmpeg/avcodec.h>
++#include <libavformat/avformat.h>
++#include <libavcodec/avcodec.h>
+ #endif
+
+ #include "IMB_imbuf_types.h"
+--- source/blender/imbuf/intern/anim.c.old 2008-03-26 01:28:44.000000000 +0100
++++ source/blender/imbuf/intern/anim.c 2008-03-26 01:29:15.000000000 +0100
+@@ -86,10 +86,10 @@
+ #include "IMB_anim5.h"
+
+ #ifdef WITH_FFMPEG
+-#include <ffmpeg/avformat.h>
+-#include <ffmpeg/avcodec.h>
+-#include <ffmpeg/rational.h>
+-#include <ffmpeg/swscale.h>
++#include <libavformat/avformat.h>
++#include <libavcodec/avcodec.h>
++#include <libavutil/rational.h>
++#include <libswscale/swscale.h>
+
+ #if LIBAVFORMAT_VERSION_INT < (49 << 16)
+ #define FFMPEG_OLD_FRAME_RATE 1
+--- source/blender/imbuf/intern/util.c.old 2008-03-26 01:52:13.000000000 +0100
++++ source/blender/imbuf/intern/util.c 2008-03-26 01:52:48.000000000 +0100
+@@ -60,8 +60,8 @@
+ #endif
+
+ #ifdef WITH_FFMPEG
+-#include <ffmpeg/avcodec.h>
+-#include <ffmpeg/avformat.h>
++#include <libavcodec/avcodec.h>
++#include <libavformat/avformat.h>
+
+ #if LIBAVFORMAT_VERSION_INT < (49 << 16)
+ #define FFMPEG_OLD_FRAME_RATE 1
+--- source/blender/src/hddaudio.c.old 2008-03-26 02:04:26.000000000 +0100
++++ source/blender/src/hddaudio.c 2008-03-26 02:04:50.000000000 +0100
+@@ -36,9 +36,9 @@
+ #endif
+
+ #ifdef WITH_FFMPEG
+-#include <ffmpeg/avformat.h>
+-#include <ffmpeg/avcodec.h>
+-#include <ffmpeg/rational.h>
++#include <libavformat/avformat.h>
++#include <libavcodec/avcodec.h>
++#include <libavutil/rational.h>
+ #if LIBAVFORMAT_VERSION_INT < (49 << 16)
+ #define FFMPEG_OLD_FRAME_RATE 1
+ #else
+--- source/blender/src/buttons_scene.c.old 2008-03-26 02:19:19.000000000 +0100
++++ source/blender/src/buttons_scene.c 2008-03-26 02:19:45.000000000 +0100
+@@ -103,8 +103,8 @@
+
+ #ifdef WITH_FFMPEG
+
+-#include <ffmpeg/avcodec.h> /* for PIX_FMT_* and CODEC_ID_* */
+-#include <ffmpeg/avformat.h>
++#include <libavcodec/avcodec.h> /* for PIX_FMT_* and CODEC_ID_* */
++#include <libavformat/avformat.h>
+
+ static int ffmpeg_preset_sel = 0;
+