summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-11-29 22:46:13 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2018-11-29 23:04:19 +0100
commit1b6961ef0347393ca69eb7e03a3cc07d316d36b2 (patch)
treede857bc086881998ebb554c5916e91eab7fe9412 /app-emulation/vice
parentmedia-video/bino: Fix building with GCC 5 (diff)
downloadgentoo-1b6961ef0347393ca69eb7e03a3cc07d316d36b2.tar.gz
gentoo-1b6961ef0347393ca69eb7e03a3cc07d316d36b2.tar.bz2
gentoo-1b6961ef0347393ca69eb7e03a3cc07d316d36b2.zip
app-emulation/vice: Fix build with ffmpeg-4
Rename PATCH to PATCHES (again!) and restore missing patch. Thanks-to: Adam Jones <adam@eidolon.org.uk> Closes: https://bugs.gentoo.org/670620 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-emulation/vice')
-rw-r--r--app-emulation/vice/files/vice-2.4.27-autotools.patch11
-rw-r--r--app-emulation/vice/files/vice-3.1-ffmpeg4.patch74
-rw-r--r--app-emulation/vice/vice-3.1.ebuild7
3 files changed, 89 insertions, 3 deletions
diff --git a/app-emulation/vice/files/vice-2.4.27-autotools.patch b/app-emulation/vice/files/vice-2.4.27-autotools.patch
new file mode 100644
index 000000000000..7bebd2800ef6
--- /dev/null
+++ b/app-emulation/vice/files/vice-2.4.27-autotools.patch
@@ -0,0 +1,11 @@
+--- vice-2.4.7.orig/configure.ac
++++ vice-2.4.7/configure.ac
+@@ -124,7 +118,7 @@
+ AC_SUBST(VICE_VERSION)
+
+ AM_INIT_AUTOMAKE(vice, $VICE_VERSION)
+-AM_CONFIG_HEADER(src/config.h)
++AC_CONFIG_HEADERS(src/config.h)
+
+ if test x"$VICE_VERSION_BUILD" = "x" -o x"$VICE_VERSION_BUILD" = "x0" ; then
+ VERSION_RC=$VICE_VERSION_MAJOR","$VICE_VERSION_MINOR",0,0"
diff --git a/app-emulation/vice/files/vice-3.1-ffmpeg4.patch b/app-emulation/vice/files/vice-3.1-ffmpeg4.patch
new file mode 100644
index 000000000000..d232ee22337e
--- /dev/null
+++ b/app-emulation/vice/files/vice-3.1-ffmpeg4.patch
@@ -0,0 +1,74 @@
+--- a/src/gfxoutputdrv/ffmpegdrv.c
++++ b/src/gfxoutputdrv/ffmpegdrv.c
+@@ -46,6 +46,13 @@
+ #include "util.h"
+ #include "soundmovie.h"
+
++/** \brief Helper macro to determine ffmpeg version
++ */
++#if (LIBAVCODEC_VERSION_MAJOR >= 58) && (LIBAVCODEC_VERSION_MINOR >= 18)
++# define HAVE_FFMPEG4
++#endif
++
++
+ static gfxoutputdrv_codec_t avi_audio_codeclist[] = {
+ { AV_CODEC_ID_MP2, "MP2" },
+ { AV_CODEC_ID_MP3, "MP3" },
+@@ -354,7 +361,11 @@
+ }
+
+ audio_is_open = 1;
++#ifdef HAVE_FFMPEG4
++ if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) {
++#else
+ if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
++#endif
+ audio_inbuf_samples = 10000;
+ } else {
+ audio_inbuf_samples = c->frame_size;
+@@ -447,8 +458,13 @@
+ audio_st.samples_count = 0;
+
+ /* Some formats want stream headers to be separate. */
+- if (ffmpegdrv_oc->oformat->flags & AVFMT_GLOBALHEADER)
++ if (ffmpegdrv_oc->oformat->flags & AVFMT_GLOBALHEADER) {
++#ifdef HAVE_FFMPEG4
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
++#else
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++#endif
++ }
+
+ /* create resampler context */
+ #ifndef HAVE_FFMPEG_AVRESAMPLE
+@@ -781,7 +797,11 @@
+
+ /* Some formats want stream headers to be separate. */
+ if (ffmpegdrv_oc->oformat->flags & AVFMT_GLOBALHEADER) {
++#ifdef HAVE_FFMPEG4
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
++#else
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++#endif
+ }
+
+ if (audio_init_done) {
+@@ -961,6 +981,7 @@
+
+ video_st.frame->pts = video_st.next_pts++;
+
++#ifdef AVFMT_RAWPICTURE
+ if (ffmpegdrv_oc->oformat->flags & AVFMT_RAWPICTURE) {
+ AVPacket pkt;
+ VICE_P_AV_INIT_PACKET(&pkt);
+@@ -971,7 +992,9 @@
+ pkt.pts = pkt.dts = video_st.frame->pts;
+
+ ret = VICE_P_AV_INTERLEAVED_WRITE_FRAME(ffmpegdrv_oc, &pkt);
+- } else {
++ } else
++#endif
++ {
+ AVPacket pkt = { 0 };
+ int got_packet;
+
diff --git a/app-emulation/vice/vice-3.1.ebuild b/app-emulation/vice/vice-3.1.ebuild
index 6fe9e2623e27..d7267e2b2073 100644
--- a/app-emulation/vice/vice-3.1.ebuild
+++ b/app-emulation/vice/vice-3.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -85,8 +85,9 @@ DEPEND="${RDEPEND}
)
)"
-PATCH=(
- "${FILESDIR}"/${P}-autotools.patch
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.4.27-autotools.patch
+ "${FILESDIR}"/${P}-ffmpeg4.patch
)
src_prepare() {