From 05fb2f5fa098b85d3d92c81ac4aaa79bed8ae81d Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Thu, 26 Jul 2007 03:52:32 +0000 Subject: Version bump, adding a patch to switch to swscaler api, closing bug #185132 Package-Manager: portage-2.1.3_rc9 --- media-video/cinelerra-cvs/ChangeLog | 8 +- media-video/cinelerra-cvs/Manifest | 30 +++- .../cinelerra-cvs/cinelerra-cvs-20070726.ebuild | 106 ++++++++++++++ .../files/cinelerra-cvs-swscaler.patch | 159 +++++++++++++++++++++ .../files/digest-cinelerra-cvs-20070726 | 3 + 5 files changed, 301 insertions(+), 5 deletions(-) create mode 100644 media-video/cinelerra-cvs/cinelerra-cvs-20070726.ebuild create mode 100644 media-video/cinelerra-cvs/files/cinelerra-cvs-swscaler.patch create mode 100644 media-video/cinelerra-cvs/files/digest-cinelerra-cvs-20070726 diff --git a/media-video/cinelerra-cvs/ChangeLog b/media-video/cinelerra-cvs/ChangeLog index 3a832c03e9b1..7b0965299952 100644 --- a/media-video/cinelerra-cvs/ChangeLog +++ b/media-video/cinelerra-cvs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-video/cinelerra-cvs # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra-cvs/ChangeLog,v 1.31 2007/07/22 08:56:59 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra-cvs/ChangeLog,v 1.32 2007/07/26 03:52:32 aballier Exp $ + +*cinelerra-cvs-20070726 (26 Jul 2007) + + 26 Jul 2007; Alexis Ballier + +files/cinelerra-cvs-swscaler.patch, +cinelerra-cvs-20070726.ebuild: + Version bump, adding a patch to switch to swscaler api, closing bug #185132 22 Jul 2007; Donnie Berkholz ; cinelerra-cvs-20070122.ebuild, cinelerra-cvs-20070607.ebuild: diff --git a/media-video/cinelerra-cvs/Manifest b/media-video/cinelerra-cvs/Manifest index 2e1a2332e25b..684387cc63b2 100644 --- a/media-video/cinelerra-cvs/Manifest +++ b/media-video/cinelerra-cvs/Manifest @@ -1,9 +1,17 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX cinelerra-cvs-swscaler.patch 5011 RMD160 99d2d021c77294f7a2605fa15ded1ca95e877db3 SHA1 9971dc37f2f040a82e62c0a4386d535a8df6bd18 SHA256 97ee3f2b3a62012bde912adcf4f0a8575b420feb65d2ff1bd4a3e35340e7eeb4 +MD5 e9607fb720b288553050b501a5cc5309 files/cinelerra-cvs-swscaler.patch 5011 +RMD160 99d2d021c77294f7a2605fa15ded1ca95e877db3 files/cinelerra-cvs-swscaler.patch 5011 +SHA256 97ee3f2b3a62012bde912adcf4f0a8575b420feb65d2ff1bd4a3e35340e7eeb4 files/cinelerra-cvs-swscaler.patch 5011 AUX recentffmpeg.patch 656 RMD160 e11f653b08b7145feeff245d8aadb72b11b89ee9 SHA1 f84d2dd7cb52fc2f489bab2d2ecd5c72a3a43c33 SHA256 be61fc2c7a200b73370aa0f1fae7cd18a28b4d27c4667782c8ea4d6cb01c0d1e MD5 e1ff8ea5d792db64b9a120ffa4abdaec files/recentffmpeg.patch 656 RMD160 e11f653b08b7145feeff245d8aadb72b11b89ee9 files/recentffmpeg.patch 656 SHA256 be61fc2c7a200b73370aa0f1fae7cd18a28b4d27c4667782c8ea4d6cb01c0d1e files/recentffmpeg.patch 656 DIST cinelerra-cvs-20070122.tar.bz2 46641387 RMD160 3ff696096166a5a41730687400acadf21a4e8e87 SHA1 163f267f19606bb3d7d33ef4018ee0187f34978c SHA256 95b94ef5da7eb4d2278f5c6e069c95f30b48cd2f64273faf730b599705ff6b80 DIST cinelerra-cvs-20070607.tar.bz2 23791150 RMD160 ecd77bab5f827139a4f64e75942b03aa9e7c22aa SHA1 5c1c14716653ac725fce744c131cba2d27ae43ff SHA256 728fd0ffc4f65eb13e892ca729b136e150bfee7ee11ed72d9ad389c25fa9ff6c +DIST cinelerra-cvs-20070726.tar.bz2 23805203 RMD160 5705ab77481a03dbc1f69b029cb4d97c59de3b79 SHA1 4a9b5d2fee288e9ccc486c79e62a1d4a808a3712 SHA256 a43a832e2459fc9f9941dc57173373f5c22ae53a39ce16585bda2533608c8f22 EBUILD cinelerra-cvs-20070122.ebuild 2768 RMD160 2d67a4b0955cc07b7ad4ee95e3387622555c916d SHA1 1aeef16c70fba193f1f768ad73150502892d8fbe SHA256 041061e2fc240cc9681c708da332148bb1561b04374874bf7b8377cf097ad8b3 MD5 9b5bbf650f4845da12ad7cbe001e1769 cinelerra-cvs-20070122.ebuild 2768 RMD160 2d67a4b0955cc07b7ad4ee95e3387622555c916d cinelerra-cvs-20070122.ebuild 2768 @@ -12,10 +20,14 @@ EBUILD cinelerra-cvs-20070607.ebuild 2843 RMD160 9f7994c58d0a67a47cee3aeb4d64d8d MD5 f668005d2992142fff7eccdf3acf22b7 cinelerra-cvs-20070607.ebuild 2843 RMD160 9f7994c58d0a67a47cee3aeb4d64d8d1821ff85a cinelerra-cvs-20070607.ebuild 2843 SHA256 72dcb448a61d3549cef38bc4a4fe02b9299ed7d7e844e221f193d3e7607889c5 cinelerra-cvs-20070607.ebuild 2843 -MISC ChangeLog 4906 RMD160 0e76ce8053837003a3e021ae395d04376e32f8fd SHA1 b11f72134d34553a38b2a96bcb7cf3a69c6cd802 SHA256 08933a76589d829c83bb7b289e5e3e5ee5a6ec1fa0f383ef5e5217da41124dad -MD5 a85627eea0b878424d5cc9acd42575fb ChangeLog 4906 -RMD160 0e76ce8053837003a3e021ae395d04376e32f8fd ChangeLog 4906 -SHA256 08933a76589d829c83bb7b289e5e3e5ee5a6ec1fa0f383ef5e5217da41124dad ChangeLog 4906 +EBUILD cinelerra-cvs-20070726.ebuild 2903 RMD160 b1470c8384d78b424345663d5396a69c735bb7a1 SHA1 67d4cdac3041befb817098a9780c0d81ccb56513 SHA256 06a3ba85ef06500441eb87bce0d3e8eac18420ad1c960050a1afe1cd092f91aa +MD5 8bdc0afbb715387d263565c54e3781e3 cinelerra-cvs-20070726.ebuild 2903 +RMD160 b1470c8384d78b424345663d5396a69c735bb7a1 cinelerra-cvs-20070726.ebuild 2903 +SHA256 06a3ba85ef06500441eb87bce0d3e8eac18420ad1c960050a1afe1cd092f91aa cinelerra-cvs-20070726.ebuild 2903 +MISC ChangeLog 5146 RMD160 6e8cfefab8c11b35edb9117d7ba2992c2ba094d9 SHA1 fe1982100ca67d045434bfd3b2fa7f097fee48da SHA256 4c0e4208a6b8d6a134b319f5ac9a41312be95189b5ab3262829e526cdff41791 +MD5 b390989bbe3e89067d8cf2e39d7d717c ChangeLog 5146 +RMD160 6e8cfefab8c11b35edb9117d7ba2992c2ba094d9 ChangeLog 5146 +SHA256 4c0e4208a6b8d6a134b319f5ac9a41312be95189b5ab3262829e526cdff41791 ChangeLog 5146 MISC metadata.xml 251 RMD160 11462994b78856883a805c72334300d07101713d SHA1 a8362b29138cd87a592947af33840bf3210cfc59 SHA256 0e151c0a2781f2632c75a2f2c3b1a8d187aed329467472236c65627a7e0ba42f MD5 955f56e990f8c32d705708b4cc4db089 metadata.xml 251 RMD160 11462994b78856883a805c72334300d07101713d metadata.xml 251 @@ -26,3 +38,13 @@ SHA256 775de61ed4c9fdc409b65ea6c9249da7637c43914bf6f159053404a201754110 files/di MD5 917460fdc7d753c3098febbca2faa4d4 files/digest-cinelerra-cvs-20070607 277 RMD160 021b733910e30702d3dffe6343873995be6890d7 files/digest-cinelerra-cvs-20070607 277 SHA256 5c2327a3faf1cfb14ebc0be9ac001d84749f4d9716d237c7bc7f9bee5f4297d7 files/digest-cinelerra-cvs-20070607 277 +MD5 437be30d17e1151c0651f4fcd986d330 files/digest-cinelerra-cvs-20070726 277 +RMD160 57acca75f443cda1cd8983dfb3cbc285d8426585 files/digest-cinelerra-cvs-20070726 277 +SHA256 614b69cdfacb52a8b06114b44699577509aa7e467b7782dc7c06cbf2ee83463a files/digest-cinelerra-cvs-20070726 277 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.5 (GNU/Linux) + +iD8DBQFGqBqMvFcC4BYPU0oRAqAMAJ9ydsjfNWXHAjWXY+7k5pehkD3qCQCgxG5z +upIjIAO136vJxhU9+qsPzq4= +=cFo7 +-----END PGP SIGNATURE----- diff --git a/media-video/cinelerra-cvs/cinelerra-cvs-20070726.ebuild b/media-video/cinelerra-cvs/cinelerra-cvs-20070726.ebuild new file mode 100644 index 000000000000..58f4a9062869 --- /dev/null +++ b/media-video/cinelerra-cvs/cinelerra-cvs-20070726.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/cinelerra-cvs/cinelerra-cvs-20070726.ebuild,v 1.1 2007/07/26 03:52:32 aballier Exp $ + +WANT_AUTOMAKE=1.9 +WANT_AUTOCONF=2.5 + +inherit toolchain-funcs eutils flag-o-matic autotools + +#filter-flags "-fPIC -fforce-addr" + +DESCRIPTION="Cinelerra - Professional Video Editor - Unofficial CVS-version" +HOMEPAGE="http://cvs.cinelerra.org/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="3dnow alsa esd mmx oss static truetype ieee1394 css altivec opengl" +RDEPEND="media-libs/libpng + >=media-libs/libdv-1.0.0 + media-libs/faad2 + media-libs/faac + media-libs/a52dec + media-libs/libsndfile + media-libs/tiff + media-video/ffmpeg + media-sound/lame + >=sci-libs/fftw-3.0.1 + >=media-libs/x264-svn-20060302 + ieee1394? ( media-libs/libiec61883 >=sys-libs/libraw1394-1.2.0 \ + >=sys-libs/libavc1394-0.5.0 ) + media-video/mjpegtools + alsa? ( media-libs/alsa-lib ) + esd? ( >=media-sound/esound-0.2.34 ) + truetype? ( >=media-libs/freetype-2.1.10 ) + opengl? ( virtual/opengl ) + >=media-libs/openexr-1.2.2 + >=media-libs/libvorbis-1.1.0 + >=media-libs/libogg-1.1 + >=media-libs/libtheora-1.0_alpha4-r1 + x11-libs/libX11 + x11-libs/libXv + x11-libs/libXxf86vm + x11-libs/libXext + x11-libs/libXvMC + x11-libs/libXft" + +DEPEND="${RDEPEND} + x86? ( dev-lang/nasm )" + +S="${WORKDIR}/${PN}" + +pkg_setup() { + if [[ "$(gcc-major-version)" -lt "4" ]]; then + eerror "You need to have gcc 4 or better" + eerror "Please follow : http://www.gentoo.org/doc/en/gcc-upgrading.xml" + eerror "And have a look at bug #128659" + die "You must use gcc 4 or better." + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/recentffmpeg.patch" + epatch "${FILESDIR}/${PN}-swscaler.patch" +} + +src_compile() { + AT_M4DIR="m4" eautoreconf + econf \ + `use_enable static` \ + `use_enable alsa` \ + `use_enable esd` \ + `use_enable oss` \ + `use_enable mmx` \ + `use_enable 3dnow` \ + --with-plugindir=/usr/$(get_libdir)/cinelerra \ + `use_enable truetype freetype2` \ + `use_enable ieee1394 firewire` \ + `use_enable css` \ + `use_enable opengl` \ + `use_enable altivec` \ + --with-external-ffmpeg \ + --with-buildinfo=cust/"Gentoo - SVN r1015" \ + || die "configure failed" + emake || die "make failed" +} + +src_install() { + emake DESTDIR="${D}" install || die + dohtml -a png,html,texi,sdw -r doc/* + # workaround + rm -fR "${D}/usr/include" + mv "${D}/usr/bin/mpeg3cat" "${D}/usr/bin/mpeg3cat.hv" + mv "${D}/usr/bin/mpeg3dump" "${D}/usr/bin/mpeg3dump.hv" + mv "${D}/usr/bin/mpeg3toc" "${D}/usr/bin/mpeg3toc.hv" + ln -s /usr/bin/mpeg2enc "${D}/usr/$(get_libdir)/cinelerra/mpeg2enc.plugin" +} + +pkg_postinst () { + elog "Please note that this is unofficial and somewhat experimental code." + elog "See cvs.cinelerra.org for a list of changes to the official cinelerra" + elog "release." +} diff --git a/media-video/cinelerra-cvs/files/cinelerra-cvs-swscaler.patch b/media-video/cinelerra-cvs/files/cinelerra-cvs-swscaler.patch new file mode 100644 index 000000000000..a478e3670ae7 --- /dev/null +++ b/media-video/cinelerra-cvs/files/cinelerra-cvs-swscaler.patch @@ -0,0 +1,159 @@ +Index: cinelerra-cvs/cinelerra/ffmpeg.C +=================================================================== +--- cinelerra-cvs.orig/cinelerra/ffmpeg.C ++++ cinelerra-cvs/cinelerra/ffmpeg.C +@@ -140,6 +140,11 @@ int FFMPEG::convert_cmodel(VFrame *frame + PixelFormat pix_fmt_out = + color_model_to_pix_fmt(frame_out->get_color_model()); + ++#ifdef HAVE_SWSCALER ++ // We need a context for swscale ++ struct SwsContext *convert_ctx; ++#endif ++ + // do conversion within libavcodec if possible + if (pix_fmt_in != PIX_FMT_NB && pix_fmt_out != PIX_FMT_NB) { + // set up a temporary pictures from frame_in and frame_out +@@ -147,7 +152,9 @@ int FFMPEG::convert_cmodel(VFrame *frame + init_picture_from_frame(&picture_in, frame_in); + init_picture_from_frame(&picture_out, frame_out); + +- int result = img_convert(&picture_out, ++ int result; ++#ifndef HAVE_SWSCALER ++ result = img_convert(&picture_out, + pix_fmt_out, + &picture_in, + pix_fmt_in, +@@ -156,6 +163,28 @@ int FFMPEG::convert_cmodel(VFrame *frame + if (result) { + printf("FFMPEG::convert_cmodel img_convert() failed\n"); + } ++#else ++ convert_ctx = sws_getContext(frame_in->get_w(), frame_in->get_h(),pix_fmt_in, ++ frame_out->get_w(),frame_out->get_h(),pix_fmt_out, ++ SWS_BICUBIC, NULL, NULL, NULL); ++ ++ if(convert_ctx == NULL){ ++ printf("FFMPEG::convert_cmodel : swscale context initialization failed\n"); ++ return 1; ++ } ++ ++ result = sws_scale(convert_ctx, ++ picture_in.data, picture_in.linesize, ++ 0, 0, ++ picture_out.data, picture_out.linesize); ++ ++ ++ sws_freeContext(convert_ctx); ++ ++ if(result){ ++ printf("FFMPEG::convert_cmodel sws_scale() failed\n"); ++ } ++#endif + return result; + } + +@@ -203,13 +232,19 @@ int FFMPEG::convert_cmodel(AVPicture *pi + + // set up a temporary picture_out from frame_out + AVPicture picture_out; ++#ifdef HAVE_SWSCALER ++ // We need a context for swscale ++ struct SwsContext *convert_ctx; ++#endif + init_picture_from_frame(&picture_out, frame_out); + int cmodel_out = frame_out->get_color_model(); + PixelFormat pix_fmt_out = color_model_to_pix_fmt(cmodel_out); + + // do conversion within libavcodec if possible + if (pix_fmt_out != PIX_FMT_NB) { +- int result = img_convert(&picture_out, ++ int result; ++#ifndef HAVE_SWSCALER ++ result = img_convert(&picture_out, + pix_fmt_out, + picture_in, + pix_fmt_in, +@@ -218,6 +253,28 @@ int FFMPEG::convert_cmodel(AVPicture *pi + if (result) { + printf("FFMPEG::convert_cmodel img_convert() failed\n"); + } ++#else ++ convert_ctx = sws_getContext(width_in, height_in,pix_fmt_in, ++ frame_out->get_w(),frame_out->get_h(),pix_fmt_out, ++ SWS_BICUBIC, NULL, NULL, NULL); ++ ++ if(convert_ctx == NULL){ ++ printf("FFMPEG::convert_cmodel : swscale context initialization failed\n"); ++ return 1; ++ } ++ ++ result = sws_scale(convert_ctx, ++ picture_in->data, picture_in->linesize, ++ 0, 0, ++ picture_out.data, picture_out.linesize); ++ ++ ++ sws_freeContext(convert_ctx); ++ ++ if(result){ ++ printf("FFMPEG::convert_cmodel sws_scale() failed\n"); ++ } ++#endif + return result; + } + +Index: cinelerra-cvs/cinelerra/ffmpeg.h +=================================================================== +--- cinelerra-cvs.orig/cinelerra/ffmpeg.h ++++ cinelerra-cvs/cinelerra/ffmpeg.h +@@ -3,6 +3,9 @@ + + extern "C" { + #include ++#ifdef HAVE_SWSCALER ++#include ++#endif + } + + #include "asset.h" +Index: cinelerra-cvs/configure.in +=================================================================== +--- cinelerra-cvs.orig/configure.in ++++ cinelerra-cvs/configure.in +@@ -341,10 +341,33 @@ AC_SUBST(CPU_CFLAGS) + ############ external ffmpeg + AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library])) + ++AH_TEMPLATE(HAVE_SWSCALER, [Define to 1 if swscaler is available in ffmpeg.]) ++ + if test "x$with_external_ffmpeg" = "xyes"; then +- PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc]) ++ PKG_CHECK_MODULES([FFMPEG_TEMP], [libavcodec libpostproc]) + FFMPEG_FOLDER="" + FFMPEG_EXTERNALTEXT="External ffmpeg" ++ ++ dnl -------------------------------------------------------------- ++ dnl check if libavcodec contains img_convert ++ dnl that means that libswscale is compiled in ++ ++ AC_MSG_CHECKING(for ffmpeg swscale support) ++ saved_LIBS="$LIBS" ++ LIBS="$saved_LIBS $FFMPEG_TEMP_LIBS" ++ AC_TRY_LINK([#include ], ++ [img_convert(0, 0, 0,0,0,0)], ++ enable_ffmpeg_swscale=no,enable_ffmpeg_swscale=yes) ++ LIBS="$saved_LIBS" ++ AC_MSG_RESULT($enable_ffmpeg_swscale) ++ ++ if test x"$enable_ffmpeg_swscale" == xyes; then ++ AC_DEFINE(HAVE_SWSCALER) ++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc libswscale]) ++ else ++ PKG_CHECK_MODULES([FFMPEG], [libavcodec libpostproc]) ++ fi ++ + else + FFMPEG_FOLDER=ffmpeg + FFMPEG_CFLAGS="-I\$(top_srcdir)/quicktime/ffmpeg/libavcodec" diff --git a/media-video/cinelerra-cvs/files/digest-cinelerra-cvs-20070726 b/media-video/cinelerra-cvs/files/digest-cinelerra-cvs-20070726 new file mode 100644 index 000000000000..33aab6055c66 --- /dev/null +++ b/media-video/cinelerra-cvs/files/digest-cinelerra-cvs-20070726 @@ -0,0 +1,3 @@ +MD5 082eb4266f783357993ca903ff81a847 cinelerra-cvs-20070726.tar.bz2 23805203 +RMD160 5705ab77481a03dbc1f69b029cb4d97c59de3b79 cinelerra-cvs-20070726.tar.bz2 23805203 +SHA256 a43a832e2459fc9f9941dc57173373f5c22ae53a39ce16585bda2533608c8f22 cinelerra-cvs-20070726.tar.bz2 23805203 -- cgit v1.2.3-65-gdbad