Initial import to the main tree. Use system libs for cholmod and umfpack. Added a...
authorSebastien Fabbro <bicatali@gentoo.org>
Fri, 6 Jan 2012 15:40:31 +0000 (15:40 +0000)
committerSebastien Fabbro <bicatali@gentoo.org>
Fri, 6 Jan 2012 15:40:31 +0000 (15:40 +0000)
Package-Manager: portage-2.1.10.41/cvs/Linux x86_64

dev-python/cvxopt/ChangeLog [new file with mode: 0644]
dev-python/cvxopt/Manifest [new file with mode: 0644]
dev-python/cvxopt/cvxopt-1.1.4.ebuild [new file with mode: 0644]
dev-python/cvxopt/files/cvxopt-setup.patch [new file with mode: 0644]
dev-python/cvxopt/metadata.xml [new file with mode: 0644]

diff --git a/dev-python/cvxopt/ChangeLog b/dev-python/cvxopt/ChangeLog
new file mode 100644 (file)
index 0000000..f4aaa9a
--- /dev/null
@@ -0,0 +1,66 @@
+# ChangeLog for dev-python/cvxopt
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/cvxopt/ChangeLog,v 1.1 2012/01/06 15:40:31 bicatali Exp $
+
+*cvxopt-1.1.4 (06 Jan 2012)
+
+  06 Jan 2012; Sébastien Fabbro <bicatali@gentoo.org> +cvxopt-1.1.4.ebuild,
+  +files/cvxopt-setup.patch, +metadata.xml:
+  Initial import to the main tree. Use system libs for cholmod and umfpack.
+  Added a src_test and a few cleanups.
+
+  10 Jul 2011; Martin von Gagern (MvG) <Martin.vGagern@gmx.net>
+  cvxopt-1.1.3.ebuild:
+  Fix quoting issue.
+
+  20 Jun 2011; François Bissey <francois.bissey@canterbury.ac.nz>
+  -files/cvxopt-1.1.2-headers.patch, cvxopt-1.1.3.ebuild,
+  +files/cvxopt-1.1.3-blas.patch:
+  Delete useless file. Solve issue #67 by getting the right blas/lapack
+  libraries.
+
+  09 May 2011; Christopher Schwan <cschwan@students.uni-mainz.de>
+  -cvxopt-0.9.ebuild, -cvxopt-1.1.2.ebuild:
+  Removed old versions of cvxopt
+
+  29 Dec 2010; François Bissey <f.r.bissey@massey.ac.nz> cvxopt-1.1.3.ebuild:
+  better SRC_URI
+
+*cvxopt-1.1.3 (15 Oct 2010)
+
+  15 Oct 2010; François Bissey <f.r.bissey@massey.ac.nz>
+  +cvxopt-1.1.3.ebuild:
+  New version is out.
+
+  29 Sep 2010; François Bissey <f.r.bissey@massey.ac.nz>
+  cvxopt-1.1.2.ebuild:
+  Update SRC_URI
+
+  08 Sep 2010; François Bissey <f.r.bissey@massey.ac.nz> metadata.xml:
+  Fix metadata
+
+  10 Aug 2010; François Bissey <f.r.bissey@massey.ac.nz>
+  cvxopt-1.1.2.ebuild, +files/cvxopt-1.1.2-headers.patch:
+  Patch cvxopt-1.1.2 - see
+  http://trac.sagemath.org/sage_trac/ticket/6456#comment:82
+
+  18 Jul 2010; Christopher Schwan <cschwan@students.uni-mainz.de>
+  cvxopt-0.9.ebuild, cvxopt-1.1.2.ebuild:
+  Replaced NEED_PYTHON with PYTHON_DEPEND because its now deprecated
+
+  26 Mar 2010; François Bissey <f.r.bissey@massey.ac.nz> cvxopt-0.9.ebuild,
+  cvxopt-1.1.2.ebuild:
+  keywording ~ppc
+
+*cvxopt-0.9 (12 Mar 2010)
+
+  12 Mar 2010; Christopher Schwan <cschwan@students.uni-mainz.de>
+  +cvxopt-0.9.ebuild:
+  Version bump: Old version (Needed for Sage)
+
+*cvxopt-1.1.2 (30 Dec 2009)
+
+  30 Dec 2009; Christopher Schwan <cschwan@students.uni-mainz.de>
+  +cvxopt-1.1.2.ebuild, +metadata.xml:
+  Initial import. Ebuild taken from sunrise overlay and updated to 1.1.2
+
diff --git a/dev-python/cvxopt/Manifest b/dev-python/cvxopt/Manifest
new file mode 100644 (file)
index 0000000..a82e1dd
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX cvxopt-setup.patch 5067 RMD160 61346ab8ffc3f510f9a2197b4b7db05b66a712d1 SHA1 e7d1cf7dd227ffc75d31e37a83012c6fb13c1d2a SHA256 b48c06fc215205901a6b784be37b5a26e8cea1751a8a2c9c39f5fbf825adb9a0
+DIST cvxopt-1.1.4.tar.gz 2949975 RMD160 7e5ed85b27fd6298cd2919c7b914669baea3df98 SHA1 ee063b8d127a2e744f663ef1a9a37e1acdc55970 SHA256 1ac01ae510038f23751624301ec8d67bfda18a8a444b4f516c52d885a3c41792
+EBUILD cvxopt-1.1.4.ebuild 1893 RMD160 9306e5e1551a25a6a6cff3ec3788fd7ea0c3d642 SHA1 67d61502334d67fa2717bf9aceb8afd0b03069f0 SHA256 d80fa2d793744fdc84a7c4a796693c0972b9a691fce1523e15e572b34b777ef0
+MISC ChangeLog 2262 RMD160 0e7dbd27280484ea842c0aae74d0bd609cbc6d09 SHA1 09504ba4312a5d09f0ab89e463d2b0316995afce SHA256 31b133569d69dae853f7969e1d79e01b4c35d2b30dd89b4a012f918deef9dc79
+MISC metadata.xml 606 RMD160 9356ad8180dba16fff52b57865bcd696d34d495f SHA1 93a097dc5964302ae44ddaf91ce2be510ab7c1cc SHA256 7793793a25bb276c5ebb3df3355beb7cfdb5835edb806805f5d580e78d41518c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iEYEARECAAYFAk8HFfgACgkQ1ycZbhPLE2BCUgCcCRNXnd80idRjhOtLYHSvcHq9
+begAnj18AimJotSN/cjg+aei6fFA/0nc
+=VhOA
+-----END PGP SIGNATURE-----
diff --git a/dev-python/cvxopt/cvxopt-1.1.4.ebuild b/dev-python/cvxopt/cvxopt-1.1.4.ebuild
new file mode 100644 (file)
index 0000000..4360acb
--- /dev/null
@@ -0,0 +1,85 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/cvxopt/cvxopt-1.1.4.ebuild,v 1.1 2012/01/06 15:40:31 bicatali Exp $
+
+EAPI=4
+
+SUPPORT_PYTHON_ABIS=1
+RESTRICT_PYTHON_ABIS="2.4"
+
+inherit distutils eutils
+
+DESCRIPTION="Python package for convex optimization"
+HOMEPAGE="http://abel.ee.ucla.edu/cvxopt"
+SRC_URI="http://abel.ee.ucla.edu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc +dsdp examples fftw +glpk gsl"
+
+RDEPEND="virtual/blas
+       virtual/cblas
+       virtual/lapack
+       sci-libs/cholmod
+       sci-libs/umfpack
+       dsdp? ( sci-libs/dsdp )
+       fftw? ( sci-libs/fftw:3.0 )
+       glpk? ( sci-mathematics/glpk )
+       gsl? ( sci-libs/gsl )"
+DEPEND="${RDEPEND}
+       dev-util/pkgconfig
+       doc? ( dev-python/sphinx )"
+
+S="${WORKDIR}/${P}/src"
+
+src_prepare(){
+       epatch "${FILESDIR}"/${PN}-setup.patch
+       rm -rf src/C/SuiteSparse*/
+
+       pkg_lib() {
+               local pylib=\'$(pkg-config --libs-only-l ${1} | sed \
+                       -e 's/^-l//' \
+                       -e "s/ -l/\',\'/g" \
+                       -e 's/.,.pthread//g' \
+                       -e "s:  ::")\'
+               sed -i -e "s:\(libraries.*\)'${1}'\(.*\):\1${pylib}\2:g" setup.py
+       }
+
+       use_cvx() {
+               if use ${1}; then
+                       sed -i \
+                               -e "s/\(BUILD_${2^^} =\) 0/\1 1/" \
+                               setup.py || die
+               fi
+       }
+
+       pkg_lib blas
+       pkg_lib cblas
+       pkg_lib lapack
+       use_cvx gsl && pkg_lib gsl
+       use_cvx fftw && pkg_lib fftw3
+       use_cvx glpk
+       use_cvx dsdp
+       distutils_src_prepare
+}
+
+src_compile() {
+       distutils_src_compile
+       use doc && emake -C "${WORKDIR}"/doc -B "${WORKDIR}"/html
+}
+
+src_test() {
+       cd "${WORKDIR}"/${P}/examples/doc/chap8
+       testing() {
+               PYTHONPATH="$(ls -d ${S}/build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" lp.py
+       }
+       python_execute_function testing
+}
+
+src_install() {
+       distutils_src_install
+       use doc && dohtml -r "${WORKDIR}"/${P}/html
+       insinto /usr/share/doc/${PF}
+       use examples && doins -r "${WORKDIR}"/${P}/examples
+}
diff --git a/dev-python/cvxopt/files/cvxopt-setup.patch b/dev-python/cvxopt/files/cvxopt-setup.patch
new file mode 100644 (file)
index 0000000..a628cda
--- /dev/null
@@ -0,0 +1,150 @@
+--- setup.py.orig      2012-01-06 04:59:53.000000000 +0000
++++ setup.py   2012-01-06 06:21:48.000000000 +0000
+@@ -2,58 +2,58 @@
+ from glob import glob
+ # directory containing libblas and liblapack
+-ATLAS_LIB_DIR = '/usr/lib'
++ATLAS_LIB_DIR = ''
+ # Set to 1 if you are using the random number generators in the GNU
+ # Scientific Library.
+ BUILD_GSL = 0
+ # Directory containing libgsl (used only when BUILD_GSL = 1).
+-GSL_LIB_DIR = '/usr/lib'       
++GSL_LIB_DIR = ''       
+ # Directory containing the GSL header files (used only when BUILD_GSL = 1).
+-GSL_INC_DIR = '/usr/include/gsl'  
++GSL_INC_DIR = ''  
+ # Set to 1 if you are installing the fftw module.
+ BUILD_FFTW = 0
+ # Directory containing libfftw3 (used only when BUILD_FFTW = 1).
+-FFTW_LIB_DIR = '/usr/lib'       
++FFTW_LIB_DIR = ''       
+ # Directory containing fftw.h (used only when BUILD_FFTW = 1).
+-FFTW_INC_DIR = '/usr/include'  
++FFTW_INC_DIR = ''  
+ # Set to 1 if you are installing the glpk module.
+ BUILD_GLPK = 0
+ # Directory containing libglpk (used only when BUILD_GLPK = 1).
+-GLPK_LIB_DIR = '/usr/lib'       
++GLPK_LIB_DIR = ''       
+ # Directory containing glpk.h (used only when BUILD_GLPK = 1).
+-GLPK_INC_DIR = '/usr/include'  
++GLPK_INC_DIR = ''  
+ # Set to 1 if you are installing the DSDP module.
+ BUILD_DSDP = 0
+ # Directory containing libdsdp (used only when BUILD_DSDP = 1).
+-DSDP_LIB_DIR = '/usr/lib'
++DSDP_LIB_DIR = ''
+  
+ # Directory containing dsdp5.h (used only when BUILD_DSDP = 1).
+-DSDP_INC_DIR = '/usr/include'
++DSDP_INC_DIR = ''
+ extmods = []
+ # optional modules
+ if BUILD_GSL:
+-    gsl = Extension('gsl', libraries = ['m', 'gsl', 'blas'],
++    gsl = Extension('gsl', libraries = ['gsl'],
+         include_dirs = [ GSL_INC_DIR ],
+         library_dirs = [ GSL_LIB_DIR ],
+         sources = ['C/gsl.c'] )
+     extmods += [gsl];
+ if BUILD_FFTW:
+-    fftw = Extension('fftw', libraries = ['fftw3', 'blas'],
++    fftw = Extension('fftw', libraries = ['fftw3'],
+         include_dirs = [ FFTW_INC_DIR ],
+         library_dirs = [ FFTW_LIB_DIR, ATLAS_LIB_DIR ],
+         sources = ['C/fftw.c'] )
+@@ -67,7 +67,7 @@
+     extmods += [glpk];
+ if BUILD_DSDP:
+-    dsdp = Extension('dsdp', libraries = ['dsdp', 'blas', 'lapack'],
++    dsdp = Extension('dsdp', libraries = ['dsdp'],
+         include_dirs = [ DSDP_INC_DIR ],
+         library_dirs = [ DSDP_LIB_DIR, ATLAS_LIB_DIR ],
+         sources = ['C/dsdp.c'] )
+@@ -85,7 +85,7 @@
+ else:    
+     MACROS = []
+-base = Extension('base', libraries = ['m','lapack','blas'],
++base = Extension('base', libraries = ['lapack'],
+     library_dirs = [ ATLAS_LIB_DIR ],
+     define_macros = MACROS,
+     sources = ['C/base.c','C/dense.c','C/sparse.c']) 
+@@ -95,22 +95,16 @@
+     define_macros = MACROS,
+     sources = ['C/blas.c'] )
+-lapack = Extension('lapack', libraries = ['lapack','blas'],
++lapack = Extension('lapack', libraries = ['lapack'],
+     library_dirs = [ ATLAS_LIB_DIR ],
+     define_macros = MACROS,
+     sources = ['C/lapack.c'] )
+ umfpack = Extension('umfpack', 
+-    include_dirs = [ 'C/SuiteSparse/UMFPACK/Include',
+-        'C/SuiteSparse/AMD/Include', 'C/SuiteSparse/AMD/Source', 
+-        'C/SuiteSparse/UFconfig' ],
+     library_dirs = [ ATLAS_LIB_DIR ],
+     define_macros = MACROS,
+-    libraries = [ 'blas', 'lapack'],
+-    sources = [ 'C/umfpack.c',
+-        'C/SuiteSparse/UMFPACK/Source/umfpack_global.c',
+-        'C/SuiteSparse/UMFPACK/Source/umfpack_tictoc.c' ] +
+-        glob('C/SuiteSparse_cvxopt_extra/umfpack/*'))
++    libraries = [ 'umfpack' ],
++    sources = [ 'C/umfpack.c' ])
+ # Build for int or long? 
+ import sys
+@@ -118,28 +112,16 @@
+ cholmod = Extension('cholmod',
+     library_dirs = [ ATLAS_LIB_DIR ],
+-    libraries = ['lapack', 'blas'],
+-    include_dirs = [ 'C/SuiteSparse/CHOLMOD/Include', 
+-        'C/SuiteSparse/COLAMD', 'C/SuiteSparse/AMD/Include', 
+-        'C/SuiteSparse/UFconfig', 'C/SuiteSparse/COLAMD/Include' ],
++    libraries = ['cholmod' ],
+     define_macros = MACROS + [('NPARTITION', '1')],
+-    sources = [ 'C/cholmod.c' ] + 
+-        ['C/SuiteSparse/AMD/Source/' + s for s in ['amd_global.c',
+-            'amd_postorder.c', 'amd_post_tree.c', 'amd_2.c']] +
+-        ['C/SuiteSparse/COLAMD/Source/' + s for s in ['colamd.c',
+-            'colamd_global.c']] +
+-        glob('C/SuiteSparse/CHOLMOD/Core/c*.c') +
+-        glob('C/SuiteSparse/CHOLMOD/Cholesky/c*.c') +
+-        ['C/SuiteSparse/CHOLMOD/Check/cholmod_check.c'] +
+-        glob('C/SuiteSparse/CHOLMOD/Supernodal/c*.c') )
++    sources = [ 'C/cholmod.c' ])
+ amd = Extension('amd', 
+-    include_dirs = [ 'C/SuiteSparse/AMD/Include', 
+-        'C/SuiteSparse/UFconfig' ],
+     define_macros = MACROS,
+-    sources = [ 'C/amd.c' ] + glob('C/SuiteSparse/AMD/Source/*.c') )
++    libraries = [ 'amd' ],
++    sources = [ 'C/amd.c' ])
+-misc_solvers = Extension('misc_solvers', libraries = ['lapack', 'blas'],
++misc_solvers = Extension('misc_solvers', libraries = ['lapack'],
+     library_dirs = [ ATLAS_LIB_DIR ],
+     define_macros = MACROS,
+     sources = ['C/misc_solvers.c'] )
diff --git a/dev-python/cvxopt/metadata.xml b/dev-python/cvxopt/metadata.xml
new file mode 100644 (file)
index 0000000..a58f874
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-mathematics</herd>
+<longdescription lang='en'>
+  CVXOPT is a software for convex optimization based on
+  the Python programming language. Its main purpose is to make the
+  development of software for convex optimization applications
+  straightforward.
+</longdescription>
+<use>
+  <flag name='glpk'>Use GNU Linear Programming Kit
+  <pkg>sci-mathematics/glpk</pkg></flag>
+  <flag name='dsdp'>Use interior point library
+  <pkg>sci-libs/dsdp</pkg></flag>
+</use>
+</pkgmetadata>