git: 0768be4ed7d7 - main - multimedia/php-pHash: Cleanup
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 Dec 2022 18:00:21 UTC
The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=0768be4ed7d79c3400b5b130770646d2cdb24a59 commit 0768be4ed7d79c3400b5b130770646d2cdb24a59 Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2022-12-08 17:59:39 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2022-12-08 17:59:39 +0000 multimedia/php-pHash: Cleanup - Requires php74 which was EOL on 2022-11-28 Sponsored by: Bounce Experts --- MOVED | 1 + multimedia/Makefile | 1 - multimedia/php-pHash/Makefile | 32 --- multimedia/php-pHash/distinfo | 2 - multimedia/php-pHash/files/patch-pHash.cpp | 312 -------------------------- multimedia/php-pHash/files/patch-php__pHash.h | 17 -- multimedia/php-pHash/pkg-descr | 4 - 7 files changed, 1 insertion(+), 368 deletions(-) diff --git a/MOVED b/MOVED index 8471d3b8eb91..3f120b7e7198 100644 --- a/MOVED +++ b/MOVED @@ -17632,3 +17632,4 @@ security/py-certbot-dns-cloudxns||2022-12-06|The CloudXNS DNS service is defunct security/pam_krb5|security/pam_krb5@mit|2022-12-06|The pam_krb5 package is now the (default) mit flavor devel/pecl-hrtime||2022-12-08|Requires php74 which was EOL on 2022-11-28 net-mgmt/zabbix5-frontend||2022-12-08|Requires php74 which was EOL on 2022-11-28 +multimedia/php-pHash||2022-12-08|Requires php74 which was EOL on 2022-11-28 diff --git a/multimedia/Makefile b/multimedia/Makefile index 133aeb209116..a554932b4f23 100644 --- a/multimedia/Makefile +++ b/multimedia/Makefile @@ -295,7 +295,6 @@ SUBDIR += phonon-gstreamer SUBDIR += phonon-vlc SUBDIR += photofilmstrip - SUBDIR += php-pHash SUBDIR += pipe-viewer SUBDIR += pipewire SUBDIR += pitivi diff --git a/multimedia/php-pHash/Makefile b/multimedia/php-pHash/Makefile deleted file mode 100644 index 8f5d8b2060d9..000000000000 --- a/multimedia/php-pHash/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -PORTNAME= pHash -PORTVERSION= 0.9.6 -PORTREVISION= 6 -CATEGORIES= multimedia devel -MASTER_SITES= http://phash.org/releases/ \ - http://www.cyberbotx.com/pHash/ -PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX} - -MAINTAINER= cyberbotx@cyberbotx.com -COMMENT= PHP extension for the pHash perceptual hash library -WWW= https://phash.org/ - -LICENSE= PHP30 -LICENSE_FILE= ${WRKSRC}/LICENSE - -DEPRECATED=Requires php 7.4 which is set to expire on 2022-11-29 -EXPIRATION_DATE=2022-11-28 - -LIB_DEPENDS= libpHash.so:multimedia/pHash - -USES= compiler:c++11-lang php:ext -# Does not build for PHP 8.0 and later -IGNORE_WITH_PHP= 80 81 82 - -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 deleted file mode 100644 index ccda48e78c3e..000000000000 --- a/multimedia/php-pHash/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index ac8f638e0110..000000000000 --- a/multimedia/php-pHash/files/patch-pHash.cpp +++ /dev/null @@ -1,312 +0,0 @@ ---- pHash.cpp.orig 2013-04-23 18:54:02 UTC -+++ pHash.cpp -@@ -36,17 +36,23 @@ 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 */ - int le_ph_video_hash; -+#if PHP_VERSION_ID >= 70000 -+extern "C" void ph_video_hash_dtor(zend_resource *rsrc TSRMLS_DC) -+#else - extern "C" void ph_video_hash_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -+#endif - { - ph_video_hash * resource = (ph_video_hash *)(rsrc->ptr); - -@@ -58,7 +64,11 @@ extern "C" void ph_video_hash_dtor(zend_ - } - - int le_ph_image_hash; -+#if PHP_VERSION_ID >= 70000 -+extern "C" void ph_image_hash_dtor(zend_resource *rsrc TSRMLS_DC) -+#else - extern "C" void ph_image_hash_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -+#endif - { - ulong64 * resource = (ulong64 *)(rsrc->ptr); - -@@ -67,7 +77,11 @@ extern "C" void ph_image_hash_dtor(zend_ - } - - int le_ph_audio_hash; -+#if PHP_VERSION_ID >= 70000 -+extern "C" void ph_audio_hash_dtor(zend_resource *rsrc TSRMLS_DC) -+#else - extern "C" void ph_audio_hash_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -+#endif - { - ph_audio_hash * resource = (ph_audio_hash *)(rsrc->ptr); - -@@ -79,7 +93,11 @@ extern "C" void ph_audio_hash_dtor(zend_ - } - - int le_ph_txt_hash; -+#if PHP_VERSION_ID >= 70000 -+extern "C" void ph_txt_hash_dtor(zend_resource *rsrc TSRMLS_DC) -+#else - extern "C" void ph_txt_hash_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) -+#endif - { - ph_text_hash * resource = (ph_text_hash *)(rsrc->ptr); - -@@ -145,7 +163,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 +185,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 +225,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"); -@@ -225,10 +249,12 @@ PHP_MINFO_FUNCTION(pHash) - PHP_FUNCTION(ph_dct_videohash) - { - ph_video_hash * return_res; -+#if PHP_VERSION_ID < 70000 - long return_res_id = -1; -+#endif - - const char * file = NULL; -- int file_len = 0; -+ SIZETorINT file_len = 0; - - - -@@ -249,7 +275,11 @@ PHP_FUNCTION(ph_dct_videohash) - else - RETURN_FALSE; - -+#if PHP_VERSION_ID >= 70000 -+ RETURN_RES(zend_register_resource(return_res, le_ph_video_hash)); -+#else - return_res_id = ZEND_REGISTER_RESOURCE(return_value, return_res, le_ph_video_hash); -+#endif - } - /* }}} ph_dct_videohash */ - -@@ -261,10 +291,12 @@ PHP_FUNCTION(ph_dct_videohash) - PHP_FUNCTION(ph_dct_imagehash) - { - ulong64 * return_res; -+#if PHP_VERSION_ID < 70000 - long return_res_id = -1; -+#endif - - const char * file = NULL; -- int file_len = 0; -+ SIZETorINT file_len = 0; - - - -@@ -282,7 +314,11 @@ PHP_FUNCTION(ph_dct_imagehash) - else - return_res = hash; - -+#if PHP_VERSION_ID >= 70000 -+ RETURN_RES(zend_register_resource(return_res, le_ph_image_hash)); -+#else - return_res_id = ZEND_REGISTER_RESOURCE(return_value, return_res, le_ph_image_hash); -+#endif - } - /* }}} ph_dct_imagehash */ - -@@ -293,10 +329,12 @@ PHP_FUNCTION(ph_dct_imagehash) - PHP_FUNCTION(ph_texthash) - { - ph_text_hash * return_res; -+#if PHP_VERSION_ID < 70000 - long return_res_id = -1; -+#endif - - const char * file = NULL; -- int file_len = 0; -+ SIZETorINT file_len = 0; - - - -@@ -316,7 +354,11 @@ PHP_FUNCTION(ph_texthash) - else - RETURN_FALSE; - -+#if PHP_VERSION_ID >= 70000 -+ RETURN_RES(zend_register_resource(return_res, le_ph_txt_hash)); -+#else - return_res_id = ZEND_REGISTER_RESOURCE(return_value, return_res, le_ph_txt_hash); -+#endif - } - /* }}} ph_texthash */ - -@@ -327,12 +369,14 @@ PHP_FUNCTION(ph_texthash) - PHP_FUNCTION(ph_audiohash) - { - ph_audio_hash * return_res; -+#if PHP_VERSION_ID < 70000 - long return_res_id = -1; -+#endif - - const char * file = NULL; -- int file_len = 0; -- long sample_rate = 5512; -- long channels = 1; -+ SIZETorINT file_len = 0; -+ zppLONG sample_rate = 5512; -+ zppLONG channels = 1; - - - -@@ -362,7 +406,11 @@ PHP_FUNCTION(ph_audiohash) - else - RETURN_FALSE; - -+#if PHP_VERSION_ID >= 70000 -+ RETURN_RES(zend_register_resource(return_res, le_ph_audio_hash)); -+#else - return_res_id = ZEND_REGISTER_RESOURCE(return_value, return_res, le_ph_audio_hash); -+#endif - } - /* }}} ph_audiohash */ - -@@ -386,8 +434,17 @@ PHP_FUNCTION(ph_image_dist) - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &h1_res, &h2_res) == FAILURE) { - return; - } -+#if PHP_VERSION_ID >= 70000 -+ if ((h1 = (ulong64 *)zend_fetch_resource2(Z_RES_P(h1_res), "ph_image_hash", h1_resid, le_ph_image_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+ if ((h2 = (ulong64 *)zend_fetch_resource2(Z_RES_P(h2_res), "ph_image_hash", h2_resid, le_ph_image_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+#else - ZEND_FETCH_RESOURCE(h1, ulong64 *, &h1_res, h1_resid, "ph_image_hash", le_ph_image_hash); - ZEND_FETCH_RESOURCE(h2, ulong64 *, &h2_res, h2_resid, "ph_image_hash", le_ph_image_hash); -+#endif - - - -@@ -415,15 +472,24 @@ PHP_FUNCTION(ph_video_dist) - int h2_resid = -1; - ph_video_hash * h2; - -- long thresh = 21; -+ zppLONG thresh = 21; - - - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|l", &h1_res, &h2_res, &thresh) == FAILURE) { - return; - } -+#if PHP_VERSION_ID >= 70000 -+ if ((h1 = (ph_video_hash *)zend_fetch_resource2(Z_RES_P(h1_res), "ph_video_hash", h1_resid, le_ph_video_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+ if ((h2 = (ph_video_hash *)zend_fetch_resource2(Z_RES_P(h2_res), "ph_video_hash", h2_resid, le_ph_video_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+#else - ZEND_FETCH_RESOURCE(h1, ph_video_hash *, &h1_res, h1_resid, "ph_video_hash", le_ph_video_hash); - ZEND_FETCH_RESOURCE(h2, ph_video_hash *, &h2_res, h2_resid, "ph_video_hash", le_ph_video_hash); -+#endif - - - -@@ -452,7 +518,7 @@ PHP_FUNCTION(ph_audio_dist) - int h2_resid = -1; - ph_audio_hash * h2; - -- long block_size = 256; -+ zppLONG block_size = 256; - double thresh = 0.30; - - -@@ -460,8 +526,17 @@ PHP_FUNCTION(ph_audio_dist) - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|ld", &h1_res, &h2_res, &block_size, &thresh) == FAILURE) { - return; - } -+#if PHP_VERSION_ID >= 70000 -+ if ((h1 = (ph_audio_hash *)zend_fetch_resource2(Z_RES_P(h1_res), "ph_audio_hash", h1_resid, le_ph_audio_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+ if ((h2 = (ph_audio_hash *)zend_fetch_resource2(Z_RES_P(h2_res), "ph_audio_hash", h2_resid, le_ph_audio_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+#else - ZEND_FETCH_RESOURCE(h1, ph_audio_hash *, &h1_res, h1_resid, "ph_audio_hash", le_ph_audio_hash); - ZEND_FETCH_RESOURCE(h2, ph_audio_hash *, &h2_res, h2_resid, "ph_audio_hash", le_ph_audio_hash); -+#endif - - - -@@ -510,8 +585,17 @@ PHP_FUNCTION(ph_compare_text_hashes) - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &h1_res, &h2_res) == FAILURE) { - return; - } -+#if PHP_VERSION_ID >= 70000 -+ if ((h1 = (ph_text_hash *)zend_fetch_resource2(Z_RES_P(h1_res), "ph_txt_hash", h1_resid, le_ph_txt_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+ if ((h2 = (ph_text_hash *)zend_fetch_resource2(Z_RES_P(h2_res), "ph_txt_hash", h2_resid, le_ph_txt_hash)) == NULL) { -+ RETURN_FALSE; -+ } -+#else - ZEND_FETCH_RESOURCE(h1, ph_text_hash *, &h1_res, h1_resid, "ph_txt_hash", le_ph_txt_hash); - ZEND_FETCH_RESOURCE(h2, ph_text_hash *, &h2_res, h2_resid, "ph_txt_hash", le_ph_txt_hash); -+#endif - - - -@@ -525,6 +609,14 @@ PHP_FUNCTION(ph_compare_text_hashes) - { - for(int i = 0; i < count; ++i) - { -+#if PHP_VERSION_ID >= 70000 -+ zval array; -+ array_init(&array); -+ add_assoc_long(&array, "begin", m[i].first_index); -+ add_assoc_long(&array, "end", m[i].second_index); -+ add_assoc_long(&array, "length", m[i].length); -+ add_next_index_zval(return_value, &array); -+#else - zval *array; - MAKE_STD_ZVAL(array); - array_init(array); -@@ -532,6 +624,7 @@ PHP_FUNCTION(ph_compare_text_hashes) - add_assoc_long(array, "end", m[i].second_index); - add_assoc_long(array, "length", m[i].length); - add_next_index_zval(return_value, array); -+#endif - } - free(m); - } diff --git a/multimedia/php-pHash/files/patch-php__pHash.h b/multimedia/php-pHash/files/patch-php__pHash.h deleted file mode 100644 index 0496e40fb6f9..000000000000 --- a/multimedia/php-pHash/files/patch-php__pHash.h +++ /dev/null @@ -1,17 +0,0 @@ ---- php_pHash.h.orig 2013-04-23 18:53:42 UTC -+++ php_pHash.h -@@ -170,6 +170,14 @@ ZEND_END_ARG_INFO() - #define ph_compare_text_hashes_arg_info NULL - #endif - -+#if PHP_VERSION_ID >= 70000 -+#define SIZETorINT size_t -+#define zppLONG zend_long -+#else -+#define SIZETorINT int -+#define zppLONG long -+#endif -+ - #ifdef __cplusplus - } // extern "C" - #endif diff --git a/multimedia/php-pHash/pkg-descr b/multimedia/php-pHash/pkg-descr deleted file mode 100644 index 78f5f4795bc9..000000000000 --- a/multimedia/php-pHash/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -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++.