summaryrefslogtreecommitdiff
path: root/dev-debug
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-13 13:10:51 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-13 13:10:51 +0000
commit7860ad41012a3808c645607818b64ad7dab025e9 (patch)
tree102565176c19f5aef57ae4f6faecd3bded6f36ee /dev-debug
parentb83f9f17a27e03508085814208cd9c89a07f1f49 (diff)
gentoo auto-resync : 13:01:2024 - 13:10:51
Diffstat (limited to 'dev-debug')
-rw-r--r--dev-debug/Manifest.gzbin0 -> 878 bytes
-rw-r--r--dev-debug/cgdb/Manifest10
-rw-r--r--dev-debug/cgdb/cgdb-0.7.1.ebuild72
-rw-r--r--dev-debug/cgdb/cgdb-0.8.0.ebuild69
-rw-r--r--dev-debug/cgdb/cgdb-9999.ebuild69
-rw-r--r--dev-debug/cgdb/files/cgdb-0.7.1-respect-AR.patch32
-rw-r--r--dev-debug/cgdb/files/cgdb-0.8.0-ar.patch18
-rw-r--r--dev-debug/cgdb/files/cgdb-9999-ar.patch16
-rw-r--r--dev-debug/cgdb/files/cgdb-test.patch55
-rw-r--r--dev-debug/cgdb/metadata.xml9
-rw-r--r--dev-debug/gdb-apple/Manifest8
-rw-r--r--dev-debug/gdb-apple/files/gdb-apple-1518-darwin8-9.patch87
-rw-r--r--dev-debug/gdb-apple/files/gdb-apple-1518-darwin8.patch128
-rw-r--r--dev-debug/gdb-apple/files/gdb-apple-1705-darwin8-10.patch11
-rw-r--r--dev-debug/gdb-apple/files/gdb-apple-768-texinfo.patch10
-rw-r--r--dev-debug/gdb-apple/files/gdb-apple-no-global-gdbinit.patch23
-rw-r--r--dev-debug/gdb-apple/gdb-apple-1752.ebuild95
-rw-r--r--dev-debug/gdb-apple/metadata.xml8
-rw-r--r--dev-debug/gdb/Manifest8
-rw-r--r--dev-debug/gdb/files/gdb-13.2-fix-sparc-debugging.patch126
-rw-r--r--dev-debug/gdb/files/gdb-8.3.1-verbose-build.patch13
-rw-r--r--dev-debug/gdb/gdb-13.2-r2.ebuild314
-rw-r--r--dev-debug/gdb/gdb-14.1.ebuild314
-rw-r--r--dev-debug/gdb/gdb-9999.ebuild314
-rw-r--r--dev-debug/gdb/metadata.xml23
-rw-r--r--dev-debug/lldb/Manifest14
-rw-r--r--dev-debug/lldb/lldb-15.0.7.ebuild115
-rw-r--r--dev-debug/lldb/lldb-16.0.6-r1.ebuild107
-rw-r--r--dev-debug/lldb/lldb-16.0.6.ebuild113
-rw-r--r--dev-debug/lldb/lldb-17.0.6.ebuild113
-rw-r--r--dev-debug/lldb/lldb-18.0.0.9999.ebuild106
-rw-r--r--dev-debug/lldb/lldb-18.0.0_pre20240106.ebuild115
-rw-r--r--dev-debug/lldb/metadata.xml10
33 files changed, 2525 insertions, 0 deletions
diff --git a/dev-debug/Manifest.gz b/dev-debug/Manifest.gz
new file mode 100644
index 000000000000..16da84d3e427
--- /dev/null
+++ b/dev-debug/Manifest.gz
Binary files differ
diff --git a/dev-debug/cgdb/Manifest b/dev-debug/cgdb/Manifest
new file mode 100644
index 000000000000..29527b38e3c1
--- /dev/null
+++ b/dev-debug/cgdb/Manifest
@@ -0,0 +1,10 @@
+AUX cgdb-0.7.1-respect-AR.patch 807 BLAKE2B 6689327f2a41f52d772b1d1f2714bac4f4cd40e994b51c6b12a8c9c5d40ed6616cb03128753e60bb773a6c6b46d26fb6d9d80c67c0ac8432e5f17e34b70105d8 SHA512 db51c83bec17cf05e9b8dfc7d92b253999e545c2c1a002db2f63edc0a08d0c831fa6b4b5177e972844755f4df455ec268e5b3554115f5fdeafa071d1df0dd4bc
+AUX cgdb-0.8.0-ar.patch 469 BLAKE2B e0633baffddab3d298f1a5ef7bb6c39138a01f639d58121fc4d52fc2b5aa1244fb6ebb848fb301f71f8bd5a2ab629c7fd0771e3bc73bc999c12e0f4b5dc48164 SHA512 e0c60ea8f3c5e89071e38f5b3b42c54a6f1cb39715c0b77fd72c6c7453da1ff16c2edced39a788b905400f635ed4a74e9b531b3e72879fa3c62b949bb1e1147d
+AUX cgdb-9999-ar.patch 378 BLAKE2B 684cd519d7fc856c9d1b66c97b5a8311f136ed0458f73e79bf23ab3a2e84704d5b98480c1d8a7f8eb9a4434d9e6a6e0828e285ebeabe215e9b7d234f16410155 SHA512 e075fee139e373befb1d027ff9ce57910ab2adf877e8e03fbcde9133e494ac0b657acb0a5cd6433fd9d3d39c5766e3d2ab8d5ed69d2b2a6a18f97aed90d96646
+AUX cgdb-test.patch 2132 BLAKE2B 7308e2817a0956382a2949baad003ff0adf10989825170fcc953979d9f39da245584de4245d4d86b81e9cb74cccf11628ce3448a736cc3e89ae6e9dfabc3112e SHA512 8c5dde409035134ee75115c99a9b257a6c711750fbf662478d33911a015cccf4bf1a1ee6ec9d72d7075b0ce6dfae98a30ec60f4d2447f958ba322ced71be203c
+DIST cgdb-0.7.1.tar.gz 314768 BLAKE2B 767a57d071fa4e3c75d231a1ec879d871669fcda9c733d157d380fa525dd321f1deb68d7ef7f424b3f36a115043a0a0faae271f24746f934e288ba7d9a4e7fa1 SHA512 050c7bad963d51c1a2cb309530319ca77e9d236f419fb0abac4ab5030ff1068d799fa626959a8b3036321711de98bddf40d264bf9367ff5697075e30ca8168c6
+DIST cgdb-0.8.0.tar.gz 328281 BLAKE2B 60e577dd5f8363b91da33136a9ffd911581e9cea4cdc1d0fcd338e0a761a26921e6edf6298c619b8d0eb1486449843457b2c5370a395a8c49fed5382a60e63a2 SHA512 e2b653db472de2014402dae6d13953ab811526a47ad5d7a05e34cfba09f44d6fea6b19304b9205ff0e2ac9549ffa5818f4282d7c03293b6c0ca9d563f9ae89e1
+EBUILD cgdb-0.7.1.ebuild 1541 BLAKE2B 1deadc0b7c8812ef91d4a1019c6883f98f2114fd0a29e7de38507c1eddbd83ea0bc5f2a937112ffaa11673434d32bf24de4f73728f8050e713c5869890aa04ba SHA512 bf337be44c4729028621db8d58d2850d92e33b1a8843f27de991de4049b76b7113a4d7ca14989abf3a1d15978d464577dc9b956ff8e38524b2ea78c130781bfc
+EBUILD cgdb-0.8.0.ebuild 1470 BLAKE2B cfa57fd5d053826e29ffb3e71eab49da522bede2ef83885efd7aea724f146db86b7f6176a5778c979da65fac9338c7d251a456b00fa4dc6dfb9cf07f1195114d SHA512 82dad9ce5f26c4a87cc017c087debf857ab98d7a5fa62d719d554cc10ecb2ee2f6f81a2888e39a10ae5814054ea47e8c40806f77eb28d652e3a53c10ced67370
+EBUILD cgdb-9999.ebuild 1475 BLAKE2B 6a67d5ae4407058d33c10145d3dd5e8b501f2a8d5c35f65e13f26f6cd9bc765553c984cea9594026feaa620881d3b31b0e347af63f1b2a8c03bb57d602db3e1b SHA512 9dc66403c54dbbefa88e3d67f488d2a72e271ecad9ac33f50cbbfc14e42a78f1e999777570375f72a56abbef0988eaedd952f885ba1c491f306b77bcb9be14b8
+MISC metadata.xml 291 BLAKE2B 10d0b1b36ae41f63a8dac8cae9860c08141b6bddad3672fa8f6649cdc50e545ee2c8f1ebd800b4026dd32dfa5e8545380a68765d5539617d971229e90535407b SHA512 b7dcb0521d63080ce670d3195bd56fe54af7d3fa3d2f0f2eaee2f1ee93a14106facffb67f1e82ff49768c90133ceaf7dc57df089b86a98f67007df1089471d77
diff --git a/dev-debug/cgdb/cgdb-0.7.1.ebuild b/dev-debug/cgdb/cgdb-0.7.1.ebuild
new file mode 100644
index 000000000000..970c6382192f
--- /dev/null
+++ b/dev-debug/cgdb/cgdb-0.7.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="
+ https://github.com/cgdb/cgdb.git
+ git@github.com:cgdb/cgdb.git"
+else
+ SRC_URI="https://github.com/cgdb/cgdb/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
+fi
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="A curses front-end for GDB, the GNU debugger"
+HOMEPAGE="https://cgdb.github.io/"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0="
+
+BDEPEND="
+ test? (
+ dev-util/dejagnu
+ app-misc/dtach
+ )"
+
+RDEPEND="
+ ${DEPEND}
+ dev-debug/gdb"
+
+DOCS=( AUTHORS ChangeLog FAQ INSTALL NEWS README.md )
+
+PATCHES=(
+ # Bugs: #730138, #678006, #630512
+ "${FILESDIR}/${PN}-test.patch"
+ # Bug: #724256
+ "${FILESDIR}/${P}-respect-AR.patch"
+)
+
+src_prepare() {
+ default
+ cp configure.{init,ac} || die "cp failed"
+ AT_M4DIR="config" eautoreconf
+}
+
+multilib_src_test() {
+ # Tests need an interactive shell, #654986
+
+ # real-time output of the log ;-)
+ touch "${T}/dtach-test.log" || die
+ tail -f "${T}/dtach-test.log" &
+ local tail_pid=${!}
+
+ nonfatal dtach -N "${T}/dtach.sock" \
+ bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
+
+ kill "${tail_pid}"
+ [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
+ [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf
+}
diff --git a/dev-debug/cgdb/cgdb-0.8.0.ebuild b/dev-debug/cgdb/cgdb-0.8.0.ebuild
new file mode 100644
index 000000000000..fad641ffce59
--- /dev/null
+++ b/dev-debug/cgdb/cgdb-0.8.0.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/cgdb/cgdb.git"
+else
+ SRC_URI="https://github.com/cgdb/cgdb/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
+fi
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="A curses front-end for GDB, the GNU debugger"
+HOMEPAGE="https://cgdb.github.io/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="test"
+# Tests are broken, need additional research to figure out the cause
+# Bug: https://bugs.gentoo.org/831899
+RESTRICT="test"
+
+DEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0="
+
+BDEPEND="
+ test? (
+ dev-util/dejagnu
+ app-misc/dtach
+ )"
+
+RDEPEND="
+ ${DEPEND}
+ dev-debug/gdb"
+
+DOCS=( AUTHORS ChangeLog FAQ INSTALL NEWS README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ar.patch
+)
+
+src_prepare() {
+ default
+ AT_M4DIR="config" eautoreconf
+}
+
+multilib_src_test() {
+ # Tests need an interactive shell, #654986
+
+ # real-time output of the log ;-)
+ touch "${T}/dtach-test.log" || die
+ tail -f "${T}/dtach-test.log" &
+ local tail_pid=${!}
+
+ nonfatal dtach -N "${T}/dtach.sock" \
+ bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
+
+ kill "${tail_pid}"
+ [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
+ [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf
+}
diff --git a/dev-debug/cgdb/cgdb-9999.ebuild b/dev-debug/cgdb/cgdb-9999.ebuild
new file mode 100644
index 000000000000..cc40b4433455
--- /dev/null
+++ b/dev-debug/cgdb/cgdb-9999.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/cgdb/cgdb.git"
+else
+ SRC_URI="https://github.com/cgdb/cgdb/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="A curses front-end for GDB, the GNU debugger"
+HOMEPAGE="https://cgdb.github.io/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="test"
+# Tests are broken, need additional research to figure out the cause
+# Bug: https://bugs.gentoo.org/831899
+RESTRICT="test"
+
+DEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0="
+
+BDEPEND="
+ test? (
+ dev-util/dejagnu
+ app-misc/dtach
+ )"
+
+RDEPEND="
+ ${DEPEND}
+ dev-debug/gdb"
+
+DOCS=( AUTHORS ChangeLog FAQ INSTALL NEWS README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ar.patch
+)
+
+src_prepare() {
+ default
+ AT_M4DIR="config" eautoreconf
+}
+
+multilib_src_test() {
+ # Tests need an interactive shell, #654986
+
+ # real-time output of the log ;-)
+ touch "${T}/dtach-test.log" || die
+ tail -f "${T}/dtach-test.log" &
+ local tail_pid=${!}
+
+ nonfatal dtach -N "${T}/dtach.sock" \
+ bash -c 'emake check &> "${T}"/dtach-test.log; echo ${?} > "${T}"/dtach-test.out'
+
+ kill "${tail_pid}"
+ [[ -f ${T}/dtach-test.out ]] || die "Unable to run tests"
+ [[ $(<"${T}"/dtach-test.out) == 0 ]] || die "Tests failed"
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf
+}
diff --git a/dev-debug/cgdb/files/cgdb-0.7.1-respect-AR.patch b/dev-debug/cgdb/files/cgdb-0.7.1-respect-AR.patch
new file mode 100644
index 000000000000..e9837855ee3d
--- /dev/null
+++ b/dev-debug/cgdb/files/cgdb-0.7.1-respect-AR.patch
@@ -0,0 +1,32 @@
+From: Jakov Smolic <jakov.smolic@sartura.hr>
+Date: Sun, 6 Sep 2020 11:33:02 +0200
+Subject: [PATCH] configure.init: respect AR
+Bug: https://bugs.gentoo.org/724256
+Patch taken from https://github.com/cgdb/cgdb/pull/142
+
+Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
+---
+ configure.init | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/configure.init b/configure.init
+index 920b2a3..d2f696d 100644
+--- a/configure.init
++++ b/configure.init
+@@ -13,6 +13,13 @@ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+ AM_PROG_LEX
+ AC_PROG_YACC
++m4_ifndef([AC_PROG_AR],[dnl
++ AN_MAKEVAR([AR], [AC_PROG_AR])
++ AN_PROGRAM([ar], [AC_PROG_AR])
++ AC_DEFUN([AC_PROG_AR],
++ [AC_CHECK_TOOL(AR, ar, :)])
++])
++AC_PROG_AR
+
+ dnl determine if we are running in linux, cygwin, solaris, or freebsd
+ AC_CANONICAL_HOST
+--
+2.26.2
+
diff --git a/dev-debug/cgdb/files/cgdb-0.8.0-ar.patch b/dev-debug/cgdb/files/cgdb-0.8.0-ar.patch
new file mode 100644
index 000000000000..128c32ec238c
--- /dev/null
+++ b/dev-debug/cgdb/files/cgdb-0.8.0-ar.patch
@@ -0,0 +1,18 @@
+Bug: https://bugs.gentoo.org/724256
+Patch taken from https://github.com/cgdb/cgdb/pull/142
+--- a/configure.ac
++++ b/configure.ac
+@@ -13,6 +13,13 @@ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+ AM_PROG_LEX
+ AC_PROG_YACC
++m4_ifndef([AC_PROG_AR],[dnl
++ AN_MAKEVAR([AR], [AC_PROG_AR])
++ AN_PROGRAM([ar], [AC_PROG_AR])
++ AC_DEFUN([AC_PROG_AR],
++ [AC_CHECK_TOOL(AR, ar, :)])
++])
++AC_PROG_AR
+
+ dnl determine if we are running in linux, cygwin, solaris, or freebsd
+ AC_CANONICAL_HOST
diff --git a/dev-debug/cgdb/files/cgdb-9999-ar.patch b/dev-debug/cgdb/files/cgdb-9999-ar.patch
new file mode 100644
index 000000000000..ed5f200b3260
--- /dev/null
+++ b/dev-debug/cgdb/files/cgdb-9999-ar.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -13,6 +13,13 @@ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+ AM_PROG_LEX
+ AC_PROG_YACC
++m4_ifndef([AC_PROG_AR],[dnl
++ AN_MAKEVAR([AR], [AC_PROG_AR])
++ AN_PROGRAM([ar], [AC_PROG_AR])
++ AC_DEFUN([AC_PROG_AR],
++ [AC_CHECK_TOOL(AR, ar, :)])
++])
++AC_PROG_AR
+
+ dnl determine if we are running in linux, cygwin, solaris, or freebsd
+ AC_CANONICAL_HOST
diff --git a/dev-debug/cgdb/files/cgdb-test.patch b/dev-debug/cgdb/files/cgdb-test.patch
new file mode 100644
index 000000000000..9bbb1749828f
--- /dev/null
+++ b/dev-debug/cgdb/files/cgdb-test.patch
@@ -0,0 +1,55 @@
+From a8a567fc46fca4ca10a23016e2fe9055669b9102 Mon Sep 17 00:00:00 2001
+From: Ian Dinwoodie <dinwoodieian@gmail.com>
+Date: Wed, 29 Jan 2020 23:58:13 -0500
+Subject: [PATCH] Ncursesw should link with tinfow.
+
+This patch is a response to issue #219.
+
+Signed-off-by: Ian Dinwoodie <dinwoodieian@gmail.com>
+---
+ config/readline_check_version.m4 | 24 ++++++++++++++++++++----
+ 1 file changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/config/readline_check_version.m4 b/config/readline_check_version.m4
+index 567bfbd4..01e61c28 100644
+--- a/config/readline_check_version.m4
++++ b/config/readline_check_version.m4
+@@ -7,10 +7,23 @@ AC_MSG_CHECKING(which library has the termcap functions)
+ _bash_needmsg=
+ fi
+ AC_CACHE_VAL(bash_cv_termcap_lib,
+-[AC_CHECK_LIB(]$curses_lib_name[, tgetent, bash_cv_termcap_lib=lib]$curses_lib_name[,
+- [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
+- [AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
+- bash_cv_termcap_lib=gnutermcap)])])])
++[AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
++if test "$curses_lib_name" = "ncursesw"; then
++ [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw,
++ [AC_CHECK_LIB(tinfow, tgetent, bash_cv_termcap_lib=libtinfow)]
++ )]
++elif test "$curses_lib_name" = "ncurses"; then
++ [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
++ [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo)]
++ )]
++elif test "$curses_lib_name" = "curses"; then
++ [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses)]
++else
++ [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
++ bash_cv_termcap_lib=gnutermcap
++ )]
++fi
++)])
+ if test "X$_bash_needmsg" = "Xyes"; then
+ AC_MSG_CHECKING(which library has the termcap functions)
+ fi
+@@ -19,6 +32,9 @@ if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
+ LDFLAGS="$LDFLAGS -L./lib/termcap"
+ TERMCAP_LIB="./lib/termcap/libtermcap.a"
+ TERMCAP_DEP="./lib/termcap/libtermcap.a"
++elif test $bash_cv_termcap_lib = libtinfow; then
++TERMCAP_LIB=-ltinfow
++TERMCAP_DEP=
+ elif test $bash_cv_termcap_lib = libtinfo; then
+ TERMCAP_LIB=-ltinfo
+ TERMCAP_DEP=
+
diff --git a/dev-debug/cgdb/metadata.xml b/dev-debug/cgdb/metadata.xml
new file mode 100644
index 000000000000..6dfc01c9d272
--- /dev/null
+++ b/dev-debug/cgdb/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">cgdb/cgdb</remote-id>
+ <remote-id type="sourceforge">cgdb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-debug/gdb-apple/Manifest b/dev-debug/gdb-apple/Manifest
new file mode 100644
index 000000000000..3603a95f0ec3
--- /dev/null
+++ b/dev-debug/gdb-apple/Manifest
@@ -0,0 +1,8 @@
+AUX gdb-apple-1518-darwin8-9.patch 2260 BLAKE2B 29c00d40a6f34f2f602b0ecfaa4079b7e70cbc2a30d1bf93c6c93cb03168bb93a1af749b8631b05950863fa8d46b0060f9270f4980bab937aac50c8c738afb3c SHA512 7c079c480b3ed1e9d6cfed78ea87358988a4c72a0e89f4cd76e12b235e9451ab6ea77679ad0953f224e6c30ba0d078c5ce4e1a25f6bbd1134214dd721b0420b6
+AUX gdb-apple-1518-darwin8.patch 3022 BLAKE2B e2c60e539fd81af137ac915a1c957ad62482686f196e941fcf9946f10682e35ecfe9438e04b6f0f9618b6fcb9c06ae363b97c2cf45cf1a13befad399b74df6c0 SHA512 efa100767336d0eba752d03d5d6ea6a77c80e40160208cd157abc444064c779f9d671e5a621cbeae8f7b2ae134e838e49a2726d1d9efcbd8421070a6b789679d
+AUX gdb-apple-1705-darwin8-10.patch 286 BLAKE2B f7f038e870aafe73ee79251bee1441e9186db898e211556212a53c1a0ec935059d1e16766d4bddffda980777c972bb661b09b6bb8973e6f3cc6b00008b37e3f3 SHA512 baf049e3a1e580faeb5b5481bbdda5cfd96abb22ec7dd2528986c4fa78113933565a9a1711f4dcf8bed9edd27190aa9f5f04d7df141b0eb1aa65b18b57915061
+AUX gdb-apple-768-texinfo.patch 487 BLAKE2B b429247205cb241c1b876d3477310b201ab9191d582daf2f40bae92f782680df3d60fbaf335ef5a91db7bab0fffd87ff8783813f1efca690ae255157f9f98464 SHA512 fb40c8c713e0cdd34df82b368fbae5b9cc4180a6519f303750d72181dcac31436f947fc01c6949bbfc8bf8a7be4459cb2083e821433c1c4e9a587e2171933b92
+AUX gdb-apple-no-global-gdbinit.patch 714 BLAKE2B 188d5f51bec24e54357b451e26e607b53e5009ded5232fb21c513c97e5833636d041d73d0d4411b7b49810a88ec432d3fa4ef83f765a9e5fedbc047478c43160 SHA512 e692621595562f002a8f2d170cf3aed087f09ddb0578e2a8bf4bdac77119ee7c4a921f9d4a10273a3c0b7cbe95299d936c93971b5ff1a73fd528f8d1984f7a4c
+DIST gdb-1752.tar.gz 17922994 BLAKE2B 9b27bca2b6a9f10e01d130d595270300a4e7f0040790c5b60337d41086e1238dc12d785cc88c484df630f742ddfe783f7baefc2132b47e41bb74a5d0b7ebbf1e SHA512 863a861a9a7708b8a763ea93599f6b519277f23fff35700d04e81a7747cc49421d0f051790deb92c440ced30ee15ba719b75066d5a614341e0f0b765d7a81094
+EBUILD gdb-apple-1752.ebuild 2672 BLAKE2B 6449e1daac76e410005cb3abefbbde222093edfa22eb3eeb50f0a044817b1f8e3a1197d54f8f8174ce30a6d7c661bb360cbcf413139f1dfc06471e8d431892a4 SHA512 39a66f27ddfaf987fa674aeffc6ade587522c23db336753adde078e66d096cb7000fdd51c0d6d581f4e15010c05421049b8fe1bd3a59c2fb96692a06a22cfdb7
+MISC metadata.xml 248 BLAKE2B 92ffbf5df7cedae395e3af770765075073d9dd2ddcc887b34b1eca1997d449a5dc827cb3513863a21f26efebf75700fc87e1228c8614a47e951da4b270f264d4 SHA512 5dca2496f2ab8cbdb810fd11c488d84ab9822448794d7e6e3edbb1f71a9f1865248685e25d3e54524b43d781b8e073082773606f8e91943a71fd2bafe63f7b73
diff --git a/dev-debug/gdb-apple/files/gdb-apple-1518-darwin8-9.patch b/dev-debug/gdb-apple/files/gdb-apple-1518-darwin8-9.patch
new file mode 100644
index 000000000000..a05169cec25d
--- /dev/null
+++ b/dev-debug/gdb-apple/files/gdb-apple-1518-darwin8-9.patch
@@ -0,0 +1,87 @@
+--- src/gdb/macosx/macosx-nat-dyld.c
++++ src/gdb/macosx/macosx-nat-dyld.c
+@@ -2083,7 +2083,9 @@
+ case MH_DYLIB:
+ case MH_DYLINKER:
+ case MH_BUNDLE:
++#ifdef MH_KEXT_BUNDLE
+ case MH_KEXT_BUNDLE:
++#endif
+ break;
+ case MH_FVMLIB:
+ case MH_PRELOAD:
+@@ -2412,7 +2414,9 @@
+ break;
+ case MH_DYLINKER:
+ case MH_BUNDLE:
++#ifdef MH_KEXT_BUNDLE
+ case MH_KEXT_BUNDLE:
++#endif
+ entry->reason = dyld_reason_dyld;
+ break;
+ default:
+--- src/gdb/macosx/macosx-nat-dyld-process.c
++++ src/gdb/macosx/macosx-nat-dyld-process.c
+@@ -407,7 +407,9 @@
+ case MH_DYLIB:
+ break;
+ case MH_BUNDLE:
++#ifdef MH_KEXT_BUNDLE
+ case MH_KEXT_BUNDLE:
++#endif
+ break;
+ default:
+ return;
+ return;
+--- src/gdb/macosx/macosx-nat-inferior.c
++++ src/gdb/macosx/macosx-nat-inferior.c
+@@ -2692,6 +2692,7 @@
+ if (tp->private == NULL || tp->private->app_thread_port == 0)
+ return NULL;
+
++#ifdef THREAD_IDENTIFIER_INFO_COUNT
+ thread_identifier_info_data_t tident;
+ unsigned int info_count;
+ kern_return_t kret;
+@@ -2719,6 +2720,7 @@
+ }
+ }
+ }
++#endif
+ return buf;
+ }
+
+--- src/gdb/macosx/macosx-nat-infthread.c
++++ src/gdb/macosx/macosx-nat-infthread.c
+@@ -809,6 +809,7 @@
+ print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
+ switch_to_thread (current_ptid);
+
++#ifdef THREAD_IDENTIFIER_INFO_COUNT
+ thread_identifier_info_data_t tident;
+ info_count = THREAD_IDENTIFIER_INFO_COUNT;
+ kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident,
+@@ -878,6 +879,7 @@
+ printf_filtered ("\tcurrent priority: %d\n", pth.pth_priority);
+ printf_filtered ("\tmax priority: %d\n", pth.pth_maxpriority);
+ }
++#endif
+
+ printf_filtered ("\tsuspend count: %d", info.suspend_count);
+
+@@ -1175,6 +1177,7 @@
+ ui_out_field_fmt (uiout, "mach-port-number", "0x%s",
+ paddr_nz (app_thread_name));
+
++#ifdef THREAD_IDENTIFIER_INFO_COUNT
+ thread_identifier_info_data_t tident;
+ info_count = THREAD_IDENTIFIER_INFO_COUNT;
+ kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident,
+@@ -1207,6 +1210,7 @@
+ paddr_nz (struct_addr));
+ }
+ }
++#endif
+ }
+
+
diff --git a/dev-debug/gdb-apple/files/gdb-apple-1518-darwin8.patch b/dev-debug/gdb-apple/files/gdb-apple-1518-darwin8.patch
new file mode 100644
index 000000000000..f8ecc30be7f6
--- /dev/null
+++ b/dev-debug/gdb-apple/files/gdb-apple-1518-darwin8.patch
@@ -0,0 +1,128 @@
+--- src/gdb/macosx/macosx-nat-inferior.c
++++ src/gdb/macosx/macosx-nat-inferior.c
+@@ -60,13 +60,17 @@
+ #include <sys/sysctl.h>
+ #include <sys/proc.h>
+ #include <mach/mach_error.h>
++#if defined(TARGET_ARM)
+ #include <spawn.h>
++#endif
+
+ #include <semaphore.h>
+
+ #include <dlfcn.h>
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-inferior.h"
+--- src/gdb/macosx/macosx-nat-info.c
++++ src/gdb/macosx/macosx-nat-info.c
+@@ -45,6 +45,22 @@
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-debug.h"
+
++#ifdef __ppc__
++#ifndef __darwin_ppc_thread_state
++#define __darwin_ppc_thread_state ppc_thread_state
++#define __r0 r0
++#define __srr0 srr0
++#define __srr1 srr1
++#define __cr cr
++#define __xer xer
++#define __lr lr
++#define __ctr ctr
++#endif
++#ifndef __darwin_ppc_exception_state
++#define __darwin_ppc_exception_state ppc_exception_state
++#endif
++#endif
++
+ extern macosx_inferior_status *macosx_status;
+
+ #define CHECK_ARGS(what, args) \
+--- src/gdb/macosx/macosx-nat-infthread.c
++++ src/gdb/macosx/macosx-nat-infthread.c
+@@ -36,8 +36,10 @@
+ #include <sys/dir.h>
+ #include <inttypes.h>
+
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-util.h"
+--- src/gdb/macosx/macosx-tdep.c
++++ src/gdb/macosx/macosx-tdep.c
+@@ -64,7 +64,6 @@
+ #include "gdbcore.h"
+
+ #include <dirent.h>
+-#include <libgen.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/param.h>
+--- src/gdb/remote.c
++++ src/gdb/remote.c
+@@ -63,7 +63,6 @@
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-dyld-process.h"
+ #endif
+-#include <execinfo.h>
+
+ /* Prototypes for local functions. */
+ static void cleanup_sigint_signal_handler (void *dummy);
+@@ -475,11 +474,13 @@
+ static void
+ remote_backtrace_self (const char *message)
+ {
++#if 0
+ void *bt_buffer[100];
+ int count = backtrace (bt_buffer, 100);
+ if (message && message[0])
+ fprintf_filtered (gdb_stderr, "%s", message);
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
++#endif
+ }
+
+ static void
+--- src/gdb/symfile.c
++++ src/gdb/symfile.c
+@@ -67,7 +67,6 @@
+ #include <ctype.h>
+ #include <time.h>
+ #include <sys/time.h>
+-#include <libgen.h>
+
+ #include <sys/mman.h>
+
+--- src/gdb/utils.c
++++ src/gdb/utils.c
+@@ -28,7 +28,6 @@
+ #include "event-top.h"
+ #include "exceptions.h"
+ #include "bfd.h"
+-#include <execinfo.h>
+ #include <sys/resource.h>
+ #include <uuid/uuid.h>
+
+@@ -879,6 +878,7 @@
+ target_terminal_ours ();
+ begin_line ();
+
++#if 0
+ /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely
+ to get useful bug reports. */
+ {
+@@ -887,6 +887,7 @@
+ fprintf (stderr, "gdb stack crawl at point of internal error:\n");
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
+ }
++#endif
+
+ /* Create a string containing the full error/warning message. Need
+ to call query with this full string, as otherwize the reason
diff --git a/dev-debug/gdb-apple/files/gdb-apple-1705-darwin8-10.patch b/dev-debug/gdb-apple/files/gdb-apple-1705-darwin8-10.patch
new file mode 100644
index 000000000000..32247431fe89
--- /dev/null
+++ b/dev-debug/gdb-apple/files/gdb-apple-1705-darwin8-10.patch
@@ -0,0 +1,11 @@
+--- src/gdb/macosx/macosx-nat-dyld.c
++++ src/gdb/macosx/macosx-nat-dyld.c
+@@ -788,7 +788,7 @@
+ }
+ else
+ {
+-#if defined (NM_NEXTSTEP)
++#if defined (NM_NEXTSTEP) && defined(TASK_DYLD_INFO_COUNT)
+ if (macosx_status->task == TASK_NULL)
+ return 0;
+
diff --git a/dev-debug/gdb-apple/files/gdb-apple-768-texinfo.patch b/dev-debug/gdb-apple/files/gdb-apple-768-texinfo.patch
new file mode 100644
index 000000000000..41153d8436de
--- /dev/null
+++ b/dev-debug/gdb-apple/files/gdb-apple-768-texinfo.patch
@@ -0,0 +1,10 @@
+--- src/Makefile.in
++++ src/Makefile.in
+@@ -280,6 +280,6 @@
+ then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
+ else if (${CONFIGURED_MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
++ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|4\.[1-9][0-9]|[5-9])') >/dev/null 2>&1; \
+ then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
+
+ # This just becomes part of the MAKEINFO definition passed down to
diff --git a/dev-debug/gdb-apple/files/gdb-apple-no-global-gdbinit.patch b/dev-debug/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
new file mode 100644
index 000000000000..0c132ec5b384
--- /dev/null
+++ b/dev-debug/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
@@ -0,0 +1,23 @@
+Sourcing /etc/gdb.conf is annoying mainly because Apple put
+ set history save on
+in there, which means everywhere you run it, you end up with a
+.gdb_history file.
+
+--- src/gdb/main.c
++++ src/gdb/main.c
+@@ -675,6 +675,7 @@
+ memset (&cwdbuf, 0, sizeof (struct stat));
+ /* APPLE LOCAL end move inits up */
+ /* APPLE LOCAL begin global gdbinit */
++#ifdef WANT_GLOBAL_GDBINIT
+ memset (&globalbuf, 0, sizeof (struct stat));
+ stat (gdbinit_global, &globalbuf);
+ if (!inhibit_gdbinit)
+@@ -683,6 +684,7 @@
+ source_file (gdbinit_global, 0);
+ }
+ do_cleanups (ALL_CLEANUPS);
++#endif
+ /* APPLE LOCAL end global gdbinit */
+
+ /* APPLE LOCAL: Set the $_Xcode convenience variable at '0' before sourcing
diff --git a/dev-debug/gdb-apple/gdb-apple-1752.ebuild b/dev-debug/gdb-apple/gdb-apple-1752.ebuild
new file mode 100644
index 000000000000..974164cdbaa3
--- /dev/null
+++ b/dev-debug/gdb-apple/gdb-apple-1752.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+APPLE_PV=${PV}
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.3"
+HOMEPAGE="https://sourceware.org/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x64-macos"
+
+IUSE="nls"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2:0=
+ sys-libs/readline:0=
+ =dev-db/sqlite-3*"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ || ( >=sys-devel/gcc-apple-4.2.1 sys-devel/llvm:* )"
+
+S=${WORKDIR}/gdb-${APPLE_PV}/src
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-no-global-gdbinit.patch
+ "${FILESDIR}"/${PN}-768-texinfo.patch
+ "${FILESDIR}"/${PN}-1518-darwin8-9.patch
+ "${FILESDIR}"/${PN}-1705-darwin8-10.patch
+)
+
+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 \
+ --disable-debug-symbols-framework \
+ $(use_enable nls)
+}
+
+src_compile() {
+ # unable to work around parallel make issue
+ # ignore texinfo issues (version mismatch, to hard to fix or
+ # disable)
+ emake -j2 MAKEINFOFLAGS="--force"
+}
+
+src_install() {
+ 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}"/
+ rm -f "${ED}"/usr/bin/*
+ mv "${ED}"/gdb "${ED}"/usr/bin/
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -ge 9 ]] ; then
+ ewarn "Due to increased security measures in 10.5 and up, gdb is"
+ ewarn "not able 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
+ if [[ ${CHOST} == *86* ]] ; then
+ einfo "FSF gdb works on Intel-based OSX platforms, sometimes even"
+ einfo "better than gdb-apple. You can consider installing FSF gdb"
+ einfo "instead of gdb-apple, since the FSF version is surely more"
+ einfo "advanced than this old 6.8 version modified by Apple."
+ fi
+}
diff --git a/dev-debug/gdb-apple/metadata.xml b/dev-debug/gdb-apple/metadata.xml
new file mode 100644
index 000000000000..232d18dd1fa2
--- /dev/null
+++ b/dev-debug/gdb-apple/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>prefix@gentoo.org</email>
+ <name>Gentoo Prefix</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-debug/gdb/Manifest b/dev-debug/gdb/Manifest
new file mode 100644
index 000000000000..09fedc3eec2c
--- /dev/null
+++ b/dev-debug/gdb/Manifest
@@ -0,0 +1,8 @@
+AUX gdb-13.2-fix-sparc-debugging.patch 4736 BLAKE2B 1c6161bca2b29cf035e68231d1c44ff96fead25c6bbaf39aa45daa61be8672b61c7375980f200bdc9787405bd61708b5499764708c4fea6ed41370f9f0f7f18f SHA512 9bb802ddc69fc8d3791590948c4283492665187c7d6eb44bd646176eede2fa1a743e36aa3aba9a60229b2baec9d1cd2ebce1489f84c197694d1a19f48af0b590
+AUX gdb-8.3.1-verbose-build.patch 395 BLAKE2B e2e82307ceae64d16aa9b57a5e639eb5d217c4d977aed0847fdf125bb13ebc004906d9afb8e3f629c41efccca88df0040015e7799c1fd24de5fb50f62f5bbd90 SHA512 c2bb013e4fcabefddcd8042bd3cbb53471f83182cc8769fe0d19eed80ccc4a83bd84d120006fa25b3b7d0310dc2f2ec6b44a6ff74909cd312b7e491f371777a3
+DIST gdb-13.2.tar.xz 23664644 BLAKE2B bf5216ba2286448a46f9e0a405367c5a678e6d7540204722d355b618018b7b75a2ebc5b51353304c5ded02a3979223a81781d305f5afa5be82516cdc2863d49f SHA512 8185d3e11ab60dafff5860a5016577bfe7dd7547ef01ebc867bc247603d82b74ff74c4f29492c7d2aee57076f52be33e289f4c6b414a4b870d4b3004909f4c34
+DIST gdb-14.1.tar.xz 24108624 BLAKE2B 52a07b4745f95561f360a597d6ec1d212dafc8e9134dc415cd7bcfb02c26934a60807c8400b545a756c68392e16e104178cdc1464430c53611973881e921a942 SHA512 575e198105076fc4a88f68591aa114ab9c1196e84386a3f7b9b58fe5f30cdeed33f6a5f957b68f08c47284ec922bb60c964627e238471419673fd913575ce427
+EBUILD gdb-13.2-r2.ebuild 8704 BLAKE2B 1d68e7432fe90bfa0a894edc545da4c8620f7a58ae8fd34f821b38903d28012b276bbf14bd20088639130762a9b9560fb3ee523b1a3073fb54e6ebe0febf4cae SHA512 19a36ac139e714e021dc24c8c9825d60458ea6ff3b03a495d8995fc70a40bb771f1b75acae43f082dc9c467b07d8dc11f8122c0911b335eb1b8d560cf58b1167
+EBUILD gdb-14.1.ebuild 8667 BLAKE2B ecde5bcd03dc14a1ed4ea13ee93ffa29817f6dd4795b1fd1173dd0cc001a73fcf1cc2addef8895a201cab41b83d1e66a6a541acf509108dec60cba334222e0e9 SHA512 2276c8000a3ee66bf9aa8ba7a3f896b368e24ad223fa7540a2558e9257ab5732cffa470006ac339f1fa16b4e9b15f3c125b42a1cc48581522462063d1e33f2a9
+EBUILD gdb-9999.ebuild 8667 BLAKE2B ecde5bcd03dc14a1ed4ea13ee93ffa29817f6dd4795b1fd1173dd0cc001a73fcf1cc2addef8895a201cab41b83d1e66a6a541acf509108dec60cba334222e0e9 SHA512 2276c8000a3ee66bf9aa8ba7a3f896b368e24ad223fa7540a2558e9257ab5732cffa470006ac339f1fa16b4e9b15f3c125b42a1cc48581522462063d1e33f2a9
+MISC metadata.xml 1348 BLAKE2B 61eb80efbf21b4d0ededbe138710ef7ce69d4c2c137448d780a0a18db13b1b80ccfc41adf9cd825358bb952dae3a627f07d2cb89845ca52383d05fe32c494b49 SHA512 b50fe1fd5fccf7eddac4eff4fd7be955e02227763725b8e00d8e3606346afa978079ed8b754948b9a3ee065441acba4787b48c2b2d55535e0f8b9405fb4f2e90
diff --git a/dev-debug/gdb/files/gdb-13.2-fix-sparc-debugging.patch b/dev-debug/gdb/files/gdb-13.2-fix-sparc-debugging.patch
new file mode 100644
index 000000000000..3d5201cd94e3
--- /dev/null
+++ b/dev-debug/gdb/files/gdb-13.2-fix-sparc-debugging.patch
@@ -0,0 +1,126 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=31a56a22c45d76df4c597439f337e3f75ac3065c
+https://sourceware.org/bugzilla/show_bug.cgi?id=30525
+https://bugs.gentoo.org/907906
+
+From 31a56a22c45d76df4c597439f337e3f75ac3065c Mon Sep 17 00:00:00 2001
+From: Pedro Alves <pedro@palves.net>
+Date: Wed, 7 Jun 2023 10:38:14 +0100
+Subject: [PATCH] Linux: Avoid pread64/pwrite64 for high memory addresses (PR
+ gdb/30525)
+
+Since commit 05c06f318fd9 ("Linux: Access memory even if threads are
+running"), GDB prefers pread64/pwrite64 to access inferior memory
+instead of ptrace. That change broke reading shared libraries on
+SPARC64 Linux, as reported by PR gdb/30525 ("gdb cannot read shared
+libraries on SPARC64").
+
+On SPARC64 Linux, surprisingly (to me), userspace shared libraries are
+mapped at high 64-bit addresses:
+
+ (gdb) info sharedlibrary
+ Cannot access memory at address 0xfff80001002011e0
+ Cannot access memory at address 0xfff80001002011d8
+ Cannot access memory at address 0xfff80001002011d8
+ From To Syms Read Shared Object Library
+ 0xfff80001000010a0 0xfff8000100021f80 Yes (*) /lib64/ld-linux.so.2
+ (*): Shared library is missing debugging information.
+
+Those addresses are 64-bit addresses with the high bits set. When
+interpreted as signed, they're negative.
+
+The Linux kernel rejects pread64/pwrite64 if the offset argument of
+type off_t (a signed type) is negative, which happens if the memory
+address we're accessing has its high bit set. See
+linux/fs/read_write.c sys_pread64 and sys_pwrite64 in Linux.
+
+Thankfully, lseek does not fail in that situation. So the fix is to
+use the 'lseek + read|write' path if the offset would be negative.
+
+Fix this in both native GDB and GDBserver.
+
+Tested on a SPARC64 GNU/Linux and x86-64 GNU/Linux.
+
+Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30525
+Change-Id: I79c724f918037ea67b7396fadb521bc9d1b10dc5
+--- a/gdb/linux-nat.c
++++ b/gdb/linux-nat.c
+@@ -3909,18 +3909,26 @@ linux_proc_xfer_memory_partial_fd (int fd, int pid,
+
+ gdb_assert (fd != -1);
+
+- /* Use pread64/pwrite64 if available, since they save a syscall and can
+- handle 64-bit offsets even on 32-bit platforms (for instance, SPARC
+- debugging a SPARC64 application). */
++ /* Use pread64/pwrite64 if available, since they save a syscall and
++ can handle 64-bit offsets even on 32-bit platforms (for instance,
++ SPARC debugging a SPARC64 application). But only use them if the
++ offset isn't so high that when cast to off_t it'd be negative, as
++ seen on SPARC64. pread64/pwrite64 outright reject such offsets.
++ lseek does not. */
+ #ifdef HAVE_PREAD64
+- ret = (readbuf ? pread64 (fd, readbuf, len, offset)
+- : pwrite64 (fd, writebuf, len, offset));
+-#else
+- ret = lseek (fd, offset, SEEK_SET);
+- if (ret != -1)
+- ret = (readbuf ? read (fd, readbuf, len)
+- : write (fd, writebuf, len));
++ if ((off_t) offset >= 0)
++ ret = (readbuf != nullptr
++ ? pread64 (fd, readbuf, len, offset)
++ : pwrite64 (fd, writebuf, len, offset));
++ else
+ #endif
++ {
++ ret = lseek (fd, offset, SEEK_SET);
++ if (ret != -1)
++ ret = (readbuf != nullptr
++ ? read (fd, readbuf, len)
++ : write (fd, writebuf, len));
++ }
+
+ if (ret == -1)
+ {
+--- a/gdbserver/linux-low.cc
++++ b/gdbserver/linux-low.cc
+@@ -5377,21 +5377,26 @@ proc_xfer_memory (CORE_ADDR memaddr, unsigned char *readbuf,
+ {
+ int bytes;
+
+- /* If pread64 is available, use it. It's faster if the kernel
+- supports it (only one syscall), and it's 64-bit safe even on
+- 32-bit platforms (for instance, SPARC debugging a SPARC64
+- application). */
++ /* Use pread64/pwrite64 if available, since they save a syscall
++ and can handle 64-bit offsets even on 32-bit platforms (for
++ instance, SPARC debugging a SPARC64 application). But only
++ use them if the offset isn't so high that when cast to off_t
++ it'd be negative, as seen on SPARC64. pread64/pwrite64
++ outright reject such offsets. lseek does not. */
+ #ifdef HAVE_PREAD64
+- bytes = (readbuf != nullptr
+- ? pread64 (fd, readbuf, len, memaddr)
+- : pwrite64 (fd, writebuf, len, memaddr));
+-#else
+- bytes = -1;
+- if (lseek (fd, memaddr, SEEK_SET) != -1)
++ if ((off_t) memaddr >= 0)
+ bytes = (readbuf != nullptr
+- ? read (fd, readbuf, len)
+- : write (fd, writebuf, len));
++ ? pread64 (fd, readbuf, len, memaddr)
++ : pwrite64 (fd, writebuf, len, memaddr));
++ else
+ #endif
++ {
++ bytes = -1;
++ if (lseek (fd, memaddr, SEEK_SET) != -1)
++ bytes = (readbuf != nullptr
++ ? read (fd, readbuf, len)
++ : write (fd, writebuf, len));
++ }
+
+ if (bytes < 0)
+ return errno;
+--
+2.39.3
diff --git a/dev-debug/gdb/files/gdb-8.3.1-verbose-build.patch b/dev-debug/gdb/files/gdb-8.3.1-verbose-build.patch
new file mode 100644
index 000000000000..06aa6084d2d2
--- /dev/null
+++ b/dev-debug/gdb/files/gdb-8.3.1-verbose-build.patch
@@ -0,0 +1,13 @@
+Enable verbose build. By default gdb ignores even --disable-silent-rules.
+Override verbosity back to non-silent.
+
+https://bugs.gentoo.org/695936
+--- a/gdb/silent-rules.mk
++++ b/gdb/silent-rules.mk
+@@ -1,5 +1,4 @@
+-# If V is undefined or V=0 is specified, use the silent/verbose/compact mode.
+-V ?= 0
++V ?= 1
+ ifeq ($(V),0)
+ ECHO_CXX = @echo " CXX $@";
+ ECHO_CXXLD = @echo " CXXLD $@";
diff --git a/dev-debug/gdb/gdb-13.2-r2.ebuild b/dev-debug/gdb/gdb-13.2-r2.ebuild
new file mode 100644
index 000000000000..43890c7910aa
--- /dev/null
+++ b/dev-debug/gdb/gdb-13.2-r2.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging
+# tips & notes.
+
+PYTHON_COMPAT=( python3_{10..11} )
+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_p2???????|*.*.90_p2???????)
+ # Weekly snapshots
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
+ https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+
+ # e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine
+ if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then
+ REGULAR_RELEASE=1
+ fi
+ ;;
+ *.*.9?)
+ # Prereleases
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+ ;;
+ *)
+ # Normal upstream release
+ SRC_URI="
+ mirror://gnu/gdb/${P}.tar.xz
+ https://sourceware.org/pub/gdb/releases/${P}.tar.xz
+ "
+
+ REGULAR_RELEASE=1
+esac
+
+PATCH_DEV=""
+PATCH_VER=""
+DESCRIPTION="GNU debugger"
+HOMEPAGE="https://sourceware.org/gdb/"
+SRC_URI="
+ ${SRC_URI}
+ ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz}
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
+"
+
+LICENSE="GPL-3+ LGPL-2.1+"
+SLOT="0"
+IUSE="cet debuginfod guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
+if [[ -n ${REGULAR_RELEASE} ]] ; then
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+fi
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/mpfr:=
+ dev-libs/gmp:=
+ >=sys-libs/ncurses-5.2-r2:=
+ >=sys-libs/readline-7:=
+ sys-libs/zlib
+ elibc_glibc? ( net-libs/libnsl:= )
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ lzma? ( app-arch/xz-utils )
+ python? ( ${PYTHON_DEPS} )
+ guile? ( >=dev-scheme/guile-2.0 )
+ xml? ( dev-libs/expat )
+ source-highlight? (
+ dev-util/source-highlight
+ )
+ xxhash? (
+ dev-libs/xxhash
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-arch/xz-utils
+ sys-apps/texinfo
+ app-alternatives/yacc
+ nls? ( sys-devel/gettext )
+ source-highlight? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+ "${FILESDIR}"/${P}-fix-sparc-debugging.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ strip-linguas -u bfd/po opcodes/po
+
+ # Avoid using ancient termcap from host on Prefix systems
+ sed -i -e 's/termcap tinfow/tinfow/g' \
+ gdb/configure{.ac,} || die
+}
+
+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}"
+}
+
+src_configure() {
+ strip-unsupported-flags
+
+ # https://sourceware.org/PR22395, bug #853898
+ filter-lto
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ local myconf=(
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or gdb's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='https://bugs.gentoo.org/'
+ --disable-werror
+ # Disable modules that are in a combined binutils/gdb tree. bug #490566
+ --disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
+
+ $(use_with debuginfod)
+
+ $(use_enable test unit-tests)
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # Helps when cross-compiling. Not to be confused with --with-sysroot.
+ --with-build-sysroot="${ESYSROOT}"
+ )
+
+ is_cross && myconf+=(
+ --with-sysroot="\${prefix}/${CTARGET}"
+ --includedir="\${prefix}/include/${CTARGET}"
+ --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
+ )
+
+ # 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, which is triggered
+ # whenever no --enable or --disable is given
+ if is_cross || use !server ; then
+ myconf+=( --disable-gdbserver )
+ fi
+
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --enable-obsolete
+ # This only disables building in the readline subdir.
+ # For gdb itself, it'll use the system version.
+ --disable-readline
+ --with-system-readline
+ # This only disables building in the zlib subdir.
+ # For gdb itself, it'll use the system version.
+ --without-zlib
+ --with-system-zlib
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with xml expat)
+ $(use_with lzma)
+ $(use_enable nls)
+ $(use_enable sim)
+ $(use_enable source-highlight)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPYTHON}")
+ $(use_with xxhash)
+ $(use_with guile)
+ $(use_with zstd)
+
+ # Find libraries using the toolchain sysroot rather than the configured
+ # prefix. Needed when cross-compiling.
+ #
+ # Check which libraries to apply this to with:
+ # "${S}"/gdb/configure --help | grep without-lib | sort
+ --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix
+ )
+
+ # source-highlight is detected with pkg-config: bug #716558
+ export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
+
+ export CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ # ensure proper compiler is detected for Clang builds: bug #831202
+ export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # Run the unittests (nabbed invocation from Fedora's spec file) at least
+ emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
+
+ # Too many failures
+ # In fact, gdb's test suite needs some work to get passing.
+ # See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
+ # As of 11.2, on amd64: "# of unexpected failures 8600"
+ # Also, ia64 kernel crashes when gdb testsuite is running.
+ #emake -k check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ find "${ED}"/usr -name libiberty.a -delete || die
+
+ # Delete translations that conflict with binutils-libs. bug #528088
+ # Note: Should figure out how to store these in an internal gdb dir.
+ if use nls ; then
+ find "${ED}" \
+ -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
+ -delete || die
+ fi
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -rf "${ED}"/usr/share/{doc,info,locale} || die
+ local f
+ for f in "${ED}"/usr/share/man/*/* ; do
+ if [[ ${f##*/} != ${CTARGET}-* ]] ; then
+ mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
+ fi
+ 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
+ # notes in src_configure above).
+ [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
+
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/PROBLEMS
+ docinto sim
+ dodoc sim/{MAINTAINERS,README-HACKING}
+
+ if use server ; then
+ docinto gdbserver
+ dodoc gdbserver/README
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
+
+ if use python ; then
+ python_optimize "${ED}"/usr/share/gdb/python/gdb
+ fi
+}
+
+pkg_postinst() {
+ # Portage doesn't 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/dev-debug/gdb/gdb-14.1.ebuild b/dev-debug/gdb/gdb-14.1.ebuild
new file mode 100644
index 000000000000..89469e978771
--- /dev/null
+++ b/dev-debug/gdb/gdb-14.1.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging
+# tips & notes.
+
+PYTHON_COMPAT=( python3_{10..12} )
+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_p2???????|*.*.90_p2???????)
+ # Weekly snapshots
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
+ https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+
+ # e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine
+ if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then
+ REGULAR_RELEASE=1
+ fi
+ ;;
+ *.*.9?)
+ # Prereleases
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+ ;;
+ *)
+ # Normal upstream release
+ SRC_URI="
+ mirror://gnu/gdb/${P}.tar.xz
+ https://sourceware.org/pub/gdb/releases/${P}.tar.xz
+ "
+
+ REGULAR_RELEASE=1
+esac
+
+PATCH_DEV=""
+PATCH_VER=""
+DESCRIPTION="GNU debugger"
+HOMEPAGE="https://sourceware.org/gdb/"
+SRC_URI="
+ ${SRC_URI}
+ ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz}
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
+"
+
+LICENSE="GPL-3+ LGPL-2.1+"
+SLOT="0"
+IUSE="cet debuginfod guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
+if [[ -n ${REGULAR_RELEASE} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+fi
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/mpfr:=
+ dev-libs/gmp:=
+ >=sys-libs/ncurses-5.2-r2:=
+ >=sys-libs/readline-7:=
+ sys-libs/zlib
+ elibc_glibc? ( net-libs/libnsl:= )
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ lzma? ( app-arch/xz-utils )
+ python? ( ${PYTHON_DEPS} )
+ guile? ( >=dev-scheme/guile-2.0 )
+ xml? ( dev-libs/expat )
+ source-highlight? (
+ dev-util/source-highlight
+ )
+ xxhash? (
+ dev-libs/xxhash
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-arch/xz-utils
+ sys-apps/texinfo
+ app-alternatives/yacc
+ nls? ( sys-devel/gettext )
+ source-highlight? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )
+"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ MIN # gnulib FP (bug #898688)
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ strip-linguas -u bfd/po opcodes/po
+
+ # Avoid using ancient termcap from host on Prefix systems
+ sed -i -e 's/termcap tinfow/tinfow/g' \
+ gdb/configure{.ac,} || die
+}
+
+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}"
+}
+
+src_configure() {
+ strip-unsupported-flags
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ local myconf=(
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or gdb's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='https://bugs.gentoo.org/'
+ --disable-werror
+ # Disable modules that are in a combined binutils/gdb tree. bug #490566
+ --disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
+
+ $(use_with debuginfod)
+
+ $(use_enable test unit-tests)
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # Helps when cross-compiling. Not to be confused with --with-sysroot.
+ --with-build-sysroot="${ESYSROOT}"
+ )
+
+ is_cross && myconf+=(
+ --with-sysroot="\${prefix}/${CTARGET}"
+ --includedir="\${prefix}/include/${CTARGET}"
+ --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
+ )
+
+ # 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, which is triggered
+ # whenever no --enable or --disable is given
+ if is_cross || use !server ; then
+ myconf+=( --disable-gdbserver )
+ fi
+
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --enable-obsolete
+ # This only disables building in the readline subdir.
+ # For gdb itself, it'll use the system version.
+ --disable-readline
+ --with-system-readline
+ # This only disables building in the zlib subdir.
+ # For gdb itself, it'll use the system version.
+ --without-zlib
+ --with-system-zlib
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with xml expat)
+ $(use_with lzma)
+ $(use_enable nls)
+ $(use_enable sim)
+ $(use_enable source-highlight)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPYTHON}")
+ $(use_with xxhash)
+ $(use_with guile)
+ $(use_with zstd)
+
+ # Find libraries using the toolchain sysroot rather than the configured
+ # prefix. Needed when cross-compiling.
+ #
+ # Check which libraries to apply this to with:
+ # "${S}"/gdb/configure --help | grep without-lib | sort
+ --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix
+ )
+
+ # source-highlight is detected with pkg-config: bug #716558
+ export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
+
+ export CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ # ensure proper compiler is detected for Clang builds: bug #831202
+ export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # Run the unittests (nabbed invocation from Fedora's spec file) at least
+ emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
+
+ # Too many failures
+ # In fact, gdb's test suite needs some work to get passing.
+ # See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
+ # As of 11.2, on amd64: "# of unexpected failures 8600"
+ # Also, ia64 kernel crashes when gdb testsuite is running.
+ #emake -k check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ find "${ED}"/usr -name libiberty.a -delete || die
+
+ # Delete translations that conflict with binutils-libs. bug #528088
+ # Note: Should figure out how to store these in an internal gdb dir.
+ if use nls ; then
+ find "${ED}" \
+ -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
+ -delete || die
+ fi
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -rf "${ED}"/usr/share/{doc,info,locale} || die
+ local f
+ for f in "${ED}"/usr/share/man/*/* ; do
+ if [[ ${f##*/} != ${CTARGET}-* ]] ; then
+ mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
+ fi
+ 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
+ # notes in src_configure above).
+ [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
+
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/PROBLEMS
+ docinto sim
+ dodoc sim/{MAINTAINERS,README-HACKING}
+
+ if use server ; then
+ docinto gdbserver
+ dodoc gdbserver/README
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
+
+ if use python ; then
+ python_optimize "${ED}"/usr/share/gdb/python/gdb
+ fi
+}
+
+pkg_postinst() {
+ # Portage doesn't 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/dev-debug/gdb/gdb-9999.ebuild b/dev-debug/gdb/gdb-9999.ebuild
new file mode 100644
index 000000000000..89469e978771
--- /dev/null
+++ b/dev-debug/gdb/gdb-9999.ebuild
@@ -0,0 +1,314 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# See https://sourceware.org/gdb/wiki/DistroAdvice for general packaging
+# tips & notes.
+
+PYTHON_COMPAT=( python3_{10..12} )
+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_p2???????|*.*.90_p2???????)
+ # Weekly snapshots
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-weekly-${MY_PV}.tar.xz
+ https://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-weekly-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+
+ # e.g. 13.1.90_p20230325 is a snapshot on the stable branch, so it's fine
+ if [[ ${PV} == *.[123456789].9?_p2??????? ]] ; then
+ REGULAR_RELEASE=1
+ fi
+ ;;
+ *.*.9?)
+ # Prereleases
+ MY_PV="${PV/_p/.}"
+ SRC_URI="
+ https://sourceware.org/pub/gdb/snapshots/branch/gdb-${MY_PV}.tar.xz
+ https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/gdb-${MY_PV}.tar.xz
+ "
+ S="${WORKDIR}/${PN}-${MY_PV}"
+ ;;
+ *)
+ # Normal upstream release
+ SRC_URI="
+ mirror://gnu/gdb/${P}.tar.xz
+ https://sourceware.org/pub/gdb/releases/${P}.tar.xz
+ "
+
+ REGULAR_RELEASE=1
+esac
+
+PATCH_DEV=""
+PATCH_VER=""
+DESCRIPTION="GNU debugger"
+HOMEPAGE="https://sourceware.org/gdb/"
+SRC_URI="
+ ${SRC_URI}
+ ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${CATEGORY}/${PN}/${P}-patches-${PATCH_VER}.tar.xz}
+ ${PATCH_VER:+mirror://gentoo/${P}-patches-${PATCH_VER}.tar.xz}
+"
+
+LICENSE="GPL-3+ LGPL-2.1+"
+SLOT="0"
+IUSE="cet debuginfod guile lzma multitarget nls +python +server sim source-highlight test vanilla xml xxhash zstd"
+if [[ -n ${REGULAR_RELEASE} ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
+fi
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ dev-libs/mpfr:=
+ dev-libs/gmp:=
+ >=sys-libs/ncurses-5.2-r2:=
+ >=sys-libs/readline-7:=
+ sys-libs/zlib
+ elibc_glibc? ( net-libs/libnsl:= )
+ debuginfod? (
+ dev-libs/elfutils[debuginfod(-)]
+ )
+ lzma? ( app-arch/xz-utils )
+ python? ( ${PYTHON_DEPS} )
+ guile? ( >=dev-scheme/guile-2.0 )
+ xml? ( dev-libs/expat )
+ source-highlight? (
+ dev-util/source-highlight
+ )
+ xxhash? (
+ dev-libs/xxhash
+ )
+ zstd? ( app-arch/zstd:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-arch/xz-utils
+ sys-apps/texinfo
+ app-alternatives/yacc
+ nls? ( sys-devel/gettext )
+ source-highlight? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )
+"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ MIN # gnulib FP (bug #898688)
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.3.1-verbose-build.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ strip-linguas -u bfd/po opcodes/po
+
+ # Avoid using ancient termcap from host on Prefix systems
+ sed -i -e 's/termcap tinfow/tinfow/g' \
+ gdb/configure{.ac,} || die
+}
+
+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}"
+}
+
+src_configure() {
+ strip-unsupported-flags
+
+ # See https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
+ # Avoid really confusing logs from subconfigure spam, makes logs far
+ # more legible.
+ MAKEOPTS="--output-sync=line ${MAKEOPTS}"
+
+ local myconf=(
+ # portage's econf() does not detect presence of --d-d-t
+ # because it greps only top-level ./configure. But not
+ # libiberty's or gdb's configure.
+ --disable-dependency-tracking
+ --disable-silent-rules
+
+ --with-pkgversion="$(gdb_branding)"
+ --with-bugurl='https://bugs.gentoo.org/'
+ --disable-werror
+ # Disable modules that are in a combined binutils/gdb tree. bug #490566
+ --disable-{binutils,etc,gas,gold,gprof,gprofng,ld}
+
+ $(use_with debuginfod)
+
+ $(use_enable test unit-tests)
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
+
+ # Helps when cross-compiling. Not to be confused with --with-sysroot.
+ --with-build-sysroot="${ESYSROOT}"
+ )
+
+ is_cross && myconf+=(
+ --with-sysroot="\${prefix}/${CTARGET}"
+ --includedir="\${prefix}/include/${CTARGET}"
+ --with-gdb-datadir="\${datadir}/gdb/${CTARGET}"
+ )
+
+ # 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, which is triggered
+ # whenever no --enable or --disable is given
+ if is_cross || use !server ; then
+ myconf+=( --disable-gdbserver )
+ fi
+
+ myconf+=(
+ --enable-64-bit-bfd
+ --disable-install-libbfd
+ --disable-install-libiberty
+ --enable-obsolete
+ # This only disables building in the readline subdir.
+ # For gdb itself, it'll use the system version.
+ --disable-readline
+ --with-system-readline
+ # This only disables building in the zlib subdir.
+ # For gdb itself, it'll use the system version.
+ --without-zlib
+ --with-system-zlib
+ --with-separate-debug-dir="${EPREFIX}"/usr/lib/debug
+ $(use_with xml expat)
+ $(use_with lzma)
+ $(use_enable nls)
+ $(use_enable sim)
+ $(use_enable source-highlight)
+ $(use multitarget && echo --enable-targets=all)
+ $(use_with python python "${EPYTHON}")
+ $(use_with xxhash)
+ $(use_with guile)
+ $(use_with zstd)
+
+ # Find libraries using the toolchain sysroot rather than the configured
+ # prefix. Needed when cross-compiling.
+ #
+ # Check which libraries to apply this to with:
+ # "${S}"/gdb/configure --help | grep without-lib | sort
+ --without-lib{babeltrace,expat,gmp,iconv,ipt,lzma,mpfr,xxhash}-prefix
+ )
+
+ # source-highlight is detected with pkg-config: bug #716558
+ export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
+
+ export CC_FOR_BUILD="$(tc-getBUILD_CC)"
+
+ # ensure proper compiler is detected for Clang builds: bug #831202
+ export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # Run the unittests (nabbed invocation from Fedora's spec file) at least
+ emake -k -C gdb run GDBFLAGS='-batch -ex "maintenance selftest"'
+
+ # Too many failures
+ # In fact, gdb's test suite needs some work to get passing.
+ # See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
+ # As of 11.2, on amd64: "# of unexpected failures 8600"
+ # Also, ia64 kernel crashes when gdb testsuite is running.
+ #emake -k check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ find "${ED}"/usr -name libiberty.a -delete || die
+
+ # Delete translations that conflict with binutils-libs. bug #528088
+ # Note: Should figure out how to store these in an internal gdb dir.
+ if use nls ; then
+ find "${ED}" \
+ -regextype posix-extended -regex '.*/(bfd|opcodes)[.]g?mo$' \
+ -delete || die
+ fi
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -rf "${ED}"/usr/share/{doc,info,locale} || die
+ local f
+ for f in "${ED}"/usr/share/man/*/* ; do
+ if [[ ${f##*/} != ${CTARGET}-* ]] ; then
+ mv "${f}" "${f%/*}/${CTARGET}-${f##*/}" || die
+ fi
+ 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
+ # notes in src_configure above).
+ [[ -e gdbserver/gdbreplay ]] && dobin gdbserver/gdbreplay
+
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/PROBLEMS
+ docinto sim
+ dodoc sim/{MAINTAINERS,README-HACKING}
+
+ if use server ; then
+ docinto gdbserver
+ dodoc gdbserver/README
+ fi
+
+ # Remove shared info pages
+ rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
+
+ if use python ; then
+ python_optimize "${ED}"/usr/share/gdb/python/gdb
+ fi
+}
+
+pkg_postinst() {
+ # Portage doesn't 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/dev-debug/gdb/metadata.xml b/dev-debug/gdb/metadata.xml
new file mode 100644
index 000000000000..2e08f18a3470
--- /dev/null
+++ b/dev-debug/gdb/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>toolchain@gentoo.org</email>
+ <name>Gentoo Toolchain Project</name>
+ </maintainer>
+ <use>
+ <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
+ <flag name="lzma">Support lzma compression in ELF debug info</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>
+ <flag name="sim">Build gdb's simulators for various hardware platforms. See https://sourceware.org/gdb/wiki/Sim.</flag>
+ <flag name="source-highlight">Enable listing highlighting via <pkg>dev-util/source-highlight</pkg></flag>
+ <flag name="xml">Support parsing XML data files needed (at least) for cpu features, memory maps, and syscall tracing</flag>
+ <flag name="xxhash">Use <pkg>dev-libs/xxhash</pkg> to speed up internal hashing.</flag>
+ <flag name="debuginfod">Enable debuginfod support via <pkg>dev-libs/elfutils</pkg> libdebuginfod</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:gdb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-debug/lldb/Manifest b/dev-debug/lldb/Manifest
new file mode 100644
index 000000000000..29117c4106e8
--- /dev/null
+++ b/dev-debug/lldb/Manifest
@@ -0,0 +1,14 @@
+DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78af36b0826a1dfd9a337992499bf701e33149665bfc47d5e14978e38f342559629a559f8b2ce328705ba34fdf6830f5ae9721a5 SHA512 4836d3603f32e8e54434cbfa8ef33d9d473ac5dc20ebf9c67132653c73f4524931abd1084655eaee5f20bcfcb91bcc4bbc5c4a0b603ad0c9029c556e14dc4c52
+DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
+DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
+DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
+DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
+DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
+DIST llvm-project-a085402ef54379758e6c996dbaedfcb92ad222b5.tar.gz 204569231 BLAKE2B 75403225fbe54f0921b279b237a90f1922b16997d1538fa5f225e04451fa2fc4a28e886efb7460ef0c26a3a964f0c57084e331b0736fa223926259c76d873200 SHA512 b8c6b0c7c0a4c369ecfa7ac71cf96549a19853e14bdf061b6b54429ce7ed998b236bb9ed3adbd6bf1c70c7e975508f751ebd0031ac2ff474d32216048a1c5f2d
+EBUILD lldb-15.0.7.ebuild 2694 BLAKE2B 5580b30227d9aae638c3be427a243fd876928c4383b0cc6e19cf53833bf0c9863208f98bf4384486a32eb383e84c94ee376b295f7b37b6e98bf32a18246519a4 SHA512 2dcdd55c4fe52a66472802e1021f539e8fd841f219fa3fcee1fef5576c83b22476a131cf2ae1d83afc69c4fd6a54091d4703cf8f5f32eadcff00ffd77cd9ed96
+EBUILD lldb-16.0.6-r1.ebuild 2512 BLAKE2B 44f7f9e02f606ed242e08a222d6b5f8febb2f8595cfa1b4905f4efd5ec99ee50410dbfbed9c48b46355532cf97874891c6002d02f707024bd0688c81dc3108e5 SHA512 ea50ecc91efff01a6ef86a7d195a2edd4ccd8cff7bfe52f6f8625e6a66b1422e7a4993dcfa33e090fed03436d617ba8c392564dd3709e1bb4c5bcd742cef5dc8
+EBUILD lldb-16.0.6.ebuild 2642 BLAKE2B 89460fbcd7677bf6eb70ba4c8acd1c75013abb4d895a928c595f50ba7081ad4b55c5a4cbceac54f450eddf07202de13f15e4f4b2bb1b5b7b420e81fc2f5540d3 SHA512 a0360df5f0336e7d5ac025e7d393eb17cceb723f6864a2538d977b1e5c193f34353410d01c9b481709c9a44636ad5ffd37524a89f917c6a371d6938268047e7b
+EBUILD lldb-17.0.6.ebuild 2621 BLAKE2B e0623f3effe73330f820e81ea344fee4dfac72fff74ef9fa1398de5577574a956b2490ad841d2d9beeae0e93a9197be072214536c02866e775c67093aef0ee10 SHA512 0475eba1a9c1d2bab6955f7a56ef451ad3e9389f364647ef8cfea62469d95e99f2140a55c74c7a089042e946fc73a652e7dcd631414135fe7fadee332659aa7e
+EBUILD lldb-18.0.0.9999.ebuild 2449 BLAKE2B 33181192b806d4f86c330ebebb31c5509a0e2a66372dabe5f41bde66da210153c68e50358f46fd3f28ffb5fa734fdb2cf1da2fd3faae4c7d55bb71110362c916 SHA512 6175e13def56fafe7898118a8098d4e603c3a3b15fdc9baa39d8ce483ebd47b2d99350ab6a8b5484f8aee5d7580897a733d6b1927e6702545c2d125dfb22ba73
+EBUILD lldb-18.0.0_pre20240106.ebuild 2678 BLAKE2B d0e53ff05e70dbf3c33ab68810f167bde315c306ad5ceeed2a228fc04f94860c0f6af66eb8c5af41c1ba632c67b609aa50055ae24cc1063535936c0e981162d9 SHA512 c74d1a23f4108f106eb8237334374c466f5e14bd67836dc0cd20341726f2d2e6ac873b43dc5245b973e80924fdb3b325d35368818ce8812280c18e6711ad732b
+MISC metadata.xml 299 BLAKE2B 2feead2cd1b35b3a43335ddd7711f8181b52bc63ee7166608914260c67528add5251349063afbef4f8cf0ec09b2cd4c3ffdd90f2c14ed60bb69ebc03888f6333 SHA512 cd745c54ab18d25bdaff18582105072574103a36cfe7c175ef740f266d00e9fc6f44c332904d23b911c939cf5bdf52973b388923099d8dd5dfef3c283b5cb685
diff --git a/dev-debug/lldb/lldb-15.0.7.ebuild b/dev-debug/lldb/lldb-15.0.7.ebuild
new file mode 100644
index 000000000000..3eff62955fde
--- /dev/null
+++ b/dev-debug/lldb/lldb-15.0.7.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit cmake llvm llvm.org python-single-r1
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 x86"
+IUSE="debug +libedit lzma ncurses +python test +xml"
+RESTRICT="test"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DEPEND="
+ libedit? ( dev-libs/libedit:0= )
+ lzma? ( app-arch/xz-utils:= )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+ xml? ( dev-libs/libxml2:= )
+ ~sys-devel/clang-${PV}
+ ~sys-devel/llvm-${PV}
+"
+RDEPEND="
+ ${DEPEND}
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/six[${PYTHON_USEDEP}]
+ ')
+ ${PYTHON_DEPS}
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ >=dev-lang/swig-3.0.11
+ $(python_gen_cond_dep '
+ dev-python/six[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ $(python_gen_cond_dep "
+ ~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
+ dev-python/psutil[\${PYTHON_USEDEP}]
+ ")
+ sys-devel/lld
+ )
+"
+
+LLVM_COMPONENTS=( lldb cmake )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest )
+llvm.org_set_globals
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local mycmakeargs=(
+ -DLLDB_ENABLE_CURSES=$(usex ncurses)
+ -DLLDB_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLDB_ENABLE_PYTHON=$(usex python)
+ -DLLDB_ENABLE_LUA=OFF
+ -DLLDB_ENABLE_LZMA=$(usex lzma)
+ -DLLDB_ENABLE_LIBXML2=$(usex xml)
+ -DLLDB_USE_SYSTEM_SIX=1
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+ -DLLDB_INCLUDE_TESTS=$(usex test)
+
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ # TODO: fix upstream to detect this properly
+ -DHAVE_LIBDL=ON
+ -DHAVE_LIBPTHREAD=ON
+
+ # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
+ # and TERMINFO_LIBS... so just force FindCurses.cmake to use
+ # ncurses with complete library set (including autodetection
+ # of -ltinfo)
+ -DCURSES_NEED_NCURSES=ON
+
+ -DLLDB_EXTERNAL_CLANG_RESOURCE_DIR="${BROOT}/usr/lib/clang/${LLVM_VERSION}"
+
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_BUILD_TESTS=$(usex test)
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lldb-{shell,unit}
+ # failures + hangs
+ #use python && cmake_build check-lldb-api
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name '*.a' -delete || die
+
+ use python && python_optimize
+}
diff --git a/dev-debug/lldb/lldb-16.0.6-r1.ebuild b/dev-debug/lldb/lldb-16.0.6-r1.ebuild
new file mode 100644
index 000000000000..df16f4ee368c
--- /dev/null
+++ b/dev-debug/lldb/lldb-16.0.6-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake llvm llvm.org python-single-r1
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~x86"
+IUSE="debug +libedit lzma ncurses +python test +xml"
+RESTRICT="test"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DEPEND="
+ libedit? ( dev-libs/libedit:0= )
+ lzma? ( app-arch/xz-utils:= )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+ xml? ( dev-libs/libxml2:= )
+ ~sys-devel/clang-${PV}
+ ~sys-devel/llvm-${PV}
+"
+RDEPEND="
+ ${DEPEND}
+ python? (
+ ${PYTHON_DEPS}
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ >=dev-lang/swig-3.0.11
+ )
+ test? (
+ $(python_gen_cond_dep "
+ ~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
+ dev-python/psutil[\${PYTHON_USEDEP}]
+ ")
+ sys-devel/lld
+ )
+"
+
+LLVM_COMPONENTS=( lldb cmake llvm/utils )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local mycmakeargs=(
+ -DLLDB_ENABLE_CURSES=$(usex ncurses)
+ -DLLDB_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLDB_ENABLE_PYTHON=$(usex python)
+ -DLLDB_ENABLE_LUA=OFF
+ -DLLDB_ENABLE_LZMA=$(usex lzma)
+ -DLLDB_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+ -DLLDB_INCLUDE_TESTS=$(usex test)
+
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ # TODO: fix upstream to detect this properly
+ -DHAVE_LIBDL=ON
+ -DHAVE_LIBPTHREAD=ON
+
+ # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
+ # and TERMINFO_LIBS... so just force FindCurses.cmake to use
+ # ncurses with complete library set (including autodetection
+ # of -ltinfo)
+ -DCURSES_NEED_NCURSES=ON
+
+ -DLLDB_EXTERNAL_CLANG_RESOURCE_DIR="${BROOT}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lldb-{shell,unit}
+ # failures + hangs
+ #use python && cmake_build check-lldb-api
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name '*.a' -delete || die
+
+ use python && python_optimize
+}
diff --git a/dev-debug/lldb/lldb-16.0.6.ebuild b/dev-debug/lldb/lldb-16.0.6.ebuild
new file mode 100644
index 000000000000..3ba34e51a3a7
--- /dev/null
+++ b/dev-debug/lldb/lldb-16.0.6.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake llvm llvm.org python-single-r1
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="amd64 arm arm64 ~loong x86"
+IUSE="debug +libedit lzma ncurses +python test +xml"
+RESTRICT="test"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DEPEND="
+ libedit? ( dev-libs/libedit:0= )
+ lzma? ( app-arch/xz-utils:= )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+ xml? ( dev-libs/libxml2:= )
+ ~sys-devel/clang-${PV}
+ ~sys-devel/llvm-${PV}
+"
+RDEPEND="
+ ${DEPEND}
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/six[${PYTHON_USEDEP}]
+ ')
+ ${PYTHON_DEPS}
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ >=dev-lang/swig-3.0.11
+ $(python_gen_cond_dep '
+ dev-python/six[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ $(python_gen_cond_dep "
+ ~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
+ dev-python/psutil[\${PYTHON_USEDEP}]
+ ")
+ sys-devel/lld
+ )
+"
+
+LLVM_COMPONENTS=( lldb cmake llvm/utils )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local mycmakeargs=(
+ -DLLDB_ENABLE_CURSES=$(usex ncurses)
+ -DLLDB_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLDB_ENABLE_PYTHON=$(usex python)
+ -DLLDB_ENABLE_LUA=OFF
+ -DLLDB_ENABLE_LZMA=$(usex lzma)
+ -DLLDB_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+ -DLLDB_INCLUDE_TESTS=$(usex test)
+
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ # TODO: fix upstream to detect this properly
+ -DHAVE_LIBDL=ON
+ -DHAVE_LIBPTHREAD=ON
+
+ # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
+ # and TERMINFO_LIBS... so just force FindCurses.cmake to use
+ # ncurses with complete library set (including autodetection
+ # of -ltinfo)
+ -DCURSES_NEED_NCURSES=ON
+
+ -DLLDB_EXTERNAL_CLANG_RESOURCE_DIR="${BROOT}/usr/lib/clang/${LLVM_MAJOR}"
+
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lldb-{shell,unit}
+ # failures + hangs
+ #use python && cmake_build check-lldb-api
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name '*.a' -delete || die
+
+ use python && python_optimize
+}
diff --git a/dev-debug/lldb/lldb-17.0.6.ebuild b/dev-debug/lldb/lldb-17.0.6.ebuild
new file mode 100644
index 000000000000..da6233562fa0
--- /dev/null
+++ b/dev-debug/lldb/lldb-17.0.6.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake llvm llvm.org python-single-r1
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${LLVM_SOABI}"
+KEYWORDS="amd64 ~arm arm64 ~loong x86"
+IUSE="debug +libedit lzma ncurses +python test +xml"
+RESTRICT="test"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DEPEND="
+ libedit? ( dev-libs/libedit:0= )
+ lzma? ( app-arch/xz-utils:= )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+ xml? ( dev-libs/libxml2:= )
+ ~sys-devel/clang-${PV}
+ ~sys-devel/llvm-${PV}
+"
+RDEPEND="
+ ${DEPEND}
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/six[${PYTHON_USEDEP}]
+ ')
+ ${PYTHON_DEPS}
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ >=dev-lang/swig-3.0.11
+ $(python_gen_cond_dep '
+ dev-python/six[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ $(python_gen_cond_dep "
+ ~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
+ dev-python/psutil[\${PYTHON_USEDEP}]
+ ")
+ sys-devel/lld
+ )
+"
+
+LLVM_COMPONENTS=( lldb cmake llvm/utils )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local mycmakeargs=(
+ -DLLDB_ENABLE_CURSES=$(usex ncurses)
+ -DLLDB_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLDB_ENABLE_PYTHON=$(usex python)
+ -DLLDB_ENABLE_LUA=OFF
+ -DLLDB_ENABLE_LZMA=$(usex lzma)
+ -DLLDB_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+ -DLLDB_INCLUDE_TESTS=$(usex test)
+
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ # TODO: fix upstream to detect this properly
+ -DHAVE_LIBDL=ON
+ -DHAVE_LIBPTHREAD=ON
+
+ # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
+ # and TERMINFO_LIBS... so just force FindCurses.cmake to use
+ # ncurses with complete library set (including autodetection
+ # of -ltinfo)
+ -DCURSES_NEED_NCURSES=ON
+
+ -DCLANG_RESOURCE_DIR="../../../clang/${LLVM_MAJOR}"
+
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lldb-{shell,unit}
+ # failures + hangs
+ #use python && cmake_build check-lldb-api
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name '*.a' -delete || die
+
+ use python && python_optimize
+}
diff --git a/dev-debug/lldb/lldb-18.0.0.9999.ebuild b/dev-debug/lldb/lldb-18.0.0.9999.ebuild
new file mode 100644
index 000000000000..caf23a9a38ee
--- /dev/null
+++ b/dev-debug/lldb/lldb-18.0.0.9999.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake llvm llvm.org python-single-r1
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${LLVM_SOABI}"
+IUSE="+debug +libedit lzma ncurses +python test +xml"
+RESTRICT="test"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DEPEND="
+ libedit? ( dev-libs/libedit:0= )
+ lzma? ( app-arch/xz-utils:= )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+ xml? ( dev-libs/libxml2:= )
+ ~sys-devel/clang-${PV}
+ ~sys-devel/llvm-${PV}
+"
+RDEPEND="
+ ${DEPEND}
+ python? (
+ ${PYTHON_DEPS}
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ >=dev-lang/swig-3.0.11
+ )
+ test? (
+ $(python_gen_cond_dep "
+ ~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
+ dev-python/psutil[\${PYTHON_USEDEP}]
+ ")
+ sys-devel/lld
+ )
+"
+
+LLVM_COMPONENTS=( lldb cmake llvm/utils )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local mycmakeargs=(
+ -DLLDB_ENABLE_CURSES=$(usex ncurses)
+ -DLLDB_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLDB_ENABLE_PYTHON=$(usex python)
+ -DLLDB_ENABLE_LUA=OFF
+ -DLLDB_ENABLE_LZMA=$(usex lzma)
+ -DLLDB_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+ -DLLDB_INCLUDE_TESTS=$(usex test)
+
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ # TODO: fix upstream to detect this properly
+ -DHAVE_LIBDL=ON
+ -DHAVE_LIBPTHREAD=ON
+
+ # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
+ # and TERMINFO_LIBS... so just force FindCurses.cmake to use
+ # ncurses with complete library set (including autodetection
+ # of -ltinfo)
+ -DCURSES_NEED_NCURSES=ON
+
+ -DCLANG_RESOURCE_DIR="../../../clang/${LLVM_MAJOR}"
+
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lldb-{shell,unit}
+ # failures + hangs
+ #use python && cmake_build check-lldb-api
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name '*.a' -delete || die
+
+ use python && python_optimize
+}
diff --git a/dev-debug/lldb/lldb-18.0.0_pre20240106.ebuild b/dev-debug/lldb/lldb-18.0.0_pre20240106.ebuild
new file mode 100644
index 000000000000..55e6b76df4ae
--- /dev/null
+++ b/dev-debug/lldb/lldb-18.0.0_pre20240106.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit cmake llvm llvm.org python-single-r1
+
+DESCRIPTION="The LLVM debugger"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0/${LLVM_SOABI}"
+IUSE="+debug +libedit lzma ncurses +python test +xml"
+RESTRICT="test"
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+DEPEND="
+ libedit? ( dev-libs/libedit:0= )
+ lzma? ( app-arch/xz-utils:= )
+ ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+ xml? ( dev-libs/libxml2:= )
+ ~sys-devel/clang-${PV}
+ ~sys-devel/llvm-${PV}
+"
+RDEPEND="
+ ${DEPEND}
+ python? (
+ ${PYTHON_DEPS}
+ )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ python? (
+ >=dev-lang/swig-3.0.11
+ )
+ test? (
+ $(python_gen_cond_dep "
+ ~dev-python/lit-${PV}[\${PYTHON_USEDEP}]
+ dev-python/psutil[\${PYTHON_USEDEP}]
+ ")
+ sys-devel/lld
+ )
+"
+
+LLVM_COMPONENTS=( lldb cmake llvm/utils )
+LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support third-party )
+llvm.org_set_globals
+
+pkg_setup() {
+ LLVM_MAX_SLOT=${LLVM_MAJOR} llvm_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # broken in standalone build
+ # https://github.com/llvm/llvm-project/pull/70996#issuecomment-1843275813
+ sed -e '/Debuginfod/d' \
+ -i source/Plugins/SymbolLocator/CMakeLists.txt || die
+
+ llvm.org_src_prepare
+}
+
+src_configure() {
+ # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ local mycmakeargs=(
+ -DLLDB_ENABLE_CURSES=$(usex ncurses)
+ -DLLDB_ENABLE_LIBEDIT=$(usex libedit)
+ -DLLDB_ENABLE_PYTHON=$(usex python)
+ -DLLDB_ENABLE_LUA=OFF
+ -DLLDB_ENABLE_LZMA=$(usex lzma)
+ -DLLDB_ENABLE_LIBXML2=$(usex xml)
+ -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+
+ -DLLDB_INCLUDE_TESTS=$(usex test)
+
+ -DCLANG_LINK_CLANG_DYLIB=ON
+ # TODO: fix upstream to detect this properly
+ -DHAVE_LIBDL=ON
+ -DHAVE_LIBPTHREAD=ON
+
+ # normally we'd have to set LLVM_ENABLE_TERMINFO, HAVE_TERMINFO
+ # and TERMINFO_LIBS... so just force FindCurses.cmake to use
+ # ncurses with complete library set (including autodetection
+ # of -ltinfo)
+ -DCURSES_NEED_NCURSES=ON
+
+ -DCLANG_RESOURCE_DIR="../../../clang/${LLVM_MAJOR}"
+
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ use test && mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-lldb-{shell,unit}
+ # failures + hangs
+ #use python && cmake_build check-lldb-api
+}
+
+src_install() {
+ cmake_src_install
+ find "${D}" -name '*.a' -delete || die
+
+ use python && python_optimize
+}
diff --git a/dev-debug/lldb/metadata.xml b/dev-debug/lldb/metadata.xml
new file mode 100644
index 000000000000..072910296ca3
--- /dev/null
+++ b/dev-debug/lldb/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>llvm@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">llvm/llvm-project</remote-id>
+ </upstream>
+</pkgmetadata>