[148140] trunk/dports/office/goldendict

devans at macports.org devans at macports.org
Wed Apr 27 14:52:14 PDT 2016


Revision: 148140
          https://trac.macports.org/changeset/148140
Author:   devans at macports.org
Date:     2016-04-27 14:52:14 -0700 (Wed, 27 Apr 2016)
Log Message:
-----------
goldendict: backport upstream patches for ffmpeg 3.0 compatibility, increment revision (#51197).

Modified Paths:
--------------
    trunk/dports/office/goldendict/Portfile

Added Paths:
-----------
    trunk/dports/office/goldendict/files/patch-ffmpeg-3.0.diff

Modified: trunk/dports/office/goldendict/Portfile
===================================================================
--- trunk/dports/office/goldendict/Portfile	2016-04-27 21:38:11 UTC (rev 148139)
+++ trunk/dports/office/goldendict/Portfile	2016-04-27 21:52:14 UTC (rev 148140)
@@ -6,7 +6,7 @@
 PortGroup           qmake 1.0
 
 github.setup        goldendict goldendict 1.5.0-RC
-revision            2
+revision            3
 # FIXME: add proper categories
 categories          office
 platforms           darwin
@@ -40,7 +40,8 @@
                     port:phonon \
                     port:zlib
 
-patchfiles          patch-goldendict.pro.diff
+patchfiles          patch-goldendict.pro.diff \
+                    patch-ffmpeg-3.0.diff
 
 post-patch {
     reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/goldendict.pro

Added: trunk/dports/office/goldendict/files/patch-ffmpeg-3.0.diff
===================================================================
--- trunk/dports/office/goldendict/files/patch-ffmpeg-3.0.diff	                        (rev 0)
+++ trunk/dports/office/goldendict/files/patch-ffmpeg-3.0.diff	2016-04-27 21:52:14 UTC (rev 148140)
@@ -0,0 +1,38 @@
+--- ffmpegaudio.cc.orig	2013-06-06 06:39:06.000000000 -0700
++++ ffmpegaudio.cc	2016-04-21 12:06:50.000000000 -0700
+@@ -326,7 +326,11 @@
+ 
+ bool DecoderContext::play( QString & errorString )
+ {
++#if LIBAVCODEC_VERSION_MAJOR < 55 || ( LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR < 28 )
+   AVFrame * frame = avcodec_alloc_frame();
++#else
++  AVFrame * frame = av_frame_alloc();
++#endif
+   if ( !frame )
+   {
+     errorString = QObject::tr( "avcodec_alloc_frame() failed." );
+@@ -348,7 +352,11 @@
+       }
+     }
+     // av_free_packet() must be called after each call to av_read_frame()
++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 7 )
+     av_free_packet( &packet );
++#else
++    av_packet_unref( &packet );
++#endif
+   }
+ 
+   if ( !isCancelled_ && codecContext_->codec->capabilities & CODEC_CAP_DELAY )
+@@ -365,8 +373,10 @@
+ 
+ #if LIBAVCODEC_VERSION_MAJOR < 54
+   av_free( frame );
+-#else
++#elif LIBAVCODEC_VERSION_MAJOR < 55 || ( LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR < 28 )
+   avcodec_free_frame( &frame );
++#else
++  av_frame_free( &frame );
+ #endif
+ 
+   return true;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160427/0352ee9e/attachment.html>


More information about the macports-changes mailing list