diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-03 17:43:29 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2012-08-03 17:43:29 +0000 |
commit | 6a7e5beb698f5552f2237d5fcc5871f4ad0fde0a (patch) | |
tree | cfc868e05f9b46f50b86038e8c6433e7091bb388 /sci-libs/nlopt | |
parent | keyword amd64-linux x86-linux (diff) | |
download | gentoo-2-6a7e5beb698f5552f2237d5fcc5871f4ad0fde0a.tar.gz gentoo-2-6a7e5beb698f5552f2237d5fcc5871f4ad0fde0a.tar.bz2 gentoo-2-6a7e5beb698f5552f2237d5fcc5871f4ad0fde0a.zip |
Fixed for as-needed, fixed pkg-config file when cxx is enabled, introduce testing, restrict python-3, use autotools-utils all the way
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/nlopt')
-rw-r--r-- | sci-libs/nlopt/ChangeLog | 10 | ||||
-rw-r--r-- | sci-libs/nlopt/files/nlopt-2.3-as-needed.patch | 23 | ||||
-rw-r--r-- | sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch | 10 | ||||
-rw-r--r-- | sci-libs/nlopt/nlopt-2.3-r1.ebuild (renamed from sci-libs/nlopt/nlopt-2.3.ebuild) | 29 |
4 files changed, 64 insertions, 8 deletions
diff --git a/sci-libs/nlopt/ChangeLog b/sci-libs/nlopt/ChangeLog index cafb4218ea69..d1df8e65bb2c 100644 --- a/sci-libs/nlopt/ChangeLog +++ b/sci-libs/nlopt/ChangeLog @@ -1,6 +1,14 @@ # 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.18 2012/08/03 00:00:28 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/ChangeLog,v 1.19 2012/08/03 17:43:29 bicatali Exp $ + +*nlopt-2.3-r1 (03 Aug 2012) + + 03 Aug 2012; Sébastien Fabbro <bicatali@gentoo.org> + +files/nlopt-2.3-as-needed.patch, +files/nlopt-2.3-pkgconfig.patch, + +nlopt-2.3-r1.ebuild, -nlopt-2.3.ebuild: + Fixed for as-needed, fixed pkg-config file when cxx is enabled, introduce + testing, restrict python-3, use autotools-utils all the way *nlopt-2.3 (03 Aug 2012) diff --git a/sci-libs/nlopt/files/nlopt-2.3-as-needed.patch b/sci-libs/nlopt/files/nlopt-2.3-as-needed.patch new file mode 100644 index 000000000000..928ec174b771 --- /dev/null +++ b/sci-libs/nlopt/files/nlopt-2.3-as-needed.patch @@ -0,0 +1,23 @@ +diff -Nur nlopt-2.3.orig/Makefile.am nlopt-2.3/Makefile.am +--- nlopt-2.3.orig/Makefile.am 2012-08-03 02:07:09.000000000 +0100 ++++ nlopt-2.3/Makefile.am 2012-08-03 02:13:13.000000000 +0100 +@@ -25,6 +25,7 @@ + + if WITH_CXX + libnlopt@NLOPT_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ ++libnlopt@NLOPT_SUFFIX@_la_LIBADD += -lstdc++ + else + libnlopt@NLOPT_SUFFIX@_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ + endif +diff -Nur nlopt-2.3.orig/swig/Makefile.am nlopt-2.3/swig/Makefile.am +--- nlopt-2.3.orig/swig/Makefile.am 2012-08-03 02:07:09.000000000 +0100 ++++ nlopt-2.3/swig/Makefile.am 2012-08-03 03:04:30.000000000 +0100 +@@ -9,7 +9,7 @@ + # Guile wrapper + + libnlopt@NLOPT_SUFFIX@_guile_la_SOURCES = nlopt-guile.cpp +-libnlopt@NLOPT_SUFFIX@_guile_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la ++libnlopt@NLOPT_SUFFIX@_guile_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la @GUILE_LIBS@ + libnlopt@NLOPT_SUFFIX@_guile_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ + libnlopt@NLOPT_SUFFIX@_guile_la_CPPFLAGS = $(GUILE_CPPFLAGS) -I$(top_builddir)/api + diff --git a/sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch b/sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch new file mode 100644 index 000000000000..8a072b15e2e2 --- /dev/null +++ b/sci-libs/nlopt/files/nlopt-2.3-pkgconfig.patch @@ -0,0 +1,10 @@ +--- nlopt.pc.in.orig 2012-08-03 01:41:30.000000000 +0100 ++++ nlopt.pc.in 2012-08-03 01:42:29.000000000 +0100 +@@ -6,5 +6,6 @@ + Name: NLopt + Description: nonlinear optimization libary + Version: @VERSION@ +-Libs: -L${libdir} -lnlopt -lm ++Libs: -L${libdir} -lnlopt@NLOPT_SUFFIX@ ++Libs.private: -lm + Cflags: -I${includedir} diff --git a/sci-libs/nlopt/nlopt-2.3.ebuild b/sci-libs/nlopt/nlopt-2.3-r1.ebuild index e9c556820309..1ec445c23993 100644 --- a/sci-libs/nlopt/nlopt-2.3.ebuild +++ b/sci-libs/nlopt/nlopt-2.3-r1.ebuild @@ -1,14 +1,15 @@ # 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 $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/nlopt/nlopt-2.3-r1.ebuild,v 1.1 2012/08/03 17:43:29 bicatali Exp $ EAPI=4 SUPPORT_PYTHON_ABIS="1" PYTHON_DEPEND="python? *" RESTRICT_PYTHON_ABIS="3.* 2.7-pypy-* *-jython" +AUTOTOOLS_AUTORECONF=1 -inherit python autotools-utils +inherit autotools-utils python DESCRIPTION="Non-linear optimization library" HOMEPAGE="http://ab-initio.mit.edu/nlopt/" @@ -25,17 +26,21 @@ DEPEND=" python? ( dev-python/numpy )" RDEPEND="${DEPEND}" -AUTOTOOLS_IN_SOURCE_BUILD=1 +PATCHES=( + "${FILESDIR}"/${PN}-2.2.4-fix-nlopt_hpp-location.patch + "${FILESDIR}"/${PN}-2.3-pkgconfig.patch + "${FILESDIR}"/${PN}-2.3-as-needed.patch +) src_prepare() { + autotools-utils_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 + use python && python_src_prepare } src_configure() { @@ -45,12 +50,11 @@ src_configure() { else export MKOCTFILE=None fi - myeconfargs+=( + local myeconfargs=( $(use_with cxx) $(use_with guile) $(use_with octave) $(use_with python) - --without-matlab ) autotools-utils_src_configure } @@ -73,10 +77,21 @@ src_compile() { fi } +src_test() { + cd "${AUTOTOOLS_BUILD_DIR}"/test + local a f + 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() { autotools-utils_src_install if use python; then installation() { + cd "${AUTOTOOLS_BUILD_DIR}" rm *.la emake DESTDIR=${D} install \ pyexecdir="${EPREFIX}$(python_get_sitedir)" \ |