Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/opencascade/, sci-libs/opencascade/files/
Date: Thu, 29 Nov 2018 20:19:16
Message-Id: 1543522726.22c33947b0ef4c26437b62ebdd76e2ad19fdb8b1.asturm@gentoo
1 commit: 22c33947b0ef4c26437b62ebdd76e2ad19fdb8b1
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 29 20:02:59 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 29 20:18:46 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22c33947
7
8 sci-libs/opencascade: Fix build with ffmpeg-4
9
10 Reported-by: Boris Vingradov <no111u3 <AT> gmail.com>
11 Closes: https://bugs.gentoo.org/672248
12 Package-Manager: Portage-2.3.52, Repoman-2.3.12
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/opencascade-7.3.0-ffmpeg4.patch | 38 ++++++++++++++++++++++
16 sci-libs/opencascade/opencascade-7.3.0.ebuild | 3 +-
17 2 files changed, 40 insertions(+), 1 deletion(-)
18
19 diff --git a/sci-libs/opencascade/files/opencascade-7.3.0-ffmpeg4.patch b/sci-libs/opencascade/files/opencascade-7.3.0-ffmpeg4.patch
20 new file mode 100644
21 index 00000000000..fc572a4f5bc
22 --- /dev/null
23 +++ b/sci-libs/opencascade/files/opencascade-7.3.0-ffmpeg4.patch
24 @@ -0,0 +1,38 @@
25 +Author: jbeich
26 +Date: Wed May 2 13:25:55 UTC 2018
27 +New revision: 468831
28 +
29 +src/Image/Image_VideoRecorder.cxx:279:25: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
30 + aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
31 + ^
32 +src/Image/Image_VideoRecorder.cxx:452:38: error: use of undeclared identifier 'AVFMT_RAWPICTURE'
33 + if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
34 + ^
35 +
36 +--- a/src/Image/Image_VideoRecorder.cxx 2017-08-30 13:28:21 UTC
37 ++++ b/src/Image/Image_VideoRecorder.cxx
38 +@@ -276,7 +276,7 @@ Standard_Boolean Image_VideoRecorder::addVideoStream (
39 + // some formats want stream headers to be separate
40 + if (myAVContext->oformat->flags & AVFMT_GLOBALHEADER)
41 + {
42 +- aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
43 ++ aCodecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
44 + }
45 + return Standard_True;
46 + #else
47 +@@ -449,6 +449,7 @@ Standard_Boolean Image_VideoRecorder::writeVideoFrame
48 + AVPacket aPacket;
49 + memset (&aPacket, 0, sizeof(aPacket));
50 + av_init_packet (&aPacket);
51 ++#ifdef AVFMT_RAWPICTURE
52 + if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
53 + && !theToFlush)
54 + {
55 +@@ -461,6 +462,7 @@ Standard_Boolean Image_VideoRecorder::writeVideoFrame
56 + aResAv = av_interleaved_write_frame (myAVContext, &aPacket);
57 + }
58 + else
59 ++#endif
60 + {
61 + // encode the image
62 + myFrame->pts = myFrameCount;
63
64 diff --git a/sci-libs/opencascade/opencascade-7.3.0.ebuild b/sci-libs/opencascade/opencascade-7.3.0.ebuild
65 index 48f4c0775e4..6d40cf35bba 100644
66 --- a/sci-libs/opencascade/opencascade-7.3.0.ebuild
67 +++ b/sci-libs/opencascade/opencascade-7.3.0.ebuild
68 @@ -1,4 +1,4 @@
69 -# Copyright 1999-2018 Gentoo Foundation
70 +# Copyright 1999-2018 Gentoo Authors
71 # Distributed under the terms of the GNU General Public License v2
72
73 EAPI=6
74 @@ -50,6 +50,7 @@ S="${WORKDIR}/occt-V${MY_PV}"
75 PATCHES=(
76 "${FILESDIR}/${P}-vtk-compat.patch"
77 "${FILESDIR}/${P}-fixed-DESTDIR.patch"
78 + "${FILESDIR}/${P}-ffmpeg4.patch" # bug 672248
79 )
80
81 pkg_setup() {