summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-08-03 00:00:28 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-08-03 00:00:28 +0000
commitede49f42c6355d75bccbb915c6f7e970ea82ad8e (patch)
tree43d0e6994822532dadbfdbe3b32d81b53e5c7747 /sci-libs
parentVersion bump, remove old. (diff)
downloadgentoo-2-ede49f42c6355d75bccbb915c6f7e970ea82ad8e.tar.gz
gentoo-2-ede49f42c6355d75bccbb915c6f7e970ea82ad8e.tar.bz2
gentoo-2-ede49f42c6355d75bccbb915c6f7e970ea82ad8e.zip
Version bump
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/nlopt/ChangeLog9
-rw-r--r--sci-libs/nlopt/metadata.xml10
-rw-r--r--sci-libs/nlopt/nlopt-2.3.ebuild98
3 files changed, 110 insertions, 7 deletions
diff --git a/sci-libs/nlopt/ChangeLog b/sci-libs/nlopt/ChangeLog
index df5217035616..cafb4218ea69 100644
--- a/sci-libs/nlopt/ChangeLog
+++ b/sci-libs/nlopt/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-libs/nlopt
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/ChangeLog,v 1.17 2012/07/09 17:14:28 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/ChangeLog,v 1.18 2012/08/03 00:00:28 bicatali Exp $
+
+*nlopt-2.3 (03 Aug 2012)
+
+ 03 Aug 2012; Sébastien Fabbro <bicatali@gentoo.org> +nlopt-2.3.ebuild,
+ metadata.xml:
+ Version bump
09 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> nlopt-2.2.4.ebuild:
keyword amd64-linux and x86-linux
@@ -73,4 +79,3 @@
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/metadata.xml b/sci-libs/nlopt/metadata.xml
index 76e5a4b28cea..55d520d4b3ca 100644
--- a/sci-libs/nlopt/metadata.xml
+++ b/sci-libs/nlopt/metadata.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>sci</herd>
- <longdescription lang="en">
+<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
@@ -15,7 +15,7 @@
* Algorithms for unconstrained optimization, bound-constrained
optimization, and general nonlinear inequality constraints.
</longdescription>
- <use>
- <flag name="octave">Add plugin for <pkg>sci-mathematics/octave</pkg></flag>
- </use>
+<use>
+ <flag name="octave">Add plugin for <pkg>sci-mathematics/octave</pkg></flag>
+</use>
</pkgmetadata>
diff --git a/sci-libs/nlopt/nlopt-2.3.ebuild b/sci-libs/nlopt/nlopt-2.3.ebuild
new file mode 100644
index 000000000000..e9c556820309
--- /dev/null
+++ b/sci-libs/nlopt/nlopt-2.3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/nlopt-2.3.ebuild,v 1.1 2012/08/03 00:00:28 bicatali Exp $
+
+EAPI=4
+
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="python? *"
+RESTRICT_PYTHON_ABIS="3.* 2.7-pypy-* *-jython"
+
+inherit python autotools-utils
+
+DESCRIPTION="Non-linear optimization library"
+HOMEPAGE="http://ab-initio.mit.edu/nlopt/"
+SRC_URI="${HOMEPAGE}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MIT"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="cxx guile octave python static-libs"
+
+DEPEND="
+ guile? ( dev-scheme/guile )
+ octave? ( sci-mathematics/octave )
+ python? ( dev-python/numpy )"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_prepare() {
+ if use python; then
+ sed -i \
+ -e '/^LTLIBRARIES/s:$(pyexec_LTLIBRARIES)::g' \
+ swig/Makefile.in || die
+ echo '#!/bin/sh' > py-compile
+ fi
+ epatch "${FILESDIR}"/${PN}-2.2.4-fix-nlopt_hpp-location.patch
+ eautoreconf
+}
+
+src_configure() {
+ if use octave; then
+ export OCT_INSTALL_DIR="${EPREFIX}"/usr/libexec/octave/site/oct/${CHOST}
+ export M_INSTALL_DIR="${EPREFIX}"/usr/share/octave/site/m
+ else
+ export MKOCTFILE=None
+ fi
+ myeconfargs+=(
+ $(use_with cxx)
+ $(use_with guile)
+ $(use_with octave)
+ $(use_with python)
+ --without-matlab
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ if use python; then
+ python_copy_sources swig
+ compilation() {
+ autotools-utils_src_compile \
+ PYTHON_CPPFLAGS="-I${EPREFIX}$(python_get_includedir)" \
+ PYTHON_LDFLAGS="${EPREFIX}$(python_get_library -l)" \
+ PYTHON_SITE_PKG="${EPREFIX}$(python_get_sitedir)" \
+ PYTHON_VERSION="${EPREFIX}$(python_get_version)" \
+ PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \
+ pythondir="${EPREFIX}$(python_get_sitedir)" \
+ pyexecdir="${EPREFIX}$(python_get_sitedir)"
+ }
+ python_execute_function -s --source-dir swig compilation
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use python; then
+ installation() {
+ rm *.la
+ emake DESTDIR=${D} install \
+ pyexecdir="${EPREFIX}$(python_get_sitedir)" \
+ pythondir="${EPREFIX}$(python_get_sitedir)"
+ }
+ python_execute_function -s --source-dir swig installation
+ python_clean_installation_image
+ fi
+ local r
+ for r in */README; do newdoc ${r} README.$(dirname ${r}); done
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize ${PN}.py
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup ${PN}.py
+}