public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sebastien Fabbro" <bicatali@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/coinor-clp/
Date: Mon, 16 Jul 2012 23:21:41 +0000 (UTC)	[thread overview]
Message-ID: <1342477263.2c6969568881d0a7694a2fcb571c9e05be14db6b.bicatali@gentoo> (raw)

commit:     2c6969568881d0a7694a2fcb571c9e05be14db6b
Author:     Sebastien Fabbro <sfabbro <AT> uvic <DOT> ca>
AuthorDate: Mon Jul 16 22:21:03 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Mon Jul 16 22:21:03 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2c696956

sci-libs/coinor-clp: Initial import

(Portage version: 2.2.01.20757-prefix/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 sci-libs/coinor-clp/ChangeLog                |    9 ++
 sci-libs/coinor-clp/coinor-clp-1.14.6.ebuild |  111 ++++++++++++++++++++++++++
 sci-libs/coinor-clp/metadata.xml             |   20 +++++
 3 files changed, 140 insertions(+), 0 deletions(-)

diff --git a/sci-libs/coinor-clp/ChangeLog b/sci-libs/coinor-clp/ChangeLog
new file mode 100644
index 0000000..337fc41
--- /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/coinor-clp-1.14.6.ebuild b/sci-libs/coinor-clp/coinor-clp-1.14.6.ebuild
new file mode 100644
index 0000000..830ae2e
--- /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 0000000..8c7fb98
--- /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>



             reply	other threads:[~2012-07-16 23:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16 23:21 Sebastien Fabbro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-29 22:30 [gentoo-commits] proj/sci:master commit in: sci-libs/coinor-clp/ Sebastien Fabbro
2013-05-26 17:38 Sebastien Fabbro
2013-12-08  5:00 Sebastien Fabbro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342477263.2c6969568881d0a7694a2fcb571c9e05be14db6b.bicatali@gentoo \
    --to=bicatali@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox