public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/hardened-dev:musl commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2014-02-17 11:53 Anthony G. Basile
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2014-02-17 11:53 UTC (permalink / raw
  To: gentoo-commits

commit:     ba181ace70bac0c23f476d1312e7fd95d3b0b3f3
Author:     Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Sun Feb 16 19:12:03 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Feb 17 11:53:46 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=ba181ace

sys-devel/gdb: move to tree

---
 sys-devel/gdb/files/gdb-7.4-linux-nat.patch        |  32 ++++
 sys-devel/gdb/files/gdb-7.4-threaddb.patch         |  38 ++++
 .../gdb/files/gdb-7.5.1-amd64-linux-nat.patch      |  11 ++
 .../gdb/files/gdb-7.6-linux-low-threaddb.patch     |  34 ++++
 sys-devel/gdb/files/gdb-7.6-pid_t.patch            |  12 ++
 sys-devel/gdb/gdb-7.5.1-r99.ebuild                 | 193 +++++++++++++++++++++
 sys-devel/gdb/metadata.xml                         |  11 ++
 7 files changed, 331 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-7.4-linux-nat.patch b/sys-devel/gdb/files/gdb-7.4-linux-nat.patch
new file mode 100644
index 0000000..30bfbc8
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-7.4-linux-nat.patch
@@ -0,0 +1,32 @@
+taken from sabotage linux
+
+the first chunk fixes build errors,
+the non_stop part below fixes thread debugging being available
+by default without setting any breakpoints or usage of libthread_db.
+
+--- gdb-7.4.org/gdb/linux-nat.c	2013-08-10 05:24:24.651000003 +0000
++++ gdb-7.4/gdb/linux-nat.c	2013-08-10 05:25:50.966000003 +0000
+@@ -71,6 +71,14 @@
+ # endif
+ #endif /* HAVE_PERSONALITY */
+ 
++#ifndef __SIGRTMIN
++#define __SIGRTMIN SIGRTMIN
++#endif
++
++#ifndef W_STOPCODE
++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
++#endif
++
+ /* This comment documents high-level logic of this file.
+ 
+ Waiting for events in sync mode
+@@ -2265,7 +2273,7 @@
+ 		status = 0;
+ 	    }
+ 
+-	  if (non_stop)
++	  if (1)
+ 	    {
+ 	      /* Add the new thread to GDB's lists as soon as possible
+ 		 so that:

diff --git a/sys-devel/gdb/files/gdb-7.4-threaddb.patch b/sys-devel/gdb/files/gdb-7.4-threaddb.patch
new file mode 100644
index 0000000..0544010
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-7.4-threaddb.patch
@@ -0,0 +1,38 @@
+taken from sabotage linux
+
+--- gdb-7.4.org/gdb/common/gdb_thread_db.h
++++ gdb-7.4/gdb/common/gdb_thread_db.h
+@@ -1,17 +1,5 @@
+ #ifdef HAVE_THREAD_DB_H
+ #include <thread_db.h>
+-
+-#ifndef LIBTHREAD_DB_SO
+-#define LIBTHREAD_DB_SO "libthread_db.so.1"
+-#endif
+-
+-#ifndef LIBTHREAD_DB_SEARCH_PATH
+-/* $sdir appears before $pdir for some minimal security protection:
+-   we trust the system libthread_db.so a bit more than some random
+-   libthread_db associated with whatever libpthread the app is using.  */
+-#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
+-#endif
+-
+ #else
+ 
+ /* Copyright (C) 1999-2000, 2007-2012 Free Software Foundation, Inc.
+@@ -453,3 +441,15 @@
+ #endif	/* thread_db.h */
+ 
+ #endif /* HAVE_THREAD_DB_H */
++
++#ifndef LIBTHREAD_DB_SO
++#define LIBTHREAD_DB_SO "libthread_db.so.1"
++#endif
++
++#ifndef LIBTHREAD_DB_SEARCH_PATH
++/* $sdir appears before $pdir for some minimal security protection:
++   we trust the system libthread_db.so a bit more than some random
++   libthread_db associated with whatever libpthread the app is using.  */
++#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
++#endif
++

diff --git a/sys-devel/gdb/files/gdb-7.5.1-amd64-linux-nat.patch b/sys-devel/gdb/files/gdb-7.5.1-amd64-linux-nat.patch
new file mode 100644
index 0000000..13459ad
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-7.5.1-amd64-linux-nat.patch
@@ -0,0 +1,11 @@
+--- a/gdb-7.5.1/gdb/amd64-linux-nat.c
++++ b/gdb-7.5.1/gdb/amd64-linux-nat.c
+@@ -31,7 +31,7 @@
+ #include "elf/common.h"
+ #include <sys/uio.h>
+ #include <sys/ptrace.h>
+-#include <sys/debugreg.h>
++#include <asm/debugreg.h>
+ #include <sys/syscall.h>
+ #include <sys/procfs.h>
+ #include <sys/user.h>

diff --git a/sys-devel/gdb/files/gdb-7.6-linux-low-threaddb.patch b/sys-devel/gdb/files/gdb-7.6-linux-low-threaddb.patch
new file mode 100644
index 0000000..4b0f1aa
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-7.6-linux-low-threaddb.patch
@@ -0,0 +1,34 @@
+taken from sabotage linux
+
+this patch fixes compilation of gdbserver on systems that don't have
+thread_db.h. in that case we fall back to gdb's own copy 
+"gdb_thread_db.h", so the typedef of the td_thrhandle_t member is 
+available, which is accessed in other parts of the code without
+checking whether thread_db.h is available.
+this is by far the cleaner solution, removing the accesses to the
+th member in other parts of the source would either litter it with
+ifdefs or cripple the functionality.
+
+--- gdb-7.6.2.org/gdb/gdbserver/linux-low.h
++++ gdb-7.6.2/gdb/gdbserver/linux-low.h
+@@ -18,6 +18,8 @@
+ 
+ #ifdef HAVE_THREAD_DB_H
+ #include <thread_db.h>
++#else
++#include "gdb_thread_db.h"
+ #endif
+ #include <signal.h>
+ 
+@@ -270,11 +272,9 @@
+   int need_step_over;
+ 
+   int thread_known;
+-#ifdef HAVE_THREAD_DB_H
+   /* The thread handle, used for e.g. TLS access.  Only valid if
+      THREAD_KNOWN is set.  */
+   td_thrhandle_t th;
+-#endif
+ 
+   /* Arch-specific additions.  */
+   struct arch_lwp_info *arch_private;

diff --git a/sys-devel/gdb/files/gdb-7.6-pid_t.patch b/sys-devel/gdb/files/gdb-7.6-pid_t.patch
new file mode 100644
index 0000000..45b5f43
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-7.6-pid_t.patch
@@ -0,0 +1,12 @@
+taken from sabotage linux
+
+--- gdb-7.6.2.org/gdb/common/linux-ptrace.h
++++ gdb-7.6.2/gdb/common/linux-ptrace.h
+@@ -67,6 +67,7 @@
+ #define __WALL          0x40000000 /* Wait for any child.  */
+ #endif
+ 
++#include <unistd.h> /* for pid_t */
+ extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
+ extern void linux_ptrace_init_warnings (void);
+ 

diff --git a/sys-devel/gdb/gdb-7.5.1-r99.ebuild b/sys-devel/gdb/gdb-7.5.1-r99.ebuild
new file mode 100644
index 0000000..9eae48c
--- /dev/null
+++ b/sys-devel/gdb/gdb-7.5.1-r99.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.5.1.ebuild,v 1.16 2013/11/20 08:15:35 vapier Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+	if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+		export CTARGET=${CATEGORY/cross-}
+	fi
+fi
+is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
+
+RPM=
+MY_PV=${PV}
+case ${PV} in
+*.*.*.*.*.*)
+	# fedora version: gdb-6.8.50.20090302-8.fc11.src.rpm
+	inherit versionator rpm
+	gvcr() { get_version_component_range "$@"; }
+	MY_PV=$(gvcr 1-4)
+	RPM="${PN}-${MY_PV}-$(gvcr 5).fc$(gvcr 6).src.rpm"
+	SRC_URI="mirror://fedora/development/source/SRPMS/${RPM}"
+	;;
+*.*.50.*)
+	# weekly snapshots
+	SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.bz2"
+	;;
+9999*)
+	# live git tree
+	EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git"
+	inherit git-2
+	SRC_URI=""
+	;;
+*)
+	# Normal upstream release
+	SRC_URI="mirror://gnu/gdb/${P}.tar.bz2
+		ftp://sourceware.org/pub/gdb/releases/${P}.tar.bz2"
+	;;
+esac
+
+PATCH_VER="2"
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+if [[ ${PV} != 9999* ]] ; then
+	KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+IUSE="+client expat multitarget nls +python +server test vanilla zlib"
+
+RDEPEND="!dev-util/gdbserver
+	>=sys-libs/ncurses-5.2-r2
+	sys-libs/readline
+	expat? ( dev-libs/expat )
+	python? ( =dev-lang/python-2* )
+	zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+	app-arch/xz-utils
+	virtual/yacc
+	test? ( dev-util/dejagnu )
+	nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+
+	epatch ${FILESDIR}/${PN}-7.4-linux-nat.patch
+	epatch ${FILESDIR}/${PN}-7.4-threaddb.patch
+	epatch ${FILESDIR}/${PN}-7.5.1-amd64-linux-nat.patch
+	epatch ${FILESDIR}/${PN}-7.6-linux-low-threaddb.patch
+	epatch ${FILESDIR}/${PN}-7.6-pid_t.patch
+
+	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
+	use vanilla || [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+	strip-linguas -u bfd/po opcodes/po
+}
+
+gdb_branding() {
+	printf "Gentoo ${PV} "
+	if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
+		printf "p${PATCH_VER}"
+	else
+		printf "vanilla"
+	fi
+}
+
+src_configure() {
+	strip-unsupported-flags
+
+	local sysroot="${EPREFIX}"/usr/${CTARGET}
+	local myconf=(
+		--with-pkgversion="$(gdb_branding)"
+		--with-bugurl='http://bugs.gentoo.org/'
+		--disable-werror
+		$(is_cross && echo \
+			--with-sysroot="${sysroot}" \
+			--includedir="${sysroot}/usr/include")
+	)
+
+	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")
+			$(use_with zlib)
+		)
+	fi
+
+	econf "${myconf[@]}"
+}
+
+src_test() {
+	emake check || ewarn "tests failed"
+}
+
+src_install() {
+	use server && ! use client && cd gdb/gdbserver
+	emake DESTDIR="${D}" install || die
+	use client && { find "${ED}"/usr -name libiberty.a -delete || 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
+	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,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
+	fi
+
+	# Remove shared info pages
+	rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info*
+}
+
+pkg_postinst() {
+	# portage sucks and doesnt unmerge files in /etc
+	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"
+		ewarn "Portage, unprivileged.  To make gdb fully functional you'll"
+		ewarn "have to perform the following steps:"
+		ewarn "  % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+		ewarn "  % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+	fi
+}

diff --git a/sys-devel/gdb/metadata.xml b/sys-devel/gdb/metadata.xml
new file mode 100644
index 0000000..ab9c41a
--- /dev/null
+++ b/sys-devel/gdb/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>toolchain</herd>
+<use>
+ <flag name='client'>Install the main "gdb" program (most people want this)</flag>
+ <flag name='multitarget'>Support all known targets in one gdb binary</flag>
+ <flag name='python'>Enable support for the new internal scripting language, as well as extended pretty printers</flag>
+ <flag name='server'>Install the "gdbserver" program (useful for embedded/remote targets)</flag>
+</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/hardened-dev:musl commit in: sys-devel/gdb/files/, sys-devel/gdb/
@ 2014-11-18 21:57 Anthony G. Basile
  0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2014-11-18 21:57 UTC (permalink / raw
  To: gentoo-commits

commit:     24c3ff8b1cce95cf693e07bf503bb3830aa9e81c
Author:     Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Fri Nov  7 19:38:30 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Nov 18 21:58:59 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=24c3ff8b

sys-devel/gdb: bump to 7.7.1

Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org>

---
 sys-devel/gdb/files/gdb-7.4-threaddb.patch         | 38 ---------------
 .../gdb/files/gdb-7.5.1-amd64-linux-nat.patch      | 11 -----
 sys-devel/gdb/files/gdb-7.6-pid_t.patch            | 12 -----
 .../{gdb-7.6.2-r99.ebuild => gdb-7.7.1-r99.ebuild} | 56 +++++++++++++---------
 4 files changed, 33 insertions(+), 84 deletions(-)

diff --git a/sys-devel/gdb/files/gdb-7.4-threaddb.patch b/sys-devel/gdb/files/gdb-7.4-threaddb.patch
deleted file mode 100644
index 0544010..0000000
--- a/sys-devel/gdb/files/gdb-7.4-threaddb.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-taken from sabotage linux
-
---- gdb-7.4.org/gdb/common/gdb_thread_db.h
-+++ gdb-7.4/gdb/common/gdb_thread_db.h
-@@ -1,17 +1,5 @@
- #ifdef HAVE_THREAD_DB_H
- #include <thread_db.h>
--
--#ifndef LIBTHREAD_DB_SO
--#define LIBTHREAD_DB_SO "libthread_db.so.1"
--#endif
--
--#ifndef LIBTHREAD_DB_SEARCH_PATH
--/* $sdir appears before $pdir for some minimal security protection:
--   we trust the system libthread_db.so a bit more than some random
--   libthread_db associated with whatever libpthread the app is using.  */
--#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
--#endif
--
- #else
- 
- /* Copyright (C) 1999-2000, 2007-2012 Free Software Foundation, Inc.
-@@ -453,3 +441,15 @@
- #endif	/* thread_db.h */
- 
- #endif /* HAVE_THREAD_DB_H */
-+
-+#ifndef LIBTHREAD_DB_SO
-+#define LIBTHREAD_DB_SO "libthread_db.so.1"
-+#endif
-+
-+#ifndef LIBTHREAD_DB_SEARCH_PATH
-+/* $sdir appears before $pdir for some minimal security protection:
-+   we trust the system libthread_db.so a bit more than some random
-+   libthread_db associated with whatever libpthread the app is using.  */
-+#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
-+#endif
-+

diff --git a/sys-devel/gdb/files/gdb-7.5.1-amd64-linux-nat.patch b/sys-devel/gdb/files/gdb-7.5.1-amd64-linux-nat.patch
deleted file mode 100644
index 13459ad..0000000
--- a/sys-devel/gdb/files/gdb-7.5.1-amd64-linux-nat.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/gdb-7.5.1/gdb/amd64-linux-nat.c
-+++ b/gdb-7.5.1/gdb/amd64-linux-nat.c
-@@ -31,7 +31,7 @@
- #include "elf/common.h"
- #include <sys/uio.h>
- #include <sys/ptrace.h>
--#include <sys/debugreg.h>
-+#include <asm/debugreg.h>
- #include <sys/syscall.h>
- #include <sys/procfs.h>
- #include <sys/user.h>

diff --git a/sys-devel/gdb/files/gdb-7.6-pid_t.patch b/sys-devel/gdb/files/gdb-7.6-pid_t.patch
deleted file mode 100644
index 45b5f43..0000000
--- a/sys-devel/gdb/files/gdb-7.6-pid_t.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-taken from sabotage linux
-
---- gdb-7.6.2.org/gdb/common/linux-ptrace.h
-+++ gdb-7.6.2/gdb/common/linux-ptrace.h
-@@ -67,6 +67,7 @@
- #define __WALL          0x40000000 /* Wait for any child.  */
- #endif
- 
-+#include <unistd.h> /* for pid_t */
- extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
- extern void linux_ptrace_init_warnings (void);
- 

diff --git a/sys-devel/gdb/gdb-7.6.2-r99.ebuild b/sys-devel/gdb/gdb-7.7.1-r99.ebuild
similarity index 78%
rename from sys-devel/gdb/gdb-7.6.2-r99.ebuild
rename to sys-devel/gdb/gdb-7.7.1-r99.ebuild
index bdea80f..b588707 100644
--- a/sys-devel/gdb/gdb-7.6.2-r99.ebuild
+++ b/sys-devel/gdb/gdb-7.7.1-r99.ebuild
@@ -1,10 +1,11 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.6.2.ebuild,v 1.8 2014/03/05 15:53:52 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-7.7.1.ebuild,v 1.10 2014/11/04 20:15:26 maekke Exp $
 
-EAPI="3"
+EAPI="4"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
 
-inherit flag-o-matic eutils
+inherit flag-o-matic eutils python-single-r1
 
 export CTARGET=${CTARGET:-${CHOST}}
 if [[ ${CTARGET} == ${CHOST} ]] ; then
@@ -50,15 +51,17 @@ SRC_URI="${SRC_URI} ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.x
 LICENSE="GPL-2 LGPL-2"
 SLOT="0"
 if [[ ${PV} != 9999* ]] ; then
- 	KEYWORDS="amd64 arm ~mips ppc x86"
+	KEYWORDS="amd64 arm ~mips ppc x86"
 fi
-IUSE="+client expat multitarget nls +python +server test vanilla zlib"
+IUSE="+client expat lzma multitarget nls +python +server test vanilla zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 RDEPEND="!dev-util/gdbserver
 	>=sys-libs/ncurses-5.2-r2
 	sys-libs/readline
 	expat? ( dev-libs/expat )
-	python? ( =dev-lang/python-2* )
+	lzma? ( app-arch/xz-utils )
+	python? ( ${PYTHON_DEPS} )
 	zlib? ( sys-libs/zlib )"
 DEPEND="${RDEPEND}
 	app-arch/xz-utils
@@ -68,15 +71,17 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${PN}-${MY_PV}
 
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
 src_prepare() {
- 	epatch ${FILESDIR}/${PN}-7.4-linux-nat.patch
- 	epatch ${FILESDIR}/${PN}-7.4-threaddb.patch
- 	epatch ${FILESDIR}/${PN}-7.5.1-amd64-linux-nat.patch
- 	epatch ${FILESDIR}/${PN}-7.6-linux-low-threaddb.patch
- 	epatch ${FILESDIR}/${PN}-7.6-pid_t.patch
+	epatch ${FILESDIR}/${PN}-7.4-linux-nat.patch
+	epatch ${FILESDIR}/${PN}-7.5.1-amd64-linux-nat.patch
 
 	[[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec
 	use vanilla || [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+	epatch_user
 	strip-linguas -u bfd/po opcodes/po
 	if [[ ${CHOST} == *-darwin* ]] ; then
 		# make sure we have a python-config that matches our install,
@@ -85,8 +90,7 @@ src_prepare() {
 		# version is
 		rm -f "${S}"/gdb/python/python-config.py || die
 		pushd "${S}"/gdb/python > /dev/null || die
-		ln -s "${EROOT}"/usr/bin/$(eselect python show --python2)-config \
-			python-config.py || die
+		ln -s "${T}"/${EPYTHON}/bin/python-config python-config.py || die
 		popd > /dev/null || die
 	fi
 }
@@ -103,14 +107,17 @@ gdb_branding() {
 src_configure() {
 	strip-unsupported-flags
 
-	local sysroot="${EPREFIX}"/usr/${CTARGET}
 	local myconf=(
 		--with-pkgversion="$(gdb_branding)"
 		--with-bugurl='http://bugs.gentoo.org/'
 		--disable-werror
-		$(is_cross && echo \
-			--with-sysroot="${sysroot}" \
-			--includedir="${sysroot}/usr/include")
+		# Disable modules that are in a combined binutils/gdb tree. #490566
+		--disable-{binutils,etc,gas,gold,gprof,ld}
+	)
+	local sysroot="${EPREFIX}/usr/${CTARGET}"
+	is_cross && myconf+=(
+		--with-sysroot="${sysroot}"
+		--includedir="${sysroot}/usr/include"
 	)
 
 	if use server && ! use client ; then
@@ -134,12 +141,16 @@ src_configure() {
 			--enable-64-bit-bfd
 			--disable-install-libbfd
 			--disable-install-libiberty
+			# This only disables building in the readline subdir.
+			# For gdb itself, it'll use the system version.
+			--disable-readline
 			--with-system-readline
 			--with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
 			$(use_with expat)
+			$(use_with lzma)
 			$(use_enable nls)
 			$(use multitarget && echo --enable-targets=all)
-			$(use_with python python "${EPREFIX}/usr/bin/python2")
+			$(use_with python python "${EPYTHON}")
 			$(use_with zlib)
 		)
 	fi
@@ -148,13 +159,13 @@ src_configure() {
 }
 
 src_test() {
-	emake check || ewarn "tests failed"
+	nonfatal emake check || ewarn "tests failed"
 }
 
 src_install() {
 	use server && ! use client && cd gdb/gdbserver
-	emake DESTDIR="${D}" install || die
-	use client && { find "${ED}"/usr -name libiberty.a -delete || die ; }
+	default
+	use client && find "${ED}"/usr -name libiberty.a -delete
 	cd "${S}"
 
 	# Don't install docs when building a cross-gdb
@@ -166,9 +177,8 @@ src_install() {
 	# 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 ; }
+	[[ -e gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay
 
-	dodoc README
 	if use client ; then
 		docinto gdb
 		dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-18 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 11:53 [gentoo-commits] proj/hardened-dev:musl commit in: sys-devel/gdb/files/, sys-devel/gdb/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2014-11-18 21:57 Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox