diff options
Diffstat (limited to 'sys-devel/gdb')
-rw-r--r-- | sys-devel/gdb/Manifest | 8 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch | 19 | ||||
-rw-r--r-- | sys-devel/gdb/files/gdb-8.3.50.20190312-source-highlight.patch | 136 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild | 266 | ||||
-rw-r--r-- | sys-devel/gdb/gdb-9999.ebuild | 9 | ||||
-rw-r--r-- | sys-devel/gdb/metadata.xml | 1 |
6 files changed, 435 insertions, 4 deletions
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest index fe8d1b91e576..1a6065ae4a95 100644 --- a/sys-devel/gdb/Manifest +++ b/sys-devel/gdb/Manifest @@ -2,6 +2,8 @@ AUX gdb-7.12.1-ia64-include.patch 891 BLAKE2B ab8fd5cf7c394a302d3c6de36f1157623d AUX gdb-8.2-sparc-fix-syntax.patch 399 BLAKE2B db7c9fad33cb9b43e986c7a5fb0adfb7fea9aac3f59990f9e8b41ca550c7e0da2363a24f06bddd321d1629857c5cc9bafba1c62920527ccfc4f375e8fd6667e2 SHA512 631dc6d92852e7852dfaa1d99fe32b98bf646f886f9906f1e170aac2d17f2809374336b93d1fd56f09419e8317b6f7634d809fe59022b803f32e18ba7d89ab39 AUX gdb-8.2-tinfow.patch 1629 BLAKE2B eb771e3ce9add5eeb6c9d87cec229fda6557eb907877ecb4461060b8869c8598891368bb83c9ae71f5840edc0d95c9fa6d7c386e78afb724fdeadf5d1619269f SHA512 a406922c3fa9c0264cb4250895783d433f59f88eda8df63e509bc8c43d6b55b540262f34dd6f57894958574d9f3412d9d6f46397c229515204d62b0e642570d2 AUX gdb-8.2.1-aarch64-musl.patch 1785 BLAKE2B a119c650c709827a35badc36a4ac0b7df30709ecb129cc3f55091c508059eb325691a2ca81d8ca8ed50f8bfbd194af2199bd03ff0c6820fc63ac170499443020 SHA512 93745b0539492a3790baf728b703d8ae09ed7e378a522471cef8db934dbd5fcf474bfdcd9ec83c7ba42bb3610e74a7f5d901fbb4b8ce6c5bbc2ac9a9ad133151 +AUX gdb-8.3.50.20190312-c++17.patch 461 BLAKE2B a5be60c24882e4b61a46d16a34382b5b0da5af15d4fbddd0b5322cf2d0915f090ae04b7c8c53f2f5793908e7c25bda6cb4750f61394bc06b99d162dc6f2cf0ff SHA512 b2d8029b58e77958fc86779ef6d6ee90d278a29d2f10c71d4f01a492e607a308adac61190e91ad142c07c2a2e55a37b9e71689b2d0d184269b1ac4f7eac877ef +AUX gdb-8.3.50.20190312-source-highlight.patch 4986 BLAKE2B 38c6b4b51740ef9ccf9fdf3a9217f4ff9151f29f9fbab0b77449759a0d32e98e692a9b74f5e7d19ae9afada9a536faa598ae6747576e4f6c2ddf8b298e59bbcc SHA512 b65155894b8efe6bd0b257d6281a6548ba4df6d0910dccce643cff4f9b79cfd60689ca82b3e71f60b236e0aae1f886e546cd8db95b0e430fae007bf3f2c8fa1f DIST gdb-7.10.1.tar.xz 18531436 BLAKE2B b50a1b6b5b867e4a52943fdc4992c654ceec180099771381df78de5ba79086e822264356a762c61b89e986407d6f0cce336be216276545591e637131dc02f4a8 SHA512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 DIST gdb-7.12.1.tar.xz 19225392 BLAKE2B 2e4b7fe69c3cb11c04b505d1e110bf0a9ca65b6178f3e6a6ccc11fde1e8750b595016baf64adb2c22903d346cec1dab15574681de812ac8d260aebf4152a3027 SHA512 0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8 DIST gdb-7.9.1.tar.xz 17867692 BLAKE2B f5de07a4ebf1a5112a1b40341b217d08f1eb6820eb2237a4be2cd289f832600b81b3c14f4632a762fdc13945a2fb65ffb58f13eb330f3d48892799e27bb62c87 SHA512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414 @@ -10,6 +12,7 @@ DIST gdb-8.1.1.tar.xz 20064728 BLAKE2B bd17a27a3974a34b94aa5898a97cf26dba9e91b81 DIST gdb-8.1.tar.xz 20095080 BLAKE2B 9332058b8b723261ba215124f42a2d6ba916219efdfb3c23ae1f48fecf131c801bbd31b345f2c8339b23d74da690be0260ac31f8f2e79549b62f0880199bfdec SHA512 ffd82f415d7652d62dad1716c307836f594217a363429609beb7d70239e8bf06b73b393345b0e000796228e56681ed7656ac3c8be05e91d6d652ab0d5b1dc357 DIST gdb-8.2.1.tar.xz 20170388 BLAKE2B 4008232de312ee71d379ac32a0ee6d63a828c0b58e84799ab9148760ce184400920f7b22c204b9878b09c452412b1b4db507a9185456dc973538de8b88483259 SHA512 2aa81cfd389bb48c35d7d9f95cc10e88b4f7ad4597bdde0f8f1fd312f60f10d9fb2cc6e5a9355227d89ff328f7feb0fc411a69394560cafeb9fa75d35d896d11 DIST gdb-8.2.tar.xz 20173112 BLAKE2B 921fdc02f7192f0bd76eb176f857c9c041b7316dc10c5e800eb81deef82a3186d511ec431145f952e5fbd20a4b2c89c14652c42dc52e0d8152acd811f3ae44a7 SHA512 11cc481bebc51eb6db73249ecb62b8c07455cf3db169f4860b3a83114849fbd2b5860a2db64488ba6c5909cf07b255c04770f1e36059eae6bee16d2a3581be90 +DIST gdb-weekly-8.3.50.20190312.tar.xz 22101500 BLAKE2B 49666c20faf3deca48a7663e2ee671de9820cc0c0e2111e6633e1b9861bc26d4a608ea4f9e853959d85ac619a8ca63b5ada52d93c2036788ff17ba564494e7d5 SHA512 224c7b3675da46b9d26da65ee1b7e099cdd5782f212b6d865c9b713b673cc8ce9fdf33618713ee38281cf28624014b7541d00e766d3978d530ac3c8a85baf22c EBUILD gdb-7.10.1.ebuild 6596 BLAKE2B 45ba5e83e3d3f95326e109a29a7cf9a5978a9f40baaca28217b734b7f12b6891e29779fa0818b8fd007b39b5f31ee37ab40f6020a5af3cfcdbe8f0d5898a469b SHA512 882ea757b29e57d6d6fc5b156fec40f8bdcaf014136918c4bd53fc453b48ab2b0c994eeac6723ec0252da933e4912d4fc77bfeb9392ae52b1bda2a4478d5b616 EBUILD gdb-7.12.1.ebuild 6662 BLAKE2B cf3e1559840ae4a37d10da41e4bd479c35ee75888f2a26d200b858a652f220a04724068f863428acf1152fe7d66352a53c60e22197b69dc885eb3e15f30049b6 SHA512 2a5e4addd33295c9b85b7b76cbef205b031222d875ea0173a5009f82e6e83e23aef381595f0a97b82a3b97cc6dd31edda99c7a2a5bc2f5b8cfca391f7e6cbf01 EBUILD gdb-7.9.1.ebuild 5945 BLAKE2B 2f767de7261f2924808b0eeeed463fb46b6cf490ed54e51d6f49838b61d053f45410ac2dd50f71696afc71d98b89afa34158d25577ad63f07006aea0393e2edc SHA512 7154ae49de7d61bb75752ad1d8e71d0414fa8baef5fb876eead8e5df4b01b2c23555d990ef2915186ca2b098c1ebdacfd121a54aabbcf103a5478affb0b64b8c @@ -19,5 +22,6 @@ EBUILD gdb-8.1.1.ebuild 7115 BLAKE2B 07455f6ec0eb8d32bd57f404b2e831accb70995e61b EBUILD gdb-8.2-r1.ebuild 7322 BLAKE2B dcfda93fad78dbabf0153edbf1d0be0eea4cfdae1e3304bb1a5f2576d5a053d2e259063bb58e1b6cb1bddab7119120bcdcb7bf833c10f0a0596ff59a59d474c3 SHA512 2d07f8cc3e663c72676f726fe60943166bff599372d8f09e4e20c923647f0ad43148efae563f84ae5a783c44c7616560a7419890d6a0a9b84e05158aea604a82 EBUILD gdb-8.2.1.ebuild 7174 BLAKE2B cf52d8377fc93a96bb4f8351af8bc9b6a4f16557441e1ef6d7f0ce58d55fdf143a10fbbdff272e91e9575a2c064af85fd5f103c947e5b633fbf9d6a90eaa7415 SHA512 1ba8c3fc08f63c4c9b6689d65da0d939d99a89d4944c6e6294ca3ab87bba697197f356d444198befdac3eca18ba062fe935b695c73bdb5efa2646bf5278ad7ac EBUILD gdb-8.2.ebuild 7232 BLAKE2B 50ae71f70afbbbd0198394b6a638a68b29c3be243add4178b5fb2c4d5d2d6e940875c0e677d24cb1af16ee79d3c15cf99ed1160c36830e9c71fd6f92ea86f71d SHA512 ce0d2accd9d22baf1842737129925554291b1c4c9fa7f45cb853712a9ce5984d3305ab77721095d2483db1eddb025aa36b766195c98d404bcd9aec1bfff52a90 -EBUILD gdb-9999.ebuild 7012 BLAKE2B 1e7cdd2faa2988fe419089d1fdc9e993e777ba27cb52945904823bb8adb7d3ec2ad22b450c1205b0416a860c27e3ea39df428c72528a8f82538c6e8b8e57f1be SHA512 02cfc66c1342b4fbd6ed735e1e93b0c6e5579ac349eacd1e52f17828fea0087fa9b93be41fd4faaa5b7c60aac776ae5ebd41646e75712d8fcb3c34a897184073 -MISC metadata.xml 914 BLAKE2B 1260cb2638b32429345bd92c06c58074b3486ba3c516e25dab674b4589bf774f2f7192f7ed3ab9da4ed31e313038a389904bee6f9b77707d794530e3a244dfb4 SHA512 515a5bcd6c70fc87309cd4e3822d83e1b8fdf52e58cbf331df0c38b9096ad2410dfdad14aed100ea0a53457f57ecdf2b61b910b6a52765219815e1872872ee0c +EBUILD gdb-8.3.50.20190312-r1.ebuild 7221 BLAKE2B deb555df63a610739b6bbf89661b2fca72120555973021dc7ca001221a4021503cf93c4f26820771fbdec02a897715badd022061da6beb5ec3e9044e9b064d33 SHA512 ec116fa159cbea4f4de6623b52e9ef6c19ea25cbcc15de4b44ea55e354d73376d8b9fd3e5cd16a400a285d851c2a658b2cf95887b74589309df4268d2abf6c53 +EBUILD gdb-9999.ebuild 7116 BLAKE2B c178abdb6a6c3c9f17d192c4a9139f01a6f085ccab5d990280ccda8af19c0d30a302e5c4a75583ca0dfbecf0560a3754d6f2cfe6bba30de4bdbfd7a491ca5af7 SHA512 29355a681f8c7ed168db4e54ccf9c02a42116406ef01514d967016e3e6326d22cbf44ea2ea08d8493b22a5e2c5ba46abdcd8c66be09b68170c26662d03e72ef5 +MISC metadata.xml 1021 BLAKE2B 81d865fbf0282b889509edfd6901654f25e60474be0eeca406803dbee20260da840f323f036818edbe27635e5a8c944b53bfba9fd7b715301d1a3eaa50898dfc SHA512 2255a18e7275069a9d8011f8360399444924ca6a3baef788c2e44e790896ba388c974fceb36ae2d394afc943b481a785ec3c11657e5018b7cd5db0eaa869c530 diff --git a/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch b/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch new file mode 100644 index 000000000000..c134cbcae8df --- /dev/null +++ b/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch @@ -0,0 +1,19 @@ +https://bugs.gentoo.org/680232 + +--- a/gdb/unittests/string_view-selftests.c ++++ b/gdb/unittests/string_view-selftests.c +@@ -170,10 +170,12 @@ run_tests () + } /* namespace string_view */ + } /* namespace selftests */ + ++#endif /* __cplusplus < 201703L */ ++ + void + _initialize_string_view_selftests () + { ++#if defined(GDB_STRING_VIEW) + selftests::register_test ("string_view", selftests::string_view::run_tests); ++#endif + } +- +-#endif /* __cplusplus < 201703L */ diff --git a/sys-devel/gdb/files/gdb-8.3.50.20190312-source-highlight.patch b/sys-devel/gdb/files/gdb-8.3.50.20190312-source-highlight.patch new file mode 100644 index 000000000000..6479efe572f4 --- /dev/null +++ b/sys-devel/gdb/files/gdb-8.3.50.20190312-source-highlight.patch @@ -0,0 +1,136 @@ +From d46304c605ff119bc6bae38b7841d64e7568b691 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Wed, 13 Mar 2019 21:15:13 +0000 +Subject: [PATCH] gdb/configure.ac: add --enable-source-highlight + +Allow disabling source-highlight dependency autodetection even +it exists in the system. More details on problem of automatic +dependencies: +https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies + +Noticed by Jeroen Roovers in https://bugs.gentoo.org/680238 +--- a/gdb/configure ++++ b/gdb/configure +@@ -879,6 +879,7 @@ with_mpfr + with_libmpfr_prefix + with_python + with_guile ++enable_source_highlight + enable_libmcheck + with_intel_pt + with_libipt_prefix +@@ -1554,6 +1555,8 @@ Optional Features: + --enable-profiling enable profiling of GDB + --enable-codesign=CERT sign gdb with 'codesign -s CERT' + --disable-rpath do not hardcode runtime library paths ++ --enable-source-highlight ++ enable source-highlight for source listings + --enable-libmcheck Try linking with -lmcheck if available + --enable-werror treat compile warnings as errors + --enable-build-warnings enable build-time compiler warnings if gcc is used +@@ -11393,13 +11396,30 @@ fi + + SRCHIGH_LIBS= + SRCHIGH_CFLAGS= +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 ++ ++# Check whether --enable-source-highlight was given. ++if test "${enable_source_highlight+set}" = set; then : ++ enableval=$enable_source_highlight; case "${enableval}" in ++ yes) enable_source_highlight=yes ;; ++ no) enable_source_highlight=no ;; ++ *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; ++esac ++else ++ enable_source_highlight=auto ++fi ++ ++ ++if test "${enable_source_highlight}" != "no"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 + $as_echo_n "checking for the source-highlight library... " >&6; } +-if test "${pkg_config_prog_path}" = "missing"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 ++ if test "${pkg_config_prog_path}" = "missing"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 + $as_echo "no - pkg-config not found" >&6; } +-else +- if ${pkg_config_prog_path} --exists source-highlight; then ++ if test "${enable_source_highlight}" = "yes"; then ++ as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 ++ fi ++ else ++ if ${pkg_config_prog_path} --exists source-highlight; then + SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` + SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` + +@@ -11407,10 +11427,14 @@ $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +- else ++ else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +- fi ++ if test "${enable_source_highlight}" = "yes"; then ++ as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 ++ fi ++ fi ++ fi + fi + + +diff --git a/gdb/configure.ac b/gdb/configure.ac +index 8ddd0fda61..1318c8d008 100644 +--- a/gdb/configure.ac ++++ b/gdb/configure.ac +@@ -1220,19 +1220,38 @@ AM_CONDITIONAL(HAVE_GUILE, test "${have_libguile}" != no) + + SRCHIGH_LIBS= + SRCHIGH_CFLAGS= +-AC_MSG_CHECKING([for the source-highlight library]) +-if test "${pkg_config_prog_path}" = "missing"; then +- AC_MSG_RESULT([no - pkg-config not found]) +-else +- if ${pkg_config_prog_path} --exists source-highlight; then ++ ++AC_ARG_ENABLE(source-highlight, ++ AS_HELP_STRING([--enable-source-highlight], ++ [enable source-highlight for source listings]), ++ [case "${enableval}" in ++ yes) enable_source_highlight=yes ;; ++ no) enable_source_highlight=no ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for source-highlight option) ;; ++esac], ++[enable_source_highlight=auto]) ++ ++if test "${enable_source_highlight}" != "no"; then ++ AC_MSG_CHECKING([for the source-highlight library]) ++ if test "${pkg_config_prog_path}" = "missing"; then ++ AC_MSG_RESULT([no - pkg-config not found]) ++ if test "${enable_source_highlight}" = "yes"; then ++ AC_MSG_ERROR([pkg-config was not found in your system]) ++ fi ++ else ++ if ${pkg_config_prog_path} --exists source-highlight; then + SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` + SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` + AC_DEFINE([HAVE_SOURCE_HIGHLIGHT], 1, + [Define to 1 if the source-highlight library is available]) + AC_MSG_RESULT([yes]) +- else ++ else + AC_MSG_RESULT([no]) +- fi ++ if test "${enable_source_highlight}" = "yes"; then ++ AC_MSG_ERROR([source-highlight was not found in your system]) ++ fi ++ fi ++ fi + fi + AC_SUBST(SRCHIGH_LIBS) + AC_SUBST(SRCHIGH_CFLAGS) +-- +2.21.0 + diff --git a/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild new file mode 100644 index 000000000000..3b02bda0bd96 --- /dev/null +++ b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild @@ -0,0 +1,266 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6,3_7} ) + +inherit eutils flag-o-matic python-single-r1 + +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi +is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } + +RPM= +MY_PV=${PV} +case ${PV} in +9999*) + # live git tree + EGIT_REPO_URI="git://sourceware.org/git/binutils-gdb.git" + inherit git-r3 + SRC_URI="" + ;; +*.*.50.2???????) + # weekly snapshots + SRC_URI="ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-${PV}.tar.xz" + ;; +*.*.*.*.*.*) + # fedora versions; note we swap the rpm & fedora core versions. + # gdb-6.8.50.20090302-8.fc11.src.rpm -> gdb-6.8.50.20090302.11.8.ebuild + # gdb-7.9-11.fc23.src.rpm -> gdb-7.9.23.11.ebuild + inherit versionator rpm + gvcr() { get_version_component_range "$@"; } + parse_fedora_ver() { + set -- $(get_version_components) + MY_PV=$(gvcr 1-$(( $# - 2 ))) + RPM="${PN}-${MY_PV}-$(gvcr $#).fc$(gvcr $(( $# - 1 ))).src.rpm" + } + parse_fedora_ver + SRC_URI="mirror://fedora-dev/development/rawhide/source/SRPMS/g/${RPM}" + ;; +*) + # Normal upstream release + SRC_URI="mirror://gnu/gdb/${P}.tar.xz + ftp://sourceware.org/pub/gdb/releases/${P}.tar.xz" + ;; +esac + +PATCH_VER="1" +PATCH_DEV="slyfox" +DESCRIPTION="GNU debugger" +HOMEPAGE="https://sourceware.org/gdb/" +SRC_URI="${SRC_URI} + ${PATCH_DEV:+https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${PN}-8.1-patches-${PATCH_VER}.tar.xz} + ${PATCH_VER:+mirror://gentoo/${PN}-8.1-patches-${PATCH_VER}.tar.xz} +" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +if [[ ${PV} != 9999* ]] ; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi +IUSE="+client lzma multitarget nls +python +server source-highlight test vanilla xml" +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + || ( client server ) +" + +RDEPEND=" + server? ( !dev-util/gdbserver ) + client? ( + dev-libs/mpfr:0= + >=sys-libs/ncurses-5.2-r2:0= + sys-libs/readline:0= + lzma? ( app-arch/xz-utils ) + python? ( ${PYTHON_DEPS} ) + xml? ( dev-libs/expat ) + sys-libs/zlib + ) + source-highlight? ( + dev-util/source-highlight + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-arch/xz-utils + sys-apps/texinfo + client? ( + virtual/yacc + test? ( dev-util/dejagnu ) + nls? ( sys-devel/gettext ) + )" + +PATCHES=( + "${FILESDIR}"/${P}-source-highlight.patch + "${FILESDIR}"/${P}-c++17.patch +) + +S=${WORKDIR}/${PN}-${MY_PV} + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + [[ -n ${RPM} ]] && rpm_spec_epatch "${WORKDIR}"/gdb.spec + + default + + strip-linguas -u bfd/po opcodes/po +} + +gdb_branding() { + printf "Gentoo ${PV} " + if ! use vanilla && [[ -n ${PATCH_VER} ]] ; then + printf "p${PATCH_VER}" + else + printf "vanilla" + fi + [[ -n ${EGIT_COMMIT} ]] && printf " ${EGIT_COMMIT}" +} + +src_configure() { + strip-unsupported-flags + + local myconf=( + --with-pkgversion="$(gdb_branding)" + --with-bugurl='https://bugs.gentoo.org/' + --disable-werror + # Disable modules that are in a combined binutils/gdb tree. #490566 + --disable-{binutils,etc,gas,gold,gprof,ld} + ) + local sysroot="${EPREFIX}/usr/${CTARGET}" + is_cross && myconf+=( + --with-sysroot="${sysroot}" + --includedir="${sysroot}/usr/include" + --with-gdb-datadir="\${datadir}/gdb/${CTARGET}" + ) + + if use server && ! use client ; then + # just configure+build in the gdbserver subdir to speed things up + cd gdb/gdbserver + myconf+=( --program-transform-name='' ) + else + # gdbserver only works for native targets (CHOST==CTARGET). + # it also doesn't support all targets, so rather than duplicate + # the target list (which changes between versions), use the + # "auto" value when things are turned on. + is_cross \ + && myconf+=( --disable-gdbserver ) \ + || myconf+=( $(use_enable server gdbserver auto) ) + fi + + if ! ( use server && ! use client ) ; then + # if we are configuring in the top level, then use all + # the additional global options + myconf+=( + --enable-64-bit-bfd + --disable-install-libbfd + --disable-install-libiberty + # Disable guile for now as it requires guile-2.x #562902 + --without-guile + # 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 source-highlight) + $(use multitarget && echo --enable-targets=all) + $(use_with python python "${EPYTHON}") + ) + fi + if use sparc-solaris || use x86-solaris ; then + # disable largefile support + # https://sourceware.org/ml/gdb-patches/2014-12/msg00058.html + myconf+=( --disable-largefile ) + fi + + econf "${myconf[@]}" +} + +src_test() { + nonfatal emake check || ewarn "tests failed" +} + +src_install() { + if use server && ! use client; then + cd gdb/gdbserver || die + fi + default + if use client; then + find "${ED}"/usr -name libiberty.a -delete || die + fi + cd "${S}" || die + + # Delete translations that conflict with binutils-libs. #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 gdb/gdbserver/gdbreplay ]] && dobin gdb/gdbserver/gdbreplay + + if use client ; then + docinto gdb + dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \ + gdb/NEWS gdb/ChangeLog gdb/PROBLEMS + fi + docinto sim + dodoc sim/{ChangeLog,MAINTAINERS,README-HACKING} + if use server ; then + docinto gdbserver + dodoc gdb/gdbserver/{ChangeLog,README} + fi + + if [[ -n ${PATCH_VER} ]] ; then + dodoc "${WORKDIR}"/extra/gdbinit.sample + fi + + # Remove shared info pages + rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,standards}.info* + + # gcore is part of ubin on freebsd + if [[ ${CHOST} == *-freebsd* ]]; then + rm "${ED}"/usr/bin/gcore || die + fi +} + +pkg_postinst() { + # portage sucks and doesnt unmerge files in /etc + rm -vf "${EROOT}"/etc/skel/.gdbinit + + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then + ewarn "gdb is unable to get a mach task port when installed by Prefix" + ewarn "Portage, unprivileged. To make gdb fully functional you'll" + ewarn "have to perform the following steps:" + ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb" + ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb" + fi +} diff --git a/sys-devel/gdb/gdb-9999.ebuild b/sys-devel/gdb/gdb-9999.ebuild index 5141bb241473..f9e1edcd7cc8 100644 --- a/sys-devel/gdb/gdb-9999.ebuild +++ b/sys-devel/gdb/gdb-9999.ebuild @@ -62,7 +62,7 @@ SLOT="0" if [[ ${PV} != 9999* ]] ; then KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" fi -IUSE="+client lzma multitarget nls +python +server test vanilla xml" +IUSE="+client lzma multitarget nls +python +server source-highlight test vanilla xml" REQUIRED_USE=" python? ( ${PYTHON_REQUIRED_USE} ) || ( client server ) @@ -78,7 +78,11 @@ RDEPEND=" python? ( ${PYTHON_DEPS} ) xml? ( dev-libs/expat ) sys-libs/zlib - )" + ) + source-highlight? ( + dev-util/source-highlight + ) +" DEPEND="${RDEPEND}" BDEPEND=" app-arch/xz-utils @@ -165,6 +169,7 @@ src_configure() { $(use_with xml expat) $(use_with lzma) $(use_enable nls) + $(use_enable source-highlight) $(use multitarget && echo --enable-targets=all) $(use_with python python "${EPYTHON}") ) diff --git a/sys-devel/gdb/metadata.xml b/sys-devel/gdb/metadata.xml index d11b1ea4a91e..4940999342f2 100644 --- a/sys-devel/gdb/metadata.xml +++ b/sys-devel/gdb/metadata.xml @@ -11,6 +11,7 @@ <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="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> </use> <upstream> |