Update to py-crypto 2.4.1

Properly honor CFLAGS and build the fastmath module, with inputs from
rpointel@

ok rpointel@, benoit@
This commit is contained in:
mpi 2011-12-28 09:56:38 +00:00
parent 3126b354d6
commit ea4e34c722
6 changed files with 82 additions and 38 deletions

View File

@ -1,16 +1,14 @@
# $OpenBSD: Makefile,v 1.23 2011/11/04 13:36:16 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.24 2011/12/28 09:56:38 mpi Exp $
SHARED_ONLY = Yes SHARED_ONLY = Yes
COMMENT = cryptographic tools for Python COMMENT = cryptographic tools for Python
MODPY_EGG_VERSION = 2.3 MODPY_EGG_VERSION = 2.4.1
DISTNAME = pycrypto-${MODPY_EGG_VERSION} DISTNAME = pycrypto-${MODPY_EGG_VERSION}
PKGNAME = py-crypto-${MODPY_EGG_VERSION} PKGNAME = py-crypto-${MODPY_EGG_VERSION}
CATEGORIES = security devel CATEGORIES = security devel
REVISION = 0
HOMEPAGE = https://www.dlitz.net/software/pycrypto/ HOMEPAGE = https://www.dlitz.net/software/pycrypto/
MAINTAINER = Martin Pieuchot <mpi@openbsd.org> MAINTAINER = Martin Pieuchot <mpi@openbsd.org>
@ -24,10 +22,15 @@ PERMIT_DISTFILES_FTP = Yes
MASTER_SITES = http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/ MASTER_SITES = http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
MODULES = lang/python MODULES = lang/python
LIB_DEPENDS = ${MODPY_LIB_DEPENDS} LIB_DEPENDS = ${MODPY_LIB_DEPENDS} \
WANTLIB = ${MODPY_WANTLIB} devel/gmp
WANTLIB = ${MODPY_WANTLIB} gmp
BUILD_DEPENDS = devel/gmp # XXX Don't set CONFIGURE_STYLE=simple otherwise python.port.mk will
# not define do-build and do-install
CONFIGURE_ARGS = CFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CFLAGS += -I${LOCALBASE}/include
DOCSDIR = ${PREFIX}/share/doc/py-crypto DOCSDIR = ${PREFIX}/share/doc/py-crypto
@ -36,6 +39,9 @@ pre-configure:
rm ${WRKSRC}/lib/Crypto/SelfTest/Cipher/test_ARC2.py rm ${WRKSRC}/lib/Crypto/SelfTest/Cipher/test_ARC2.py
rm ${WRKSRC}/lib/Crypto/SelfTest/Hash/test_MD2.py rm ${WRKSRC}/lib/Crypto/SelfTest/Hash/test_MD2.py
do-configure:
${MODSIMPLE_configure}
post-install: post-install:
${INSTALL_DATA_DIR} ${DOCSDIR} ${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}

View File

@ -1,5 +1,5 @@
MD5 (pycrypto-2.3.tar.gz) = K4Ec+/w0LYPuYUCX7/uBAQ== MD5 (pycrypto-2.4.1.tar.gz) = wqFASoSHl/sIBvPhHCnvFQ==
RMD160 (pycrypto-2.3.tar.gz) = W3sVqrP14zETuhl6Lt1inHJZU3Q= RMD160 (pycrypto-2.4.1.tar.gz) = fb87DKEOj3KHcvCygmZ+S6lGYcU=
SHA1 (pycrypto-2.3.tar.gz) = lrM7d+cpiTvQg3oJpqp6ErUHADc= SHA1 (pycrypto-2.4.1.tar.gz) = 2gKDWZhskSW4gLW2K3yLoGtzMoI=
SHA256 (pycrypto-2.3.tar.gz) = TxHoX7zxOWA3NlD8La6PCI+bAB8H+20++y/LUzSYcYI= SHA256 (pycrypto-2.4.1.tar.gz) = T/X3AIhpyFCdFqMfKFufY0DEqf9wPIUpiDKihpIQsVQ=
SIZE (pycrypto-2.3.tar.gz) = 331476 SIZE (pycrypto-2.4.1.tar.gz) = 383032

View File

@ -1,10 +1,11 @@
--- lib/Crypto/SelfTest/Cipher/__init__.py.orig Fri Aug 27 06:41:55 2010 $OpenBSD: patch-lib_Crypto_SelfTest_Cipher___init___py,v 1.3 2011/12/28 09:56:38 mpi Exp $
+++ lib/Crypto/SelfTest/Cipher/__init__.py Sun Oct 9 17:06:47 2011 --- lib/Crypto/SelfTest/Cipher/__init__.py.orig Fri Nov 4 20:17:40 2011
@@ -29,7 +29,6 @@ __revision__ = "$Id: patch-lib_Crypto_SelfTest_Cipher___init___py,v 1.2 2011/10/09 15:09:55 ajacoutot Exp $" +++ lib/Crypto/SelfTest/Cipher/__init__.py Mon Dec 26 09:48:45 2011
@@ -29,7 +29,6 @@
def get_tests(config={}): def get_tests(config={}):
tests = [] tests = []
import test_AES; tests += test_AES.get_tests(config=config) from Crypto.SelfTest.Cipher import test_AES; tests += test_AES.get_tests(config=config)
- import test_ARC2; tests += test_ARC2.get_tests(config=config) - from Crypto.SelfTest.Cipher import test_ARC2; tests += test_ARC2.get_tests(config=config)
import test_ARC4; tests += test_ARC4.get_tests(config=config) from Crypto.SelfTest.Cipher import test_ARC4; tests += test_ARC4.get_tests(config=config)
import test_Blowfish; tests += test_Blowfish.get_tests(config=config) from Crypto.SelfTest.Cipher import test_Blowfish; tests += test_Blowfish.get_tests(config=config)
import test_CAST; tests += test_CAST.get_tests(config=config) from Crypto.SelfTest.Cipher import test_CAST; tests += test_CAST.get_tests(config=config)

View File

@ -1,10 +1,11 @@
--- lib/Crypto/SelfTest/Hash/__init__.py.orig Fri Aug 27 06:41:55 2010 $OpenBSD: patch-lib_Crypto_SelfTest_Hash___init__py,v 1.3 2011/12/28 09:56:38 mpi Exp $
+++ lib/Crypto/SelfTest/Hash/__init__.py Sun Oct 9 17:06:47 2011 --- lib/Crypto/SelfTest/Hash/__init__.py.orig Fri Nov 4 20:17:40 2011
@@ -29,7 +29,6 @@ __revision__ = "$Id: patch-lib_Crypto_SelfTest_Hash___init__py,v 1.2 2011/10/09 15:09:55 ajacoutot Exp $" +++ lib/Crypto/SelfTest/Hash/__init__.py Mon Dec 26 09:50:24 2011
@@ -29,7 +29,6 @@
def get_tests(config={}): def get_tests(config={}):
tests = [] tests = []
import test_HMAC; tests += test_HMAC.get_tests(config=config) from Crypto.SelfTest.Hash import test_HMAC; tests += test_HMAC.get_tests(config=config)
- import test_MD2; tests += test_MD2.get_tests(config=config) - from Crypto.SelfTest.Hash import test_MD2; tests += test_MD2.get_tests(config=config)
import test_MD4; tests += test_MD4.get_tests(config=config) from Crypto.SelfTest.Hash import test_MD4; tests += test_MD4.get_tests(config=config)
import test_MD5; tests += test_MD5.get_tests(config=config) from Crypto.SelfTest.Hash import test_MD5; tests += test_MD5.get_tests(config=config)
import test_RIPEMD; tests += test_RIPEMD.get_tests(config=config) from Crypto.SelfTest.Hash import test_RIPEMD; tests += test_RIPEMD.get_tests(config=config)

View File

@ -1,7 +1,26 @@
$OpenBSD: patch-setup_py,v 1.6 2011/10/10 10:08:05 mpi Exp $ $OpenBSD: patch-setup_py,v 1.7 2011/12/28 09:56:38 mpi Exp $
--- setup.py.orig Fri Aug 27 06:41:55 2010 --- setup.py.orig Fri Nov 4 20:17:40 2011
+++ setup.py Sun Oct 9 17:06:47 2011 +++ setup.py Mon Dec 26 12:38:05 2011
@@ -267,9 +267,6 @@ kw = {'name':"pycrypto", @@ -173,15 +173,14 @@
# the libtomcrypt code.
self.__add_compiler_option("-O")
else:
- # Speed up execution by tweaking compiler options. This
- # especially helps the DES modules.
- self.__add_compiler_option("-O3")
- self.__add_compiler_option("-fomit-frame-pointer")
# Don't include debug symbols unless debugging
self.__remove_compiler_option("-g")
# Don't include profiling information (incompatible with
# -fomit-frame-pointer)
self.__remove_compiler_option("-pg")
+ # Honor CFLAGS
+ for opt in os.getenv('CFLAGS').split():
+ self.__add_compiler_option(opt)
if USE_GCOV:
self.__add_compiler_option("-fprofile-arcs")
self.__add_compiler_option("-ftest-coverage")
@@ -413,9 +412,6 @@
sources=["src/_fastmath.c"]), sources=["src/_fastmath.c"]),
# Hash functions # Hash functions
@ -11,7 +30,7 @@ $OpenBSD: patch-setup_py,v 1.6 2011/10/10 10:08:05 mpi Exp $
Extension("Crypto.Hash.MD4", Extension("Crypto.Hash.MD4",
include_dirs=['src/'], include_dirs=['src/'],
sources=["src/MD4.c"]), sources=["src/MD4.c"]),
@@ -285,9 +282,10 @@ kw = {'name':"pycrypto", @@ -431,9 +427,10 @@
Extension("Crypto.Cipher.AES", Extension("Crypto.Cipher.AES",
include_dirs=['src/'], include_dirs=['src/'],
sources=["src/AES.c"]), sources=["src/AES.c"]),

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.7 2011/10/08 14:56:34 mpi Exp $ @comment $OpenBSD: PLIST,v 1.8 2011/12/28 09:56:38 mpi Exp $
lib/python${MODPY_VERSION}/site-packages/Crypto/ lib/python${MODPY_VERSION}/site-packages/Crypto/
lib/python${MODPY_VERSION}/site-packages/Crypto/Cipher/ lib/python${MODPY_VERSION}/site-packages/Crypto/Cipher/
lib/python${MODPY_VERSION}/site-packages/Crypto/Cipher/AES.so lib/python${MODPY_VERSION}/site-packages/Crypto/Cipher/AES.so
@ -21,7 +21,13 @@ lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/RIPEMD.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/RIPEMD160.so lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/RIPEMD160.so
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA.py lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA224.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA224.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA256.so lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA256.so
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA384.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA384.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA512.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/SHA512.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/__init__.py lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/__init__.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/__init__.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/Hash/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Protocol/ lib/python${MODPY_VERSION}/site-packages/Crypto/Protocol/
@ -44,6 +50,7 @@ lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_RSA.py
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_RSA.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_RSA.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/__init__.py lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/__init__.py
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/__init__.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_fastmath.so
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_slowmath.py lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_slowmath.py
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_slowmath.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/_slowmath.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/pubkey.py lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/pubkey.py
@ -112,11 +119,19 @@ lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_RIPEMD.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_RIPEMD.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_RIPEMD.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA.py lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA224.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA224.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA256.py lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA256.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA256.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA256.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA384.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA384.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA512.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Hash/test_SHA512.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/ lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/__init__.py lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/__init__.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/__init__.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_AllOrNothing.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_AllOrNothing.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_chaffing.py lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_chaffing.py
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_chaffing.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_chaffing.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_rfc1751.py lib/python${MODPY_VERSION}/site-packages/Crypto/SelfTest/Protocol/test_rfc1751.py
@ -188,8 +203,10 @@ lib/python${MODPY_VERSION}/site-packages/Crypto/Util/asn1.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/asn1.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/Util/asn1.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/number.py lib/python${MODPY_VERSION}/site-packages/Crypto/Util/number.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/number.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/Util/number.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/python_compat.py lib/python${MODPY_VERSION}/site-packages/Crypto/Util/py21compat.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/python_compat.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/Util/py21compat.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/py3compat.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/py3compat.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/randpool.py lib/python${MODPY_VERSION}/site-packages/Crypto/Util/randpool.py
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/randpool.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/Util/randpool.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/Util/strxor.so lib/python${MODPY_VERSION}/site-packages/Crypto/Util/strxor.so
@ -200,5 +217,5 @@ lib/python${MODPY_VERSION}/site-packages/Crypto/__init__.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/pct_warnings.py lib/python${MODPY_VERSION}/site-packages/Crypto/pct_warnings.py
lib/python${MODPY_VERSION}/site-packages/Crypto/pct_warnings.pyc lib/python${MODPY_VERSION}/site-packages/Crypto/pct_warnings.pyc
lib/python${MODPY_VERSION}/site-packages/pycrypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info lib/python${MODPY_VERSION}/site-packages/pycrypto-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
share/doc/py-crypto/ share/doc/${MODPY_PY_PREFIX}crypto/
share/doc/py-crypto/README share/doc/${MODPY_PY_PREFIX}crypto/README