From 194313a653d5ba077627c85051de73377b95672a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 3 Mar 2024 11:42:33 +0000 Subject: gentoo auto-resync : 03:03:2024 - 11:42:33 --- dev-debug/gdb/Manifest | 4 +- dev-debug/gdb/gdb-14.2.ebuild | 322 ++++++++++++++++++++++++++++++++++++++++++ dev-debug/gdb/gdb-9999.ebuild | 8 ++ 3 files changed, 333 insertions(+), 1 deletion(-) create mode 100644 dev-debug/gdb/gdb-14.2.ebuild (limited to 'dev-debug/gdb') diff --git a/dev-debug/gdb/Manifest b/dev-debug/gdb/Manifest index 5d6ee46c63a3..ef8452111016 100644 --- a/dev-debug/gdb/Manifest +++ b/dev-debug/gdb/Manifest @@ -5,8 +5,10 @@ AUX gdb-14.1-fix-print-global-variable-stubs.patch 3387 BLAKE2B ff3adebf74c8b9ca 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 +DIST gdb-14.2.tar.xz 24111936 BLAKE2B 65765dfd1ed08e19bb881fc7ae98d6ee4914f38a9a2bb0d0ca73bef472669664f807fe9c04e8dffd7025be98e736ac52f88ff5851ceddbb01a361885b18befc8 SHA512 7e07941f1fe661288cc571b4964012ceabc1760624fce20320db2f470c01439b2386f859b5288da13204b758e2e3b22a74c68c012178db93b9529b06f1e22ede EBUILD gdb-13.2-r2.ebuild 8704 BLAKE2B 1d68e7432fe90bfa0a894edc545da4c8620f7a58ae8fd34f821b38903d28012b276bbf14bd20088639130762a9b9560fb3ee523b1a3073fb54e6ebe0febf4cae SHA512 19a36ac139e714e021dc24c8c9825d60458ea6ff3b03a495d8995fc70a40bb771f1b75acae43f082dc9c467b07d8dc11f8122c0911b335eb1b8d560cf58b1167 EBUILD gdb-14.1-r1.ebuild 9231 BLAKE2B 31fc4776392a7edc8a8acb68b3e8ff6019fe01b97649a566a6dcf4016f72c5d1eb81cf2ec7e2e79483850d0732cfb17a8dcb4d27374faac96fe42e8591977719 SHA512 029e076123eee3c6e17309ff263af8a235fd3a1979c75adfc0cf743f1b2dd4bc36ccf9673be7f0a8fbfd6f3ec06228522bca642fab80772e50c208cdfbb2615e EBUILD gdb-14.1.ebuild 8667 BLAKE2B ecde5bcd03dc14a1ed4ea13ee93ffa29817f6dd4795b1fd1173dd0cc001a73fcf1cc2addef8895a201cab41b83d1e66a6a541acf509108dec60cba334222e0e9 SHA512 2276c8000a3ee66bf9aa8ba7a3f896b368e24ad223fa7540a2558e9257ab5732cffa470006ac339f1fa16b4e9b15f3c125b42a1cc48581522462063d1e33f2a9 -EBUILD gdb-9999.ebuild 8667 BLAKE2B ecde5bcd03dc14a1ed4ea13ee93ffa29817f6dd4795b1fd1173dd0cc001a73fcf1cc2addef8895a201cab41b83d1e66a6a541acf509108dec60cba334222e0e9 SHA512 2276c8000a3ee66bf9aa8ba7a3f896b368e24ad223fa7540a2558e9257ab5732cffa470006ac339f1fa16b4e9b15f3c125b42a1cc48581522462063d1e33f2a9 +EBUILD gdb-14.2.ebuild 9067 BLAKE2B 648034794b0b4c70c5645337e7c859d640e8fdd0a9d1a92656dba01adc5f4c3416524804b4776bc10d1698b28f3b88e37ffe10798129491ab000000daad5570b SHA512 dbe86f068a52c3220c1a9d5ab1b3f181e7f5dfa8fa681d7be1b10750fc78b0f546491b0b6831409775b803531719aabfe236b49d930cb6bb1a671df33322f0ab +EBUILD gdb-9999.ebuild 9067 BLAKE2B 648034794b0b4c70c5645337e7c859d640e8fdd0a9d1a92656dba01adc5f4c3416524804b4776bc10d1698b28f3b88e37ffe10798129491ab000000daad5570b SHA512 dbe86f068a52c3220c1a9d5ab1b3f181e7f5dfa8fa681d7be1b10750fc78b0f546491b0b6831409775b803531719aabfe236b49d930cb6bb1a671df33322f0ab MISC metadata.xml 1348 BLAKE2B 61eb80efbf21b4d0ededbe138710ef7ce69d4c2c137448d780a0a18db13b1b80ccfc41adf9cd825358bb952dae3a627f07d2cb89845ca52383d05fe32c494b49 SHA512 b50fe1fd5fccf7eddac4eff4fd7be955e02227763725b8e00d8e3606346afa978079ed8b754948b9a3ee065441acba4787b48c2b2d55535e0f8b9405fb4f2e90 diff --git a/dev-debug/gdb/gdb-14.2.ebuild b/dev-debug/gdb/gdb-14.2.ebuild new file mode 100644 index 000000000000..541bf7f8915a --- /dev/null +++ b/dev-debug/gdb/gdb-14.2.ebuild @@ -0,0 +1,322 @@ +# 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 + if [[ ${CHOST} == *-solaris* ]] ; then + # code relies on C++11, so make sure we get that selected + # due to Python 3.11 pymacro.h doing stuff to work around + # versioning mess based on the C version, while we're compiling + # C++ here, so we need to make it clear we're doing C++11/C11 + # because Solaris system headers act on these + sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die + fi +} + +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 index 89469e978771..541bf7f8915a 100644 --- a/dev-debug/gdb/gdb-9999.ebuild +++ b/dev-debug/gdb/gdb-9999.ebuild @@ -131,6 +131,14 @@ src_prepare() { # Avoid using ancient termcap from host on Prefix systems sed -i -e 's/termcap tinfow/tinfow/g' \ gdb/configure{.ac,} || die + if [[ ${CHOST} == *-solaris* ]] ; then + # code relies on C++11, so make sure we get that selected + # due to Python 3.11 pymacro.h doing stuff to work around + # versioning mess based on the C version, while we're compiling + # C++ here, so we need to make it clear we're doing C++11/C11 + # because Solaris system headers act on these + sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die + fi } gdb_branding() { -- cgit v1.2.3