Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/2mandvd/files/, media-video/2mandvd/
Date: Mon, 05 Dec 2016 10:07:29
Message-Id: 1480932438.4ffb125c12109bff6987c033823a8b00d4df4970.aballier@gentoo
1 commit: 4ffb125c12109bff6987c033823a8b00d4df4970
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 5 10:07:07 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 5 10:07:18 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ffb125c
7
8 media-video/2mandvd: fix build with gcc6 and ffmpeg 3. Bug #575054.
9
10 Package-Manager: portage-2.3.2
11
12 media-video/2mandvd/2mandvd-1.8.5.ebuild | 4 ++-
13 .../2mandvd/files/2mandvd-1.8.5-ffmpeg3.patch | 32 ++++++++++++++++++++++
14 media-video/2mandvd/files/2mandvd-1.8.5-gcc6.patch | 21 ++++++++++++++
15 3 files changed, 56 insertions(+), 1 deletion(-)
16
17 diff --git a/media-video/2mandvd/2mandvd-1.8.5.ebuild b/media-video/2mandvd/2mandvd-1.8.5.ebuild
18 index 28f3931..d6cdd0f 100644
19 --- a/media-video/2mandvd/2mandvd-1.8.5.ebuild
20 +++ b/media-video/2mandvd/2mandvd-1.8.5.ebuild
21 @@ -1,4 +1,4 @@
22 -# Copyright 1999-2015 Gentoo Foundation
23 +# Copyright 1999-2016 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 # $Id$
26
27 @@ -45,6 +45,8 @@ S=${WORKDIR}/${MY_PN}
28 PATCHES=(
29 "${FILESDIR}/${PN}-1.7.3-libav.patch"
30 "${FILESDIR}/${PN}-1.8.5-libavformat54.patch"
31 + "${FILESDIR}/${PN}-1.8.5-gcc6.patch"
32 + "${FILESDIR}/${PN}-1.8.5-ffmpeg3.patch"
33 )
34
35 src_prepare() {
36
37 diff --git a/media-video/2mandvd/files/2mandvd-1.8.5-ffmpeg3.patch b/media-video/2mandvd/files/2mandvd-1.8.5-ffmpeg3.patch
38 new file mode 100644
39 index 00000000..29ffc95
40 --- /dev/null
41 +++ b/media-video/2mandvd/files/2mandvd-1.8.5-ffmpeg3.patch
42 @@ -0,0 +1,32 @@
43 +Index: 2ManDVD/videowrapper.cpp
44 +===================================================================
45 +--- 2ManDVD.orig/videowrapper.cpp
46 ++++ 2ManDVD/videowrapper.cpp
47 +@@ -99,11 +99,11 @@ int videowrapper::load_video(QString fil
48 +
49 + img_convert_ctx = sws_getContext(pCodecCtx->width,
50 + pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,
51 +- pCodecCtx->height, PIX_FMT_RGB24, SWS_BICUBIC, NULL,
52 ++ pCodecCtx->height, AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL,
53 + NULL, NULL);
54 +
55 + // *** ON DETERMINE LA TAILLE DU BUFFER ***
56 +- numBytes=avpicture_get_size(PIX_FMT_RGB24, pCodecCtx->width,
57 ++ numBytes=avpicture_get_size(AV_PIX_FMT_RGB24, pCodecCtx->width,
58 + pCodecCtx->height);
59 + buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
60 + old_frame = -1;
61 +@@ -120,10 +120,10 @@ QImage videowrapper::read_frame(int64_t
62 + if ( num_frame != old_frame )
63 + {
64 + // *** ALLOCATE VIDEO FRAME ***
65 +- pFrameRGB=avcodec_alloc_frame();
66 +- pFrame=avcodec_alloc_frame();
67 ++ pFrameRGB=av_frame_alloc();
68 ++ pFrame=av_frame_alloc();
69 +
70 +- avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
71 ++ avpicture_fill((AVPicture *)pFrameRGB, buffer, AV_PIX_FMT_RGB24,
72 + pCodecCtx->width, pCodecCtx->height);
73 + av_seek_frame(pFormatCtx,videoStream,0, AVSEEK_FLAG_FRAME);
74 + compte_frame = -1;
75
76 diff --git a/media-video/2mandvd/files/2mandvd-1.8.5-gcc6.patch b/media-video/2mandvd/files/2mandvd-1.8.5-gcc6.patch
77 new file mode 100644
78 index 00000000..5a16d95
79 --- /dev/null
80 +++ b/media-video/2mandvd/files/2mandvd-1.8.5-gcc6.patch
81 @@ -0,0 +1,21 @@
82 +Index: 2ManDVD/tetrahedron.h
83 +===================================================================
84 +--- 2ManDVD.orig/tetrahedron.h
85 ++++ 2ManDVD/tetrahedron.h
86 +@@ -83,7 +83,6 @@ public:
87 + float scale_factor;
88 + float wg_x;
89 + float wdecal;
90 +- GLfloat light_position[];
91 +
92 + GLfloat anag_x;
93 + GLfloat anag_y;
94 +@@ -427,6 +426,8 @@ private:
95 + void dropEvent(QDropEvent *);
96 + void dragEnterEvent(QDragEnterEvent *);
97 + Qt::DropActions supportedDropActions () const;
98 ++public:
99 ++ GLfloat light_position[];
100 + };
101 +
102 + #endif