summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-02 01:24:11 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-02 01:24:11 +0000
commita7f36d792db49b097405108f25d6cabff9e4dd64 (patch)
treed1a10586b83e245fa8750eef788d6d747423170b /dev-python
parentVersion bump (diff)
downloadgentoo-2-a7f36d792db49b097405108f25d6cabff9e4dd64.tar.gz
gentoo-2-a7f36d792db49b097405108f25d6cabff9e4dd64.tar.bz2
gentoo-2-a7f36d792db49b097405108f25d6cabff9e4dd64.zip
Make gmp optional.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/pycrypto/ChangeLog6
-rw-r--r--dev-python/pycrypto/files/pycrypto-2.0.1-gmp.patch16
-rw-r--r--dev-python/pycrypto/pycrypto-2.0.1-r2.ebuild14
3 files changed, 31 insertions, 5 deletions
diff --git a/dev-python/pycrypto/ChangeLog b/dev-python/pycrypto/ChangeLog
index 0214b72f106c..bd751b5bf215 100644
--- a/dev-python/pycrypto/ChangeLog
+++ b/dev-python/pycrypto/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/pycrypto
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.26 2006/02/01 15:41:03 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.27 2006/02/02 01:24:11 vapier Exp $
+
+ 01 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/pycrypto-2.0.1-gmp.patch, pycrypto-2.0.1-r2.ebuild:
+ Make gmp optional.
*pycrypto-2.0.1-r2 (01 Feb 2006)
diff --git a/dev-python/pycrypto/files/pycrypto-2.0.1-gmp.patch b/dev-python/pycrypto/files/pycrypto-2.0.1-gmp.patch
new file mode 100644
index 000000000000..7580c951bfe8
--- /dev/null
+++ b/dev-python/pycrypto/files/pycrypto-2.0.1-gmp.patch
@@ -0,0 +1,16 @@
+Give control over gmp support
+
+--- pycrypto/setup.py
++++ pycrypto/setup.py
+@@ -116,10 +116,8 @@
+ 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')):
++ if os.environ.has_key("USE_GMP") and os.environ["USE_GMP"] == "1":
+ exts.append(Extension("Crypto.PublicKey._fastmath",
+ include_dirs=['src/'],
+ libraries=['gmp'],
diff --git a/dev-python/pycrypto/pycrypto-2.0.1-r2.ebuild b/dev-python/pycrypto/pycrypto-2.0.1-r2.ebuild
index c61d1eabf809..99a93d17d6a5 100644
--- a/dev-python/pycrypto/pycrypto-2.0.1-r2.ebuild
+++ b/dev-python/pycrypto/pycrypto-2.0.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/pycrypto-2.0.1-r2.ebuild,v 1.1 2006/02/01 15:41:04 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/pycrypto-2.0.1-r2.ebuild,v 1.2 2006/02/02 01:24:11 vapier Exp $
inherit eutils distutils toolchain-funcs flag-o-matic
@@ -11,9 +11,10 @@ SRC_URI="http://www.amk.ca/files/python/crypto/${P}.tar.gz"
LICENSE="freedist"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~ppc ~ppc-macos ~s390 ~sh ~sparc ~x86"
-IUSE="bindist test"
+IUSE="bindist gmp test"
-RDEPEND="virtual/python"
+RDEPEND="virtual/python
+ gmp? ( dev-libs/gmp )"
DEPEND="${RDEPEND}
test? ( =dev-python/sancho-0.11 )"
@@ -21,10 +22,14 @@ src_unpack() {
unpack ${A}
cd "${S}"
use bindist && epatch "${FILESDIR}"/${P}-bindist.patch
- epatch "${FILESDIR}/pycrypto-2.0.1-ia64.patch"
+ epatch "${FILESDIR}"/${P}-gmp.patch
+ epatch "${FILESDIR}"/pycrypto-2.0.1-ia64.patch
}
src_compile() {
+ use gmp \
+ && export USE_GMP=1 \
+ || export USE_GMP=0
# sha256 hashes occasionally trigger ssp when built with
# -finline-functions (implied by -O3).
gcc-specs-ssp && append-flags -fno-inline-functions
@@ -32,6 +37,7 @@ src_compile() {
}
src_test() {
+ export PYTHONPATH=$(ls -d "${S}"/build/lib.*/)
python ./test.py || die "test failed"
if use test ; then
local x