From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 21CD6139085 for ; Thu, 26 Jan 2017 22:57:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E626F23402D; Thu, 26 Jan 2017 22:57:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B2B0B23402D for ; Thu, 26 Jan 2017 22:57:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3A3AA341142 for ; Thu, 26 Jan 2017 22:57:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3D98930D9 for ; Thu, 26 Jan 2017 22:57:29 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1485471030.ace68147247dbdbe28003b6ec89614f3d4787c39.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/vice/, app-emulation/vice/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/vice/files/vice-31580-ffmpeg-build.patch app-emulation/vice/vice-2.4.27-r2.ebuild X-VCS-Directories: app-emulation/vice/ app-emulation/vice/files/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: ace68147247dbdbe28003b6ec89614f3d4787c39 X-VCS-Branch: master Date: Thu, 26 Jan 2017 22:57:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9e19c735-9f7f-4880-9076-3099af5f3b07 X-Archives-Hash: 0058a0dc8d0d0e47f996526e5d76d54c commit: ace68147247dbdbe28003b6ec89614f3d4787c39 Author: Jimi Huotari gentoo org> AuthorDate: Sun Nov 6 10:40:08 2016 +0000 Commit: David Seifert gentoo org> CommitDate: Thu Jan 26 22:50:30 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ace68147 app-emulation/vice: Fix compiling with '>=media-video/ffmpeg-3'. Add a patch to allow compiling '2.4.27-r2' with 'ffmpeg-3' installed. Backported from: https://sourceforge.net/p/vice-emu/code/31580/ Also change 'PATCH' to 'PATCHES'. Package-Manager: portage-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/2759 .../vice/files/vice-31580-ffmpeg-build.patch | 64 ++++++++++++++++++++++ app-emulation/vice/vice-2.4.27-r2.ebuild | 8 ++- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/app-emulation/vice/files/vice-31580-ffmpeg-build.patch b/app-emulation/vice/files/vice-31580-ffmpeg-build.patch new file mode 100644 index 00000000..82dc342 --- /dev/null +++ b/app-emulation/vice/files/vice-31580-ffmpeg-build.patch @@ -0,0 +1,64 @@ +# Patch to fix compiling with ffmpeg-3. +# Backported from: https://sourceforge.net/p/vice-emu/code/31580/ + +--- /src/gfxoutputdrv/ffmpeglib.h ++++ /src/gfxoutputdrv/ffmpeglib.h +@@ -76,6 +76,14 @@ + #define AVCodecID CodecID + #endif + ++#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(55,17,103) ++#define VICE_AV_PIX_FMT_RGB24 PIX_FMT_RGB24 ++#define VICE_AV_PixelFormat PixelFormat ++#else ++#define VICE_AV_PIX_FMT_RGB24 AV_PIX_FMT_RGB24 ++#define VICE_AV_PixelFormat AVPixelFormat ++#endif ++ + /* avcodec fucntions */ + typedef void(*av_init_packet_t)(AVPacket *pkt); + typedef int(*avcodec_open2_t)(AVCodecContext*, AVCodec*, AVDictionary **); +@@ -118,7 +126,7 @@ + + /* swscale functions */ + typedef struct SwsContext * (*sws_getContext_t)(int srcW, int srcH, +- enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, ++ enum VICE_AV_PixelFormat srcFormat, int dstW, int dstH, enum VICE_AV_PixelFormat dstFormat, + int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param); + typedef void (*sws_freeContext_t)(struct SwsContext *swsContext); + typedef int (*sws_scale_t)(struct SwsContext *context, uint8_t* srcSlice[], + +--- /src/gfxoutputdrv/ffmpegdrv.c ++++ /src/gfxoutputdrv/ffmpegdrv.c +@@ -671,8 +671,8 @@ + picture is needed too. It is then converted to the required + output format */ + video_st.tmp_frame = NULL; +- if (c->pix_fmt != PIX_FMT_RGB24) { +- video_st.tmp_frame = ffmpegdrv_alloc_picture(PIX_FMT_RGB24, c->width, c->height); ++ if (c->pix_fmt != VICE_AV_PIX_FMT_RGB24) { ++ video_st.tmp_frame = ffmpegdrv_alloc_picture(VICE_AV_PIX_FMT_RGB24, c->width, c->height); + if (!video_st.tmp_frame) { + log_debug("ffmpegdrv: could not allocate temporary picture"); + return -1; +@@ -769,9 +769,9 @@ + + #ifdef HAVE_FFMPEG_SWSCALE + /* setup scaler */ +- if (c->pix_fmt != PIX_FMT_RGB24) { ++ if (c->pix_fmt != VICE_AV_PIX_FMT_RGB24) { + sws_ctx = VICE_P_SWS_GETCONTEXT +- (video_width, video_height, PIX_FMT_RGB24, ++ (video_width, video_height, VICE_AV_PIX_FMT_RGB24, + video_width, video_height, c->pix_fmt, + SWS_BICUBIC, + NULL, NULL, NULL); +@@ -948,7 +948,7 @@ + + c = video_st.st->codec; + +- if (c->pix_fmt != PIX_FMT_RGB24) { ++ if (c->pix_fmt != VICE_AV_PIX_FMT_RGB24) { + ffmpegdrv_fill_rgb_image(screenshot, video_st.tmp_frame); + + if (sws_ctx != NULL) { diff --git a/app-emulation/vice/vice-2.4.27-r2.ebuild b/app-emulation/vice/vice-2.4.27-r2.ebuild index 2782d0f..0791ebb 100644 --- a/app-emulation/vice/vice-2.4.27-r2.ebuild +++ b/app-emulation/vice/vice-2.4.27-r2.ebuild @@ -85,12 +85,18 @@ DEPEND="${RDEPEND} x11-proto/videoproto nls? ( sys-devel/gettext )" -PATCH=( +PATCHES=( "${FILESDIR}"/${P}-autotools.patch ) #"${FILESDIR}"/vice_rath.txt src_prepare() { + if use ffmpeg && has_version ">=media-video/ffmpeg-3" ; then + PATCHES+=( + "${FILESDIR}"/${PN}-31580-ffmpeg-build.patch + ) + fi + default sed -i \ -e 's/building//' \