diff options
Diffstat (limited to 'sys-devel/gdb-apple/gdb-apple-1752.ebuild')
-rw-r--r-- | sys-devel/gdb-apple/gdb-apple-1752.ebuild | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/sys-devel/gdb-apple/gdb-apple-1752.ebuild b/sys-devel/gdb-apple/gdb-apple-1752.ebuild index f374628fb7d5..6f9458c8f084 100644 --- a/sys-devel/gdb-apple/gdb-apple-1752.ebuild +++ b/sys-devel/gdb-apple/gdb-apple-1752.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 -inherit eutils flag-o-matic +inherit eutils flag-o-matic toolchain-funcs APPLE_PV=${PV} DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.3" @@ -17,10 +17,12 @@ KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" IUSE="nls" -RDEPEND=">=sys-libs/ncurses-5.2-r2 +RDEPEND=">=sys-libs/ncurses-5.2-r2:0= + sys-libs/readline:0= =dev-db/sqlite-3*" DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" + nls? ( sys-devel/gettext ) + || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )" S=${WORKDIR}/gdb-${APPLE_PV}/src @@ -34,9 +36,22 @@ PATCHES=( src_prepare() { default [[ ${CHOST} == *-darwin8 ]] && eapply "${FILESDIR}"/${PN}-1518-darwin8.patch + + # use host readline + sed -i -e '/host_libs/s/readline//' configure.in configure || die + sed -i \ + -e '/^\(READLINE\|readline\)_/s/=.*$/=/' \ + -e '/^READLINE /s/=.*$/= -lreadline/' \ + gdb/Makefile.in || die } src_configure() { + if tc-is-gcc ; then + # force gcc-apple, FSF gcc doesn't grok this code + export CC=${CTARGET:-${CHOST}}-gcc-4.2.1 + export CXX=${CTARGET:-${CHOST}}-g++-4.2.1 + fi + replace-flags -O? -O2 econf \ --disable-werror \ @@ -47,11 +62,15 @@ src_configure() { src_compile() { # unable to work around parallel make issue - emake -j2 || die + # ignore texinfo issues (version mismatch, to hard to fix or + # disable) + emake -j2 MAKEINFOFLAGS="--force" || die } src_install() { - emake -j2 DESTDIR="${D}" libdir=/nukeme includedir=/nukeme install || die + emake -j2 \ + DESTDIR="${D}" libdir=/nukeme includedir=/nukeme \ + MAKEINFOFLAGS="--force" install || die rm -R "${D}"/nukeme || die rm -Rf "${ED}"/usr/${CHOST} || die mv "${ED}"/usr/bin/gdb "${ED}"/ |