summaryrefslogtreecommitdiff
path: root/sys-devel/gdb/gdb-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
commitc719fdcee603a5a706a45d10cb598762d56a727d (patch)
tree620cbf137661399a3fb1eff92914204f9a970713 /sys-devel/gdb/gdb-9999.ebuild
parentcc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff)
gentoo resync : 25.09.2021
Diffstat (limited to 'sys-devel/gdb/gdb-9999.ebuild')
-rw-r--r--sys-devel/gdb/gdb-9999.ebuild56
1 files changed, 33 insertions, 23 deletions
diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild
index fde1ad992437..8b1a81f909e0 100644
--- a/sys-devel/gdb/gdb-9999.ebuild
+++ b/sys-devel/gdb/gdb-9999.ebuild
@@ -2,34 +2,36 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9,10} )
-inherit eutils flag-o-matic python-single-r1 toolchain-funcs
+PYTHON_COMPAT=( python3_{8,9,10} )
+inherit flag-o-matic python-single-r1 strip-linguas toolchain-funcs
export CTARGET=${CTARGET:-${CHOST}}
+
if [[ ${CTARGET} == ${CHOST} ]] ; then
if [[ ${CATEGORY} == cross-* ]] ; then
export CTARGET=${CATEGORY#cross-}
fi
fi
+
is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
case ${PV} in
-9999*)
- # live git tree
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
- inherit git-r3
- SRC_URI=""
- ;;
-*.*.50.2???????)
- # weekly snapshots
- SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
- ;;
-*)
- # Normal upstream release
- SRC_URI="mirror://gnu/gdb/${P}.tar.xz
- ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
- ;;
+ 9999*)
+ # live git tree
+ EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git"
+ inherit git-r3
+ SRC_URI=""
+ ;;
+ *.*.50.2???????)
+ # weekly snapshots
+ SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz"
+ ;;
+ *)
+ # Normal upstream release
+ SRC_URI="mirror://gnu/gdb/${P}.tar.xz
+ ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz"
+ ;;
esac
PATCH_VER=""
@@ -43,23 +45,23 @@ SRC_URI="${SRC_URI}
LICENSE="GPL-2 LGPL-2"
SLOT="0"
+
if [[ ${PV} != 9999* ]] ; then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
+
IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash"
-REQUIRED_USE="
- python? ( ${PYTHON_REQUIRED_USE} )
-"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
# ia64 kernel crashes when gdb testsuite is running
RESTRICT="
ia64? ( test )
-
!test? ( test )
"
RDEPEND="
dev-libs/mpfr:0=
+ dev-libs/gmp:=
>=sys-libs/ncurses-5.2-r2:0=
>=sys-libs/readline-7:0=
sys-libs/zlib
@@ -105,11 +107,13 @@ src_prepare() {
gdb_branding() {
printf "Gentoo ${PV} "
+
if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then
printf "p${PATCH_VER}"
else
printf "vanilla"
fi
+
[[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}"
}
@@ -137,7 +141,9 @@ src_configure() {
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
)
+
local sysroot="${EPREFIX}/usr/${CTARGET}"
+
is_cross && myconf+=(
--with-sysroot="${sysroot}"
--includedir="${sysroot}/usr/include"
@@ -176,8 +182,9 @@ src_configure() {
$(use_with xxhash)
$(use_with guile)
)
+
if use sparc-solaris || use x86-solaris ; then
- # disable largefile support
+ # Disable largefile support
# https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html
myconf+=( --disable-largefile )
fi
@@ -190,6 +197,7 @@ src_configure() {
src_install() {
default
+
find "${ED}"/usr -name libiberty.a -delete || die
# Delete translations that conflict with binutils-libs. #528088
@@ -211,6 +219,7 @@ src_install() {
done
return 0
fi
+
# Install it by hand for now:
# https://sourceware.org/ml/gdb-patches/2011-12/msg00915.html
# Only install if it exists due to the twisted behavior (see
@@ -222,6 +231,7 @@ src_install() {
gdb/NEWS gdb/ChangeLog gdb/PROBLEMS
docinto sim
dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING}
+
if use server ; then
docinto gdbserver
dodoc gdbserver/{ChangeLog,README}
@@ -245,7 +255,7 @@ src_install() {
}
pkg_postinst() {
- # portage sucks and doesnt unmerge files in /etc
+ # Portage doesn't unmerge files in /etc
rm -vf "${EROOT}"/etc/skel/.gdbinit
if use prefix && [[ ${CHOST} == *-darwin* ]] ; then