public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/vice/files/, app-emulation/vice/
Date: Thu, 29 Nov 2018 22:04:36 +0000 (UTC)	[thread overview]
Message-ID: <1543529059.1b6961ef0347393ca69eb7e03a3cc07d316d36b2.asturm@gentoo> (raw)

commit:     1b6961ef0347393ca69eb7e03a3cc07d316d36b2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 21:46:13 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 22:04:19 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b6961ef

app-emulation/vice: Fix build with ffmpeg-4

Rename PATCH to PATCHES (again!) and restore missing patch.

Thanks-to: Adam Jones <adam <AT> 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 <AT> gentoo.org>

 .../vice/files/vice-2.4.27-autotools.patch         | 11 ++++
 app-emulation/vice/files/vice-3.1-ffmpeg4.patch    | 74 ++++++++++++++++++++++
 app-emulation/vice/vice-3.1.ebuild                 |  7 +-
 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 00000000000..7bebd2800ef
--- /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 00000000000..d232ee22337
--- /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 6fe9e2623e2..d7267e2b207 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() {


             reply	other threads:[~2018-11-29 22:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 22:04 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-10-30 13:10 [gentoo-commits] repo/gentoo:master commit in: app-emulation/vice/files/, app-emulation/vice/ Ionen Wolkens
2020-09-17 16:27 James Le Cuirot
2020-09-17 16:27 James Le Cuirot
2020-04-14 13:22 James Le Cuirot
2016-05-30 20:01 Michael Sterrett
2015-12-29  7:41 Michael Sterrett
2015-11-12  4:07 Michael Sterrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1543529059.1b6961ef0347393ca69eb7e03a3cc07d316d36b2.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox