From 3233560c3086d871b405181809d8ca178b7bd07e Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 11 Sep 2015 23:28:02 +0000 Subject: multimedia/php-pHash: add new port PR: 202635 Submitted by: Naram Qashat 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/ --- multimedia/php-pHash/files/patch-pHash.cpp | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 multimedia/php-pHash/files/patch-pHash.cpp (limited to 'multimedia/php-pHash/files/patch-pHash.cpp') 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"); -- cgit v1.2.3