From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 365371382C5 for ; Sun, 21 Jun 2020 04:55:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0F191E093B; Sun, 21 Jun 2020 04:55:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9AB5AE093B for ; Sun, 21 Jun 2020 04:55:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9195534F1A2 for ; Sun, 21 Jun 2020 04:55:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 292DF1AC for ; Sun, 21 Jun 2020 04:54:58 +0000 (UTC) From: "Mark Wright" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mark Wright" Message-ID: <1592715245.1c975626cefbea18e1d2e1c1c1bfbedc662b1cda.gienah@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/nlopt/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/nlopt/Manifest sci-libs/nlopt/nlopt-2.6.2.ebuild X-VCS-Directories: sci-libs/nlopt/ X-VCS-Committer: gienah X-VCS-Committer-Name: Mark Wright X-VCS-Revision: 1c975626cefbea18e1d2e1c1c1bfbedc662b1cda X-VCS-Branch: master Date: Sun, 21 Jun 2020 04:54:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 22a6157f-6adf-4a8f-a742-5da320221009 X-Archives-Hash: 8e711d5e01ac383564bc234f19c14302 commit: 1c975626cefbea18e1d2e1c1c1bfbedc662b1cda Author: Mark Wright gentoo org> AuthorDate: Sun Jun 21 04:54:05 2020 +0000 Commit: Mark Wright gentoo org> CommitDate: Sun Jun 21 04:54:05 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c975626 sci-libs/nlopt: Bump to 2.6.2 Thanks to Marian Kyral for starting work on the ebuild bump. Closes: https://bugs.gentoo.org/724640 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Mark Wright gentoo.org> sci-libs/nlopt/Manifest | 1 + sci-libs/nlopt/nlopt-2.6.2.ebuild | 95 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/sci-libs/nlopt/Manifest b/sci-libs/nlopt/Manifest index 1f8348cf56b..459d271131f 100644 --- a/sci-libs/nlopt/Manifest +++ b/sci-libs/nlopt/Manifest @@ -1 +1,2 @@ DIST nlopt-2.4.2.tar.gz 2361992 BLAKE2B c1c9f533c7e7b3bb61e81343ebd26b87e05434fdbea1f347fc5f6a6c10160289ce105a51c6540296f3f1d122d31b415452da49b84516cd13fabc73372e4cfd0e SHA512 136aacc00a69f77e8a7ce5dc26a5f3f027bc8c01b97aa1f43919462e0a412154eabfb01be258e082dffe61f9b554bb2bfbb550a7b82c7c77c7b22874a64a9703 +DIST v2.6.2.tar.gz 2040229 BLAKE2B f1f4124de574600ddbef8a885bbdd3a4f57b469b2f958ce94bbc831cf9bfa8a845e438fccfe4ab219a73a5675b8d880f6d49e0e7cbe9d0966777b0d2344521d4 SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b 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 00000000000..f21aa295b04 --- /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 +}