[148144] trunk/dports/multimedia/pHash

devans at macports.org devans at macports.org
Wed Apr 27 15:38:57 PDT 2016


Revision: 148144
          https://trac.macports.org/changeset/148144
Author:   devans at macports.org
Date:     2016-04-27 15:38:57 -0700 (Wed, 27 Apr 2016)
Log Message:
-----------
pHash: patch for ffmpeg-3.0 compatibility, increment revision (#51213, maintainer timeout).

Modified Paths:
--------------
    trunk/dports/multimedia/pHash/Portfile

Added Paths:
-----------
    trunk/dports/multimedia/pHash/files/
    trunk/dports/multimedia/pHash/files/patch-ffmpeg-3.0.diff

Modified: trunk/dports/multimedia/pHash/Portfile
===================================================================
--- trunk/dports/multimedia/pHash/Portfile	2016-04-27 22:25:39 UTC (rev 148143)
+++ trunk/dports/multimedia/pHash/Portfile	2016-04-27 22:38:57 UTC (rev 148144)
@@ -5,7 +5,7 @@
 
 name                pHash
 version             0.9.6
-revision            3
+revision            4
 categories          multimedia
 platforms           darwin
 maintainers         workisfun.ru:ivan
@@ -28,6 +28,11 @@
                     port:mpg123 \
                     port:CImg
 
+patchfiles          patch-ffmpeg-3.0.diff
+
+use_autoreconf      yes
+autoreconf.args     -fvi
+
 post-destroot {
     set docdir ${destroot}${prefix}/share/doc/${name}
     xinstall -d ${docdir}

Added: trunk/dports/multimedia/pHash/files/patch-ffmpeg-3.0.diff
===================================================================
--- trunk/dports/multimedia/pHash/files/patch-ffmpeg-3.0.diff	                        (rev 0)
+++ trunk/dports/multimedia/pHash/files/patch-ffmpeg-3.0.diff	2016-04-27 22:38:57 UTC (rev 148144)
@@ -0,0 +1,89 @@
+--- configure.ac.orig	2016-04-22 17:12:32.000000000 -0700
++++ configure.ac	2016-04-22 17:13:39.000000000 -0700
+@@ -122,7 +122,7 @@
+ AC_DEFUN([AC_CHECK_FFMPEG],
+ [
+ AC_MSG_CHECKING([whether FFmpeg is present])
+-AC_CHECK_LIB([avcodec], [avcodec_alloc_frame], [], [AC_MSG_ERROR([
++AC_CHECK_LIB([avcodec], [avcodec_find_decoder], [], [AC_MSG_ERROR([
+ 
+ *** libavcodec not found.
+ You need FFmpeg. Get it at <http://ffmpeg.org/>])])
+--- src/cimgffmpeg.cpp.orig	2016-04-22 17:35:34.000000000 -0700
++++ src/cimgffmpeg.cpp	2016-04-22 17:40:34.000000000 -0700
+@@ -39,11 +39,11 @@
+ int ReadFrames(VFInfo *st_info, CImgList<uint8_t> *pFrameList, unsigned int low_index, unsigned int hi_index)
+ {
+         //target pixel format
+-	PixelFormat ffmpeg_pixfmt;
++	AVPixelFormat ffmpeg_pixfmt;
+ 	if (st_info->pixelformat == 0)
+-	    ffmpeg_pixfmt = PIX_FMT_GRAY8;
++	    ffmpeg_pixfmt = AV_PIX_FMT_GRAY8;
+ 	else 
+-	    ffmpeg_pixfmt = PIX_FMT_RGB24;
++	    ffmpeg_pixfmt = AV_PIX_FMT_RGB24;
+ 
+ 	st_info->next_index = low_index;
+ 
+@@ -100,12 +100,12 @@
+         AVFrame *pFrame;
+ 
+ 	// Allocate video frame
+-	pFrame=avcodec_alloc_frame();
++	pFrame=av_frame_alloc();
+ 	if (pFrame==NULL)
+ 	    return -1;
+ 
+ 	// Allocate an AVFrame structure
+-	AVFrame *pConvertedFrame = avcodec_alloc_frame();
++	AVFrame *pConvertedFrame = av_frame_alloc();
+ 	if(pConvertedFrame==NULL)
+ 	  return -1;
+ 		
+@@ -123,7 +123,7 @@
+ 	int size = 0;
+ 	
+ 
+-        int channels = ffmpeg_pixfmt == PIX_FMT_GRAY8 ? 1 : 3;
++        int channels = ffmpeg_pixfmt == AV_PIX_FMT_GRAY8 ? 1 : 3;
+ 
+ 	AVPacket packet;
+ 	int result = 1;
+@@ -189,11 +189,11 @@
+ 
+ int NextFrames(VFInfo *st_info, CImgList<uint8_t> *pFrameList)
+ {
+-        PixelFormat ffmpeg_pixfmt;
++        AVPixelFormat ffmpeg_pixfmt;
+ 	if (st_info->pixelformat == 0)
+-	    ffmpeg_pixfmt = PIX_FMT_GRAY8;
++	    ffmpeg_pixfmt = AV_PIX_FMT_GRAY8;
+         else 
+-	    ffmpeg_pixfmt = PIX_FMT_RGB24;
++	    ffmpeg_pixfmt = AV_PIX_FMT_RGB24;
+ 
+ 	if (st_info->pFormatCtx == NULL)
+ 	{
+@@ -254,10 +254,10 @@
+ 	AVFrame *pFrame;
+ 
+ 	// Allocate video frame
+-	pFrame=avcodec_alloc_frame();
++	pFrame=av_frame_alloc();
+ 		
+ 	// Allocate an AVFrame structure
+-	AVFrame *pConvertedFrame = avcodec_alloc_frame();
++	AVFrame *pConvertedFrame = av_frame_alloc();
+ 	if(pConvertedFrame==NULL){
+ 	  return -1;
+ 	}
+@@ -287,7 +287,7 @@
+ 			break;
+ 		if(packet.stream_index == st_info->videoStream) {
+ 			
+-		int channels = ffmpeg_pixfmt == PIX_FMT_GRAY8 ? 1 : 3;
++		int channels = ffmpeg_pixfmt == AV_PIX_FMT_GRAY8 ? 1 : 3;
+  		AVPacket avpkt;
+                 av_init_packet(&avpkt);
+                 avpkt.data = packet.data;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160427/a0bab652/attachment.html>


More information about the macports-changes mailing list