summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-02 05:42:56 +0000
committerMike Frysinger <vapier@gentoo.org>2012-01-02 05:42:56 +0000
commit070fb8c61dcd35d59eab38c1e8eed8ae030dadf4 (patch)
tree71ded1c5d266549b94257486b7293a711a6325d6 /sys-devel
parentFix manifest (diff)
downloadgentoo-2-070fb8c61dcd35d59eab38c1e8eed8ae030dadf4.tar.gz
gentoo-2-070fb8c61dcd35d59eab38c1e8eed8ae030dadf4.tar.bz2
gentoo-2-070fb8c61dcd35d59eab38c1e8eed8ae030dadf4.zip
Merge live/non-live ebuilds, fix up USE="-client -server" behavior, and handle gdbserver better in unsupported configurations #396697 by Thomas Sachau.
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gdb/ChangeLog8
-rw-r--r--sys-devel/gdb/gdb-7.3.1-r1.ebuild29
-rw-r--r--sys-devel/gdb/gdb-9999.ebuild96
3 files changed, 93 insertions, 40 deletions
diff --git a/sys-devel/gdb/ChangeLog b/sys-devel/gdb/ChangeLog
index 710e38394a2a..e087f3a0d97d 100644
--- a/sys-devel/gdb/ChangeLog
+++ b/sys-devel/gdb/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/gdb
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.200 2012/01/01 19:45:57 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.201 2012/01/02 05:42:56 vapier Exp $
+
+ 02 Jan 2012; Mike Frysinger <vapier@gentoo.org> gdb-7.3.1-r1.ebuild,
+ gdb-9999.ebuild:
+ Merge live/non-live ebuilds, fix up USE="-client -server" behavior, and
+ handle gdbserver better in unsupported configurations #396697 by Thomas
+ Sachau.
01 Jan 2012; Fabian Groffen <grobian@gentoo.org> gdb-7.3.1-r1.ebuild:
Remove/check existing files (wrt Prefix offset)
diff --git a/sys-devel/gdb/gdb-7.3.1-r1.ebuild b/sys-devel/gdb/gdb-7.3.1-r1.ebuild
index a5262bd21bba..ecc2381b6027 100644
--- a/sys-devel/gdb/gdb-7.3.1-r1.ebuild
+++ b/sys-devel/gdb/gdb-7.3.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild,v 1.2 2012/01/01 19:45:57 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.3.1-r1.ebuild,v 1.3 2012/01/02 05:42:56 vapier Exp $
EAPI="3"
@@ -48,9 +48,7 @@ HOMEPAGE="http://sourceware.org/gdb/"
SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
LICENSE="GPL-2 LGPL-2"
-is_cross \
- && SLOT="${CTARGET}" \
- || SLOT="0"
+SLOT="0"
if [[ ${PV} != 9999* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
@@ -94,12 +92,23 @@ src_configure() {
$(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET})
)
- if use server ; then
- use client || cd gdb/gdbserver
+ if use server && ! use client ; then
+ # just configure+build in the gdbserver subdir to speed things up
+ cd gdb/gdbserver
myconf+=( --program-transform-name='' )
+ else
+ # 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) )
fi
- if use client ; then
+ if ! ( use server && ! use client ) ; then
+ # if we are configuring in the top level, then use all
+ # the additional global options
myconf+=(
--enable-64-bit-bfd
--disable-install-libbfd
@@ -110,7 +119,6 @@ src_configure() {
$(use_enable nls)
$(use multitarget && echo --enable-targets=all)
$(use_with python python "${EPREFIX}/usr/bin/python2")
- $(use_enable server gdbserver)
)
fi
@@ -132,8 +140,11 @@ src_install() {
rm -r "${ED}"/usr/share
return 0
fi
+ # Install it by hand for now:
# http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
- use server && { dobin gdb/gdbserver/gdbreplay || die ; }
+ # Only install if it exists due to the twisted behavior (see
+ # notes in src_configure above).
+ [[ -e gdb/gdbserver/gdbreplay ]] && { dobin gdb/gdbserver/gdbreplay || die ; }
dodoc README
if use client ; then
diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
index f40255c49716..d90545495518 100644
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ b/sys-devel/gdb/gdb-9999.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild,v 1.6 2011/12/02 21:08:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-9999.ebuild,v 1.7 2012/01/02 05:42:56 vapier Exp $
EAPI="3"
@@ -48,15 +48,14 @@ HOMEPAGE="http://sourceware.org/gdb/"
SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
LICENSE="GPL-2 LGPL-2"
-is_cross \
- && SLOT="${CTARGET}" \
- || SLOT="0"
+SLOT="0"
if [[ ${PV} != 9999* ]] ; then
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~x64-macos ~x86-macos"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
-IUSE="expat multitarget nls +python test vanilla"
+IUSE="+client expat multitarget nls +python +server test vanilla"
-RDEPEND=">=sys-libs/ncurses-5.2-r2
+RDEPEND="!dev-util/gdbserver
+ >=sys-libs/ncurses-5.2-r2
sys-libs/readline
expat? ( dev-libs/expat )
python? ( =dev-lang/python-2* )"
@@ -85,18 +84,45 @@ gdb_branding() {
src_configure() {
strip-unsupported-flags
- econf \
- --with-pkgversion="$(gdb_branding)" \
- --with-bugurl='http://bugs.gentoo.org/' \
- --disable-werror \
- --enable-64-bit-bfd \
- --with-system-readline \
- --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug \
- $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET}) \
- $(use_with expat) \
- $(use_enable nls) \
- $(use multitarget && echo --enable-targets=all) \
- $(use_with python python "${EPREFIX}/usr/bin/python2")
+
+ local myconf=(
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='http://bugs.gentoo.org/'
+ --disable-werror
+ $(is_cross && echo --with-sysroot="${EPREFIX}"/usr/${CTARGET})
+ )
+
+ if use server && ! use client ; then
+ # just configure+build in the gdbserver subdir to speed things up
+ cd gdb/gdbserver
+ myconf+=( --program-transform-name='' )
+ else
+ # 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) )
+ fi
+
+ if ! ( use server && ! use client ) ; then
+ # if we are configuring in the top level, then use all
+ # the additional global options
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --with-system-readline
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with expat)
+ $(use_enable nls)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPREFIX}/usr/bin/python2")
+ )
+ fi
+
+ econf "${myconf[@]}"
}
src_test() {
@@ -104,24 +130,34 @@ src_test() {
}
src_install() {
- emake \
- DESTDIR="${D}" \
- {include,lib}dir=/nukeme/pretty/pretty/please \
- install || die
- rm -r "${D}"/nukeme || die
+ use server && ! use client && cd gdb/gdbserver
+ emake DESTDIR="${D}" install || die
+ use client && { rm "${ED}"/usr/lib*/libiberty.a || die ; }
+ cd "${S}"
# Don't install docs when building a cross-gdb
if [[ ${CTARGET} != ${CHOST} ]] ; then
rm -r "${ED}"/usr/share
return 0
fi
+ # Install it by hand for now:
+ # http://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
+ # Only install if it exists due to the twisted behavior (see
+ # notes in src_configure above).
+ [[ -e gdb/gdbserver/gdbreplay ]] && { dobin gdb/gdbserver/gdbreplay || die ; }
dodoc README
- docinto gdb
- dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
- gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ if use client ; then
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
+ fi
docinto sim
- dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+ dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
+ if use server ; then
+ docinto gdbserver
+ dodoc gdb/gdbserver/{ChangeLog,README}
+ fi
if [[ -n ${PATCH_VER} ]] ; then
dodoc "${WORKDIR}"/extra/gdbinit.sample
@@ -133,7 +169,7 @@ src_install() {
pkg_postinst() {
# portage sucks and doesnt unmerge files in /etc
- rm -vf "${ROOT}"/etc/skel/.gdbinit
+ rm -vf "${EROOT}"/etc/skel/.gdbinit
if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
ewarn "gdb is unable to get a mach task port when installed by Prefix"