diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-01-24 14:40:00 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-01-24 14:40:00 +0000 |
commit | 0281595f3140a6143fa0ed81ea69e23b367f1f12 (patch) | |
tree | d90ef4e8eaa73248ec8bc71b18316e010985e847 /app-emulation | |
parent | Version bump. (diff) | |
download | gentoo-2-0281595f3140a6143fa0ed81ea69e23b367f1f12.tar.gz gentoo-2-0281595f3140a6143fa0ed81ea69e23b367f1f12.tar.bz2 gentoo-2-0281595f3140a6143fa0ed81ea69e23b367f1f12.zip |
Fix build and runtime with recent FFmpeg versions. Part of bug #443218.
(Portage version: 2.2.0_alpha160/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/vice/ChangeLog | 6 | ||||
-rw-r--r-- | app-emulation/vice/files/vice-2.4-ffmpeg-1.patch | 141 | ||||
-rw-r--r-- | app-emulation/vice/vice-2.4.ebuild | 5 |
3 files changed, 149 insertions, 3 deletions
diff --git a/app-emulation/vice/ChangeLog b/app-emulation/vice/ChangeLog index 76983daa4d3d..58fdf7e986b2 100644 --- a/app-emulation/vice/ChangeLog +++ b/app-emulation/vice/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-emulation/vice # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/vice/ChangeLog,v 1.86 2013/01/06 07:27:57 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vice/ChangeLog,v 1.87 2013/01/24 14:40:00 aballier Exp $ + + 24 Jan 2013; Alexis Ballier <aballier@gentoo.org> vice-2.4.ebuild, + +files/vice-2.4-ffmpeg-1.patch: + Fix build and runtime with recent FFmpeg versions. Part of bug #443218. 06 Jan 2013; Michael Sterrett <mr_bones_@gentoo.org> +files/vice-2.4-arm.patch, vice-2.4.ebuild: diff --git a/app-emulation/vice/files/vice-2.4-ffmpeg-1.patch b/app-emulation/vice/files/vice-2.4-ffmpeg-1.patch new file mode 100644 index 000000000000..e601e7041697 --- /dev/null +++ b/app-emulation/vice/files/vice-2.4-ffmpeg-1.patch @@ -0,0 +1,141 @@ +Fixes build with recent FFmpeg versions. + +https://bugs.gentoo.org/show_bug.cgi?id=443218 +https://sourceforge.net/tracker/?func=detail&aid=3601992&group_id=223021&atid=1057619 + +Index: vice-2.4/src/gfxoutputdrv/ffmpegdrv.c +=================================================================== +--- vice-2.4.orig/src/gfxoutputdrv/ffmpegdrv.c ++++ vice-2.4/src/gfxoutputdrv/ffmpegdrv.c +@@ -343,7 +343,7 @@ static int ffmpegmovie_init_audio(int sp + c = st->codec; + c->codec_id = ffmpegdrv_fmt->audio_codec; + c->codec_type = AVMEDIA_TYPE_AUDIO; +- c->sample_fmt = SAMPLE_FMT_S16; ++ c->sample_fmt = AV_SAMPLE_FMT_S16; + + /* put sample parameters */ + c->bit_rate = audio_bitrate; +@@ -613,12 +613,7 @@ static int ffmpegdrv_init_file(void) + if (!video_init_done || !audio_init_done) + return 0; + +- if ((*ffmpeglib.p_av_set_parameters)(ffmpegdrv_oc, NULL) < 0) { +- log_debug("ffmpegdrv: Invalid output format parameters"); +- return -1; +- } +- +- (*ffmpeglib.p_dump_format)(ffmpegdrv_oc, 0, ffmpegdrv_oc->filename, 1); ++ (*ffmpeglib.p_av_dump_format)(ffmpegdrv_oc, 0, ffmpegdrv_oc->filename, 1); + + if (video_st && (ffmpegdrv_open_video(ffmpegdrv_oc, video_st) < 0)) { + ui_error(translate_text(IDGS_FFMPEG_CANNOT_OPEN_VSTREAM)); +@@ -632,8 +627,8 @@ static int ffmpegdrv_init_file(void) + } + + if (!(ffmpegdrv_fmt->flags & AVFMT_NOFILE)) { +- if ((*ffmpeglib.p_url_fopen)(&ffmpegdrv_oc->pb, ffmpegdrv_oc->filename, +- URL_WRONLY) < 0) ++ if ((*ffmpeglib.p_avio_open)(&ffmpegdrv_oc->pb, ffmpegdrv_oc->filename, ++ AVIO_FLAG_WRITE) < 0) + { + ui_error(translate_text(IDGS_FFMPEG_CANNOT_OPEN_S), ffmpegdrv_oc->filename); + screenshot_stop_recording(); +@@ -642,7 +637,7 @@ static int ffmpegdrv_init_file(void) + + } + +- (*ffmpeglib.p_av_write_header)(ffmpegdrv_oc); ++ (*ffmpeglib.p_avformat_write_header)(ffmpegdrv_oc,NULL); + + log_debug("ffmpegdrv: Initialized file successfully"); + +@@ -724,7 +719,7 @@ static int ffmpegdrv_close(screenshot_t + (*ffmpeglib.p_av_write_trailer)(ffmpegdrv_oc); + if (!(ffmpegdrv_fmt->flags & AVFMT_NOFILE)) { + /* close the output file */ +- (*ffmpeglib.p_url_fclose)(ffmpegdrv_oc->pb); ++ (*ffmpeglib.p_avio_close)(ffmpegdrv_oc->pb); + } + } + +Index: vice-2.4/src/gfxoutputdrv/ffmpeglib.c +=================================================================== +--- vice-2.4.orig/src/gfxoutputdrv/ffmpeglib.c ++++ vice-2.4/src/gfxoutputdrv/ffmpeglib.c +@@ -208,13 +208,12 @@ static int load_avformat(ffmpeglib_t *li + GET_SYMBOL_AND_TEST_AVFORMAT(av_init_packet); + GET_SYMBOL_AND_TEST_AVFORMAT(av_register_all); + GET_SYMBOL_AND_TEST_AVFORMAT(av_new_stream); +- GET_SYMBOL_AND_TEST_AVFORMAT(av_set_parameters); +- GET_SYMBOL_AND_TEST_AVFORMAT(av_write_header); ++ GET_SYMBOL_AND_TEST_AVFORMAT(avformat_write_header); + GET_SYMBOL_AND_TEST_AVFORMAT(av_write_frame); + GET_SYMBOL_AND_TEST_AVFORMAT(av_write_trailer); +- GET_SYMBOL_AND_TEST_AVFORMAT(url_fopen); +- GET_SYMBOL_AND_TEST_AVFORMAT(url_fclose); +- GET_SYMBOL_AND_TEST_AVFORMAT(dump_format); ++ GET_SYMBOL_AND_TEST_AVFORMAT(avio_open); ++ GET_SYMBOL_AND_TEST_AVFORMAT(avio_close); ++ GET_SYMBOL_AND_TEST_AVFORMAT(av_dump_format); + GET_SYMBOL_AND_TEST_AVFORMAT(av_guess_format); + #ifndef HAVE_FFMPEG_SWSCALE + GET_SYMBOL_AND_TEST_AVFORMAT(img_convert); +@@ -240,13 +239,12 @@ static void free_avformat(ffmpeglib_t *l + lib->p_av_init_packet = NULL; + lib->p_av_register_all = NULL; + lib->p_av_new_stream = NULL; +- lib->p_av_set_parameters = NULL; +- lib->p_av_write_header = NULL; ++ lib->p_avformat_write_header = NULL; + lib->p_av_write_frame = NULL; + lib->p_av_write_trailer = NULL; +- lib->p_url_fopen = NULL; +- lib->p_url_fclose = NULL; +- lib->p_dump_format = NULL; ++ lib->p_avio_open = NULL; ++ lib->p_avio_close = NULL; ++ lib->p_av_dump_format = NULL; + lib->p_av_guess_format = NULL; + #ifndef HAVE_FFMPEG_SWSCALE + lib->p_img_convert = NULL; +Index: vice-2.4/src/gfxoutputdrv/ffmpeglib.h +=================================================================== +--- vice-2.4.orig/src/gfxoutputdrv/ffmpeglib.h ++++ vice-2.4/src/gfxoutputdrv/ffmpeglib.h +@@ -80,13 +80,12 @@ typedef int (*avpicture_get_size_t) (int + typedef void (*av_init_packet_t) (AVPacket *pkt); + typedef void (*av_register_all_t) (void); + typedef AVStream* (*av_new_stream_t) (AVFormatContext*, int); +-typedef int (*av_set_parameters_t) (AVFormatContext*, AVFormatParameters*); +-typedef int (*av_write_header_t) (AVFormatContext*); ++typedef int (*avformat_write_header_t) (AVFormatContext*,AVDictionary **); + typedef int (*av_write_frame_t) (AVFormatContext*, AVPacket*); + typedef int (*av_write_trailer_t) (AVFormatContext*); +-typedef int (*url_fopen_t) (ByteIOContext**, const char*, int); +-typedef int (*url_fclose_t) (ByteIOContext*); +-typedef void (*dump_format_t) (AVFormatContext *, int, const char*, int); ++typedef int (*avio_open_t) (AVIOContext**, const char*, int); ++typedef int (*avio_close_t) (AVIOContext*); ++typedef void (*av_dump_format_t) (AVFormatContext *, int, const char*, int); + typedef AVOutputFormat* (*av_guess_format_t) (const char*, const char*, const char*); + typedef int (*img_convert_t) (AVPicture*, int, AVPicture*, int, int, int); + +@@ -118,13 +117,12 @@ struct ffmpeglib_s { + av_init_packet_t p_av_init_packet; + av_register_all_t p_av_register_all; + av_new_stream_t p_av_new_stream; +- av_set_parameters_t p_av_set_parameters; +- av_write_header_t p_av_write_header; ++ avformat_write_header_t p_avformat_write_header; + av_write_frame_t p_av_write_frame; + av_write_trailer_t p_av_write_trailer; +- url_fopen_t p_url_fopen; +- url_fclose_t p_url_fclose; +- dump_format_t p_dump_format; ++ avio_open_t p_avio_open; ++ avio_close_t p_avio_close; ++ av_dump_format_t p_av_dump_format; + av_guess_format_t p_av_guess_format; + #ifndef HAVE_FFMPEG_SWSCALE + img_convert_t p_img_convert; diff --git a/app-emulation/vice/vice-2.4.ebuild b/app-emulation/vice/vice-2.4.ebuild index 0ec0effff02f..6f9f64bad2df 100644 --- a/app-emulation/vice/vice-2.4.ebuild +++ b/app-emulation/vice/vice-2.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/app-emulation/vice/vice-2.4.ebuild,v 1.3 2013/01/06 07:27:57 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vice/vice-2.4.ebuild,v 1.4 2013/01/24 14:40:00 aballier Exp $ EAPI=5 inherit autotools eutils toolchain-funcs games @@ -59,7 +59,8 @@ DEPEND="${RDEPEND} nls? ( sys-devel/gettext )" src_prepare() { - epatch "${FILESDIR}"/${P}-arm.patch + epatch "${FILESDIR}"/${P}-arm.patch \ + "${FILESDIR}"/${P}-ffmpeg-1.patch sed -i \ -e "s:/usr/local/lib/VICE:${GAMES_DATADIR}/${PN}:" \ man/vice.1 \ |