summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2009-07-10 19:27:20 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2009-07-10 19:27:20 +0000
commit189bf574040c6e024ba6099c2dae2fae51b95ce5 (patch)
treef9404d914b23b40eedae705addc500478ce4465d /sci-libs
parentRun eautoreconf wrt #277345 by Fabiano Francesconi. (diff)
downloadgentoo-2-189bf574040c6e024ba6099c2dae2fae51b95ce5.tar.gz
gentoo-2-189bf574040c6e024ba6099c2dae2fae51b95ce5.tar.bz2
gentoo-2-189bf574040c6e024ba6099c2dae2fae51b95ce5.zip
Initial import
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/nlopt/ChangeLog10
-rw-r--r--sci-libs/nlopt/files/nlopt-1.0.1-qsort.patch11
-rw-r--r--sci-libs/nlopt/metadata.xml23
-rw-r--r--sci-libs/nlopt/nlopt-1.0.1.ebuild41
4 files changed, 85 insertions, 0 deletions
diff --git a/sci-libs/nlopt/ChangeLog b/sci-libs/nlopt/ChangeLog
new file mode 100644
index 000000000000..a803b9e2bf29
--- /dev/null
+++ b/sci-libs/nlopt/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sci-libs/nlopt
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/ChangeLog,v 1.1 2009/07/10 19:27:20 bicatali Exp $
+
+*nlopt-1.0.1 (10 Jul 2009)
+
+ 10 Jul 2009; Sébastien Fabbro <bicatali@gentoo.org> +nlopt-1.0.1.ebuild,
+ +files/nlopt-1.0.1-qsort.patch, +metadata.xml:
+ Initial import
+
diff --git a/sci-libs/nlopt/files/nlopt-1.0.1-qsort.patch b/sci-libs/nlopt/files/nlopt-1.0.1-qsort.patch
new file mode 100644
index 000000000000..b5d2e8a7d617
--- /dev/null
+++ b/sci-libs/nlopt/files/nlopt-1.0.1-qsort.patch
@@ -0,0 +1,11 @@
+--- util/qsort_r.c.orig 2009-07-10 20:09:49.000000000 +0100
++++ util/qsort_r.c 2009-07-10 20:11:41.000000000 +0100
+@@ -65,7 +65,7 @@
+ int (*compar)(void *, const void *, const void *))
+ {
+ #ifdef HAVE_QSORT_R
+- qsort_r(base_, nmemb, size, thunk, compar);
++#include <stdlib.h>
+ #else
+ char *base = (char *) base_;
+ if (nmemb < 10) { /* use O(nmemb^2) algorithm for small enough nmemb */
diff --git a/sci-libs/nlopt/metadata.xml b/sci-libs/nlopt/metadata.xml
new file mode 100644
index 000000000000..cfbf29b467f5
--- /dev/null
+++ b/sci-libs/nlopt/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+ NLopt is a library for nonlinear optimization,
+ providing a common interface for a number of different free
+ optimization routines available online as well as original
+ implementations of various other algorithms. Its features include:
+ * Callable from C, C++, Fortran, GNU Octave, and Matlab.
+ * A common interface for many different algorithms—try a different
+ algorithm just by changing one parameter.
+ * Both global and local optimization algorithms.
+ * Both derivative-free and gradient-based optimization algorithms.
+ * Algorithms for unconstrained optimization, bound-constrained
+ optimization, and general nonlinear inequality constraints.
+ * Free/open-source software under the GNU LGPL (and looser
+ licenses for some portions of NLopt).
+</longdescription>
+<use>
+ <flag name='octave'>Add plugin for <pkg>sci-mathematics/octave</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/sci-libs/nlopt/nlopt-1.0.1.ebuild b/sci-libs/nlopt/nlopt-1.0.1.ebuild
new file mode 100644
index 000000000000..2417fe8f98f6
--- /dev/null
+++ b/sci-libs/nlopt/nlopt-1.0.1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/nlopt-1.0.1.ebuild,v 1.1 2009/07/10 19:27:20 bicatali Exp $
+
+EAPI=2
+inherit eutils
+
+DESCRIPTION="Non-linear optimization library"
+SRC_URI="http://ab-initio.mit.edu/nlopt/${P}.tar.gz"
+HOMEPAGE="http://ab-initio.mit.edu/nlopt/"
+
+LICENSE="LGPL-2.1 MIT"
+KEYWORDS="~amd64 ~x86"
+
+SLOT="0"
+IUSE="octave cxx"
+
+DEPEND="octave? ( sci-mathematics/octave )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-qsort.patch
+}
+
+src_configure() {
+ if use octave; then
+ export OCT_INSTALL_DIR=/usr/libexec/octave/site/oct/${CHOST}
+ export M_INSTALL_DIR=/usr/share/octave/site/m
+ else
+ export MKOCTFILE=None
+ fi
+ econf \
+ --enable-shared \
+ $(use_with cxx)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README
+ for r in */README; do newdoc ${r} README.$(dirname ${r}); done
+}