mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-05 06:27:37 +00:00
- Update to 1.3.3
- Remove leading indefinite article from COMMENT - Pet portlint: remove ABI version number from LIB_DEPENDS - Cleanup Makefile header Changes: http://pecl.php.net/package-changelog.php?package=gnupg
This commit is contained in:
parent
7027b5a896
commit
6aa36a6744
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=324453
@ -1,12 +1,8 @@
|
||||
# Ports collection makefile for: pear-gnupg
|
||||
# Date created: 16 March 2006
|
||||
# Whom: mnag@FreeBSD.org
|
||||
#
|
||||
# Created by: mnag@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= gnupg
|
||||
PORTVERSION= 1.3.2
|
||||
PORTVERSION= 1.3.3
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://pecl.php.net/get/
|
||||
PKGNAMEPREFIX= pecl-
|
||||
@ -14,9 +10,9 @@ EXTRACT_SUFX= .tgz
|
||||
DIST_SUBDIR= PECL
|
||||
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= A pecl wrapper around the gpgme library
|
||||
COMMENT= PECL wrapper around the gpgme library
|
||||
|
||||
LIB_DEPENDS= gpgme.19:${PORTSDIR}/security/gpgme
|
||||
LIB_DEPENDS= gpgme:${PORTSDIR}/security/gpgme
|
||||
|
||||
CFLAGS+= -I${LOCALBASE}/include
|
||||
CONFIGURE_ARGS= --with-gnupg=${LOCALBASE}/include/gpgme
|
||||
@ -25,7 +21,6 @@ USE_PHP= yes
|
||||
USE_PHPEXT= yes
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|$$GNUPG_DIR/lib|${LOCALBASE}/lib|; s| -ldl||g' \
|
||||
${WRKSRC}/config.m4
|
||||
@${REINPLACE_CMD} -e 's|$$GNUPG_DIR/lib|${LOCALBASE}/lib|; s| -ldl||g' ${WRKSRC}/config.m4
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (PECL/gnupg-1.3.2.tgz) = 9da2d793e4f90cff8fa9b20c627f0977e1af7fe6597febac8cd1eabe988d59ee
|
||||
SIZE (PECL/gnupg-1.3.2.tgz) = 18237
|
||||
SHA256 (PECL/gnupg-1.3.3.tgz) = 6a20b9bb8567b305a77bc2c5671c3cb28006f337f5f022aff4e2968a2a3eb121
|
||||
SIZE (PECL/gnupg-1.3.3.tgz) = 19141
|
||||
|
@ -1,95 +0,0 @@
|
||||
--- gnupg.c 2010/07/20 19:27:25 301426
|
||||
+++ gnupg.c 2012/05/06 07:43:30 325553
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
+#include "zend_exceptions.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_gnupg.h"
|
||||
|
||||
@@ -53,7 +54,7 @@
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, (char*)error); \
|
||||
break; \
|
||||
case 2: \
|
||||
- zend_throw_exception(zend_exception_get_default(), (char*) error, 0 TSRMLS_CC); \
|
||||
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), (char*) error, 0 TSRMLS_CC); \
|
||||
break; \
|
||||
default: \
|
||||
intern->errortxt = (char*)error; \
|
||||
@@ -136,6 +137,9 @@
|
||||
gpgme_ctx_t ctx;
|
||||
gpgme_check_version (NULL);
|
||||
gpgme_new (&ctx);
|
||||
+#ifdef GNUPG_PATH
|
||||
+ gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_OpenPGP, GNUPG_PATH, NULL);
|
||||
+#endif
|
||||
gpgme_set_armor (ctx,1);
|
||||
intern->ctx = ctx;
|
||||
intern->encryptkeys = NULL;
|
||||
@@ -170,16 +174,22 @@
|
||||
/* {{{ objects_new */
|
||||
zend_object_value gnupg_obj_new(zend_class_entry *class_type TSRMLS_DC){
|
||||
gnupg_object *intern;
|
||||
+#if PHP_VERSION_ID < 50399
|
||||
zval *tmp;
|
||||
+#endif
|
||||
zend_object_value retval;
|
||||
|
||||
- intern = emalloc(sizeof(gnupg_object));
|
||||
+ intern = ecalloc(1, sizeof(gnupg_object));
|
||||
intern->zo.ce = class_type;
|
||||
+
|
||||
+#if PHP_VERSION_ID < 50399
|
||||
intern->zo.properties = NULL;
|
||||
-
|
||||
ALLOC_HASHTABLE (intern->zo.properties);
|
||||
zend_hash_init (intern->zo.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy (intern->zo.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
+#else
|
||||
+ object_properties_init(&intern->zo, class_type);
|
||||
+#endif
|
||||
|
||||
retval.handle = zend_objects_store_put(intern,NULL,(zend_objects_free_object_storage_t) gnupg_obj_dtor,NULL TSRMLS_CC);
|
||||
retval.handlers = (zend_object_handlers *) & gnupg_object_handlers;
|
||||
@@ -379,7 +389,7 @@
|
||||
/* {{{ callback func for setting the passphrase */
|
||||
|
||||
gpgme_error_t passphrase_cb (gnupg_object *intern, const char *uid_hint, const char *passphrase_info,int last_was_bad, int fd TSRMLS_DC){
|
||||
- char uid[16];
|
||||
+ char uid[17];
|
||||
int idx;
|
||||
char *passphrase = NULL;
|
||||
zval *return_value = NULL;
|
||||
@@ -407,7 +417,7 @@
|
||||
}
|
||||
|
||||
gpgme_error_t passphrase_decrypt_cb (gnupg_object *intern, const char *uid_hint, const char *passphrase_info,int last_was_bad, int fd TSRMLS_DC){
|
||||
- char uid[16];
|
||||
+ char uid[17];
|
||||
int idx;
|
||||
char *passphrase = NULL;
|
||||
zval *return_value = NULL;
|
||||
@@ -1244,7 +1254,6 @@
|
||||
gpgme_data_t in, out;
|
||||
gpgme_decrypt_result_t decrypt_result;
|
||||
gpgme_verify_result_t verify_result;
|
||||
- gpgme_signature_t gpg_signatures;
|
||||
|
||||
GNUPG_GETOBJ();
|
||||
|
||||
@@ -1472,13 +1481,12 @@
|
||||
/* {{{ proto array gnupg_listsignatures(string keyid) */
|
||||
PHP_FUNCTION(gnupg_listsignatures){
|
||||
char *keyid;
|
||||
- char keyid_len;
|
||||
+ int keyid_len;
|
||||
|
||||
zval *sub_arr;
|
||||
zval *sig_arr;
|
||||
|
||||
gpgme_key_t gpgme_key;
|
||||
- gpgme_subkey_t gpgme_subkey;
|
||||
gpgme_user_id_t gpgme_userid;
|
||||
gpgme_key_sig_t gpgme_signature;
|
||||
|
@ -1,28 +0,0 @@
|
||||
--- gnupg_keylistiterator.c 2006/11/03 12:38:35 222719
|
||||
+++ gnupg_keylistiterator.c 2012/01/29 02:38:33 322911
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
#include "zend_interfaces.h"
|
||||
+#include "zend_exceptions.h"
|
||||
#include "php_gnupg.h"
|
||||
#include "php_gnupg_keylistiterator.h"
|
||||
|
||||
@@ -148,7 +149,7 @@
|
||||
gpgme_key_release(intern->gpgkey);
|
||||
}
|
||||
|
||||
- if(intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey)){
|
||||
+ if((intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey))){
|
||||
gpgme_key_release(intern->gpgkey);
|
||||
intern->gpgkey = NULL;
|
||||
}
|
||||
@@ -159,7 +160,7 @@
|
||||
GNUPG_GET_ITERATOR();
|
||||
|
||||
if((intern->err = gpgme_op_keylist_start(intern->ctx, Z_STRVAL(intern->pattern), 0)) != GPG_ERR_NO_ERROR){
|
||||
- zend_throw_exception(zend_exception_get_default(),gpg_strerror(intern->err),1 TSRMLS_CC);
|
||||
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C),gpg_strerror(intern->err),1 TSRMLS_CC);
|
||||
}
|
||||
if((intern->err = gpgme_op_keylist_next(intern->ctx, &intern->gpgkey))!=GPG_ERR_NO_ERROR){
|
||||
RETURN_FALSE;
|
Loading…
Reference in New Issue
Block a user