summaryrefslogtreecommitdiff
path: root/multimedia/php-pHash/files/patch-pHash.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2015-09-11 23:28:02 +0000
committerJan Beich <jbeich@FreeBSD.org>2015-09-11 23:28:02 +0000
commit3233560c3086d871b405181809d8ca178b7bd07e (patch)
tree5ad992f8cb876d435d6067066987925ff719aad8 /multimedia/php-pHash/files/patch-pHash.cpp
parentmultimedia/pHash: add new port (diff)
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 '')
-rw-r--r--multimedia/php-pHash/files/patch-pHash.cpp47
1 files changed, 47 insertions, 0 deletions
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");