commit:     81c90b0e2306772099620a6c0a56d7f991506ad1
Author:     Mark Wright <gienah <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 22 01:41:27 2020 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Mon Jun 22 01:41:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81c90b0e

sci-libs/nlopt: Inherit fortran, fix static-libs logic.

Fix QA bad filename: [ v2.6.2.tar.gz ], thanks to
Michelangelo Scopelliti for reporting.

inherit fortran-2, thanks to Michelangelo Scopelliti and
François Bissey for reporting.

Put back the logic I incorrectly removed when adding support
for USE=static-libs for building stuff when USE=-python.

Thanks to Michelangelo Scopelliti, François Bissey and
Andreas Sturmlechner for helping.

Co-Authored-By: François Bissey <frp.bissey <AT> gmail.com>
Bug: https://bugs.gentoo.org/724640
Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Mark Wright <gienah <AT> gentoo.org>

 sci-libs/nlopt/Manifest              |  2 +-
 sci-libs/nlopt/nlopt-2.6.2-r1.ebuild | 12 ++++++++++--
 sci-libs/nlopt/nlopt-2.6.2.ebuild    | 12 ++++++++++--
 3 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/sci-libs/nlopt/Manifest b/sci-libs/nlopt/Manifest
index 459d271131f..763315e9b52 100644
--- a/sci-libs/nlopt/Manifest
+++ b/sci-libs/nlopt/Manifest
@@ -1,2 +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
+DIST nlopt-2.6.2.tar.gz 2040229 BLAKE2B 
f1f4124de574600ddbef8a885bbdd3a4f57b469b2f958ce94bbc831cf9bfa8a845e438fccfe4ab219a73a5675b8d880f6d49e0e7cbe9d0966777b0d2344521d4
 SHA512 
61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b

diff --git a/sci-libs/nlopt/nlopt-2.6.2-r1.ebuild 
b/sci-libs/nlopt/nlopt-2.6.2-r1.ebuild
index e99f07d1cdf..416022d0dc5 100644
--- a/sci-libs/nlopt/nlopt-2.6.2-r1.ebuild
+++ b/sci-libs/nlopt/nlopt-2.6.2-r1.ebuild
@@ -5,11 +5,11 @@ EAPI=7
 
 PYTHON_COMPAT=( python3_{6..9} )
 
-inherit python-r1 cmake
+inherit python-r1 cmake fortran-2
 
 DESCRIPTION="Non-linear optimization library"
 HOMEPAGE="https://ab-initio.mit.edu/nlopt/";
-SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz";
+SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
 
 LICENSE="LGPL-2.1 MIT"
 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
@@ -48,6 +48,8 @@ src_configure() {
        )
        if use python; then
                python_foreach_impl run_in_build_dir cmake_src_configure
+       else
+               cmake_src_configure
        fi
        if use static-libs; then
                mycmakeargs+=(
@@ -60,6 +62,8 @@ src_configure() {
 src_compile() {
        if use python; then
                python_foreach_impl run_in_build_dir cmake_src_compile
+       else
+               cmake_src_compile
        fi
        if use static-libs; then
                BUILD_DIR="${S}_static-libs" run_in_build_dir cmake_src_compile
@@ -78,6 +82,8 @@ src_test() {
        }
        if use python; then
                python_foreach_impl run_in_build_dir do_test
+       else
+               do_test
        fi
        if use static-libs; then
                BUILD_DIR="${S}_static-libs" run_in_build_dir do_test
@@ -92,6 +98,8 @@ nlopt_install() {
 src_install() {
        if use python; then
                python_foreach_impl run_in_build_dir nlopt_install
+       else
+               cmake_src_install
        fi
        if use static-libs; then
                BUILD_DIR="${S}_static-libs" run_in_build_dir dolib.a libnlopt.a

diff --git a/sci-libs/nlopt/nlopt-2.6.2.ebuild 
b/sci-libs/nlopt/nlopt-2.6.2.ebuild
index ec04d41e8bc..21c2ada3624 100644
--- a/sci-libs/nlopt/nlopt-2.6.2.ebuild
+++ b/sci-libs/nlopt/nlopt-2.6.2.ebuild
@@ -5,11 +5,11 @@ EAPI=7
 
 PYTHON_COMPAT=( python2_7 python3_{6..9} )
 
-inherit python-r1 cmake
+inherit python-r1 cmake fortran-2
 
 DESCRIPTION="Non-linear optimization library"
 HOMEPAGE="https://ab-initio.mit.edu/nlopt/";
-SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz";
+SRC_URI="https://github.com/stevengj/nlopt/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
 
 LICENSE="LGPL-2.1 MIT"
 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
@@ -49,6 +49,8 @@ src_configure() {
        )
        if use python; then
                python_foreach_impl run_in_build_dir cmake_src_configure
+       else
+               cmake_src_configure
        fi
        if use static-libs; then
                mycmakeargs+=(
@@ -61,6 +63,8 @@ src_configure() {
 src_compile() {
        if use python; then
                python_foreach_impl run_in_build_dir cmake_src_compile
+       else
+               cmake_src_compile
        fi
        if use static-libs; then
                BUILD_DIR="${S}_static-libs" run_in_build_dir cmake_src_compile
@@ -79,6 +83,8 @@ src_test() {
        }
        if use python; then
                python_foreach_impl run_in_build_dir do_test
+       else
+               do_test
        fi
        if use static-libs; then
                BUILD_DIR="${S}_static-libs" run_in_build_dir do_test
@@ -93,6 +99,8 @@ nlopt_install() {
 src_install() {
        if use python; then
                python_foreach_impl run_in_build_dir nlopt_install
+       else
+               cmake_src_install
        fi
        if use static-libs; then
                BUILD_DIR="${S}_static-libs" run_in_build_dir dolib.a libnlopt.a

Reply via email to