<pre style='margin:0'>
David B. Evans (dbevans) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ea91fa1a27c308daa1617d2b522d3b8af1ebdc82">https://github.com/macports/macports-ports/commit/ea91fa1a27c308daa1617d2b522d3b8af1ebdc82</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ea91fa1 Pangolin: fix build with ffmpeg 4.0
</span>ea91fa1 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ea91fa1a27c308daa1617d2b522d3b8af1ebdc82
</span>Author: David B. Evans <devans@macports.org>
AuthorDate: Sun May 20 10:54:38 2018 -0700
<span style='display:block; white-space:pre;color:#404040;'> Pangolin: fix build with ffmpeg 4.0
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Based on upstream PR.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> See https://github.com/stevenlovegrove/Pangolin/pull/318
</span>---
graphics/Pangolin/Portfile | 5 +-
graphics/Pangolin/files/ffmpeg-4.0.patch | 87 ++++++++++++++++++++++++++++++++
2 files changed, 90 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/Pangolin/Portfile b/graphics/Pangolin/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ca6bac9..cec07ee 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/graphics/Pangolin/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/Pangolin/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,7 +6,7 @@ PortGroup cxx11 1.1
</span> PortGroup github 1.0
github.setup stevenlovegrove Pangolin 0.5 v
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 3
</span> categories graphics
platforms darwin
license MIT
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -35,6 +35,7 @@ depends_lib-append port:glew \
</span> checksums rmd160 5b31d14e8cb1d78cde3f48b9f2576e77e8a5f717 \
sha256 7d9ac216ae4ef86150a3ced1cfb0bb23572493aae4f7403b1552be4314b766df
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles-append CMakeLists.txt.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append CMakeLists.txt.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffmpeg-4.0.patch
</span>
configure.args -DBUILD_PANGOLIN_GUI=OFF
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/Pangolin/files/ffmpeg-4.0.patch b/graphics/Pangolin/files/ffmpeg-4.0.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..019e8d3e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/Pangolin/files/ffmpeg-4.0.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,87 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+commit b56a041ca1586ebaac0659892e5ba381e0a4288d
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Author: ericb <eric.bachard@free.fr>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Wed Jan 3 18:46:31 2018 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Proposed fix for the Linux (maybe other OSs) issue, because of deprecated CONSTANTS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/CMakeModules/FindFFMPEG.cmake b/CMakeModules/FindFFMPEG.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 4f77e5a..0f3b6cb 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- CMakeModules/FindFFMPEG.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ CMakeModules/FindFFMPEG.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -60,8 +60,8 @@ IF(AVCODEC_INCLUDE_DIR AND AVFORMAT_INCLUDE_DIR AND AVUTIL_INCLUDE_DIR AND SWSCA
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_CXX_SOURCE_COMPILES(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "#include \"${AVCODEC_INCLUDE_DIR}/libavformat/avformat.h\"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int main() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sizeof(AVFormatContext::max_analyze_duration2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }" HAVE_FFMPEG_MAX_ANALYZE_DURATION2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sizeof(AVFormatContext::max_analyze_duration);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }" HAVE_FFMPEG_MAX_ANALYZE_DURATION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_CXX_SOURCE_COMPILES(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "#include \"${AVCODEC_INCLUDE_DIR}/libavformat/avformat.h\"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/video/drivers/ffmpeg.cpp b/src/video/drivers/ffmpeg.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f0aa6ad..efd48dd 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/video/drivers/ffmpeg.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/video/drivers/ffmpeg.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,6 +34,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <libavutil/mathematics.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ namespace pangolin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -74,8 +76,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUVJ420P);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUVJ422P);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUVJ444P);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef FF_API_XVMC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(UYVY422);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(UYYVYY411);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(BGR8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -95,11 +99,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUV440P);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUVJ440P);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUVA420P);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef FF_API_VDPAU
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(VDPAU_H264);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(VDPAU_MPEG1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(VDPAU_MPEG2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(VDPAU_WMV3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(VDPAU_VC1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(RGB48BE );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(RGB48LE );
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(RGB565BE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -119,7 +125,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUV422P16BE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUV444P16LE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(YUV444P16BE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef FF_API_VDPAU
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(VDPAU_MPEG4);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(DXVA2_VLD);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(RGB444BE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TEST_PIX_FMT_RETURN(RGB444LE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -560,6 +568,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int got_packet = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if FF_API_LAVF_FMT_RAWPICTURE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Setup AVPacket
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (recorder.oc->oformat->flags & AVFMT_RAWPICTURE) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Raw video case - directly store the picture in the packet */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -569,6 +578,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkt.pts = frame->pts;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* encode the image */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if (LIBAVFORMAT_VERSION_MAJOR >= 54)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ret = avcodec_encode_video2(stream->codec, &pkt, frame, &got_packet);
</span></pre><pre style='margin:0'>
</pre>