commit:     f59be307fbc5ef4d693ebde8cbcce6b63cb6304f
Author:     Adam Feldman <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  1 18:27:17 2020 +0000
Commit:     Adam Feldman <np-hardass <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 19:54:38 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f59be307

mate.eclass: drop static-libs whenever possible

Whenever package doesn't have static-libs available and selected,
if configure script has static-libs selectable, explicitly disable

Bug: https://bugs.gentoo.org/695878
Signed-off-by: Adam Feldman <NP-Hardass <AT> gentoo.org>

 eclass/mate.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/eclass/mate.eclass b/eclass/mate.eclass
index db511aedb1f..3dea7bd7d6f 100644
--- a/eclass/mate.eclass
+++ b/eclass/mate.eclass
@@ -115,7 +115,17 @@ mate_src_prepare() {
 # MATE specific configure handling
 # Stub to gnome2_src_configure()
 mate_src_configure() {
-       gnome2_src_configure "$@"
+
+       local mateconf=()
+
+       # Pass --disable-static whenever possible
+       if ! use_if_iuse static-libs; then
+               if grep -q "enable-static" "${ECONF_SOURCE:-.}"/configure; then
+                       mateconf+=( --disable-static )
+               fi
+       fi
+
+       gnome2_src_configure "${mateconf[@]} $@"
 }
 
 # @FUNCTION: mate_src_install

Reply via email to