commit:     e364e1fc6dc01eb6078974cce77c26a12d5ac5e0
Author:     Mark Wright <gienah <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 21 14:04:30 2020 +0000
Commit:     Mark Wright <gienah <AT> gentoo <DOT> org>
CommitDate: Sun Jun 21 14:04:30 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e364e1fc

sci-libs/nlopt: Fix USE=static-libs

Need to multibuild it again to obtain the libnlopt.a, and install it.

Package-Manager: Portage-2.3.101, Repoman-2.3.22
Signed-off-by: Mark Wright <gienah <AT> gentoo.org>

 sci-libs/nlopt/nlopt-2.6.2.ebuild | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/sci-libs/nlopt/nlopt-2.6.2.ebuild 
b/sci-libs/nlopt/nlopt-2.6.2.ebuild
index f21aa295b04..ec04d41e8bc 100644
--- a/sci-libs/nlopt/nlopt-2.6.2.ebuild
+++ b/sci-libs/nlopt/nlopt-2.6.2.ebuild
@@ -49,16 +49,21 @@ 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+=(
+                       -DBUILD_SHARED_LIBS=OFF
+               )
+               BUILD_DIR="${S}_static-libs" run_in_build_dir 
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
+       if use static-libs; then
+               BUILD_DIR="${S}_static-libs" run_in_build_dir cmake_src_compile
        fi
 }
 
@@ -74,8 +79,9 @@ 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
        fi
 }
 
@@ -87,8 +93,9 @@ 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
        fi
        local r
        for r in */README; do newdoc ${r} README.$(dirname ${r}); done

Reply via email to