summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2007-10-18 14:37:03 +0000
committerMatthias Schwarzott <zzam@gentoo.org>2007-10-18 14:37:03 +0000
commit04e18949f7f878ae6f88b3512f4a4efc4b4ccc3a (patch)
tree64461efe458ea3eacae0cccea048576fc04d6b78 /media-video/dvbcut
parentSparc stable --- Bug #195009 --- working for me for over a month. (diff)
downloadhistorical-04e18949f7f878ae6f88b3512f4a4efc4b4ccc3a.tar.gz
historical-04e18949f7f878ae6f88b3512f4a4efc4b4ccc3a.tar.bz2
historical-04e18949f7f878ae6f88b3512f4a4efc4b4ccc3a.zip
Fix compilation against newest ffmpeg, Bug #188184. Added desktop menu entry, Bug #188579.
Package-Manager: portage-2.1.3.14
Diffstat (limited to 'media-video/dvbcut')
-rw-r--r--media-video/dvbcut/ChangeLog9
-rw-r--r--media-video/dvbcut/Manifest27
-rw-r--r--media-video/dvbcut/dvbcut-0.5.4-r1.ebuild54
-rw-r--r--media-video/dvbcut/files/digest-dvbcut-0.5.4-r13
-rw-r--r--media-video/dvbcut/files/dvbcut-0.5.4-ffmpeg-compat3.patch199
5 files changed, 283 insertions, 9 deletions
diff --git a/media-video/dvbcut/ChangeLog b/media-video/dvbcut/ChangeLog
index 44b7bb6e6c4f..0b5c15e02fc4 100644
--- a/media-video/dvbcut/ChangeLog
+++ b/media-video/dvbcut/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-video/dvbcut
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/dvbcut/ChangeLog,v 1.7 2007/06/03 10:08:24 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/dvbcut/ChangeLog,v 1.8 2007/10/18 14:37:02 zzam Exp $
+
+*dvbcut-0.5.4-r1 (18 Oct 2007)
+
+ 18 Oct 2007; Matthias Schwarzott <zzam@gentoo.org>
+ +files/dvbcut-0.5.4-ffmpeg-compat3.patch, +dvbcut-0.5.4-r1.ebuild:
+ Fix compilation against newest ffmpeg, Bug #188184. Added desktop menu
+ entry, Bug #188579.
03 Jun 2007; Alexis Ballier <aballier@gentoo.org>
-files/dvbcut-0.5.3-ac3-buffer.patch,
diff --git a/media-video/dvbcut/Manifest b/media-video/dvbcut/Manifest
index 4da33e51c214..78a55caf4143 100644
--- a/media-video/dvbcut/Manifest
+++ b/media-video/dvbcut/Manifest
@@ -9,19 +9,27 @@ AUX dvbcut-0.5.4-ffmpeg-compat2.patch 3262 RMD160 8c819ffab5b6a54246915a2eb575ef
MD5 f4e0a2cae5d37c3f1b24881269869153 files/dvbcut-0.5.4-ffmpeg-compat2.patch 3262
RMD160 8c819ffab5b6a54246915a2eb575efa6674bef24 files/dvbcut-0.5.4-ffmpeg-compat2.patch 3262
SHA256 aec5a2c92fc839e87da35a6875ee273c93d1dd36292be9e2e9f7a5a8782286c1 files/dvbcut-0.5.4-ffmpeg-compat2.patch 3262
+AUX dvbcut-0.5.4-ffmpeg-compat3.patch 6179 RMD160 4c6721d92fd508b56924975779acc02dfc6fe350 SHA1 294f4e686570c21291129128e9f019897ecda570 SHA256 018c5a88c11692259397610db6d5456154d2bbd0912994e17a664e5135fc2170
+MD5 edc045610a550e7080ccd003de8d38f0 files/dvbcut-0.5.4-ffmpeg-compat3.patch 6179
+RMD160 4c6721d92fd508b56924975779acc02dfc6fe350 files/dvbcut-0.5.4-ffmpeg-compat3.patch 6179
+SHA256 018c5a88c11692259397610db6d5456154d2bbd0912994e17a664e5135fc2170 files/dvbcut-0.5.4-ffmpeg-compat3.patch 6179
AUX dvbcut-0.5.4-gcc42.patch 576 RMD160 6e84fa4a525f4bba1f4f8263048b8dd89ddd2294 SHA1 adb11d4d8eb3b48c1c5a437fb70013c6e3b0e104 SHA256 9792d58872aa949233d3b554019cf63ba08c8ee4a2bd03ece55b69392f521a83
MD5 f56c0d9ca9e2ee1e7ed6c610d1ab2818 files/dvbcut-0.5.4-gcc42.patch 576
RMD160 6e84fa4a525f4bba1f4f8263048b8dd89ddd2294 files/dvbcut-0.5.4-gcc42.patch 576
SHA256 9792d58872aa949233d3b554019cf63ba08c8ee4a2bd03ece55b69392f521a83 files/dvbcut-0.5.4-gcc42.patch 576
DIST dvbcut_0.5.4.tar.bz2 795991 RMD160 fc36b9d3abd818495498c1d8181e1250f43e0057 SHA1 2bf174ec05fd92a9ac5878498c91f90bd307a2ca SHA256 db6500fc327585be6ee5a36135c9940828d22bde936daa17b6a5cce852ad9f70
+EBUILD dvbcut-0.5.4-r1.ebuild 1465 RMD160 57fe918df6b1caaf7272ba6abe134ea10456a7bb SHA1 1cd59052f94e8278958b913c00d51a376b24a13d SHA256 25577c3f823921724f0461104c7a3d46f698b3977f037bc9007b114dd5ef004b
+MD5 654464fa72da947ae0f6f3420e3184ce dvbcut-0.5.4-r1.ebuild 1465
+RMD160 57fe918df6b1caaf7272ba6abe134ea10456a7bb dvbcut-0.5.4-r1.ebuild 1465
+SHA256 25577c3f823921724f0461104c7a3d46f698b3977f037bc9007b114dd5ef004b dvbcut-0.5.4-r1.ebuild 1465
EBUILD dvbcut-0.5.4.ebuild 1336 RMD160 35255d1406d61d933c88219917af2a1183a24666 SHA1 a015897802b6b89a31b7c78f0f68d37f1128697a SHA256 6fcb9fe042557d1fe64a0af12a7801b1a7f98ce8c94946bd1706e1c6cfbc114f
MD5 2ccc87edb8700dbfd8af3575d622560e dvbcut-0.5.4.ebuild 1336
RMD160 35255d1406d61d933c88219917af2a1183a24666 dvbcut-0.5.4.ebuild 1336
SHA256 6fcb9fe042557d1fe64a0af12a7801b1a7f98ce8c94946bd1706e1c6cfbc114f dvbcut-0.5.4.ebuild 1336
-MISC ChangeLog 1846 RMD160 d435ccb137d0bf03d44317a5085dbece7cf25368 SHA1 d9e0699c8783dba662f31759b8e1ebe69b70d270 SHA256 07365d4f6591cd753b88c70d928f20a944727bee6cd2144b8fd79dc746bdb3f7
-MD5 b729d4135cfb2958bd933c59f117efd7 ChangeLog 1846
-RMD160 d435ccb137d0bf03d44317a5085dbece7cf25368 ChangeLog 1846
-SHA256 07365d4f6591cd753b88c70d928f20a944727bee6cd2144b8fd79dc746bdb3f7 ChangeLog 1846
+MISC ChangeLog 2092 RMD160 a902f1f2a26da66b8ccbf83ddc6824f46a91d5ae SHA1 3572433a9dad08720d013f551da96c371097b1e0 SHA256 f781e690127d6d867b9b135b0183cfb6463cdd2fc8033d85de7e04fdf793e8bf
+MD5 2fd2021d0084dfa8094fb7c188af6a4c ChangeLog 2092
+RMD160 a902f1f2a26da66b8ccbf83ddc6824f46a91d5ae ChangeLog 2092
+SHA256 f781e690127d6d867b9b135b0183cfb6463cdd2fc8033d85de7e04fdf793e8bf ChangeLog 2092
MISC metadata.xml 223 RMD160 86b42c49b694db39ddb3fdc60b98a3ad1a0c3392 SHA1 ea8c387229caaf4b0d3c9fbef9143b70dcae0b0d SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812
MD5 0338bfb24d7bfb6450aac4dd025c0096 metadata.xml 223
RMD160 86b42c49b694db39ddb3fdc60b98a3ad1a0c3392 metadata.xml 223
@@ -29,10 +37,13 @@ SHA256 dd48e823ec9a151bc3611121402ed26ee24eb3304aa62870b1e875a8fa0ac812 metadata
MD5 68a668c208545818355af0e0a827f6f5 files/digest-dvbcut-0.5.4 241
RMD160 576297ca9a6bb1ee724a29159eb0c79b12c281f2 files/digest-dvbcut-0.5.4 241
SHA256 d39fe62f6e9623d8a8b8fa2b7560278e0dc9b7aed00d371da6aeb5cd9fdac370 files/digest-dvbcut-0.5.4 241
+MD5 68a668c208545818355af0e0a827f6f5 files/digest-dvbcut-0.5.4-r1 241
+RMD160 576297ca9a6bb1ee724a29159eb0c79b12c281f2 files/digest-dvbcut-0.5.4-r1 241
+SHA256 d39fe62f6e9623d8a8b8fa2b7560278e0dc9b7aed00d371da6aeb5cd9fdac370 files/digest-dvbcut-0.5.4-r1 241
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.4 (GNU/Linux)
+Version: GnuPG v2.0.7 (GNU/Linux)
-iD8DBQFGYpMtvFcC4BYPU0oRAi5cAJ48LxP8x2TA5IQvI4fkm01MTiyaEwCeI4w5
-K5y6g0lXP//+OS07ESCxZfU=
-=Dpl+
+iD8DBQFHF2+Xt2vP6XvVdOcRAqpmAJ9mUGFDoBFymzf2F/Qw9Bm2SkPMhQCeP1Tg
+drSQMFZq7axIy5P1pPimlso=
+=qHxI
-----END PGP SIGNATURE-----
diff --git a/media-video/dvbcut/dvbcut-0.5.4-r1.ebuild b/media-video/dvbcut/dvbcut-0.5.4-r1.ebuild
new file mode 100644
index 000000000000..68bdc8a5699b
--- /dev/null
+++ b/media-video/dvbcut/dvbcut-0.5.4-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/dvbcut/dvbcut-0.5.4-r1.ebuild,v 1.1 2007/10/18 14:37:02 zzam Exp $
+
+inherit qt3 eutils
+
+IUSE=""
+
+MY_P="${P/-/_}"
+
+DESCRIPTION="frame-accurate editing of MPEG-2 video with MPEG and AC3 audio"
+HOMEPAGE="http://dvbcut.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="$(qt_min_version 3)
+ media-libs/libao
+ >=media-video/ffmpeg-0.4.9_p20070330"
+
+DEPEND="${RDEPEND}
+ dev-util/scons"
+
+pkg_setup() {
+ if ! built_with_use media-video/ffmpeg a52; then
+ eerror "This package requires media-video/ffmpeg compiled with A/52 (a.k.a. AC-3) support."
+ eerror "Please reemerge media-video/ffmpeg with USE=\"a52\"."
+ die "Please reemerge media-video/ffmpeg with USE=\"a52\"."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-0.5.3-ffmpeg-compat.patch"
+ epatch "${FILESDIR}/${P}-gcc42.patch"
+ epatch "${FILESDIR}/${P}-ffmpeg-compat2.patch"
+ epatch "${FILESDIR}/${P}-ffmpeg-compat3.patch"
+}
+
+src_compile() {
+ emake FFMPEG=/usr || die "build failed"
+}
+
+src_install() {
+ emake FFMPEG=/usr DESTDIR="${D}" PREFIX="/usr" MANPATH="/usr/share/man" install \
+ || die "install failed"
+ make_desktop_entry dvbcut DVBcut \
+ || die "Couldn't make dvbcut desktop entry"
+ dodoc CREDITS ChangeLog README README.ffmpeg README.icons
+}
diff --git a/media-video/dvbcut/files/digest-dvbcut-0.5.4-r1 b/media-video/dvbcut/files/digest-dvbcut-0.5.4-r1
new file mode 100644
index 000000000000..e23a50a9a373
--- /dev/null
+++ b/media-video/dvbcut/files/digest-dvbcut-0.5.4-r1
@@ -0,0 +1,3 @@
+MD5 02803e28a6bf6850f129ca6aa0a9c96e dvbcut_0.5.4.tar.bz2 795991
+RMD160 fc36b9d3abd818495498c1d8181e1250f43e0057 dvbcut_0.5.4.tar.bz2 795991
+SHA256 db6500fc327585be6ee5a36135c9940828d22bde936daa17b6a5cce852ad9f70 dvbcut_0.5.4.tar.bz2 795991
diff --git a/media-video/dvbcut/files/dvbcut-0.5.4-ffmpeg-compat3.patch b/media-video/dvbcut/files/dvbcut-0.5.4-ffmpeg-compat3.patch
new file mode 100644
index 000000000000..53e762a1b741
--- /dev/null
+++ b/media-video/dvbcut/files/dvbcut-0.5.4-ffmpeg-compat3.patch
@@ -0,0 +1,199 @@
+Index: dvbcut-svn/src/psfile.cpp
+===================================================================
+--- dvbcut-svn.orig/src/psfile.cpp
++++ dvbcut-svn/src/psfile.cpp
+@@ -90,7 +90,7 @@ psfile::psfile(const std::string &filena
+ streamnumber[sid]=audiostream(audiostreams);
+ stream *S=&s[audiostream(audiostreams++)];
+ S->id=sid;
+- S->dec=&mp2_decoder;
++ S->dec=avcodec_find_decoder(CODEC_ID_MP2);
+ S->type=streamtype::mpegaudio;
+ if (audiostreams>=MAXAUDIOSTREAMS)
+ break;
+@@ -100,7 +100,7 @@ psfile::psfile(const std::string &filena
+ streamnumber[sid]=audiostream(audiostreams);
+ stream *S=&s[audiostream(audiostreams++)];
+ S->id=sid;
+- S->dec=&liba52_decoder;
++ S->dec=avcodec_find_decoder(CODEC_ID_AC3);
+ S->type=streamtype::ac3audio;
+ if (audiostreams>=MAXAUDIOSTREAMS)
+ break;
+@@ -114,8 +114,8 @@ psfile::psfile(const std::string &filena
+ S->allocavcc();
+ S->avcc->codec_type=CODEC_TYPE_VIDEO;
+ S->avcc->codec_id=CODEC_ID_MPEG2VIDEO;
+- S->dec=&mpeg2video_decoder;
+- S->enc=&mpeg2video_encoder;
++ S->dec=avcodec_find_decoder(CODEC_ID_MPEG2VIDEO);
++ S->enc=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
+ S->type=streamtype::mpeg2video;
+ }
+
+Index: dvbcut-svn/src/tsfile.cpp
+===================================================================
+--- dvbcut-svn.orig/src/tsfile.cpp
++++ dvbcut-svn/src/tsfile.cpp
+@@ -78,12 +78,12 @@ tsfile::tsfile(const std::string &filena
+ stream *S=&s[audiostream(audiostreams++)];
+ S->id=it->second;
+ if (it->first==0xbd) {
+- S->dec=&liba52_decoder;
+- S->enc=&ac3_encoder;
++ S->dec=avcodec_find_decoder(CODEC_ID_AC3);
++ S->enc=avcodec_find_encoder(CODEC_ID_AC3);
+ S->type=streamtype::ac3audio;
+ } else {
+- S->dec=&mp2_decoder;
+- S->enc=&mp2_encoder;
++ S->dec=avcodec_find_decoder(CODEC_ID_MP2);
++ S->enc=avcodec_find_decoder(CODEC_ID_MP2);
+ S->type=streamtype::mpegaudio;
+ }
+ if (audiostreams>=MAXAUDIOSTREAMS)
+@@ -98,8 +98,8 @@ tsfile::tsfile(const std::string &filena
+ S->allocavcc();
+ S->avcc->codec_type=CODEC_TYPE_VIDEO;
+ S->avcc->codec_id=CODEC_ID_MPEG2VIDEO;
+- S->dec=&mpeg2video_decoder;
+- S->enc=&mpeg2video_encoder;
++ S->dec=avcodec_find_decoder(CODEC_ID_MPEG2VIDEO);
++ S->enc=avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
+ S->type=streamtype::mpeg2video;
+ }
+
+Index: dvbcut-svn/src/avframe.cpp
+===================================================================
+--- dvbcut-svn.orig/src/avframe.cpp
++++ dvbcut-svn/src/avframe.cpp
+@@ -23,7 +23,11 @@
+ #include <stdio.h>
+ #include "avframe.h"
+
++#ifdef HAVE_LIB_SWSCALE
++avframe::avframe() : tobefreed(0),w(0),h(0),dw(0),pix_fmt(),img_convert_ctx(0)
++#else
+ avframe::avframe() : tobefreed(0),w(0),h(0),dw(0),pix_fmt()
++#endif
+ {
+ f=avcodec_alloc_frame();
+ }
+@@ -54,7 +58,11 @@ avframe::avframe(AVFrame *src, AVCodecCo
+ h=ctx->height;
+ pix_fmt=ctx->pix_fmt;
+ dw=w*ctx->sample_aspect_ratio.num/ctx->sample_aspect_ratio.den;
+-
++#ifdef HAVE_LIB_SWSCALE
++ img_convert_ctx=sws_getContext(w, h, pix_fmt,
++ w, h, PIX_FMT_BGR24, SWS_BICUBIC,
++ NULL, NULL, NULL);
++#endif
+ }
+
+ avframe::~avframe()
+@@ -63,11 +71,19 @@ avframe::~avframe()
+ free(tobefreed);
+ if (f)
+ av_free(f);
++#ifdef HAVE_LIB_SWSCALE
++ if (img_convert_ctx)
++ sws_freeContext(img_convert_ctx);
++#endif
+ }
+
+ QImage avframe::getqimage(bool scaled, int viewscalefactor)
+ {
++#ifdef HAVE_LIB_SWSCALE
++ if (w<=0 || h<=0 || img_convert_ctx==NULL)
++#else
+ if (w<=0 || h<=0)
++#endif
+ return QImage();
+
+ uint8_t *rgbbuffer=(uint8_t*)malloc(avpicture_get_size(PIX_FMT_RGB24, w, h)+64);
+@@ -79,11 +95,20 @@ QImage avframe::getqimage(bool scaled, i
+ rgbbuffer+headerlen,
+ PIX_FMT_RGB24,w,h);
+
++#ifdef HAVE_LIB_SWSCALE
++ sws_scale(img_convert_ctx, f->data, f->linesize, 0, h,
++ avframergb->data, avframergb->linesize);
++#else
+ img_convert((AVPicture *)avframergb, PIX_FMT_RGB24, (AVPicture*)f, pix_fmt, w, h);
++#endif
+
+ QImage im;
+ im.loadFromData(rgbbuffer, headerlen+w*h*3, "PPM");
+
++#ifdef HAVE_LIB_SWSCALE
++ im = im.swapRGB();
++#endif
++
+ if ((scaled && w!=dw)||(viewscalefactor!=1)) {
+ #ifdef SMOOTHSCALE
+ im = im.smoothScale((scaled?dw:w)/viewscalefactor, h/viewscalefactor);
+Index: dvbcut-svn/src/avframe.h
+===================================================================
+--- dvbcut-svn.orig/src/avframe.h
++++ dvbcut-svn/src/avframe.h
+@@ -23,6 +23,9 @@
+
+ extern "C" {
+ #include <ffmpeg/avcodec.h>
++#ifdef HAVE_LIB_SWSCALE
++#include <ffmpeg/swscale.h>
++#endif
+ }
+
+ class QImage;
+@@ -37,6 +40,9 @@ protected:
+ void *tobefreed;
+ int w,h,dw;
+ enum PixelFormat pix_fmt;
++#ifdef HAVE_LIB_SWSCALE
++ struct SwsContext *img_convert_ctx;
++#endif
+
+ public:
+ avframe();
+Index: dvbcut-svn/SConstruct
+===================================================================
+--- dvbcut-svn.orig/SConstruct
++++ dvbcut-svn/SConstruct
+@@ -88,10 +88,6 @@ if (not env.GetOption('clean')):
+ print "Checking for libao... found"
+ else:
+ print "Checking for libao... not found"
+-
+-### FINISH
+-
+-env=conf.Finish()
+
+ ###### BUILD ENVIRONMENT (pt2)
+
+@@ -117,8 +113,23 @@ if (ffmpegpath!='/usr'):
+ env.Append(CPPPATH=os.path.join(str(ffmpegpath),'include'))
+ env.Append(LIBPATH=os.path.join(str(ffmpegpath),'lib'))
+ env.Append(LIBS=['avformat','avcodec','avutil'])
++if (localffmpeg==False):
++ env.Append(CPPDEFINES=["__STDC_CONSTANT_MACROS", "__STDC_LIMIT_MACROS"])
++
++
++### LIBSWSCALE
++if (not env.GetOption('clean') and not localffmpeg):
++ if (conf.TryAction('pkg-config --exists libswscale')[0]):
++ conf.env.Append(CPPDEFINES="HAVE_LIB_SWSCALE")
++ conf.env.ParseConfig('pkg-config --cflags --libs libswscale')
++ print "Checking for C library swscale... yes"
++ elif (conf.CheckLibWithHeader('swscale', 'ffmpeg/swscale.h', 'C')):
++ conf.env.Append(CPPDEFINES="HAVE_LIB_SWSCALE")
++
++### FINISH
++
++env=conf.Finish()
+
+-env.Append(CPPDEFINES="__STDC_CONSTANT_MACROS")
+ ###### WORK
+
+ env.bin_targets=[]