/[gentoo-x86]/dev-python/cvxopt/cvxopt-1.1.4-r1.ebuild
Gentoo

Contents of /dev-python/cvxopt/cvxopt-1.1.4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sat May 26 14:56:34 2012 UTC (2 years, 6 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
fixed typo. removed old

(Portage version: 2.1.10.60/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/cvxopt/cvxopt-1.1.4-r1.ebuild,v 1.4 2012/05/04 15:12:12 patrick Exp $
4
5 EAPI=4
6
7 SUPPORT_PYTHON_ABIS=1
8 RESTRICT_PYTHON_ABIS="2.4 2.5 *-jython 2.7-pypy-*"
9
10 inherit distutils eutils
11
12 DESCRIPTION="Python package for convex optimization"
13 HOMEPAGE="http://abel.ee.ucla.edu/cvxopt"
14 SRC_URI="http://abel.ee.ucla.edu/${PN}/${P}.tar.gz"
15
16 LICENSE="GPL-3"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
19 IUSE="doc +dsdp examples fftw +glpk gsl"
20
21 RDEPEND="virtual/blas
22 virtual/cblas
23 virtual/lapack
24 sci-libs/cholmod
25 sci-libs/umfpack
26 dsdp? ( sci-libs/dsdp )
27 fftw? ( sci-libs/fftw:3.0 )
28 glpk? ( sci-mathematics/glpk )
29 gsl? ( sci-libs/gsl )"
30 DEPEND="${RDEPEND}
31 virtual/pkgconfig
32 doc? ( dev-python/sphinx )"
33
34 S="${WORKDIR}/${P}/src"
35
36 src_prepare(){
37 epatch "${FILESDIR}"/${PN}-setup.patch
38 rm -rf src/C/SuiteSparse*/
39 rm -rf ../doc/build # 413905
40
41 pkg_lib() {
42 local pylib=\'$(pkg-config --libs-only-l ${1} | sed \
43 -e 's/^-l//' \
44 -e "s/ -l/\',\'/g" \
45 -e 's/.,.pthread//g' \
46 -e "s: ::")\'
47 sed -i -e "s:\(libraries.*\)'${1}'\(.*\):\1${pylib}\2:g" setup.py
48 }
49
50 use_cvx() {
51 if use ${1}; then
52 sed -i \
53 -e "s/\(BUILD_${1^^} =\) 0/\1 1/" \
54 setup.py || die
55 fi
56 }
57
58 pkg_lib blas
59 pkg_lib lapack
60 use_cvx gsl && pkg_lib gsl
61 use_cvx fftw && pkg_lib fftw3
62 use_cvx glpk
63 use_cvx dsdp
64 distutils_src_prepare
65 }
66
67 src_compile() {
68 distutils_src_compile
69 use doc && emake -C "${WORKDIR}"/${P}/doc -B html
70 }
71
72 src_test() {
73 cd "${WORKDIR}"/${P}/examples/doc/chap8
74 testing() {
75 PYTHONPATH="$(ls -d ${S}/build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" lp.py
76 }
77 python_execute_function testing
78 }
79
80 src_install() {
81 distutils_src_install
82 use doc && dohtml -r "${WORKDIR}"/${P}/doc/build/html/*
83 insinto /usr/share/doc/${PF}
84 use examples && doins -r "${WORKDIR}"/${P}/examples
85 }

  ViewVC Help
Powered by ViewVC 1.1.20