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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Jan 17 18:28:45 2012 UTC (6 years, 7 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Fixed missing components (bug #399029, thanks Francois Bissey), removed useless seds and fixed optional sed's

(Portage version: 2.1.10.41/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.ebuild,v 1.2 2012/01/16 20:35:26 bicatali Exp $
4
5 EAPI=4
6
7 SUPPORT_PYTHON_ABIS=1
8 RESTRICT_PYTHON_ABIS="2.4"
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 dev-util/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
40 pkg_lib() {
41 local pylib=\'$(pkg-config --libs-only-l ${1} | sed \
42 -e 's/^-l//' \
43 -e "s/ -l/\',\'/g" \
44 -e 's/.,.pthread//g' \
45 -e "s: ::")\'
46 sed -i -e "s:\(libraries.*\)'${1}'\(.*\):\1${pylib}\2:g" setup.py
47 }
48
49 use_cvx() {
50 if use ${1}; then
51 sed -i \
52 -e "s/\(BUILD_${2^^} =\) 0/\1 1/" \
53 setup.py || die
54 fi
55 }
56
57 pkg_lib blas
58 pkg_lib cblas
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