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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Jun 19 05:41:47 2013 UTC (5 years, 6 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Version bump

(Portage version: 2.2.01.22013-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)

1 # Copyright 1999-2013 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.5.ebuild,v 1.4 2013/02/26 20:33:17 jlec 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 toolchain-funcs
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="
22 virtual/blas
23 virtual/cblas
24 virtual/lapack
25 sci-libs/cholmod
26 sci-libs/umfpack
27 dsdp? ( sci-libs/dsdp )
28 fftw? ( sci-libs/fftw:3.0 )
29 glpk? ( sci-mathematics/glpk )
30 gsl? ( sci-libs/gsl )"
31 DEPEND="${RDEPEND}
32 virtual/pkgconfig
33 doc? ( dev-python/sphinx )"
34
35 S="${WORKDIR}/${P}/src"
36
37 src_prepare(){
38 epatch "${FILESDIR}"/${P}-setup.patch
39 rm -rf src/C/SuiteSparse*/
40 rm -rf ../doc/build # 413905
41
42 pkg_lib() {
43 local pylib=\'$($(tc-getPKG_CONFIG) --libs-only-l ${1} | sed \
44 -e 's/^-l//' \
45 -e "s/ -l/\',\'/g" \
46 -e 's/.,.pthread//g' \
47 -e "s: ::")\'
48 sed -i -e "/_LIB = /s:\(.*\)'${1}'\(.*\):\1${pylib}\2:" setup.py
49 }
50
51 use_cvx() {
52 if use ${1}; then
53 sed -i \
54 -e "s/\(BUILD_${1^^} =\) 0/\1 1/" \
55 setup.py || die
56 fi
57 }
58
59 pkg_lib blas
60 pkg_lib lapack
61 use_cvx gsl
62 use_cvx fftw
63 use_cvx glpk
64 use_cvx dsdp
65 distutils_src_prepare
66 }
67
68 src_compile() {
69 distutils_src_compile
70 use doc && emake -C "${WORKDIR}"/${P}/doc -B html
71 }
72
73 src_test() {
74 cd "${WORKDIR}"/${P}/examples/doc/chap8
75 testing() {
76 PYTHONPATH="$(ls -d ${S}/build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" lp.py
77 }
78 python_execute_function testing
79 }
80
81 src_install() {
82 distutils_src_install
83 use doc && dohtml -r "${WORKDIR}"/${P}/doc/build/html/*
84 insinto /usr/share/doc/${PF}
85 use examples && doins -r "${WORKDIR}"/${P}/examples
86 }

  ViewVC Help
Powered by ViewVC 1.1.20