From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1398028-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id B93BA158090
	for <garchives@archives.gentoo.org>; Wed, 18 May 2022 01:36:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id AE454E085A;
	Wed, 18 May 2022 01:36:41 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 973F6E085A
	for <gentoo-commits@lists.gentoo.org>; Wed, 18 May 2022 01:36:41 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id EE36734136E
	for <gentoo-commits@lists.gentoo.org>; Wed, 18 May 2022 01:36:39 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 57AC1462
	for <gentoo-commits@lists.gentoo.org>; Wed, 18 May 2022 01:36:38 +0000 (UTC)
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" <mjo@gentoo.org>
Message-ID: <1652837724.b42d8d1364f977dbfceb02de0784c3b0e9e2df8d.mjo@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.7.1.ebuild
X-VCS-Directories: sci-libs/nlopt/
X-VCS-Committer: mjo
X-VCS-Committer-Name: Michael Orlitzky
X-VCS-Revision: b42d8d1364f977dbfceb02de0784c3b0e9e2df8d
X-VCS-Branch: master
Date: Wed, 18 May 2022 01:36:38 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 0ca3d9e5-d96f-4772-92b3-649791208169
X-Archives-Hash: 29a2d14751718163f62fb369c3a3309e

commit:     b42d8d1364f977dbfceb02de0784c3b0e9e2df8d
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed May 18 01:34:02 2022 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed May 18 01:35:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b42d8d13

sci-libs/nlopt: new upstream v2.7.1.

  * Update HOMEPAGE.
  * Disable MATLAB detection in src_configure().
  * No more static libs.

Closes: https://bugs.gentoo.org/661952
Bug: https://bugs.gentoo.org/826774
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-libs/nlopt/Manifest           |  1 +
 sci-libs/nlopt/nlopt-2.7.1.ebuild | 97 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git a/sci-libs/nlopt/Manifest b/sci-libs/nlopt/Manifest
index a4d07e389b10..bc0bc63e1b06 100644
--- a/sci-libs/nlopt/Manifest
+++ b/sci-libs/nlopt/Manifest
@@ -1 +1,2 @@
 DIST nlopt-2.6.2.tar.gz 2040229 BLAKE2B f1f4124de574600ddbef8a885bbdd3a4f57b469b2f958ce94bbc831cf9bfa8a845e438fccfe4ab219a73a5675b8d880f6d49e0e7cbe9d0966777b0d2344521d4 SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b
+DIST nlopt-2.7.1.tar.gz 2044180 BLAKE2B 6d459f94a26ee6dd7f72c73c48992bd047150aa525bc4ad088c8516127afc5c7843f6fbb6726c2f845271b87934c13e0892a063362ab50df51f92e81979111fb SHA512 e23cb522fc696010574c14b72be85acc0f8ccf0bf208bf2b8789c57d6c5a6e6d419ee10330581518b1c1567018ae909b626ce7761d4fbd5bf112916871e420e2

diff --git a/sci-libs/nlopt/nlopt-2.7.1.ebuild b/sci-libs/nlopt/nlopt-2.7.1.ebuild
new file mode 100644
index 000000000000..814c7a1440fc
--- /dev/null
+++ b/sci-libs/nlopt/nlopt-2.7.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit python-r1 cmake fortran-2
+
+DESCRIPTION="Non-linear optimization library"
+HOMEPAGE="https://github.com/stevengj/nlopt"
+SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1 MIT"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="cxx guile octave python test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	guile? ( dev-scheme/guile:* )
+	octave? ( >=sci-mathematics/octave-6 )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/numpy[${PYTHON_USEDEP}]
+	)
+	"
+DEPEND="
+	${RDEPEND}
+	python? ( dev-lang/swig )
+	"
+
+src_prepare() {
+	cmake_src_prepare
+	use python && python_copy_sources
+}
+
+src_configure() {
+	# MATLAB detection causes problems (as in bug 826774) if we don't
+	# explicitly disable it.
+	local mycmakeargs=(
+		-DNLOPT_CXX=$(usex cxx)
+		-DNLOPT_FORTRAN=$(usex test)
+		-DNLOPT_GUILE=$(usex guile)
+		-DNLOPT_OCTAVE=$(usex octave)
+		-DNLOPT_MATLAB=OFF
+		-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
+}