summaryrefslogtreecommitdiff
path: root/sci-libs/nlopt
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/nlopt')
-rw-r--r--sci-libs/nlopt/Manifest2
-rw-r--r--sci-libs/nlopt/nlopt-2.6.2.ebuild95
2 files changed, 97 insertions, 0 deletions
diff --git a/sci-libs/nlopt/Manifest b/sci-libs/nlopt/Manifest
index c503ace00d75..6f40d8de381d 100644
--- a/sci-libs/nlopt/Manifest
+++ b/sci-libs/nlopt/Manifest
@@ -3,5 +3,7 @@ AUX nlopt-2.3-pkgconfig.patch 318 BLAKE2B 3569931fb9e2fceebf46c542e10fcd2562c8ac
AUX nlopt-2.4.2-fix-dynamic-underlinking.patch 2522 BLAKE2B 5cdb8ea93cb44c25b1814431962259727c5c4dc97b4cf78d239189187f953a4b9458849a9afe77979841768b78226c6218ecc531328cb5752d26b9df63468ee5 SHA512 bdb07b216ffb68b68cb3f03076336234c558db3953c48b02511883bf9fb12f5915c04950a2e3222577c7af4fb1e288a165af2e8adf211fc853e747c98a65cd19
AUX nlopt-2.4.2-octave-4-map.patch 1858 BLAKE2B 34b1696762a9690a5ef5f3abc265b37d5de2f92b29e514952aa062faf1553a77ed3dba6f2abf7c8f1f7cbcc1cc63c9546967f3a317a773aa5e7c5c1e9c13f7e3 SHA512 00c45fe04fdc1acf4ccbb77aaf39feab0cb2b811b45edf791db7e87aa9e965c23b6131400eebd68335be8dcb86f346c01892e718f739f07dc0853b3dd9ea5ad4
DIST nlopt-2.4.2.tar.gz 2361992 BLAKE2B c1c9f533c7e7b3bb61e81343ebd26b87e05434fdbea1f347fc5f6a6c10160289ce105a51c6540296f3f1d122d31b415452da49b84516cd13fabc73372e4cfd0e SHA512 136aacc00a69f77e8a7ce5dc26a5f3f027bc8c01b97aa1f43919462e0a412154eabfb01be258e082dffe61f9b554bb2bfbb550a7b82c7c77c7b22874a64a9703
+DIST v2.6.2.tar.gz 2040229 BLAKE2B f1f4124de574600ddbef8a885bbdd3a4f57b469b2f958ce94bbc831cf9bfa8a845e438fccfe4ab219a73a5675b8d880f6d49e0e7cbe9d0966777b0d2344521d4 SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b
EBUILD nlopt-2.4.2-r2.ebuild 2714 BLAKE2B 3939763ab3da6e8708c10b3ca39f1c001f2d9913e883648cade9d58b83c3242804991373fdd36599474715840562533881c8ab0ffd98cda54ad71d3d4c12cbe4 SHA512 c2a7e3336ccb1887c2c6074aed5fffb254dd11e607d871bd3ed864794d04cdfb7a3aff711b8cb5f7f0a98629f34a196f4f5fa7221f5c07324b2439b48cc9e5c9
+EBUILD nlopt-2.6.2.ebuild 1962 BLAKE2B dafee2481e89c71e5c55cb0480358754ee82fd9486f85a751485cfdfdeb0743119d6e7ac3cdfe10f85076eed564507296a6e9f94d640ecbd84800a53cc0ed55b SHA512 fb35120424450c937211755fc1350d24510b09c49fe6b58c6d611f3ca98ef861e0aa89bd3ac27d9aedd747e5c0a18a22df1fb1be2b99b7dfe3eed44ebba5b5e8
MISC metadata.xml 1095 BLAKE2B e5032d65fbb49b125b6cb5abe332c52a1e058271c71aec2d2522cc78874a079f8987e2e8356290295bcb886c32e1cf794df9b157ebc712a862605105b80abe31 SHA512 74a37bc3e6fa74d0f96c3390fadf16e76caf904f43cf9ac0496f70e3e3bc458727e58d9fc65c39a81302b081575e530c27be3812488df20fab42aff5494437f7
diff --git a/sci-libs/nlopt/nlopt-2.6.2.ebuild b/sci-libs/nlopt/nlopt-2.6.2.ebuild
new file mode 100644
index 000000000000..f21aa295b041
--- /dev/null
+++ b/sci-libs/nlopt/nlopt-2.6.2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{6..9} )
+
+inherit python-r1 cmake
+
+DESCRIPTION="Non-linear optimization library"
+HOMEPAGE="https://ab-initio.mit.edu/nlopt/"
+SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz"
+
+LICENSE="LGPL-2.1 MIT"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="cxx guile octave python static-libs test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ guile? ( dev-scheme/guile:* )
+ octave? ( sci-mathematics/octave )
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep 'dev-python/numpy-python2[${PYTHON_USEDEP}]' -2)
+ $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' -3)
+ )
+ "
+DEPEND="
+ ${RDEPEND}
+ python? ( dev-lang/swig )
+ "
+
+src_prepare() {
+ cmake_src_prepare
+ use python && python_copy_sources
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DNLOPT_CXX=$(usex cxx)
+ -DNLOPT_FORTRAN=$(usex test)
+ -DNLOPT_GUILE=$(usex guile)
+ -DNLOPT_OCTAVE=$(usex octave)
+ -DNLOPT_PYTHON=$(usex python)
+ -DNLOPT_SWIG=$(usex python)
+ -DNLOPT_TESTS=$(usex test)
+ )
+ if use python; then
+ python_foreach_impl run_in_build_dir cmake_src_configure
+ else
+ cmake_src_configure
+ fi
+}
+
+src_compile() {
+ if use python; then
+ python_foreach_impl run_in_build_dir cmake_src_compile
+ else
+ cmake_src_compile
+ fi
+}
+
+src_test() {
+ do_test() {
+ local a f
+ cd "${BUILD_DIR}"/test
+ for a in {1..$(usex cxx 9 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
+}
+
+nlopt_install() {
+ cmake_src_install
+ python_optimize
+}
+
+src_install() {
+ if use python; then
+ python_foreach_impl run_in_build_dir nlopt_install
+ else
+ cmake_src_install
+ fi
+ local r
+ for r in */README; do newdoc ${r} README.$(dirname ${r}); done
+}