summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2007-09-19 07:32:21 +0000
committerLuca Barbato <lu_zero@gentoo.org>2007-09-19 07:32:21 +0000
commitaf7386c6e0b95d38e462b2f57fddf6430841da27 (patch)
tree4d8fb01d759888dbba511aebc282b7362473ebe9 /media-gfx/blender
parentAdd reference to bugs #192894 and #192923 to ChangeLog. (diff)
downloadgentoo-2-af7386c6e0b95d38e462b2f57fddf6430841da27.tar.gz
gentoo-2-af7386c6e0b95d38e462b2f57fddf6430841da27.tar.bz2
gentoo-2-af7386c6e0b95d38e462b2f57fddf6430841da27.zip
complete the fix for ffmpeg
(Portage version: 2.1.3.9)
Diffstat (limited to 'media-gfx/blender')
-rw-r--r--media-gfx/blender/ChangeLog8
-rw-r--r--media-gfx/blender/blender-2.44-r1.ebuild136
-rw-r--r--media-gfx/blender/files/blender-2.44-swscale.patch84
-rw-r--r--media-gfx/blender/files/digest-blender-2.44-r13
4 files changed, 224 insertions, 7 deletions
diff --git a/media-gfx/blender/ChangeLog b/media-gfx/blender/ChangeLog
index ff027c2c5d5c..09dbbc27b0bd 100644
--- a/media-gfx/blender/ChangeLog
+++ b/media-gfx/blender/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-gfx/blender
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.120 2007/08/30 16:58:53 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/ChangeLog,v 1.121 2007/09/19 07:32:21 lu_zero Exp $
+
+*blender-2.44-r1 (19 Sep 2007)
+
+ 19 Sep 2007; Luca Barbato <lu_zero@gentoo.org>
+ files/blender-2.44-swscale.patch, +blender-2.44-r1.ebuild:
+ Patch update and ebuild fixes by Martin Capitanio <gentoo-bug@capitanio.org>
30 Aug 2007; Bernard Cafarelli <voyageur@gentoo.org> blender-2.44.ebuild:
Compilation fix for python versions other than 2.4, closes bug #152700
diff --git a/media-gfx/blender/blender-2.44-r1.ebuild b/media-gfx/blender/blender-2.44-r1.ebuild
new file mode 100644
index 000000000000..955bcb877f1c
--- /dev/null
+++ b/media-gfx/blender/blender-2.44-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/blender/blender-2.44-r1.ebuild,v 1.1 2007/09/19 07:32:21 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 sdl verse"
+FFMPEG_SNAP="0.4.9-p20070330"
+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-${FFMPEG_SNAP/-/_}
+ >=media-libs/x264-svn-20061014 )
+ 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 )
+ sdl? ( >=media-libs/libsdl-1.2 )
+ virtual/opengl"
+
+DEPEND="dev-util/scons
+ x11-libs/libXt
+ ${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 COPYING 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.44-swscale.patch b/media-gfx/blender/files/blender-2.44-swscale.patch
index 08bdb65bae98..4a8df202990e 100644
--- a/media-gfx/blender/files/blender-2.44-swscale.patch
+++ b/media-gfx/blender/files/blender-2.44-swscale.patch
@@ -1,7 +1,20 @@
-Index: writeffmpeg.c
-===================================================================
---- blender.orig/source/blender/blenkernel/intern/writeffmpeg.c (revision 11354)
-+++ blender/source/blender/blenkernel/intern/writeffmpeg.c (working copy)
+diff --git a/trunk/blender/config/linux2-config.py b/trunk/blender/config/linux2-config.py
+index edc7f26..bd323e4 100644
+--- a/trunk/blender/config/linux2-config.py
++++ b/trunk/blender/config/linux2-config.py
+@@ -119,7 +119,7 @@ WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
+ BF_FFMPEG = '/usr'
+ BF_FFMPEG_INC = '${BF_FFMPEG}/include'
+ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
+-BF_FFMPEG_LIB = 'avformat avcodec avutil'
++BF_FFMPEG_LIB = 'avformat avcodec avutil swscale'
+
+ # Mesa Libs should go here if your using them as well....
+ WITH_BF_STATICOPENGL = 'false'
+diff --git a/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c b/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
+index 703f280..8576f59 100644
+--- a/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
++++ b/trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
@@ -32,6 +32,7 @@
#include <ffmpeg/avformat.h>
#include <ffmpeg/avcodec.h>
@@ -10,7 +23,7 @@ Index: writeffmpeg.c
#if LIBAVFORMAT_VERSION_INT < (49 << 16)
#define FFMPEG_OLD_FRAME_RATE 1
-@@ -258,6 +259,7 @@
+@@ -258,6 +259,7 @@ static void write_video_frame(AVFrame* frame)
static AVFrame* generate_video_frame(uint8_t* pixels)
{
uint8_t* rendered_frame;
@@ -18,7 +31,7 @@ Index: writeffmpeg.c
AVCodecContext* c = get_codec_from_stream(video_stream);
int width = c->width;
-@@ -317,8 +319,18 @@
+@@ -317,8 +319,18 @@ static AVFrame* generate_video_frame(uint8_t* pixels)
}
if (c->pix_fmt != PIX_FMT_RGBA32) {
@@ -39,3 +52,62 @@ Index: writeffmpeg.c
delete_picture(rgb_frame);
}
return current_frame;
+diff --git a/trunk/blender/source/blender/imbuf/intern/anim.c b/trunk/blender/source/blender/imbuf/intern/anim.c
+index 5b185a4..5cdb651 100644
+--- a/trunk/blender/source/blender/imbuf/intern/anim.c
++++ b/trunk/blender/source/blender/imbuf/intern/anim.c
+@@ -89,6 +89,7 @@
+ #include <ffmpeg/avformat.h>
+ #include <ffmpeg/avcodec.h>
+ #include <ffmpeg/rational.h>
++#include <ffmpeg/swscale.h>
+
+ #if LIBAVFORMAT_VERSION_INT < (49 << 16)
+ #define FFMPEG_OLD_FRAME_RATE 1
+@@ -619,6 +620,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
+ AVPacket packet;
+ int64_t pts_to_search = 0;
+ int pos_found = 1;
++ static struct SwsContext *img_convert_ctx;
+
+ if (anim == 0) return (0);
+
+@@ -706,12 +708,32 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
+ unsigned char * p =(unsigned char*) ibuf->rect;
+ unsigned char * e = p + anim->x * anim->y * 4;
+
+- img_convert((AVPicture *)anim->pFrameRGB,
+- PIX_FMT_RGBA32,
+- (AVPicture*)anim->pFrame,
+- anim->pCodecCtx->pix_fmt,
+- anim->pCodecCtx->width,
+- anim->pCodecCtx->height);
++// img_convert((AVPicture *)anim->pFrameRGB,
++// PIX_FMT_RGBA32,
++// (AVPicture*)anim->pFrame,
++// anim->pCodecCtx->pix_fmt,
++// anim->pCodecCtx->width,
++// anim->pCodecCtx->height);
++ if (img_convert_ctx == NULL) {
++ img_convert_ctx = sws_getContext(
++ anim->pCodecCtx->width,
++ anim->pCodecCtx->height,
++ PIX_FMT_RGBA32,
++ anim->pCodecCtx->width,
++ anim->pCodecCtx->height,
++ anim->pCodecCtx->pix_fmt,
++ SWS_BICUBIC,
++ NULL, NULL, NULL);
++ }
++ sws_scale(img_convert_ctx,
++ anim->pFrame->data,
++ anim->pFrame->linesize,
++ 0,
++ anim->pCodecCtx->height,
++ anim->pFrameRGB->data,
++ anim->pFrameRGB->linesize);
++
++
+ IMB_flipy(ibuf);
+ if (G.order == L_ENDIAN) {
+ /* BGRA -> RGBA */
diff --git a/media-gfx/blender/files/digest-blender-2.44-r1 b/media-gfx/blender/files/digest-blender-2.44-r1
new file mode 100644
index 000000000000..b6d7e5970f2a
--- /dev/null
+++ b/media-gfx/blender/files/digest-blender-2.44-r1
@@ -0,0 +1,3 @@
+MD5 7ac841f6feb27e9d7fb6d77cf137be12 blender-2.44.tar.gz 14362667
+RMD160 65e96e03258263a7759bdff5a6d14fc65d13a816 blender-2.44.tar.gz 14362667
+SHA256 8fa5a46ea65d2a8b87fd1368d5984dfa0a41bdc3cfe24c776e069a4fe40102d1 blender-2.44.tar.gz 14362667