commit:     22c33947b0ef4c26437b62ebdd76e2ad19fdb8b1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 20:02:59 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 20:18:46 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22c33947

sci-libs/opencascade: Fix build with ffmpeg-4

Reported-by: Boris Vingradov <no111u3 <AT> gmail.com>
Closes: https://bugs.gentoo.org/672248
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/opencascade-7.3.0-ffmpeg4.patch          | 38 ++++++++++++++++++++++
 sci-libs/opencascade/opencascade-7.3.0.ebuild      |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/sci-libs/opencascade/files/opencascade-7.3.0-ffmpeg4.patch 
b/sci-libs/opencascade/files/opencascade-7.3.0-ffmpeg4.patch
new file mode 100644
index 00000000000..fc572a4f5bc
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.3.0-ffmpeg4.patch
@@ -0,0 +1,38 @@
+Author: jbeich
+Date: Wed May  2 13:25:55 UTC 2018
+New revision: 468831
+
+src/Image/Image_VideoRecorder.cxx:279:25: error: use of undeclared identifier 
'CODEC_FLAG_GLOBAL_HEADER'
+    aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
+                        ^
+src/Image/Image_VideoRecorder.cxx:452:38: error: use of undeclared identifier 
'AVFMT_RAWPICTURE'
+  if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
+                                     ^
+
+--- a/src/Image/Image_VideoRecorder.cxx        2017-08-30 13:28:21 UTC
++++ b/src/Image/Image_VideoRecorder.cxx
+@@ -276,7 +276,7 @@ Standard_Boolean Image_VideoRecorder::addVideoStream (
+   // some formats want stream headers to be separate
+   if (myAVContext->oformat->flags & AVFMT_GLOBALHEADER)
+   {
+-    aCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++    aCodecCtx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+   }
+   return Standard_True;
+ #else
+@@ -449,6 +449,7 @@ Standard_Boolean Image_VideoRecorder::writeVideoFrame 
+   AVPacket aPacket;
+   memset (&aPacket, 0, sizeof(aPacket));
+   av_init_packet (&aPacket);
++#ifdef AVFMT_RAWPICTURE
+   if ((myAVContext->oformat->flags & AVFMT_RAWPICTURE) != 0
+    && !theToFlush)
+   {
+@@ -461,6 +462,7 @@ Standard_Boolean Image_VideoRecorder::writeVideoFrame 
+     aResAv = av_interleaved_write_frame (myAVContext, &aPacket);
+   }
+   else
++#endif
+   {
+     // encode the image
+     myFrame->pts = myFrameCount;

diff --git a/sci-libs/opencascade/opencascade-7.3.0.ebuild 
b/sci-libs/opencascade/opencascade-7.3.0.ebuild
index 48f4c0775e4..6d40cf35bba 100644
--- a/sci-libs/opencascade/opencascade-7.3.0.ebuild
+++ b/sci-libs/opencascade/opencascade-7.3.0.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
@@ -50,6 +50,7 @@ S="${WORKDIR}/occt-V${MY_PV}"
 PATCHES=(
        "${FILESDIR}/${P}-vtk-compat.patch"
        "${FILESDIR}/${P}-fixed-DESTDIR.patch"
+       "${FILESDIR}/${P}-ffmpeg4.patch" # bug 672248
 )
 
 pkg_setup() {

Reply via email to