[148924] trunk/dports/multimedia/pHash

khindenburg at macports.org khindenburg at macports.org
Sun May 22 17:00:51 PDT 2016


Revision: 148924
          https://trac.macports.org/changeset/148924
Author:   khindenburg at macports.org
Date:     2016-05-22 17:00:51 -0700 (Sun, 22 May 2016)
Log Message:
-----------
phash: extern C for all functions in audiophash.h and fix for 4 channel images; maintainer #51460

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

Added Paths:
-----------
    trunk/dports/multimedia/pHash/files/patch-audiophash.h.diff
    trunk/dports/multimedia/pHash/files/patch-pHash.cpp.diff

Modified: trunk/dports/multimedia/pHash/Portfile
===================================================================
--- trunk/dports/multimedia/pHash/Portfile	2016-05-22 23:46:35 UTC (rev 148923)
+++ trunk/dports/multimedia/pHash/Portfile	2016-05-23 00:00:51 UTC (rev 148924)
@@ -5,10 +5,11 @@
 
 name                pHash
 version             0.9.6
-revision            5
+revision            6
 categories          multimedia
 platforms           darwin
-maintainers         workisfun.ru:ivan
+maintainers         yandex.com:bstj \
+                    openmaintainer
 license             GPL-3
 
 description         Perceptual hash library
@@ -28,7 +29,9 @@
                     port:mpg123 \
                     port:CImg
 
-patchfiles          patch-ffmpeg-3.0.diff
+patchfiles          patch-ffmpeg-3.0.diff \
+                    patch-audiophash.h.diff \
+                    patch-pHash.cpp.diff
 
 use_autoreconf      yes
 autoreconf.args     -fvi
@@ -42,3 +45,7 @@
         ChangeLog \
         ${docdir}
 }
+
+livecheck.type      regex
+livecheck.url       ${homepage}
+livecheck.regex     pHash (\[0-9.\]+) Released

Added: trunk/dports/multimedia/pHash/files/patch-audiophash.h.diff
===================================================================
--- trunk/dports/multimedia/pHash/files/patch-audiophash.h.diff	                        (rev 0)
+++ trunk/dports/multimedia/pHash/files/patch-audiophash.h.diff	2016-05-23 00:00:51 UTC (rev 148924)
@@ -0,0 +1,17 @@
+--- src/audiophash.h.orig	2011-12-23 20:47:08.000000000 +0100
++++ src/audiophash.h	2011-12-23 20:47:12.000000000 +0100
+@@ -34,7 +34,6 @@
+ 
+ extern "C" {
+ #include "ph_fft.h"
+-}
+ 
+ /*  /brief count number of samples in file
+  *  
+@@ -105,4 +104,6 @@
+  */
+ double* ph_audio_distance_ber(uint32_t *hash_a , const int Na, uint32_t *hash_b, const int Nb, const float threshold, const int block_size, int &Nc);
+ 
++}
++
+ #endif

Added: trunk/dports/multimedia/pHash/files/patch-pHash.cpp.diff
===================================================================
--- trunk/dports/multimedia/pHash/files/patch-pHash.cpp.diff	                        (rev 0)
+++ trunk/dports/multimedia/pHash/files/patch-pHash.cpp.diff	2016-05-23 00:00:51 UTC (rev 148924)
@@ -0,0 +1,16 @@
+--- src/pHash.cpp	2013-04-13 19:23:12.000000000 +0200
++++ src/pHash.cpp	2013-09-06 03:17:28.000000000 +0200
+@@ -369,10 +369,9 @@
+     if (src.spectrum() == 3){
+         img = src.RGBtoYCbCr().channel(0).get_convolve(meanfilter);
+     } else if (src.spectrum() == 4){
+-	int width = img.width();
+-        int height = img.height();
+-        int depth = img.depth();
+-	img = src.crop(0,0,0,0,width-1,height-1,depth-1,2).RGBtoYCbCr().channel(0).get_convolve(meanfilter);
++        int width = src.width();
++        int height = src.height();
++        img = src.crop(0,0,0,0,width-1,height-1,0,2).RGBtoYCbCr().channel(0).get_convolve(meanfilter);
+     } else {
+ 	img = src.channel(0).get_convolve(meanfilter);
+     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160522/cfaec0cb/attachment.html>


More information about the macports-changes mailing list