diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-02-07 18:45:16 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-02-07 18:45:16 +0000 |
commit | c1b33151fe7ef4a02afabacba853495882db4fdc (patch) | |
tree | 30add2d227c1c012db92279fe46105c466b19ebd /media-sound/karlyriceditor | |
parent | version bump, eapi 5, use subslot and := deps (diff) | |
download | gentoo-2-c1b33151fe7ef4a02afabacba853495882db4fdc.tar.gz gentoo-2-c1b33151fe7ef4a02afabacba853495882db4fdc.tar.bz2 gentoo-2-c1b33151fe7ef4a02afabacba853495882db4fdc.zip |
Fix compatibility with older ffmpeg versions and fix build on amd64 while at it.
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-sound/karlyriceditor')
4 files changed, 64 insertions, 4 deletions
diff --git a/media-sound/karlyriceditor/ChangeLog b/media-sound/karlyriceditor/ChangeLog index 95b772ff8244..371c1481d934 100644 --- a/media-sound/karlyriceditor/ChangeLog +++ b/media-sound/karlyriceditor/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-sound/karlyriceditor # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/karlyriceditor/ChangeLog,v 1.7 2013/02/06 08:41:23 pesa Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/karlyriceditor/ChangeLog,v 1.8 2013/02/07 18:45:16 aballier Exp $ + + 07 Feb 2013; Alexis Ballier <aballier@gentoo.org> karlyriceditor-1.4.ebuild, + +files/karlyriceditor-1.4-ffmpeg_compat.patch, + +files/karlyriceditor-1.4-qmin.patch: + Fix compatibility with older ffmpeg versions and fix build on amd64 while at + it. *karlyriceditor-1.4 (06 Feb 2013) diff --git a/media-sound/karlyriceditor/files/karlyriceditor-1.4-ffmpeg_compat.patch b/media-sound/karlyriceditor/files/karlyriceditor-1.4-ffmpeg_compat.patch new file mode 100644 index 000000000000..9711f9e556f9 --- /dev/null +++ b/media-sound/karlyriceditor/files/karlyriceditor-1.4-ffmpeg_compat.patch @@ -0,0 +1,37 @@ +Index: karlyriceditor-1.4/src/ffmpegvideoencoder.cpp +=================================================================== +--- karlyriceditor-1.4.orig/src/ffmpegvideoencoder.cpp ++++ karlyriceditor-1.4/src/ffmpegvideoencoder.cpp +@@ -397,6 +397,13 @@ int FFMpegVideoEncoderPriv::encodeImage( + // SWS conversion + convertImage_sws(img); + ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,2,0) ++ int out_size = avcodec_encode_video(pVideoCodecCtx,outbuf,outbuf_size,ppicture); ++ ++ if (out_size > 0) ++ { ++ av_init_packet(&pkt); ++#else + av_init_packet( &pkt ); + pkt.data = NULL; + pkt.size = 0; +@@ -408,6 +415,7 @@ int FFMpegVideoEncoderPriv::encodeImage( + + if ( got_packet ) + { ++#endif + if ( pVideoCodecCtx->coded_frame->pts != (int64_t) (0x8000000000000000LL) ) + pkt.pts= av_rescale_q(pVideoCodecCtx->coded_frame->pts, pVideoCodecCtx->time_base, pVideoStream->time_base); + +@@ -415,6 +423,10 @@ int FFMpegVideoEncoderPriv::encodeImage( + pkt.flags |= AV_PKT_FLAG_KEY; + + pkt.stream_index = pVideoStream->index; ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54,2,0) ++ pkt.data = outbuf; ++ pkt.size = out_size; ++#endif + + int ret = av_interleaved_write_frame(pOutputCtx, &pkt); + diff --git a/media-sound/karlyriceditor/files/karlyriceditor-1.4-qmin.patch b/media-sound/karlyriceditor/files/karlyriceditor-1.4-qmin.patch new file mode 100644 index 000000000000..b7835e5973ac --- /dev/null +++ b/media-sound/karlyriceditor/files/karlyriceditor-1.4-qmin.patch @@ -0,0 +1,13 @@ +Index: karlyriceditor-1.4/src/kfn_file_parser.cpp +=================================================================== +--- karlyriceditor-1.4.orig/src/kfn_file_parser.cpp ++++ karlyriceditor-1.4/src/kfn_file_parser.cpp +@@ -311,7 +311,7 @@ QByteArray KFNFileParser::extract( const + + while ( total_in < entry.length_in ) + { +- int toRead = qMin( sizeof(buffer), (unsigned int) entry.length_in - total_in ); ++ int toRead = qMin( sizeof(buffer), (size_t) entry.length_in - total_in ); + int bytesRead = m_file.read( buffer, toRead ); + + // We might need to write less than we read since the file is rounded to 16 bytes diff --git a/media-sound/karlyriceditor/karlyriceditor-1.4.ebuild b/media-sound/karlyriceditor/karlyriceditor-1.4.ebuild index cf4b1f338aa5..24c04fd06b1d 100644 --- a/media-sound/karlyriceditor/karlyriceditor-1.4.ebuild +++ b/media-sound/karlyriceditor/karlyriceditor-1.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/karlyriceditor/karlyriceditor-1.4.ebuild,v 1.1 2013/02/06 08:41:23 pesa Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/karlyriceditor/karlyriceditor-1.4.ebuild,v 1.2 2013/02/07 18:45:16 aballier Exp $ EAPI=5 @@ -18,7 +18,7 @@ IUSE="" RDEPEND=" dev-libs/openssl:0 media-libs/libsdl - >=virtual/ffmpeg-0.11 + >=virtual/ffmpeg-0.10 x11-libs/qt-core:4 x11-libs/qt-gui:4 " @@ -26,7 +26,11 @@ DEPEND="${RDEPEND} virtual/pkgconfig " -PATCHES=( "${FILESDIR}/${PN}-1.3-libav.patch" ) +PATCHES=( + "${FILESDIR}/${PN}-1.3-libav.patch" + "${FILESDIR}/${PN}-1.4-ffmpeg_compat.patch" + "${FILESDIR}/${PN}-1.4-qmin.patch" + ) src_install() { dodoc Changelog |