Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 1 | # Copyright 1999-2014 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 3 | # $Header: /var/cvsroot/gentoo-x86/dev-python/mysql-python/mysql-python-1.2.5.ebuild,v 1.4 2014/03/18 15:26:44 idella4 Exp $ |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 4 | |
| 5 | EAPI=5 |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 6 | |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 7 | PYTHON_COMPAT=( python{2_6,2_7} ) |
| 8 | |
| 9 | inherit distutils-r1 flag-o-matic |
| 10 | |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 11 | MY_PN="MySQL-python" |
| 12 | MY_P="${MY_PN}-${PV}" |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION="Python interface to MySQL" |
| 15 | HOMEPAGE="http://sourceforge.net/projects/mysql-python/ http://pypi.python.org/pypi/MySQL-python" |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 16 | SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip" |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 17 | |
| 18 | LICENSE="GPL-2" |
| 19 | SLOT="0" |
| 20 | KEYWORDS="*" |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 21 | IUSE="doc" |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 22 | |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 23 | RDEPEND="virtual/mysql" |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 24 | DEPEND="${RDEPEND} |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 25 | app-arch/unzip |
| 26 | dev-python/setuptools[${PYTHON_USEDEP}] |
| 27 | doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 28 | |
| 29 | S="${WORKDIR}/${MY_P}" |
| 30 | |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 31 | DOCS=( HISTORY README.md doc/{FAQ,MySQLdb}.rst ) |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 32 | |
| 33 | src_configure() { |
| 34 | # Append the SYSROOT Library Path in order for the linker to find |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 35 | # libbfd when cross-compiling. |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 36 | append-ldflags "-L${SYSROOT}/usr/${CHOST}/lib" |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 37 | |
Simran Basi | 80cab6a | 2014-02-11 14:39:09 -0800 | [diff] [blame] | 38 | # Update the site configuration options to search for mysql_config in the SYSROOT. |
| 39 | sed -i -r \ |
| 40 | -e "s:#mysql_config = /usr/local/bin:mysql_config = ${SYSROOT}/usr/bin:" \ |
| 41 | site.cfg |
| 42 | distutils-r1_src_configure |
| 43 | } |
| 44 | |
| 45 | python_configure_all() { |
| 46 | append-flags -fno-strict-aliasing |
| 47 | } |
Aviv Keshet | 4c4adcf | 2014-06-11 13:27:58 -0700 | [diff] [blame] | 48 | |
| 49 | python_compile_all() { |
| 50 | use doc && sphinx-build -b html doc doc/_build/ |
| 51 | } |
| 52 | |
| 53 | python_install_all() { |
| 54 | use doc && local HTML_DOCS=( doc/_build/. ) |
| 55 | distutils-r1_python_install_all |
| 56 | } |