aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2015-09-12 07:28:02 +0800
committerjbeich <jbeich@FreeBSD.org>2015-09-12 07:28:02 +0800
commita5c601850918e44fe030eae2866ddbe2e05b0300 (patch)
tree5ad992f8cb876d435d6067066987925ff719aad8 /multimedia
parent42e3b6a1de01b545a362e47ffdec8da4de85f310 (diff)
downloadfreebsd-ports-gnome-a5c601850918e44fe030eae2866ddbe2e05b0300.tar.gz
freebsd-ports-gnome-a5c601850918e44fe030eae2866ddbe2e05b0300.tar.zst
freebsd-ports-gnome-a5c601850918e44fe030eae2866ddbe2e05b0300.zip
multimedia/php-pHash: add new port
PR: 202635 Submitted by: Naram Qashat <cyberbotx@cyberbotx.com> This is the PHP extension of the pHash library, which is an open source software library released under the GPLv3 license that implements several perceptual hashing algorithms, and provides a C-like API to use those functions in your own programs. pHash itself is written in C++. http://phash.org/
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/Makefile1
-rw-r--r--multimedia/php-pHash/Makefile31
-rw-r--r--multimedia/php-pHash/distinfo2
-rw-r--r--multimedia/php-pHash/files/patch-pHash.cpp47
-rw-r--r--multimedia/php-pHash/pkg-descr6
5 files changed, 87 insertions, 0 deletions
diff --git a/multimedia/Makefile b/multimedia/Makefile
index fc872faf3e51..d5a3598ae6d9 100644
--- a/multimedia/Makefile
+++ b/multimedia/Makefile
@@ -286,6 +286,7 @@
SUBDIR += phonon-vlc
SUBDIR += phonon-xine
SUBDIR += photofilmstrip
+ SUBDIR += php-pHash
SUBDIR += pitivi
SUBDIR += playd
SUBDIR += plexhometheater
diff --git a/multimedia/php-pHash/Makefile b/multimedia/php-pHash/Makefile
new file mode 100644
index 000000000000..4823c5d6102f
--- /dev/null
+++ b/multimedia/php-pHash/Makefile
@@ -0,0 +1,31 @@
+# Created by: Naram Qashat <cyberbotx@cyberbotx.com>
+# $FreeBSD$
+
+PORTNAME= pHash
+PORTVERSION= 0.9.6
+CATEGORIES= multimedia devel
+MASTER_SITES= http://phash.org/releases/ \
+ http://www.cyberbotx.com/pHash/
+PKGNAMEPREFIX= php-
+
+MAINTAINER= cyberbotx@cyberbotx.com
+COMMENT= PHP extension for the pHash perceptual hash library
+
+LICENSE= PHP30
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libpHash.so:${PORTSDIR}/multimedia/pHash
+
+USE_PHP= yes
+USE_PHPIZE= yes
+USE_PHPEXT= yes
+USE_PHP_BUILD= yes
+
+WRKSRC_SUBDIR= bindings/php
+
+# The tarball contains stale pre-built files that interfere with building this
+# ourselves.
+post-configure:
+ @(cd ${WRKSRC} && ${MAKE_CMD} clean)
+
+.include <bsd.port.mk>
diff --git a/multimedia/php-pHash/distinfo b/multimedia/php-pHash/distinfo
new file mode 100644
index 000000000000..ccda48e78c3e
--- /dev/null
+++ b/multimedia/php-pHash/distinfo
@@ -0,0 +1,2 @@
+SHA256 (pHash-0.9.6.tar.gz) = 3c8258a014f9c2491fb1153010984606805638a45d00498864968a9a30102935
+SIZE (pHash-0.9.6.tar.gz) = 1315965
diff --git a/multimedia/php-pHash/files/patch-pHash.cpp b/multimedia/php-pHash/files/patch-pHash.cpp
new file mode 100644
index 000000000000..badf1369f175
--- /dev/null
+++ b/multimedia/php-pHash/files/patch-pHash.cpp
@@ -0,0 +1,47 @@
+--- pHash.cpp.orig 2013-04-23 18:54:02 UTC
++++ pHash.cpp
+@@ -36,12 +36,14 @@ struct ph_text_hash
+
+ /* {{{ phpinfo logo definitions */
+
++#if PHP_VERSION_ID < 50500
+ #include "php_logos.h"
+
+
+ static unsigned char pHash_logo[] = {
+ #include "pHash_logos.h"
+ };
++#endif
+ /* }}} */
+
+ /* {{{ Resource destructors */
+@@ -145,7 +147,9 @@ ZEND_GET_MODULE(pHash)
+ /* {{{ PHP_MINIT_FUNCTION */
+ PHP_MINIT_FUNCTION(pHash)
+ {
++#if PHP_VERSION_ID < 50500
+ php_register_info_logo("PHASH_LOGO_ID", "", pHash_logo, 49651);
++#endif
+ le_ph_video_hash = zend_register_list_destructors_ex(ph_video_hash_dtor,
+ NULL, "ph_video_hash", module_number);
+ le_ph_image_hash = zend_register_list_destructors_ex(ph_image_hash_dtor,
+@@ -165,7 +169,9 @@ PHP_MINIT_FUNCTION(pHash)
+ /* {{{ PHP_MSHUTDOWN_FUNCTION */
+ PHP_MSHUTDOWN_FUNCTION(pHash)
+ {
++#if PHP_VERSION_ID < 50500
+ php_unregister_info_logo("PHASH_LOGO_ID");
++#endif
+
+ /* add your stuff here */
+
+@@ -203,7 +209,9 @@ PHP_MINFO_FUNCTION(pHash)
+ if (SG(request_info).request_uri) {
+ php_printf("%s", (SG(request_info).request_uri));
+ }
++#if PHP_VERSION_ID < 50500
+ php_printf("?=%s", "PHASH_LOGO_ID");
++#endif
+ php_printf("' align='right' alt='image' border='0'>\n");
+
+ php_printf("pHash\n");
diff --git a/multimedia/php-pHash/pkg-descr b/multimedia/php-pHash/pkg-descr
new file mode 100644
index 000000000000..a7756b4059d3
--- /dev/null
+++ b/multimedia/php-pHash/pkg-descr
@@ -0,0 +1,6 @@
+This is the PHP extension of the pHash library, which is an open source software
+library released under the GPLv3 license that implements several perceptual
+hashing algorithms, and provides a C-like API to use those functions in your own
+programs. pHash itself is written in C++.
+
+WWW: http://phash.org/