aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2016-03-13 01:50:06 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2016-03-13 01:50:06 +0000
commitd363fcb68326b54db24ebc97eed3ffa6424b8a77 (patch)
treeb40642801fcc8886cd006d178dce6b0a9b1c66b5
parent5c27392b08e34c53582877044190cfa9cd5e9cca (diff)
- Switch to options helpers
- Silence patching and stripping - Regenerate patches with `make makepatch`
Notes
Notes: svn path=/head/; revision=410939
-rw-r--r--security/py-pow/Makefile10
-rw-r--r--security/py-pow/files/patch-POW.c42
2 files changed, 27 insertions, 25 deletions
diff --git a/security/py-pow/Makefile b/security/py-pow/Makefile
index 3209c911a549..ad1bc69f1dee 100644
--- a/security/py-pow/Makefile
+++ b/security/py-pow/Makefile
@@ -14,8 +14,6 @@ COMMENT= Python OpenSSL Wrappers
LICENSE= BSD3CLAUSE
-OPTIONS_DEFINE= DOCS
-
USES= python
USE_PYTHON= distutils
PYDISTUTILS_PKGNAME= POW
@@ -23,14 +21,18 @@ USE_OPENSSL= yes
PORTDOCS= POW.pdf
+OPTIONS_DEFINE= DOCS
+
post-patch:
- ${REINPLACE_CMD} -e 's|licence|license|' ${WRKSRC}/setup.py
+ @${REINPLACE_CMD} -e 's|licence|license|' ${WRKSRC}/setup.py
do-build:
cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} build_ext -D NO_IDEA -D NO_RC5_32_12_16 ${PYDISTUTILS_BUILD_TARGET}
post-install:
- ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/POW/_POW.so
+ @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/POW/_POW.so
+
+post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/docs/${i} ${STAGEDIR}${DOCSDIR}
diff --git a/security/py-pow/files/patch-POW.c b/security/py-pow/files/patch-POW.c
index 8f25e29096c3..67fdd7875f3c 100644
--- a/security/py-pow/files/patch-POW.c
+++ b/security/py-pow/files/patch-POW.c
@@ -1,5 +1,5 @@
---- POW.c.orig 2002-09-18 05:54:28.000000000 +0200
-+++ POW.c 2014-04-16 10:32:11.000000000 +0200
+--- POW.c.orig 2002-09-18 03:54:28 UTC
++++ POW.c
@@ -46,9 +46,10 @@
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -20,7 +20,7 @@
#define MD5_DIGEST 2
#define SHA_DIGEST 3
#define SHA1_DIGEST 4
-@@ -304,54 +304,54 @@
+@@ -304,54 +304,54 @@ evp_cipher_factory(int cipher_type)
switch(cipher_type)
{
#ifndef NO_DES
@@ -111,7 +111,7 @@
#endif
default: return NULL;
}
-@@ -580,7 +580,7 @@
+@@ -580,7 +580,7 @@ static x509_object *
X509_object_der_read(char *src, int len)
{
x509_object *self;
@@ -120,7 +120,7 @@
if ( !(self = PyObject_New( x509_object, &x509type ) ) )
goto error;
-@@ -767,7 +767,6 @@
+@@ -767,7 +767,6 @@ static char X509_object_sign__doc__[] =
" signed, it should be one of the following:\n"
" </para>\n"
" <simplelist>\n"
@@ -128,7 +128,7 @@
" <member><constant>MD5_DIGEST</constant></member>\n"
" <member><constant>SHA_DIGEST</constant></member>\n"
" <member><constant>SHA1_DIGEST</constant></member>\n"
-@@ -805,12 +804,6 @@
+@@ -805,12 +804,6 @@ X509_object_sign(x509_object *self, PyOb
{ PyErr_SetString( SSLErrorObject, "could not sign certificate" ); goto error; }
break;
}
@@ -141,7 +141,7 @@
case SHA_DIGEST:
{
if (!X509_sign(self->x509, pkey, EVP_sha() ) )
-@@ -2050,7 +2043,7 @@
+@@ -2050,7 +2043,7 @@ static x509_crl_object *
x509_crl_object_der_read(char *src, int len)
{
x509_crl_object *self;
@@ -150,7 +150,7 @@
if ( !(self = PyObject_New( x509_crl_object, &x509_crltype ) ) )
goto error;
-@@ -2435,7 +2428,7 @@
+@@ -2435,7 +2428,7 @@ static X509_REVOKED *
X509_REVOKED_dup(X509_REVOKED *rev)
{
return((X509_REVOKED *)ASN1_dup((int (*)())i2d_X509_REVOKED,
@@ -159,7 +159,7 @@
}
static PyObject *
-@@ -2815,7 +2808,6 @@
+@@ -2815,7 +2808,6 @@ static char x509_crl_object_sign__doc__[
" signed, it should be one of the following:\n"
" </para>\n"
" <simplelist>\n"
@@ -167,7 +167,7 @@
" <member><constant>MD5_DIGEST</constant></member>\n"
" <member><constant>SHA_DIGEST</constant></member>\n"
" <member><constant>SHA1_DIGEST</constant></member>\n"
-@@ -2852,12 +2844,6 @@
+@@ -2852,12 +2844,6 @@ x509_crl_object_sign(x509_crl_object *se
{ PyErr_SetString( SSLErrorObject, "could not sign certificate" ); goto error; }
break;
}
@@ -180,7 +180,7 @@
case SHA_DIGEST:
{
if (!X509_CRL_sign(self->crl, pkey, EVP_sha() ) )
-@@ -4576,7 +4562,7 @@
+@@ -4576,7 +4562,7 @@ static asymmetric_object *
asymmetric_object_der_read(int key_type, char *src, int len)
{
asymmetric_object *self=NULL;
@@ -189,7 +189,7 @@
self = PyObject_New( asymmetric_object, &asymmetrictype );
if (self == NULL)
-@@ -5031,7 +5017,6 @@
+@@ -5031,7 +5017,6 @@ static char asymmetric_object_sign__doc_
" following:\n"
" </para>\n"
" <simplelist>\n"
@@ -197,7 +197,7 @@
" <member><constant>MD5_DIGEST</constant></member>\n"
" <member><constant>SHA_DIGEST</constant></member>\n"
" <member><constant>SHA1_DIGEST</constant></member>\n"
-@@ -5063,8 +5048,6 @@
+@@ -5063,8 +5048,6 @@ asymmetric_object_sign(asymmetric_object
switch(digest_type)
{
@@ -206,7 +206,7 @@
case MD5_DIGEST:
{ digest_nid = NID_md5; digest_len = MD5_DIGEST_LENGTH; break; }
case SHA_DIGEST:
-@@ -5141,7 +5124,6 @@
+@@ -5141,7 +5124,6 @@ static char asymmetric_object_verify__do
" following:\n"
" </para>\n"
" <simplelist>\n"
@@ -214,7 +214,7 @@
" <member><constant>MD5_DIGEST</constant></member>\n"
" <member><constant>SHA_DIGEST</constant></member>\n"
" <member><constant>SHA1_DIGEST</constant></member>\n"
-@@ -5165,8 +5147,6 @@
+@@ -5165,8 +5147,6 @@ asymmetric_object_verify(asymmetric_obje
switch(digest_type)
{
@@ -223,7 +223,7 @@
case MD5_DIGEST:
{ digest_len = MD5_DIGEST_LENGTH; digest_nid = NID_md5; break; }
case SHA_DIGEST:
-@@ -5567,8 +5547,6 @@
+@@ -5567,8 +5547,6 @@ digest_object_new(int digest_type)
switch(digest_type)
{
@@ -232,7 +232,7 @@
case MD5_DIGEST:
{ self->digest_type = MD5_DIGEST; EVP_DigestInit( &self->digest_ctx, EVP_md5() ); break; }
case SHA_DIGEST:
-@@ -5777,7 +5755,7 @@
+@@ -5777,7 +5755,7 @@ static hmac_object *
hmac_object_new(int digest_type, char *key, int key_len)
{
hmac_object *self=NULL;
@@ -241,7 +241,7 @@
self = PyObject_New( hmac_object, &hmactype );
if (self == NULL)
-@@ -5785,8 +5763,6 @@
+@@ -5785,8 +5763,6 @@ hmac_object_new(int digest_type, char *k
switch(digest_type)
{
@@ -250,7 +250,7 @@
case MD5_DIGEST:
{ md = EVP_md5(); break; }
case SHA_DIGEST:
-@@ -6137,7 +6113,6 @@
+@@ -6137,7 +6113,6 @@ static char pow_module_new_digest__doc__
" of digest to create and should be one of the following: \n"
" </para>\n"
" <simplelist>\n"
@@ -258,7 +258,7 @@
" <member><constant>MD5_DIGEST</constant></member>\n"
" <member><constant>SHA_DIGEST</constant></member>\n"
" <member><constant>SHA1_DIGEST</constant></member>\n"
-@@ -6176,7 +6151,6 @@
+@@ -6176,7 +6151,6 @@ static char pow_module_new_hmac__doc__[]
" string and <parameter>type</parameter> should be one of the following: \n"
" </para>\n"
" <simplelist>\n"
@@ -266,7 +266,7 @@
" <member><constant>MD5_DIGEST</constant></member>\n"
" <member><constant>SHA_DIGEST</constant></member>\n"
" <member><constant>SHA1_DIGEST</constant></member>\n"
-@@ -7078,7 +7052,6 @@
+@@ -7078,7 +7052,6 @@ init_POW(void)
#endif
// message digests