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 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/dev-python/mysql-python/mysql-python-1.2.3-r1.ebuild,v 1.12 2014/02/06 09:27:32 jer Exp $ |
| 4 | |
| 5 | EAPI=5 |
| 6 | PYTHON_COMPAT=( python{2_6,2_7} ) |
| 7 | |
| 8 | inherit distutils-r1 flag-o-matic |
| 9 | |
| 10 | MY_P="MySQL-python-${PV}" |
| 11 | |
| 12 | DESCRIPTION="Python interface to MySQL" |
| 13 | HOMEPAGE="http://sourceforge.net/projects/mysql-python/ http://pypi.python.org/pypi/MySQL-python" |
| 14 | SRC_URI="mirror://sourceforge/mysql-python/${MY_P}.tar.gz" |
| 15 | |
| 16 | LICENSE="GPL-2" |
| 17 | SLOT="0" |
| 18 | KEYWORDS="*" |
| 19 | IUSE="" |
| 20 | |
| 21 | # RDEPEND on sys-devel/binutils to ensure libbfd is available. |
| 22 | RDEPEND="virtual/mysql |
| 23 | sys-devel/binutils |
| 24 | " |
| 25 | DEPEND="${RDEPEND} |
| 26 | dev-python/setuptools[${PYTHON_USEDEP}]" |
| 27 | |
| 28 | S="${WORKDIR}/${MY_P}" |
| 29 | |
| 30 | DOCS=( HISTORY README doc/{FAQ,MySQLdb}.txt ) |
| 31 | |
| 32 | src_configure() { |
| 33 | # Append the SYSROOT Library Path in order for the linker to find |
| 34 | # libbfd when cross-compiling. |
| 35 | append-ldflags "-L${SYSROOT}/usr/${CHOST}/lib" |
| 36 | |
| 37 | # Update the site configuration options to search for mysql_config in the SYSROOT. |
| 38 | sed -i -r \ |
| 39 | -e "s:#mysql_config = /usr/local/bin:mysql_config = ${SYSROOT}/usr/bin:" \ |
| 40 | site.cfg |
| 41 | distutils-r1_src_configure |
| 42 | } |
| 43 | |
| 44 | python_configure_all() { |
| 45 | append-flags -fno-strict-aliasing |
| 46 | } |