diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2014-06-09 04:12:12 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2014-06-09 04:12:12 +0000 |
commit | ba6581da25122727616142adb313631e873c9a9a (patch) | |
tree | fedef6c0045e3beae0c2ec26e9d7f57a37536d6a /sci-libs/nlopt | |
parent | ported 9999 to distutils-r1, fixed deps (diff) | |
download | gentoo-2-ba6581da25122727616142adb313631e873c9a9a.tar.gz gentoo-2-ba6581da25122727616142adb313631e873c9a9a.tar.bz2 gentoo-2-ba6581da25122727616142adb313631e873c9a9a.zip |
Version bump. Worked out some kind of multibuild for both C and C++ libraries
(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-libs/nlopt')
-rw-r--r-- | sci-libs/nlopt/ChangeLog | 10 | ||||
-rw-r--r-- | sci-libs/nlopt/metadata.xml | 12 | ||||
-rw-r--r-- | sci-libs/nlopt/nlopt-2.4.2.ebuild | 103 |
3 files changed, 117 insertions, 8 deletions
diff --git a/sci-libs/nlopt/ChangeLog b/sci-libs/nlopt/ChangeLog index c9315edb51ef..363a7656784b 100644 --- a/sci-libs/nlopt/ChangeLog +++ b/sci-libs/nlopt/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/nlopt -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/ChangeLog,v 1.22 2013/04/24 12:20:01 jlec Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/ChangeLog,v 1.23 2014/06/09 04:12:12 bicatali Exp $ + +*nlopt-2.4.2 (09 Jun 2014) + + 09 Jun 2014; Sébastien Fabbro <bicatali@gentoo.org> +nlopt-2.4.2.ebuild, + metadata.xml: + Version bump. Worked out some kind of multibuild for both C and C++ libraries 24 Apr 2013; Justin Lecher <jlec@gentoo.org> nlopt-2.2.4.ebuild, nlopt-2.3-r1.ebuild, nlopt-2.3-r2.ebuild, metadata.xml: diff --git a/sci-libs/nlopt/metadata.xml b/sci-libs/nlopt/metadata.xml index 4b343041281b..41afd070ac46 100644 --- a/sci-libs/nlopt/metadata.xml +++ b/sci-libs/nlopt/metadata.xml @@ -1,13 +1,13 @@ <?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 implementations of various other algorithms. Its features include: - * Callable from variety of languages (C, C++, Fortran, Python, Octave,...) + * Callable from variety of languages (C, C++, Fortran, Python, Octave) * A common interface for many different algorithms—try a different algorithm just by changing one parameter. * Both global and local optimization algorithms. @@ -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.4.2.ebuild b/sci-libs/nlopt/nlopt-2.4.2.ebuild new file mode 100644 index 000000000000..b8e6e74b462b --- /dev/null +++ b/sci-libs/nlopt/nlopt-2.4.2.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/nlopt-2.4.2.ebuild,v 1.1 2014/06/09 04:12:12 bicatali Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_7} ) +AUTOTOOLS_AUTORECONF=1 + +inherit python-r1 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" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +DEPEND=" + guile? ( dev-scheme/guile ) + octave? ( sci-mathematics/octave ) + python? ( dev-python/numpy[${PYTHON_USEDEP}] )" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3-pkgconfig.patch + "${FILESDIR}"/${PN}-2.3-as-needed.patch +) + +src_prepare() { + autotools-utils_src_prepare + use cxx && BUILD_CXX="${S}_cxx" + use python && python_copy_sources +} + +src_configure() { + if use octave; then + export OCT_INSTALL_DIR="$(octave-config -p LOCALOCTFILEDIR)" + export M_INSTALL_DIR="$(octave-config -p LOCALFCNFILEDIR)" + + else + export MKOCTFILE=None + fi + local myeconfargs=( + $(use_with guile) + ) + if use python; then + python_foreach_impl run_in_build_dir autotools-utils_src_configure + else + autotools-utils_src_configure + fi + if use cxx; then + myeconfargs+=( --with-cxx --without-octave --without-python ) + BUILD_DIR="${BUILD_CXX}" autotools-utils_src_configure + fi +} + +src_compile() { + if use python; then + python_foreach_impl run_in_build_dir autotools-utils_src_compile + else + autotools-utils_src_compile + fi + use cxx && BUILD_DIR="${BUILD_CXX}" autotools-utils_src_compile + #-C "${BUILD_DIR}_cxx" +} + +src_test() { + do_test() { + local a f + cd "${BUILD_DIR}"/test + for a in {1..7}; do + for f in {5..9}; do + ./testopt -a $a -o $f || die "algorithm $a function $f failed" + done + done + } + if use python; then + python_foreach_impl run_in_build_dir do_test + else + do_test + fi + cd "${BUILD_CXX}"/test + for a in {1..9}; do + for f in {5..9}; do + ./testopt -a $a -o $f || die "algorithm $a function $f failed" + done + done +} + +src_install() { + # build cxx first so the c lib overwrites the pc file + use cxx && BUILD_DIR="${BUILD_CXX}" autotools-utils_src_install + if use python; then + python_foreach_impl run_in_build_dir autotools-utils_src_install + else + autotools-utils_src_install + fi + local r + for r in */README; do newdoc ${r} README.$(dirname ${r}); done +} |