commit:     375f3579a115a14ddbd99aae0302da4d1dec4fea
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  4 15:11:24 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Dec  4 15:11:41 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=375f3579

sys-devel/gdb-10.1: fix compilation on Solaris

- refrain from linking against ancient libtermcap
- really use auto-detection on gdbserver with USE=server

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-devel/gdb/gdb-10.1.ebuild | 13 +++++++++----
 sys-devel/gdb/gdb-9999.ebuild | 13 +++++++++----
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/sys-devel/gdb/gdb-10.1.ebuild b/sys-devel/gdb/gdb-10.1.ebuild
index 410498d1061..6d2efc19161 100644
--- a/sys-devel/gdb/gdb-10.1.ebuild
+++ b/sys-devel/gdb/gdb-10.1.ebuild
@@ -99,6 +99,10 @@ src_prepare() {
 
        strip-linguas -u bfd/po opcodes/po
        export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+       # avoid using ancient termcap from host on Prefix systems
+       sed -i -e 's/termcap tinfow/tinfow/g' \
+               gdb/configure{.ac,} || die
 }
 
 gdb_branding() {
@@ -141,10 +145,11 @@ src_configure() {
                # gdbserver only works for native targets (CHOST==CTARGET).
                # it also doesn't support all targets, so rather than duplicate
                # the target list (which changes between versions), use the
-               # "auto" value when things are turned on.
-               is_cross \
-                       && myconf+=( --disable-gdbserver ) \
-                       || myconf+=( $(use_enable server gdbserver auto) )
+               # "auto" value when things are turned on, which is triggered
+               # whenever no --enable or --disable is given
+               if is_cross || use !server ; then
+                       myconf+=( --disable-gdbserver )
+               fi
        fi
 
        if ! ( use server && ! use client ) ; then

diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
index 44bd11b3926..1645237331c 100644
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ b/sys-devel/gdb/gdb-9999.ebuild
@@ -99,6 +99,10 @@ src_prepare() {
 
        strip-linguas -u bfd/po opcodes/po
        export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+       # avoid using ancient termcap from host on Prefix systems
+       sed -i -e 's/termcap tinfow/tinfow/g' \
+               gdb/configure{.ac,} || die
 }
 
 gdb_branding() {
@@ -141,10 +145,11 @@ src_configure() {
                # gdbserver only works for native targets (CHOST==CTARGET).
                # it also doesn't support all targets, so rather than duplicate
                # the target list (which changes between versions), use the
-               # "auto" value when things are turned on.
-               is_cross \
-                       && myconf+=( --disable-gdbserver ) \
-                       || myconf+=( $(use_enable server gdbserver auto) )
+               # "auto" value when things are turned on, which is triggered
+               # whenever no --enable or --disable is given
+               if is_cross || use !server ; then
+                       myconf+=( --disable-gdbserver )
+               fi
        fi
 
        if ! ( use server && ! use client ) ; then

Reply via email to