| 1 |
maksbotan |
1.1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
ranger |
1.9 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/pycrypto-2.6.ebuild,v 1.8 2012/06/06 14:10:29 ranger Exp $ |
| 4 |
maksbotan |
1.1 |
|
| 5 |
maksbotan |
1.2 |
EAPI="4" |
| 6 |
maksbotan |
1.1 |
PYTHON_DEPEND="2" |
| 7 |
|
|
SUPPORT_PYTHON_ABIS="1" |
| 8 |
|
|
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" |
| 9 |
|
|
DISTUTILS_SRC_TEST="setup.py" |
| 10 |
|
|
|
| 11 |
maksbotan |
1.2 |
inherit distutils |
| 12 |
maksbotan |
1.1 |
|
| 13 |
|
|
DESCRIPTION="Python Cryptography Toolkit" |
| 14 |
|
|
HOMEPAGE="http://www.dlitz.net/software/pycrypto/ http://pypi.python.org/pypi/pycrypto" |
| 15 |
|
|
SRC_URI="http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/${P}.tar.gz" |
| 16 |
|
|
|
| 17 |
|
|
LICENSE="PSF-2 public-domain" |
| 18 |
|
|
SLOT="0" |
| 19 |
ranger |
1.9 |
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" |
| 20 |
maksbotan |
1.1 |
IUSE="doc +gmp" |
| 21 |
|
|
|
| 22 |
|
|
RDEPEND="gmp? ( dev-libs/gmp )" |
| 23 |
|
|
DEPEND="${RDEPEND} |
| 24 |
|
|
doc? ( dev-python/docutils >=dev-python/epydoc-3 )" |
| 25 |
|
|
|
| 26 |
maksbotan |
1.2 |
PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") |
| 27 |
maksbotan |
1.1 |
|
| 28 |
|
|
DOCS="ACKS ChangeLog README TODO" |
| 29 |
|
|
PYTHON_MODNAME="Crypto" |
| 30 |
|
|
|
| 31 |
|
|
src_configure() { |
| 32 |
|
|
econf \ |
| 33 |
|
|
$(use_with gmp) \ |
| 34 |
maksbotan |
1.2 |
--without-mpir |
| 35 |
maksbotan |
1.1 |
} |
| 36 |
|
|
|
| 37 |
|
|
src_compile() { |
| 38 |
|
|
distutils_src_compile |
| 39 |
|
|
|
| 40 |
|
|
if use doc; then |
| 41 |
|
|
einfo "Generation of documentation" |
| 42 |
|
|
rst2html.py Doc/pycrypt.rst > Doc/index.html |
| 43 |
|
|
PYTHONPATH="$(ls -d build-$(PYTHON --ABI -f)/lib.*)" epydoc --config=Doc/epydoc-config --exclude-introspect="^Crypto\.(Random\.OSRNG\.nt|Util\.winrandom)$" || die "Generation of documentation failed" |
| 44 |
|
|
fi |
| 45 |
|
|
} |
| 46 |
|
|
|
| 47 |
|
|
src_install() { |
| 48 |
|
|
distutils_src_install |
| 49 |
|
|
|
| 50 |
|
|
if use doc; then |
| 51 |
maksbotan |
1.2 |
dohtml Doc/apidoc/* Doc/index.html |
| 52 |
maksbotan |
1.1 |
fi |
| 53 |
|
|
} |