diff options
author | 2012-07-16 15:21:03 -0700 | |
---|---|---|
committer | 2012-07-16 15:21:03 -0700 | |
commit | 2c6969568881d0a7694a2fcb571c9e05be14db6b (patch) | |
tree | b4bf381ab084622e967b42e83411d755f12228b8 /sci-libs/coinor-clp | |
parent | sci-libs/coinor-dylp: Initial import (diff) | |
download | sci-2c6969568881d0a7694a2fcb571c9e05be14db6b.tar.gz sci-2c6969568881d0a7694a2fcb571c9e05be14db6b.tar.bz2 sci-2c6969568881d0a7694a2fcb571c9e05be14db6b.zip |
sci-libs/coinor-clp: Initial import
(Portage version: 2.2.01.20757-prefix/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)
Diffstat (limited to 'sci-libs/coinor-clp')
-rw-r--r-- | sci-libs/coinor-clp/ChangeLog | 9 | ||||
-rw-r--r-- | sci-libs/coinor-clp/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/coinor-clp/coinor-clp-1.14.6.ebuild | 111 | ||||
-rw-r--r-- | sci-libs/coinor-clp/metadata.xml | 20 |
4 files changed, 141 insertions, 0 deletions
diff --git a/sci-libs/coinor-clp/ChangeLog b/sci-libs/coinor-clp/ChangeLog new file mode 100644 index 000000000..337fc41c7 --- /dev/null +++ b/sci-libs/coinor-clp/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sci-libs/coinor-clp +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*coinor-clp-1.14.6 (16 Jul 2012) + + 16 Jul 2012; SĂ©bastien Fabbro <bicatali@gentoo.org> +coinor-clp-1.14.6.ebuild, + +metadata.xml: + sci-libs/coinor-clp: Initial import diff --git a/sci-libs/coinor-clp/Manifest b/sci-libs/coinor-clp/Manifest new file mode 100644 index 000000000..43a8ae4dd --- /dev/null +++ b/sci-libs/coinor-clp/Manifest @@ -0,0 +1 @@ +DIST Clp-1.14.6.tgz 5141028 SHA256 971a5fe3e5a2c79d31361d0e920c67c129e428fbe1cb581dd7cede84620b1c23 SHA512 8a6a4c220852cccca6cf17deb39dd310cc354789af634a42089bb7f35b251b087155d47cdcce53206705d0997ed236af9b7897073a6d23ceb604ba48061db646 WHIRLPOOL 7587717c5ab507ce113f528826a2e652691ea0eb4cda74a78d7cc0cf40a400a59e3b59ed7b343c423eb36ba4ee5cd2d4ec61b10e61e8f25dd3c4d6a937f41659 diff --git a/sci-libs/coinor-clp/coinor-clp-1.14.6.ebuild b/sci-libs/coinor-clp/coinor-clp-1.14.6.ebuild new file mode 100644 index 000000000..830ae2e2d --- /dev/null +++ b/sci-libs/coinor-clp/coinor-clp-1.14.6.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit autotools-utils multilib + +MYPN=Clp + +DESCRIPTION="COIN-OR Linear Programming solver" +HOMEPAGE="https://projects.coin-or.org/Clp/" +SRC_URI="http://www.coin-or.org/download/source/${MYPN}/${MYPN}-${PV}.tgz" + +LICENSE="EPL-1.0" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples glpk metis mumps sparse static-libs test" + +RDEPEND="sci-libs/coinor-osi + sci-libs/coinor-utils + glpk? ( sci-mathematics/glpk ) + metis? ( || ( sci-libs/metis sci-libs/parmetis ) ) + mumps? ( sci-libs/mumps )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen[dot] ) + test? ( sci-libs/coinor-sample )" + +S="${WORKDIR}/${MYPN}-${PV}/${MYPN}" + +src_prepare() { + # as-needed fix + # hack to avoid eautoreconf (coinor has its own weird autotools) + sed -i \ + -e 's:\(libOsiClp_la_LIBADD.*=\).*:\1 $(top_builddir)/src/libClp.la:g' \ + src/OsiClp/Makefile.in || die + sed -i \ + -e 's:\(libClp_la_LIBADD.*=\).*:\1 @CLPLIB_LIBS@:g' \ + src/Makefile.in || die + + if has_version sci-libs/mumps[-mpi]; then + ln -s "${EPREFIX}"/usr/include/mpiseq/mpi.h src/mpi.h + elif has_version sci-libs/mumps[mpi]; then + export CXX=mpicxx + fi +} + +src_configure() { + local myeconfargs=( + $(use_with doc dot) + ) + if use glpk; then + myeconfargs+=( + --with-glpk-incdir="${EPREFIX}"/usr/include + --with-glpk-lib=-lglpk ) + else + myeconfargs+=( --without-glpk ) + fi + if use sparse; then + myeconfargs+=( + --with-amd-incdir="${EPREFIX}"/usr/include + --with-amd-lib=-lamd + --with-cholmod-incdir="${EPREFIX}"/usr/include + --with-cholmod-lib=-lcholmod ) + else + myeconfargs+=( --without-amd --without-cholmod ) + fi + if use metis; then + myeconfargs+=( + --with-metis-incdir="$(pkg-config --cflags metis | sed s/-I//)" + --with-metis-lib="$(pkg-config --libs metis)" ) + else + myeconfargs+=( --without-metis ) + fi + if use mumps; then + myeconfargs+=( + --with-mumps-incdir="${EPREFIX}"/usr/include + --with-mumps-lib="-lmumps_common -ldmumps -lzmumps -lsmumps -lcmumps" ) + else + myeconfargs+=( --without-mumps ) + fi + + PKG_CONFIG_PATH+="${ED}"/usr/$(get_libdir)/pkgconfig \ + autotools-utils_src_configure +} + +src_compile() { + # hack for parallel build, to overcome not patching Makefile.am above + autotools-utils_src_compile -C src libClp.la + autotools-utils_src_compile all $(use doc && echo doxydoc) +} + +src_test() { + pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null || die + emake test + popd > /dev/null || die +} + +src_install() { + use doc && HTML_DOC=("${AUTOTOOLS_BUILD_DIR}/doxydocs/html/") + # hack for parallel install, to overcome not patching Makefile.am above + autotools-utils_src_install -C src install-am + autotools-utils_src_install + # already installed + rm "${ED}"/usr/share/coin/doc/${MYPN}/{README,AUTHORS,LICENSE} || die + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +} diff --git a/sci-libs/coinor-clp/metadata.xml b/sci-libs/coinor-clp/metadata.xml new file mode 100644 index 000000000..8c7fb9886 --- /dev/null +++ b/sci-libs/coinor-clp/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +<longdescription lang="en"> + Clp (Coin-or linear programming) is an open-source linear + programming solver written in C++. It is primarily meant to be used + as a callable library, but a basic, stand-alone executable version + is also available. It is designed to find solutions of constrained + linear mathematical optimization problems. +</longdescription> +<use> + <flag name='glpk'>Enable GNU Linear Programming Kit + <pkg>sci-mathematics/glpk</pkg> support</flag> + <flag name='metis'>Enable partitioning with + <pkg>sci-libs/metis</pkg></flag> + <flag name='mumps'>Enable <pkg>sci-libs/mumps</pkg> support</flag> + <flag name='sparse'>Enable support for sparse matrix with <pkg>sci-libs/cholmod</pkg></flag> +</use> +</pkgmetadata> |