commit:     e1150b0c245c9c371355c6a94a4eaec020fecd19
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 21 08:21:52 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 08:34:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1150b0c

dev-libs/nspr: disable 'optimize' when 'debug' is enabled

Closes: https://bugs.gentoo.org/888972
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-libs/nspr/nspr-4.35-r1.ebuild | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/dev-libs/nspr/nspr-4.35-r1.ebuild 
b/dev-libs/nspr/nspr-4.35-r1.ebuild
index f12eb3a54277..3dc60399c257 100644
--- a/dev-libs/nspr/nspr-4.35-r1.ebuild
+++ b/dev-libs/nspr/nspr-4.35-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -70,11 +70,14 @@ multilib_src_configure() {
                && export CROSS_COMPILE=1 \
                || unset CROSS_COMPILE
 
-       local myconf=(
-               --libdir="${EPREFIX}/usr/$(get_libdir)"
-               $(use_enable debug)
-               $(use_enable !debug optimize="${my_optlvl}")
-       )
+       local myconf=( --libdir="${EPREFIX}/usr/$(get_libdir)" )
+
+       # Optimization is disabled when debug is enabled.
+       if use debug; then
+               myconf+=( --enable-debug )
+       else
+               myconf+=( --enable-optimize="${my_optlvl}" )
+       fi
 
        # The configure has some fancy --enable-{{n,x}32,64bit} switches
        # that trigger some code conditional to platform & arch. This really

Reply via email to