Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2015 23:28:03 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r396724 - in head/multimedia: . php-pHash php-pHash/files
Message-ID:  <201509112328.t8BNS3s6004256@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Sep 11 23:28:02 2015
New Revision: 396724
URL: https://svnweb.freebsd.org/changeset/ports/396724

Log:
  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/

Added:
  head/multimedia/php-pHash/
  head/multimedia/php-pHash/Makefile   (contents, props changed)
  head/multimedia/php-pHash/distinfo   (contents, props changed)
  head/multimedia/php-pHash/files/
  head/multimedia/php-pHash/files/patch-pHash.cpp   (contents, props changed)
  head/multimedia/php-pHash/pkg-descr   (contents, props changed)
Modified:
  head/multimedia/Makefile   (contents, props changed)

Modified: head/multimedia/Makefile
==============================================================================
--- head/multimedia/Makefile	Fri Sep 11 23:27:46 2015	(r396723)
+++ head/multimedia/Makefile	Fri Sep 11 23:28:02 2015	(r396724)
@@ -286,6 +286,7 @@
     SUBDIR += phonon-vlc
     SUBDIR += phonon-xine
     SUBDIR += photofilmstrip
+    SUBDIR += php-pHash
     SUBDIR += pitivi
     SUBDIR += playd
     SUBDIR += plexhometheater

Added: head/multimedia/php-pHash/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/php-pHash/Makefile	Fri Sep 11 23:28:02 2015	(r396724)
@@ -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>

Added: head/multimedia/php-pHash/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/php-pHash/distinfo	Fri Sep 11 23:28:02 2015	(r396724)
@@ -0,0 +1,2 @@
+SHA256 (pHash-0.9.6.tar.gz) = 3c8258a014f9c2491fb1153010984606805638a45d00498864968a9a30102935
+SIZE (pHash-0.9.6.tar.gz) = 1315965

Added: head/multimedia/php-pHash/files/patch-pHash.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/php-pHash/files/patch-pHash.cpp	Fri Sep 11 23:28:02 2015	(r396724)
@@ -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");

Added: head/multimedia/php-pHash/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/php-pHash/pkg-descr	Fri Sep 11 23:28:02 2015	(r396724)
@@ -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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509112328.t8BNS3s6004256>