Enable _fastmath module

ok ish@
This commit is contained in:
alek 2006-01-23 08:52:55 +00:00
parent e7551ce9e3
commit e23f2939cc
3 changed files with 29 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.4 2005/11/27 15:20:42 alek Exp $
# $OpenBSD: Makefile,v 1.5 2006/01/23 08:52:55 alek Exp $
SHARED_ONLY= Yes
@ -6,7 +6,7 @@ COMMENT= "cryptographic tools for Python"
VERSION= 2.0.1
DISTNAME= pycrypto-${VERSION}
PKGNAME= py-crypto-${VERSION}
PKGNAME= py-crypto-${VERSION}p1
CATEGORIES= security devel
HOMEPAGE= http://www.amk.ca/python/code/crypto.html
@ -22,9 +22,13 @@ PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= http://www.amk.ca/files/python/crypto/
MODULES= lang/python
LIB_DEPENDS= gmp.6::devel/gmp
DOCSDIR= ${PREFIX}/share/doc/py-crypto
pre-build:
perl -pi -e 's,!!LOCALBASE!!,${LOCALBASE},g' ${WRKSRC}/setup.py
post-install:
${INSTALL_DATA_DIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-setup_py,v 1.1 2005/05/28 05:39:45 djm Exp $
$OpenBSD: patch-setup_py,v 1.2 2006/01/23 08:52:55 alek Exp $
--- setup.py.orig Sat May 28 14:24:30 2005
+++ setup.py Sat May 28 14:24:33 2005
@@ -64,9 +64,10 @@ class PCTBuildExt (build_ext):
@ -51,6 +51,26 @@ $OpenBSD: patch-setup_py,v 1.1 2005/05/28 05:39:45 djm Exp $
# Stream ciphers
Extension("Crypto.Cipher.ARC4",
@@ -116,14 +122,12 @@ class PCTBuildExt (build_ext):
build_ext.build_extensions(self)
def detect_modules (self):
- lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
exts = []
- if (self.compiler.find_library_file(lib_dirs, 'gmp')):
- exts.append(Extension("Crypto.PublicKey._fastmath",
- include_dirs=['src/'],
- libraries=['gmp'],
- sources=["src/_fastmath.c"]))
+ exts.append(Extension("Crypto.PublicKey._fastmath",
+ include_dirs=['src/', '!!LOCALBASE!!/include'],
+ library_dirs=['!!LOCALBASE!!/lib'],
+ libraries=['gmp'],
+ sources=["src/_fastmath.c"]))
self.extensions += exts
kw = {'name':"pycrypto",
@@ -139,9 +142,9 @@ kw = {'name':"pycrypto",
'package_dir' : { "Crypto":"." },
# One module is defined here, because build_ext won't be

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.4 2005/11/27 15:20:42 alek Exp $
@comment $OpenBSD: PLIST,v 1.5 2006/01/23 08:52:55 alek Exp $
lib/python${MODPY_VERSION}/site-packages/Crypto/
lib/python${MODPY_VERSION}/site-packages/Crypto/Cipher/
lib/python${MODPY_VERSION}/site-packages/Crypto/Cipher/AES.so
@ -38,6 +38,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/__init__.py
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/pubkey.py
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/pubkey.pyc
lib/python${MODPY_VERSION}/site-packages/Crypto/PublicKey/qNEW.py