diff options
Diffstat (limited to 'dev-debug')
42 files changed, 1488 insertions, 0 deletions
diff --git a/dev-debug/Manifest.gz b/dev-debug/Manifest.gz Binary files differindex 4e76affdfffa..a93debace8ad 100644 --- a/dev-debug/Manifest.gz +++ b/dev-debug/Manifest.gz diff --git a/dev-debug/ald/Manifest b/dev-debug/ald/Manifest new file mode 100644 index 000000000000..f28facfb6c57 --- /dev/null +++ b/dev-debug/ald/Manifest @@ -0,0 +1,3 @@ +DIST ald-0.1.7.tar.gz 665998 BLAKE2B 52cdd01f5927a4fedc2bdd7728cd063aa3b48fda7dd3af36c4b9299b62d7cbd199f2a8ebb06457bf29c62a5024fb158944d82260b4aac77838e4338acdd33a25 SHA512 dbde0929beebe51ef5f77055b5f396630e16fd01ded4210d828f9ce97c676e7863700a98bf02d26e10cc2d8481adf329d8c8cb11c866302361221f072dbf45bf +EBUILD ald-0.1.7-r2.ebuild 621 BLAKE2B 365f070b4bfc81953c7a50a5e27861bc30f9334993030bcbf183adc58a40948cf06d82dd9e87a78504a8709b6e16619319300902440e3f810ed5a12207ac1892 SHA512 755e6e364d227ac3e30013118a93057c851bd9a49b7b099278572a99520bc9e7097bc8bd77c3a3e34d45ce11118fdeffd1f1195848d54d0e7401de6282167f15 +MISC metadata.xml 523 BLAKE2B 85040063b855a6b4a44dbf574f8ed93fbcbf3b649f05f703e11b905aa746cb365431803ad556c3796f9b72f0d2bc16f2631f7258895ac4b274f48fdd118ade24 SHA512 95c37477835365d3f642c94c454628e25701dcdd77620476a1f1e40c231fcde36ae9f907181fc8909babbf88e3595d884f89f8343b216853ee2e592646d9883d diff --git a/dev-debug/ald/ald-0.1.7-r2.ebuild b/dev-debug/ald/ald-0.1.7-r2.ebuild new file mode 100644 index 000000000000..008890acfa6f --- /dev/null +++ b/dev-debug/ald/ald-0.1.7-r2.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit autotools + +DESCRIPTION="Assembly Language Debugger" +HOMEPAGE="http://ald.sourceforge.net/" +SRC_URI="mirror://sourceforge/ald/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86" +IUSE="debug ncurses" + +DEPEND="ncurses? ( sys-libs/ncurses:= )" +RDEPEND="${DEPEND}" + +src_prepare() { + # respect CFLAGS (bug #240268) + sed -i -e "/^CFLAGS/d" configure.ac || die 'sed on CFLAGS failed' + eapply_user + eautoreconf +} + +src_configure() { + econf \ + $(use_enable ncurses curses) \ + $(use_enable debug assert) +} diff --git a/dev-debug/ald/metadata.xml b/dev-debug/ald/metadata.xml new file mode 100644 index 000000000000..5ea1805417d5 --- /dev/null +++ b/dev-debug/ald/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>bircoph@gentoo.org</email> + <name>Andrew Savchenko</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">ald</remote-id> + </upstream> + <longdescription> + Assembly Language Debugger --- a tool for debugging executable programs at the assembly level. + It currently runs only on Intel x86 platforms. + </longdescription> +</pkgmetadata> diff --git a/dev-debug/ddd/Manifest b/dev-debug/ddd/Manifest new file mode 100644 index 000000000000..facd125a5565 --- /dev/null +++ b/dev-debug/ddd/Manifest @@ -0,0 +1,12 @@ +AUX ddd-3.3.12-clang.patch 413 BLAKE2B e9bde1c85c2419094d0e667a98f241f32a9523c827adb27e6443d177cf436f36cc5ea26a0016140034a0e774fb60ffc19a0b0208f4ee3c70985b1faa39faeb9c SHA512 dc8bca61ae507b3471411af331e6d1daba3c8031283db0bac0fdf1fb5420bf1429172c5c11a827b728fb2e17cd73b91c62433d5233f290f636f735c7c0094fa4 +AUX ddd-3.3.12-gcc44.patch 209 BLAKE2B ce05a8f213e505680297aa3de998efada5c4db48ea18fa3a5474b8aeb266fa85c582723ac3a9b52a7ece0ec7636782a1dc69d69ed073becb8dc834839e907715 SHA512 9373fee21d92b5661c659bcad0f9ce4bca25c86eba40d5d6e498f454cd56af225f290431bd79bfd98a6da5e49180ccb8fd37c144fb99e8b75c886c066e48b129 +AUX ddd-3.3.12-gcc9.patch 3409 BLAKE2B 752d4d8e36af49e4dcec6b79e3c3c0a0f8f55fcfba6fb882d3ba64a4016fc8d74a7eb32873be08194a865309e99b80a0d188d0456dd5dd770e7f280ed14172b1 SHA512 e148f6dcce1406d1ba2f5b83ff387c16bc914d6014077c465508085b9a595de539d7dc39b39a02e0db2e3e0b9704de748949767d31fb23657b40655b4052a580 +AUX ddd-3.3.12-gdb-disassembler-bug.patch 266 BLAKE2B a5658a1513adc116a81de7ec7bfb3eca4002043629a7b939970b8d902e1534d31df0ab8252a7dd2e5f998bc0df4d632bb5cb04662e81391b0e26e6a09809e35b SHA512 15ca238a9ac88c0736c861b962558f09be53f1bc85a5d46d6efb8d6c7ff6fc089b9f730dc0b691d65bbc40010cbd4d2cc4947f369d12271c214770114d533b14 +AUX ddd-3.3.12-man.patch 571 BLAKE2B 88f499833e47ae279beac8dbc4aadcfaa80e8c19f388b6dac3d724b284820472ca83ce81811df838e26d66d3bf1a558c9de8f51f22037b70cff3207f82104b40 SHA512 830115e517f754702892549d780003033e29fc0668824540cc63c3270e8445549896505a6584ccee104d94ffcf152bff679d946922f9d6fffc75d77abdbb8a59 +AUX ddd-3.3.12-parallel.patch 621 BLAKE2B 57446f5c7e797d7ddab5ed6aca01a5ffdc6af314bb797d96cfb357e214f1cf49153387635f9b585c53ebbcf7b06dcd6119b6bb2cbcaffa7d4382c4fbe9fdd181 SHA512 1157bec9212ffd4cbf86e8d36f68c80e9170091d09318effd800ce154f2b738e730db95e1e954c632dc25390e78cf88a9f1f3d14426df4069c0e5523f2dc6646 +AUX ddd-3.3.12-tinfo.patch 330 BLAKE2B f0e29f408f1e5e7fa40e386ab2a1f6786a9a14dc6722aef3fc8132558b624c233102b4290c0ba0e5d55b27aa4b25e6bcdd6fcd1b4ae237540621f3961e92bffc SHA512 a3cd3d59bdcce6c106d4488ec9a6c32d8baea49963f61e8e493a01131fd604664dca2e9e548852ff4c538c7123f5c1572bc54d6143340167fcdfa754002eb224 +DIST ddd-3.3.12.tar.gz 5687115 BLAKE2B 52c448eda46bfdc4f5720abda569a0c70f3680c3fdd543f6101c9af8c4c448496414c1c2a7be91590d9f14d0c8c2bb053a234d179bf900ca52df0ea8c2642131 SHA512 1249e4f5f25335f8f2c3616470f7a8f36262c00b8ac12b79f2b2806228de2831ebeb780fe09490e5e8b5b1ca108fe936ae70856f6a6ec02876fc75c7b4a7dbf3 +DIST ddd-3.4.0.tar.gz 5742233 BLAKE2B d67969ce2a9803875d8c22abb0708fae2b3e8ef7ce3e36d0969f60ee2f72251fe96774e2768f1dc57e9973684c07ba02d275a711a7a15af24585d6b1468d8eec SHA512 0498eeeb12da7c7f5e2343da2ec44b68ff2b7b9b6481386a8fb9f2d9ac3a9c7154361fe0be78ce81fd966afbc48ed212f40747d1e3b112109ec16f152c67786a +EBUILD ddd-3.3.12-r5.ebuild 1956 BLAKE2B a29322f9bf259309a2ace06521817397f8c7ca9e0349efd6569081098dd47d0898c18845f5e0561cffd04aa1d1bdcf6d8ea4b37e065bd383bfc34399cd7127f5 SHA512 421ec7d7e909033fd973a9cabc1337f6091e72fa554c39a78236030ba0776552a1a53a35d0f51a35f43524f40a3f0c7bedba47f67d1429c8cba5694964892108 +EBUILD ddd-3.4.0.ebuild 1818 BLAKE2B 02f86c302c8f800798d4d602c094f150e1200b64f4e4e5efa11f018197a159cd646e1a3d97b3c8f2c5b4986b60cc56446111873186baf0f17da4c3ba8fce9740 SHA512 c098cf89daa26f4de4dde04f83b109f02de6a201257902516a5a298a2d8efede97197827dcb55e26fcc6c8f151e99b1591262dc9d2a1b16c53bf4fb2281b0fab +MISC metadata.xml 741 BLAKE2B ce0a1aa5ccf21951fcc5fd69d9dfd6cce8eef7e82d6cf5314a92bce28f7604faf7f5162efe9074aec305b183dd0f98b9c69dc9c42fc2b2318857e9c21cbb235a SHA512 38030c88852f9e1b98db8272fdcce9dae23a7eae0f8e9bba4de8f0246fe90e2c47b4fbac1cbea9acd6d20fb4b387da87d23ccac46496a38060040b33476afb0d diff --git a/dev-debug/ddd/ddd-3.3.12-r5.ebuild b/dev-debug/ddd/ddd-3.3.12-r5.ebuild new file mode 100644 index 000000000000..de0f8edcfecf --- /dev/null +++ b/dev-debug/ddd/ddd-3.3.12-r5.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop optfeature + +DESCRIPTION="Graphical front-end for command-line debuggers" +HOMEPAGE="https://www.gnu.org/software/ddd" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-3 LGPL-3 FDL-1.1" +SLOT="0" +KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" +IUSE="readline" + +RESTRICT="test" + +COMMON_DEPEND=" + dev-debug/gdb + sys-libs/ncurses:= + x11-libs/libX11 + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXpm + x11-libs/libXt + >=x11-libs/motif-2.3:0 + ppc? ( dev-libs/elfutils ) + ppc64? ( dev-libs/elfutils ) + readline? ( sys-libs/readline:= ) +" +DEPEND="${COMMON_DEPEND} + x11-base/xorg-proto +" +RDEPEND="${COMMON_DEPEND} + x11-apps/xfontsel +" + +PATCHES=( + "${FILESDIR}/${P}-gcc44.patch" + "${FILESDIR}/${P}-gdb-disassembler-bug.patch" + "${FILESDIR}/${PN}-3.3.12-man.patch" + "${FILESDIR}/${PN}-3.3.12-tinfo.patch" + "${FILESDIR}/${PN}-3.3.12-gcc9.patch" + "${FILESDIR}/${PN}-3.3.12-parallel.patch" + "${FILESDIR}/${PN}-3.3.12-clang.patch" +) + +DOCS=( + AUTHORS CREDITS INSTALL NEWS PROBLEMS README TIPS TODO + doc/ddd{-paper.ps,.pdf,-themes.pdf} +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_with readline) +} + +src_install() { + # Remove app defaults + rm -f "${S}"/ddd/Ddd || die + + # Install ddd distribution + default + + # Install application icon + doicon "${S}"/icons/ddd.xpm +} + +pkg_postinst() { + optfeature "Data visualisation" sci-visualization/gnuplot + optfeature "Java debugging" virtual/jdk + optfeature "Bash debugging" app-shells/bashdb + optfeature "Perl debugging" dev-lang/perl + optfeature "Python debugging" dev-python/pydb + elog + elog "Important notice: if you encounter DDD crashes during visualization, you might" + elog "have hit bug #459324. Try switching to plotting in external window:" + elog "Select Edit|Preferences|Helpers and switch 'plot window' to 'external'" +} diff --git a/dev-debug/ddd/ddd-3.4.0.ebuild b/dev-debug/ddd/ddd-3.4.0.ebuild new file mode 100644 index 000000000000..57ef0f7ffdf5 --- /dev/null +++ b/dev-debug/ddd/ddd-3.4.0.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools desktop optfeature + +DESCRIPTION="Graphical front-end for command-line debuggers" +HOMEPAGE="https://www.gnu.org/software/ddd" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-3 LGPL-3 FDL-1.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="readline" + +RESTRICT="test" + +COMMON_DEPEND=" + dev-debug/gdb + sys-libs/ncurses:= + x11-libs/libX11 + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libXpm + x11-libs/libXt + >=x11-libs/motif-2.3:0 + ppc? ( dev-libs/elfutils ) + ppc64? ( dev-libs/elfutils ) + readline? ( sys-libs/readline:= ) +" +DEPEND="${COMMON_DEPEND} + x11-base/xorg-proto +" +RDEPEND="${COMMON_DEPEND} + x11-apps/xfontsel +" + +PATCHES=( + "${FILESDIR}/${PN}-3.3.12-man.patch" + "${FILESDIR}/${PN}-3.3.12-tinfo.patch" +# "${FILESDIR}/${PN}-3.4.0-gcc9.patch" + "${FILESDIR}/${PN}-3.3.12-parallel.patch" +) + +DOCS=( + AUTHORS CREDITS INSTALL NEWS README TIPS + doc/ddd{.pdf,-themes.pdf} +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_with readline) +} + +src_install() { + # Remove app defaults + rm -f "${S}"/ddd/Ddd || die + + # Install ddd distribution + default + + # Install application icon + doicon "${S}"/icons/ddd.xpm +} + +pkg_postinst() { + optfeature "Data visualisation" sci-visualization/gnuplot + optfeature "Java debugging" virtual/jdk + optfeature "Bash debugging" app-shells/bashdb + optfeature "Perl debugging" dev-lang/perl + optfeature "Python debugging" dev-python/pydb + elog + elog "Important notice: if you encounter DDD crashes during visualization, you might" + elog "have hit bug #459324. Try switching to plotting in external window:" + elog "Select Edit|Preferences|Helpers and switch 'plot window' to 'external'" +} diff --git a/dev-debug/ddd/files/ddd-3.3.12-clang.patch b/dev-debug/ddd/files/ddd-3.3.12-clang.patch new file mode 100644 index 000000000000..a1f8da27b116 --- /dev/null +++ b/dev-debug/ddd/files/ddd-3.3.12-clang.patch @@ -0,0 +1,15 @@ +diff -ruN ddd-3.3.12/ddd/exit.C ddd-my/ddd/exit.C +--- ddd-3.3.12/ddd/exit.C 2009-02-11 18:25:07.000000000 +0100 ++++ ddd-my/ddd/exit.C 2020-09-27 03:23:14.713650981 +0200 +@@ -769,7 +769,11 @@ + + static XtAppContext xt_error_app_context = 0; + ++#ifdef __clang__ ++static void ddd_xt_error(String message = 0) _X_NORETURN ++#else + static void ddd_xt_error(String message = 0) ++#endif + { + ddd_has_crashed = true; + diff --git a/dev-debug/ddd/files/ddd-3.3.12-gcc44.patch b/dev-debug/ddd/files/ddd-3.3.12-gcc44.patch new file mode 100644 index 000000000000..2464b2b4a9c4 --- /dev/null +++ b/dev-debug/ddd/files/ddd-3.3.12-gcc44.patch @@ -0,0 +1,10 @@ +--- ddd-3.3.12-orig/ddd/strclass.C ++++ ddd-3.3.12/ddd/strclass.C +@@ -39,6 +39,7 @@ + #include <limits.h> + #include <new> + #include <stdlib.h> ++#include <stdio.h> + + void string::error(const char* msg) const + { diff --git a/dev-debug/ddd/files/ddd-3.3.12-gcc9.patch b/dev-debug/ddd/files/ddd-3.3.12-gcc9.patch new file mode 100644 index 000000000000..ce12a41c91d2 --- /dev/null +++ b/dev-debug/ddd/files/ddd-3.3.12-gcc9.patch @@ -0,0 +1,93 @@ +diff -ruN -x '*.am' ddd-3.3.12/ddd/strclass.h my/ddd/strclass.h +--- ddd-3.3.12/ddd/strclass.h 2009-02-11 18:25:06.000000000 +0100 ++++ my/ddd/strclass.h 2019-11-22 22:00:49.000267420 +0100 +@@ -543,7 +543,6 @@ + bool OK() const; + }; + +- + class string + { + friend class subString; +@@ -811,9 +810,9 @@ + const regex& sep); + + friend string common_prefix(const string& x, const string& y, +- int startpos = 0); ++ int startpos); + friend string common_suffix(const string& x, const string& y, +- int startpos = -1); ++ int startpos); + friend string replicate(char c, int n); + friend string replicate(const string& y, int n); + friend string join(const string *src, int n, const string& sep); +@@ -864,8 +863,8 @@ + friend std::istream& operator>>(std::istream& s, string& x); + + friend int readline(std::istream& s, string& x, +- char terminator = '\n', +- int discard_terminator = 1); ++ char terminator, ++ int discard_terminator); + + // Status + unsigned int length() const; +@@ -882,6 +881,58 @@ + bool OK() const; + }; + ++inline void cat(const string&, const string&, string&); ++inline void cat(const string&, const subString&, string&); ++inline void cat(const string&, const constSubString&, string&); ++inline void cat(const string&, const char*, string&); ++inline void cat(const string&, char*, string&); ++inline void cat(const string&, char, string&); ++ ++inline void cat(const subString&, const string&, string&); ++inline void cat(const subString&, const subString&, string&); ++inline void cat(const subString&, const char*, string&); ++inline void cat(const subString&, char*, string&); ++inline void cat(const subString&, char, string&); ++ ++inline void cat(const char*, const string&, string&); ++inline void cat(const char*, const subString&, string&); ++inline void cat(const char*, const char*, string&); ++inline void cat(const char*, char*, string&); ++inline void cat(const char*, char, string&); ++ ++inline void cat(char*, const string&, string&); ++inline void cat(char*, const subString&, string&); ++inline void cat(char*, const char*, string&); ++inline void cat(char*, char*, string&); ++inline void cat(char*, char, string&); ++ ++inline void cat(char, const string&, string&); ++inline void cat(char, const subString&, string&); ++inline void cat(char, const char*, string&); ++inline void cat(char, char*, string&); ++inline void cat(char, char, string&); ++ ++int split(const string& x, string *res, int maxn, ++ const string& sep); ++int split(const string& x, string *res, int maxn, ++ const regex& sep); ++ ++string common_prefix(const string& x, const string& y, ++ int startpos = 0); ++string common_suffix(const string& x, const string& y, ++ int startpos = -1); ++string replicate(char c, int n); ++string replicate(const string& y, int n); ++string join(const string *src, int n, const string& sep); ++ ++inline std::ostream& operator<<(std::ostream& s, const string& x); ++inline std::ostream& operator<<(std::ostream& s, const subString& x); ++std::istream& operator>>(std::istream& s, string& x); ++ ++int readline(std::istream& s, string& x, ++ char terminator = '\n', ++ int discard_terminator = 1); ++ + // Inject names manually to accomodate argument-dependent name lookup (ADL) + // (aka Koenig lookup). The rule is that friend declarations are visible + // when found through ADL because an argument of the call happens to be diff --git a/dev-debug/ddd/files/ddd-3.3.12-gdb-disassembler-bug.patch b/dev-debug/ddd/files/ddd-3.3.12-gdb-disassembler-bug.patch new file mode 100644 index 000000000000..738cda5946f9 --- /dev/null +++ b/dev-debug/ddd/files/ddd-3.3.12-gdb-disassembler-bug.patch @@ -0,0 +1,11 @@ +--- a/ddd/GDBAgent.C 2004-09-01 20:07:38.000000000 +0200 ++++ b/ddd/GDBAgent.C 2010-06-15 14:16:34.000000000 +0200 +@@ -3078,7 +3078,7 @@ + { + string end_( end ); + normalize_address(end_); +- cmd += ' '; ++ cmd += ','; + cmd += end_; + } + return cmd; diff --git a/dev-debug/ddd/files/ddd-3.3.12-man.patch b/dev-debug/ddd/files/ddd-3.3.12-man.patch new file mode 100644 index 000000000000..06f9deb806f0 --- /dev/null +++ b/dev-debug/ddd/files/ddd-3.3.12-man.patch @@ -0,0 +1,16 @@ +diff -ruN ddd-3.3.12/ddd/Makefile.am ddd-my/ddd/Makefile.am +--- ddd-3.3.12/ddd/Makefile.am 2009-02-11 18:25:07.000000000 +0100 ++++ ddd-my/ddd/Makefile.am 2012-11-06 01:48:46.363493473 +0100 +@@ -1371,10 +1371,8 @@ + man_MANS = ddd.1 + + # `ddd.man' has 8-bit format, `ddd.1' has 7-bit format +-ddd.1: ddd.man $(srcdir)/unumlaut.sed +- -$(SED) -f $(srcdir)/unumlaut.sed ddd.man | $(DELETE_CR) > $@~ \ +- && $(MV) $@~ $@ +- ++ddd.1: ddd.man ++ iconv -f ISO8859-15 -t UTF-8 ddd.man > ddd.1 + + + # ----------------------------------------------------------------------------- diff --git a/dev-debug/ddd/files/ddd-3.3.12-parallel.patch b/dev-debug/ddd/files/ddd-3.3.12-parallel.patch new file mode 100644 index 000000000000..21624a2ab614 --- /dev/null +++ b/dev-debug/ddd/files/ddd-3.3.12-parallel.patch @@ -0,0 +1,15 @@ +diff -ruN -x strclass.h ddd-3.3.12/ddd/Makefile.am my/ddd/Makefile.am +--- ddd-3.3.12/ddd/Makefile.am 2009-02-11 18:25:07.000000000 +0100 ++++ my/ddd/Makefile.am 2019-11-22 22:49:26.212765331 +0100 +@@ -580,9 +580,8 @@ + + # Make sure needed headers are built before trying to compile these files + # (Assume ddd.C is the first source file to be built.) +-ddd.o: version.h host.h root.h +-resources.o: Ddd.ad.h +-show.o: build.h ++# MM: AND WHY WOULD YOU ASSUME THAT?? ++BUILT_SOURCES = version.h host.h root.h Ddd.ad.h build.h + + # ----------------------------------------------------------------------------- + # Local Libraries. diff --git a/dev-debug/ddd/files/ddd-3.3.12-tinfo.patch b/dev-debug/ddd/files/ddd-3.3.12-tinfo.patch new file mode 100644 index 000000000000..ab7df14ae9d9 --- /dev/null +++ b/dev-debug/ddd/files/ddd-3.3.12-tinfo.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -360,7 +360,7 @@ + dnl + _termlib="${ddd_termlib}" + if test "x${ddd_termlib}" = x; then +- _termlib="mytinfo ncurses curses termcap terminfo termlib" ++ _termlib="mytinfo ncurses tinfo curses termcap terminfo termlib" + fi + _termlib_path= + if test x"${ddd_termlib_libraries_path}" != x; then diff --git a/dev-debug/ddd/metadata.xml b/dev-debug/ddd/metadata.xml new file mode 100644 index 000000000000..0831f299a2df --- /dev/null +++ b/dev-debug/ddd/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>reavertm@gentoo.org</email> + <name>Maciej Mrozowski</name> + </maintainer> + <longdescription lang="en"> + GNU DDD is a graphical front-end for command-line debuggers such as + GDB, DBX, WDB, Ladebug, JDB, XDB, the Perl debugger, the bash debugger, + or the Python debugger. Besides ``usual'' front-end features such as + viewing source texts, DDD has become famous through its interactive + graphical data display, where data structures are displayed as graphs. + </longdescription> + <upstream> + <remote-id type="savannah">ddd</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/edb-debugger/Manifest b/dev-debug/edb-debugger/Manifest new file mode 100644 index 000000000000..22cd34404664 --- /dev/null +++ b/dev-debug/edb-debugger/Manifest @@ -0,0 +1,7 @@ +AUX edb-debugger-1.3.0-capstone-5.patch 1135 BLAKE2B 835105b255338811747521ca9b76c88eb5b88cebb050c536657b110fcf20fa81b5e0a33fae1c81fe9c890daba9021f4782df7440a1197ae5da7b325a1076d504 SHA512 7b6edec1d8fa7f350883eb0e1184c5051096dec3a4ea9519dbaacd036a0c893ed452f11906ae2c1844c94f3df5f215ba43a21cc70c5da74412b1e905deb9c06a +AUX edb-debugger-1.3.0-gcc12.patch 3374 BLAKE2B 6e75e6d940da2d54d20bfdd62dd26c7955ffcc00d00d84a1029b583b00bee69106e43a64ad5b9ab96a269b84f7a69e48c12d6acbfd0f4404b8d490660620c35f SHA512 9b0fb244ce7e80ca4810323d6198e273019b3255c40e198563da109e228f1329bf0b36560024607b6015bc1ba992e396151858cb1bed1fecc39d2dd688232e62 +AUX edb-debugger-1.3.0-gcc13.patch 795 BLAKE2B eed779fd71962ec451606d54793e7ce9628a5ced1f05fc82ebeb3ae807be175060f9a7e881252d78143ee29c5bd1cedadaebdfc229bdf641aa4e46fbbb3b533b SHA512 836516212cc893dde4774854fe76856b6cc40dafa58bebf8a7757d7d758b9d8d2885f6690018be49f233d3208639ab84393a381f2660c86b184f07c3094144f7 +DIST edb-debugger-1.3.0.tgz 618227 BLAKE2B 1650e727851b629d7778c8488a464b6439f2ac4e5a72c0738cfe1ee302538b0d97dcbf9587a1108a82f8f8f4a6bec273e31ad454063f70704ffb48ca8ba5b73f SHA512 9d813bb61cdc7b61b594e63834ffb3999d3e1bb0c7a435095efea9b3b6726369a06c553ba6633df160d9456758ff54d5eee8cfbee6a1304f3a01d09fe2c7a65d +EBUILD edb-debugger-1.3.0-r1.ebuild 1375 BLAKE2B ddb3444426bb1d4942be1793a6beed7c9aeef774715aa576c7fcb7139bfc5cecba65f5563631ef73b23c7daaabc1cb9b09822675beb244708c010542233b7f42 SHA512 57e86d04276e3b941132f09d9f96f444a2a50da53df3b4670103dafffd5d7f6bb6af97355bf514b150aee5ce01249425d5c699855a880f8b13c1a215ad1c836a +EBUILD edb-debugger-9999.ebuild 1247 BLAKE2B 362ca3698ed3e1e0f6840ea0f77c0ee3d5a45d54416999a18324d563f6102df6981915215eae2d399a264f78a489c511b46ea5e03cfed52938253ec1c91dc453 SHA512 d1f60bda8799425668b95527da9e15b130b7a13c496739434010f2c984bf3dfc2233e518b09b022537bb77d3061986313ed19743486c73b1ca545fdc0d7642ad +MISC metadata.xml 252 BLAKE2B fb12cf596eb089cfb2077cf0726394d90785dbea303035ffbb140513dbb5e0fc69ddcdab039f0d159a41cedd601084eab5f93d017c8eed995112ced496a1ebf2 SHA512 23a9f942e083e04792112e33470839ef3906e11035ef61a24b4f5aa2bf0a5b4fc322ed9f48e09905132c9a8a5f7abe02b2711bd3396da9f6d4ec95fea50ccadb diff --git a/dev-debug/edb-debugger/edb-debugger-1.3.0-r1.ebuild b/dev-debug/edb-debugger/edb-debugger-1.3.0-r1.ebuild new file mode 100644 index 000000000000..18c5a36f7a6f --- /dev/null +++ b/dev-debug/edb-debugger/edb-debugger-1.3.0-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="edb is a cross platform x86/x86-64 debugger, inspired by Ollydbg" +HOMEPAGE="https://github.com/eteran/edb-debugger" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/eteran/edb-debugger" + inherit git-r3 +else + SRC_URI="https://github.com/eteran/edb-debugger/releases/download/${PV}/edb-debugger-${PV}.tgz" + S="${WORKDIR}"/${PN} + + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2+" +SLOT="0" +IUSE="graphviz" + +RDEPEND="dev-libs/capstone:= + dev-libs/double-conversion:= + dev-qt/qtconcurrent:5 + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + dev-qt/qtxmlpatterns:5 + graphviz? ( media-gfx/graphviz )" +DEPEND="dev-libs/boost + ${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${P}-gcc12.patch + "${FILESDIR}"/${PN}-1.3.0-capstone-5.patch + "${FILESDIR}"/${PN}-1.3.0-gcc13.patch +) + +src_prepare() { + # Make the desktop's entries somewhat better + sed -i -e 's/GenericName=edb debugger/GenericName=Evan\x27s Debugger/' edb.desktop || die + sed -i -e 's/Comment=edb debugger/Comment=edb is a cross platform x86\/x86-64 debugger/' edb.desktop || die + + if ! use graphviz; then + sed -i -e '/pkg_check_modules(GRAPHVIZ/d' CMakeLists.txt || die + fi + + cmake_src_prepare +} diff --git a/dev-debug/edb-debugger/edb-debugger-9999.ebuild b/dev-debug/edb-debugger/edb-debugger-9999.ebuild new file mode 100644 index 000000000000..7cb7dbf2f7f2 --- /dev/null +++ b/dev-debug/edb-debugger/edb-debugger-9999.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake + +DESCRIPTION="edb is a cross platform x86/x86-64 debugger, inspired by Ollydbg" +HOMEPAGE="https://github.com/eteran/edb-debugger" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/eteran/edb-debugger" + inherit git-r3 +else + SRC_URI="https://github.com/eteran/edb-debugger/releases/download/${PV}/edb-debugger-${PV}.tgz" + S="${WORKDIR}"/${PN} + + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-2+" +SLOT="0" +IUSE="graphviz" + +RDEPEND="dev-libs/capstone:= + dev-libs/double-conversion:= + dev-qt/qtconcurrent:5 + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + dev-qt/qtxml:5 + dev-qt/qtxmlpatterns:5 + graphviz? ( media-gfx/graphviz )" +DEPEND="dev-libs/boost + ${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + # Make the desktop's entries somewhat better + sed -i -e 's/GenericName=edb debugger/GenericName=Evan\x27s Debugger/' edb.desktop || die + sed -i -e 's/Comment=edb debugger/Comment=edb is a cross platform x86\/x86-64 debugger/' edb.desktop || die + + if ! use graphviz; then + sed -i -e '/pkg_check_modules(GRAPHVIZ/d' CMakeLists.txt || die + fi + + cmake_src_prepare +} diff --git a/dev-debug/edb-debugger/files/edb-debugger-1.3.0-capstone-5.patch b/dev-debug/edb-debugger/files/edb-debugger-1.3.0-capstone-5.patch new file mode 100644 index 000000000000..d900ae335242 --- /dev/null +++ b/dev-debug/edb-debugger/files/edb-debugger-1.3.0-capstone-5.patch @@ -0,0 +1,29 @@ +From cb1da3fb1d2e45e279118ee8e68468373b71dbc8 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Tue, 13 Sep 2022 17:52:01 +0100 +Subject: [PATCH] Fix build with Capstone 5 + +Capstone 5 drops X86_INS_VCVTPD2DQX and X86_INS_VCVTPD2PSX from +x86.h (happened in https://github.com/capstone-engine/capstone/commit/dd91f03fef5102492352756e2adb5972dd79a70f +but no real explanation). + +Given: +1. these instructions had no wiring up; +2. other Capstone consumers have done the same +let's drop based on a macro for the Capstone version. + +Bug: https://bugs.gentoo.org/843755 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/src/capstone-edb/Instruction.cpp ++++ b/src/capstone-edb/Instruction.cpp +@@ -880,8 +880,10 @@ bool is_SIMD_PD(const Operand &operand) { + case X86_INS_CVTPD2PI: + case X86_INS_CVTPD2PS: + case X86_INS_VCVTPD2PS: ++#if CS_API_MAJOR < 5 + case X86_INS_VCVTPD2DQX: // FIXME: what's this? + case X86_INS_VCVTPD2PSX: // FIXME: what's this? ++#endif + // case X86_INS_VCVTPD2QQ: // FIXME: Capstone seems to not support it + case X86_INS_VCVTPD2UDQ: + // case X86_INS_VCVTPD2UQQ: // FIXME: Capstone seems to not support it diff --git a/dev-debug/edb-debugger/files/edb-debugger-1.3.0-gcc12.patch b/dev-debug/edb-debugger/files/edb-debugger-1.3.0-gcc12.patch new file mode 100644 index 000000000000..df037193310f --- /dev/null +++ b/dev-debug/edb-debugger/files/edb-debugger-1.3.0-gcc12.patch @@ -0,0 +1,88 @@ +https://github.com/eteran/edb-debugger/commit/da04c339559f82257ff54ea62b1d403ee98c1ba0 +https://bugs.gentoo.org/841839 + +From da04c339559f82257ff54ea62b1d403ee98c1ba0 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyich@gmail.com> +Date: Sat, 2 Apr 2022 22:36:50 +0000 +Subject: [PATCH] Gcc 12 includes fix (#815) + +* RegisterViewModelBase.h: add <memory> for unique_ptr + +Without the change gcc-12 fails to build edb-debugger as: + + [ 20%] Building CXX object src/CMakeFiles/edb.dir/RegisterViewModelBase.cpp.o + In file included from edb-debugger/src/RegisterViewModelBase.cpp:18: + edb-debugger/include/RegisterViewModelBase.h:162:14: error: + 'unique_ptr' in namespace 'std' does not name a template type + 162 | std::unique_ptr<CategoriesHolder> rootItem; + | ^~~~~~~~~~ + edb-debugger/include/RegisterViewModelBase.h:9:1: note: + 'std::unique_ptr' is defined in header '<memory>'; + did you forget to '#include <memory>'? + 8 | #include <deque> + +++ |+#include <memory> + +* State.h: add <memory> for unique_ptr + +Without the change gcc-12 fails to build edb-debugger as: + + [ 21%] Building CXX object src/CMakeFiles/edb.dir/State.cpp.o + In file included from edb-debugger/src/State.cpp:19: + edb-debugger/include/State.h:93:14: + error: 'unique_ptr' in namespace 'std' does not name a template type + 93 | std::unique_ptr<IState> impl_; + | ^~~~~~~~~~ + edb-debugger/include/State.h:24:1: + note: 'std::unique_ptr' is defined in header '<memory>'; + did you forget to '#include <memory>'? + 23 | #include "Types.h" + +++ |+#include <memory> + 24 | + +* IState.h: add <memory> for unique_ptr + +Without the change gcc-12 fails to build edb-debugger as: + + [ 69%] Building CXX object plugins/DebuggerCore/CMakeFiles/DebuggerCore.dir/unix/linux/arch/x86-generic/PlatformState.cpp.o + In file included from edb-debugger/plugins/DebuggerCore/unix/linux/arch/x86-generic/PlatformState.h:22, + from edb-debugger/plugins/DebuggerCore/unix/linux/arch/x86-generic/PlatformState.cpp:19: + edb-debugger/include/IState.h:33:22: + error: 'unique_ptr' in namespace 'std' does not name a template type + 33 | virtual std::unique_ptr<IState> clone() const = 0; + | ^~~~~~~~~~ + edb-debugger/include/IState.h:23:1: + note: 'std::unique_ptr' is defined in header '<memory>'; + did you forget to '#include <memory>'? + 22 | #include "Register.h" + +++ |+#include <memory> + 23 | #include "Types.h" +--- a/include/IState.h ++++ b/include/IState.h +@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. + #ifndef ISTATE_H_20110315_ + #define ISTATE_H_20110315_ + ++#include <memory> + #include "Register.h" + #include "Types.h" + +--- a/include/RegisterViewModelBase.h ++++ b/include/RegisterViewModelBase.h +@@ -6,6 +6,7 @@ + #include "util/Integer.h" + #include <QAbstractItemModel> + #include <deque> ++#include <memory> + #include <vector> + + Q_DECLARE_METATYPE(std::vector<NumberDisplayMode>) +--- a/include/State.h ++++ b/include/State.h +@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. + #ifndef STATE_H_20060715_ + #define STATE_H_20060715_ + ++#include <memory> + #include "API.h" + #include "Types.h" + diff --git a/dev-debug/edb-debugger/files/edb-debugger-1.3.0-gcc13.patch b/dev-debug/edb-debugger/files/edb-debugger-1.3.0-gcc13.patch new file mode 100644 index 000000000000..f30eacc97436 --- /dev/null +++ b/dev-debug/edb-debugger/files/edb-debugger-1.3.0-gcc13.patch @@ -0,0 +1,26 @@ +https://github.com/eteran/edb-debugger/pull/837 + +From 934de81a7799f3e1d210366e0eb5ea86d172ead4 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sat, 15 Apr 2023 10:05:11 +0100 +Subject: [PATCH] Fix build with GCC 13 + +GCC 13 (as usual for new compiler releases) shuffles around some internal includes so some +are no longer transitively included. + +See https://gnu.org/software/gcc/gcc-13/porting_to.html. + +Bug: https://bugs.gentoo.org/897890 +--- a/plugins/DebuggerCore/unix/linux/FeatureDetect.cpp ++++ b/plugins/DebuggerCore/unix/linux/FeatureDetect.cpp +@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. + #include "FeatureDetect.h" + #include "edb.h" + ++#include <cstdint> + #include <fcntl.h> + #include <iomanip> + #include <iostream> +-- +2.40.0 + diff --git a/dev-debug/edb-debugger/metadata.xml b/dev-debug/edb-debugger/metadata.xml new file mode 100644 index 000000000000..09229532f67a --- /dev/null +++ b/dev-debug/edb-debugger/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-needed --> + <upstream> + <remote-id type="github">eteran/edb-debugger</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/gef/Manifest b/dev-debug/gef/Manifest new file mode 100644 index 000000000000..ec1cd807ebfb --- /dev/null +++ b/dev-debug/gef/Manifest @@ -0,0 +1,6 @@ +DIST gef-2023.08.tar.gz 230347 BLAKE2B b9b8fed1bdf81fa870583921c4bdd6df2d98112748c939da48acae7e636ec6e22dc751d8ed75e52e72ff0aa04835720293f0e82e99ff614c447f2a614c76e48a SHA512 d3a26826b991db7e8d475da945b16933ce046dd64381f5df60ea0fe310d0325f39b05142de5f75abbbd5693c93ad70ff25e982d0ff3526a6fe66fd7526a359c5 +DIST gef-2024.01.tar.gz 235145 BLAKE2B f5409e592c50dbbe65761e7727f28aa7a96b130449f187e392cc0170707b7cfb2d1bf9e75581dce7dce8ff6d004ffc624d34a46b7ba35ab434a5671662860bdb SHA512 d8dbc308f864e434ea79eaf44e329e11f2cea9836a5dcdc019bd621bbec6792f70e58edd9fd8b3c434dc61a17fbac08394e281530423081beb1cc1192aece79c +EBUILD gef-2023.08.ebuild 1602 BLAKE2B 6845fd1e36bf904b5d4dd82f3bada677d6189d013f851f9efb0ba5e6741c06ba8ebba32d6071fb18ca6004baecb0fb5248b5a14af045adbdf4975aa27b7464cd SHA512 8a0b35fa12cd7ef715ce149b777139d8e1ab25f49c4376c42c46b488e31e250100746039f424aabdfabe09bfea8e916840bf4de4102081b3890ba7438be1b141 +EBUILD gef-2024.01.ebuild 1623 BLAKE2B 56412e322545696c102c08cf838f5ee500f9154121e0dd133913ffd63c232b58c092942489987e527489d28a0d0137f398685371d104ebe4a9a5df5cbe3434de SHA512 2bfceea99e6db34575af3bddceb90d919d045adb3243a538ef4b771527740206234916690aad3258f5db04d288c6b765eeb37de32978dfbff608dcd441056ac0 +EBUILD gef-9999.ebuild 1623 BLAKE2B 3cc6f7d75d58ac978c24a1ece80f2bc7512469ba002f26058ea6bd8458f9c405354169302b3a183dac114d578c560e03b0c5337441c3dc37d6f249754d9c257f SHA512 6b3b6f85600e6b274bf3401fd8faa0498b3f26d4cca7523afd0a57ddebf00bd670bf9730a9676f1e55902e653428601784403b895fce711fbea3c6a6474ba7e3 +MISC metadata.xml 995 BLAKE2B f4c30ac2ea932c90b74800c44389169199cdc189e69584a3873c91b36086eb30b5d463a12a5b08cc45196aa57e939d00806e3d1e96fbb647c997ab891a312ea0 SHA512 b4e09578a7f5656688dced42d1f924ba928b59abcb8345fe143be11ae30b553cda26663c6771a99e44ffc9f72c187b871ee2d1c096bf49d37b1e0fd460653ad4 diff --git a/dev-debug/gef/gef-2023.08.ebuild b/dev-debug/gef/gef-2023.08.ebuild new file mode 100644 index 000000000000..dcf8e73117bf --- /dev/null +++ b/dev-debug/gef/gef-2023.08.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +DOCS_BUILDER="mkdocs" +DOCS_DEPEND=" + dev-python/mkdocs-material +" + +inherit python-single-r1 docs wrapper + +DESCRIPTION="GDB Enhanced Features for exploit devs & reversers" +HOMEPAGE="https://github.com/hugsy/gef" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hugsy/gef" +else + SRC_URI="https://github.com/hugsy/gef/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="test" +# Seem to hang right now? +RESTRICT="!test? ( test ) test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + dev-debug/gdb[python,${PYTHON_SINGLE_USEDEP}] + dev-util/ropper[${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + dev-libs/capstone[python,${PYTHON_USEDEP}] + dev-libs/keystone[python,${PYTHON_USEDEP}] + dev-python/pylint[${PYTHON_USEDEP}] + dev-util/unicorn[python,${PYTHON_USEDEP}] + ')" + +BDEPEND=" + test? ( + $(python_gen_cond_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ') + )" + +DOCS=( README.md ) + +src_prepare() { + default + + sed -i -e '/pylint/d' tests/requirements.txt || die +} + +src_compile() { + # Tries to compile tests + : + + docs_compile +} + +src_install() { + insinto "/usr/share/${PN}" + doins -r *.py + + python_optimize "${ED}/usr/share/${PN}" + + make_wrapper "gdb-gef" \ + "gdb -x \"/usr/share/${PN}/gef.py\"" || die + + einstalldocs +} + +pkg_postinst() { + einfo "\nUsage:" + einfo " ~$ gdb-gef <program>\n" +} diff --git a/dev-debug/gef/gef-2024.01.ebuild b/dev-debug/gef/gef-2024.01.ebuild new file mode 100644 index 000000000000..ab3ad1835c9a --- /dev/null +++ b/dev-debug/gef/gef-2024.01.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +DOCS_BUILDER="mkdocs" +DOCS_DEPEND=" + dev-python/mkdocs-material +" + +inherit python-single-r1 docs wrapper + +DESCRIPTION="GDB Enhanced Features for exploit devs & reversers" +HOMEPAGE="https://github.com/hugsy/gef" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hugsy/gef" +else + SRC_URI="https://github.com/hugsy/gef/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="test" +# Seem to hang right now? +RESTRICT="!test? ( test ) test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + dev-util/ropper[${PYTHON_SINGLE_USEDEP}] + dev-debug/gdb[python,${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + dev-libs/capstone[python,${PYTHON_USEDEP}] + dev-libs/keystone[python,${PYTHON_USEDEP}] + dev-python/pylint[${PYTHON_USEDEP}] + dev-python/rpyc[${PYTHON_USEDEP}] + dev-util/unicorn[python,${PYTHON_USEDEP}] + ')" + +BDEPEND=" + test? ( + $(python_gen_cond_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ') + )" + +DOCS=( README.md ) + +src_prepare() { + default + + sed -i -e '/pylint/d' tests/requirements.txt || die +} + +src_compile() { + # Tries to compile tests + : + + docs_compile +} + +src_install() { + insinto "/usr/share/${PN}" + doins -r *.py + + python_optimize "${ED}/usr/share/${PN}" + + make_wrapper "gdb-gef" \ + "gdb -x \"/usr/share/${PN}/gef.py\"" || die + + einstalldocs +} + +pkg_postinst() { + einfo "\nUsage:" + einfo " ~$ gdb-gef <program>\n" +} diff --git a/dev-debug/gef/gef-9999.ebuild b/dev-debug/gef/gef-9999.ebuild new file mode 100644 index 000000000000..b692b6cc9ec0 --- /dev/null +++ b/dev-debug/gef/gef-9999.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +DOCS_BUILDER="mkdocs" +DOCS_DEPEND=" + dev-python/mkdocs-material +" + +inherit python-single-r1 docs wrapper + +DESCRIPTION="GDB Enhanced Features for exploit devs & reversers" +HOMEPAGE="https://github.com/hugsy/gef" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/hugsy/gef" +else + SRC_URI="https://github.com/hugsy/gef/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="test" +# Seem to hang right now? +RESTRICT="!test? ( test ) test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + dev-debug/gdb[python,${PYTHON_SINGLE_USEDEP}] + dev-util/ropper[${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + dev-libs/capstone[python,${PYTHON_USEDEP}] + dev-libs/keystone[python,${PYTHON_USEDEP}] + dev-python/pylint[${PYTHON_USEDEP}] + dev-python/rpyc[${PYTHON_USEDEP}] + dev-util/unicorn[python,${PYTHON_USEDEP}] + ')" + +BDEPEND=" + test? ( + $(python_gen_cond_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ') + )" + +DOCS=( README.md ) + +src_prepare() { + default + + sed -i -e '/pylint/d' tests/requirements.txt || die +} + +src_compile() { + # Tries to compile tests + : + + docs_compile +} + +src_install() { + insinto "/usr/share/${PN}" + doins -r *.py + + python_optimize "${ED}/usr/share/${PN}" + + make_wrapper "gdb-gef" \ + "gdb -x \"/usr/share/${PN}/gef.py\"" || die + + einstalldocs +} + +pkg_postinst() { + einfo "\nUsage:" + einfo " ~$ gdb-gef <program>\n" +} diff --git a/dev-debug/gef/metadata.xml b/dev-debug/gef/metadata.xml new file mode 100644 index 000000000000..9ee6bdf0edc1 --- /dev/null +++ b/dev-debug/gef/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>mario.haustein@hrz.tu-chemnitz.de</email> + <name>Mario Haustein</name> + </maintainer> + <maintainer type="person"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <longdescription> + GEF is a set of commands for x86/64, ARM, MIPS, PowerPC and SPARC to + assist exploit developers and reverse-engineers when using old school + GDB. It provides additional features to GDB using the Python API to + assist during the process of dynamic analysis and exploit development. + Application developers will also benefit from it, as GEF lifts a great + part of regular GDB obscurity, avoiding repeating traditional commands, + or bringing out the relevant information from the debugging runtime. + </longdescription> + <upstream> + <remote-id type="github">hugsy/gef</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/kdbg/Manifest b/dev-debug/kdbg/Manifest new file mode 100644 index 000000000000..146b5a445358 --- /dev/null +++ b/dev-debug/kdbg/Manifest @@ -0,0 +1,7 @@ +AUX kdbg-3.0.1-fix-rare-memleak.patch 1113 BLAKE2B 8bb235a47294c2d9d541dafcceedad3038db795aa869b6ca940a51da50d300db1e1d3735171e7e91c5eb43d21167dd3e8b2be50590689a8886e4b9d8f1eff626 SHA512 1caff1850cf21d09b46cc19ea8caf80066b2501901db044328bad64b89559759207629237d602146d214389055b780c180e100d8ee642b3d165da94a99f633fc +AUX kdbg-3.0.1-usable-trace.patch 808 BLAKE2B 8286f826354d8b9035f2b4cef753206074d72e3a8aa1c5fd1888052f22a8725696e1f2326dc0a202d5ec3ad9675fff199e78daac14a69ea29eb5108ad945e7ea SHA512 71f2feb9ca41f75e78a5d689d1e76d7de0d48d03d54250f94beab03553a93eaa7f9302f6e6fe4dec670e211ad7b591e5abef4800bfad57711119ab0e343b203d +DIST kdbg-3.0.1.tar.gz 431143 BLAKE2B 869bf9765650b2a4a2330f99303b51f599df764848ff18442c8c6813421fece2671e5e78a0e8c66a59bd77f06a7f02677ec08a49fb9a28874b92b0f84bf8f74f SHA512 9f3e0073bf37e56fa8ad0c3ae5f0be80331d8963b564ff376aee40c3ccebab5b5a482c31f110fd0f4dd14f9614cff31102d8edf62ffb33f4ae361d24346543ea +DIST kdbg-3.1.0.tar.gz 444052 BLAKE2B d0083094f8ba3cb374b2df4a20b7697ddae4fb24579e18d883701a5e826e86041a8cdb7bd1919c881bc149c49e764221eb246d98bcebacbffbdb5e0f83264ad6 SHA512 e7da5bb1a4882b031077bd4344c6795b058088eb9a00ef3a2ba9c3d72c0a022bb16822525369ca7bcfb623c775cf73140caa114c1591d37f1d6f6a3b22ae649b +EBUILD kdbg-3.0.1-r1.ebuild 1114 BLAKE2B 9587623760d8679d3fd0e6d8789d8efc58b1b6b5531299f032615242b451da808d30733d0411f759a716c213d202dec7bc9d00156176d5ddf80132a2f3fdfda6 SHA512 1df34a526e6ebacd820a1b19e038fe42bd764d566a3064a49b5adc51c4355568c4e9a1dea6665816b712345566c33d8ffcfc8ca2c8f90391fc484b750c9f599d +EBUILD kdbg-3.1.0.ebuild 1007 BLAKE2B a780df09201ea9564dd24c8bfb0fc0e0f1e266e358707b54e4229fc0979748aa3e79f7a6fde1178f36e4cfecca5fac4139590f81790c1102c68e881616ab71da SHA512 de22a4c06c8229ee6bf021513f1c6bf05fa93c2fb5e9442f09bb31b915ad1322364e3f7527c926c91dc276c12e8f8571bbfb31473add94c2de1b98e2fb69a855 +MISC metadata.xml 372 BLAKE2B f633a86dc35ba0a596d161b7789f01b22b32c4f501c9a5b68701ad352555956a433dadbf8856c1fdb0f331abb39fc89caee0cf2da6cf295095be993b24d1f414 SHA512 9f19dcf19b03626e2263f3bfccc611e6013da09b97de69a6673c5e79b9f1c1b3622d540d6e49bff59ced02f632ccc4b8734950690c4363556fa622edb3e576d9 diff --git a/dev-debug/kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch b/dev-debug/kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch new file mode 100644 index 000000000000..44a2b33623f4 --- /dev/null +++ b/dev-debug/kdbg/files/kdbg-3.0.1-fix-rare-memleak.patch @@ -0,0 +1,35 @@ +From 0feb0986f220126177084badf67813ccdbaa996c Mon Sep 17 00:00:00 2001 +From: Daniels Umanovskis <daniels@umanovskis.se> +Date: Fri, 13 Mar 2020 13:48:19 +0100 +Subject: [PATCH] Fix a rare memory leak in the register display window + +--- + kdbg/regwnd.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/kdbg/regwnd.cpp b/kdbg/regwnd.cpp +index edb0e55..93008f9 100644 +--- a/kdbg/regwnd.cpp ++++ b/kdbg/regwnd.cpp +@@ -274,11 +274,12 @@ static char* toRaw(const QString& hex, uint& length) + static bool littleendian=(*testChar==1); + + length=((hex.length()-2)%2)+((hex.length()-2)/2); ++ if (hex.length()<=2) return 0; ++ + char* data=new char[length]; + + if (littleendian) { + uint j=0; +- if (hex.length()<=2) return 0; + for (int i=hex.length()-1; i>=2; ) { + if (j%2==0) + data[j/2]=hexCharToDigit(hex[i].toLatin1()); +@@ -288,7 +289,6 @@ static char* toRaw(const QString& hex, uint& length) + } + } else { // big endian + uint j=0; +- if (hex.length()<=2) return 0; + for (int i=2; i<hex.length(); ) { + if (j%2==0) + data[j/2]=hexCharToDigit(hex[i].toLatin1())<<4; diff --git a/dev-debug/kdbg/files/kdbg-3.0.1-usable-trace.patch b/dev-debug/kdbg/files/kdbg-3.0.1-usable-trace.patch new file mode 100644 index 000000000000..8336d2d53255 --- /dev/null +++ b/dev-debug/kdbg/files/kdbg-3.0.1-usable-trace.patch @@ -0,0 +1,23 @@ +From 8f2add1046c2d23294496bc0bc7c00d18c6aa0a2 Mon Sep 17 00:00:00 2001 +From: Daniels Umanovskis <daniels@umanovskis.se> +Date: Fri, 13 Mar 2020 16:23:02 +0100 +Subject: [PATCH] Change output for a trace so that trace is actually usable + again + +--- + kdbg/debugger.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kdbg/debugger.cpp b/kdbg/debugger.cpp +index 3751e4c..7d43eb9 100644 +--- a/kdbg/debugger.cpp ++++ b/kdbg/debugger.cpp +@@ -2225,7 +2225,7 @@ void KDebugger::slotValueEdited(VarTree* expr, const QString& text) + + ExprWnd* wnd = static_cast<ExprWnd*>(expr->treeWidget()); + TRACE(QString().sprintf("Changing %s to ", +- wnd->name()) + text); ++ wnd->exprList().join(" ")) + text); + + // determine the lvalue to edit + QString lvalue = expr->computeExpr(); diff --git a/dev-debug/kdbg/kdbg-3.0.1-r1.ebuild b/dev-debug/kdbg/kdbg-3.0.1-r1.ebuild new file mode 100644 index 000000000000..bfa17d373d61 --- /dev/null +++ b/dev-debug/kdbg/kdbg-3.0.1-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_HANDBOOK="true" +KFMIN=5.85.0 +QTMIN=5.15.2 +inherit ecm + +DESCRIPTION="Graphical debugger interface" +HOMEPAGE="https://www.kdbg.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="5" +KEYWORDS="~amd64 ~riscv ~x86" +IUSE="" + +DEPEND=" + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kiconthemes-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 +" +RDEPEND="${DEPEND} + dev-debug/gdb +" + +PATCHES=( + "${FILESDIR}"/${P}-fix-rare-memleak.patch + "${FILESDIR}"/${P}-usable-trace.patch +) + +src_prepare() { + # allow documentation to be handled by eclass + mv kdbg/doc . || die + sed -i -e '/add_subdirectory(doc)/d' kdbg/CMakeLists.txt || die + echo "add_subdirectory ( doc ) " >> CMakeLists.txt || die + + ecm_src_prepare +} diff --git a/dev-debug/kdbg/kdbg-3.1.0.ebuild b/dev-debug/kdbg/kdbg-3.1.0.ebuild new file mode 100644 index 000000000000..f0b0412e4cf4 --- /dev/null +++ b/dev-debug/kdbg/kdbg-3.1.0.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_HANDBOOK="true" +KFMIN=5.85.0 +QTMIN=5.15.2 +inherit ecm + +DESCRIPTION="Graphical debugger interface" +HOMEPAGE="https://www.kdbg.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="5" +KEYWORDS="~amd64 ~riscv ~x86" + +DEPEND=" + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kiconthemes-${KFMIN}:5 + >=kde-frameworks/kwidgetsaddons-${KFMIN}:5 + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/kxmlgui-${KFMIN}:5 +" +RDEPEND="${DEPEND} + dev-debug/gdb +" + +src_prepare() { + # allow documentation to be handled by eclass + mv kdbg/doc . || die + sed -i -e '/add_subdirectory(doc)/d' kdbg/CMakeLists.txt || die + echo 'add_subdirectory(doc)' >> CMakeLists.txt || die + + ecm_src_prepare +} diff --git a/dev-debug/kdbg/metadata.xml b/dev-debug/kdbg/metadata.xml new file mode 100644 index 000000000000..b879ad3d0e80 --- /dev/null +++ b/dev-debug/kdbg/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>kde@gentoo.org</email> + <name>Gentoo KDE Project</name> + </maintainer> + <upstream> + <remote-id type="github">j6t/kdbg</remote-id> + <remote-id type="sourceforge">kdbg</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/peda/Manifest b/dev-debug/peda/Manifest new file mode 100644 index 000000000000..3f63fa6628f4 --- /dev/null +++ b/dev-debug/peda/Manifest @@ -0,0 +1,4 @@ +DIST peda-1.2.tar.gz 65331 BLAKE2B 6942b99d714eb1114167b80ba202d86f6dee52cd47c8047b4cb78d4a91f45e1594521440a3318a968e35c5dc56a616393c0837d6f9db5ba41505641a385fb573 SHA512 e69844b8c3a51af96096d97ebfa4a67ac8ff16e4a9e0edb64bbb5e946b1ebeaa56260663718b90145f4191cc25762f3e351a8de92bf9b56f9f1d11389c563c43 +EBUILD peda-1.2.ebuild 994 BLAKE2B 9b514eab43d545b4f8fa5557cbbacb9f81f29ce786958e909f8166cfa7ec01141e7c248741a53335e3d4c87fa79cce095d05538079e71df5b6bfbec772bead37 SHA512 31be421e5fb0d5d40a3b6f3ec517d77c3f23ca157b552ed7b5782625a2242c2342276ddd6300bfa24f1e5921b8c54de621baa253279bd8f973abdfbc7c1b0843 +EBUILD peda-9999.ebuild 996 BLAKE2B f14fa286c2b3a88408f8d5bd481bbaad37a2354502bcdfd30ff666d04e16542854f0322c7b941a7d790200dbd0e774b34052202f61fbb8bdb4b3cdfac9f7f26a SHA512 c4eb08ef6e03a516db871e47b719fb61f64c61899c3ce5d439a398fdff4db360a98878cfa5f9ff5a58c5c1c885757504a749bee99adfd88e0e3d99f4ddf328ff +MISC metadata.xml 487 BLAKE2B 0e628d9250a7ffad11b26dc82ac257d8128f1656939525478ed90916381a2781a4f6f1c479a3251151bca74f647da0580c9e725ca2b2d4cd89eb96210dcb8a2d SHA512 0420e4ec7a90845c4021ee3ddfbaee208836c7c1fd633d0c5e8767ac346c56fa7de9a6840c7ac698611786bc7245c42e0f5a4b495266462eca1fceca33521e9c diff --git a/dev-debug/peda/metadata.xml b/dev-debug/peda/metadata.xml new file mode 100644 index 000000000000..a4d70b1a53ea --- /dev/null +++ b/dev-debug/peda/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>mario.haustein@hrz.tu-chemnitz.de</email> + <name>Mario Haustein</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <upstream> + <remote-id type="github">longld/peda</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/peda/peda-1.2.ebuild b/dev-debug/peda/peda-1.2.ebuild new file mode 100644 index 000000000000..9e889d8de922 --- /dev/null +++ b/dev-debug/peda/peda-1.2.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit python-single-r1 wrapper + +DESCRIPTION="Python Exploit Development Assistance for GDB" +HOMEPAGE="https://github.com/longld/peda" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/longld/peda" +else + SRC_URI="https://github.com/longld/peda/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 x86" +fi + +LICENSE="CC-BY-NC-SA-3.0" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-debug/gdb[python,${PYTHON_SINGLE_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ') +" + +src_install() { + insinto /usr/share/${PN} + doins -r lib/ *.py + + python_optimize "${ED}"/usr/share/${PN} + + make_wrapper "gdb-peda" \ + "gdb -x \"${EPREFIX}/usr/share/${PN}/peda.py\"" || die + + dodoc README{,.md} +} + +pkg_postinst() { + einfo "\nUsage:" + einfo " ~$ gdb-peda <program>\n" +} diff --git a/dev-debug/peda/peda-9999.ebuild b/dev-debug/peda/peda-9999.ebuild new file mode 100644 index 000000000000..dc8b77cb35cd --- /dev/null +++ b/dev-debug/peda/peda-9999.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit python-single-r1 wrapper + +DESCRIPTION="Python Exploit Development Assistance for GDB" +HOMEPAGE="https://github.com/longld/peda" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/longld/peda" +else + SRC_URI="https://github.com/longld/peda/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="CC-BY-NC-SA-3.0" +SLOT="0" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-debug/gdb[python,${PYTHON_SINGLE_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ') +" + +src_install() { + insinto /usr/share/${PN} + doins -r lib/ *.py + + python_optimize "${ED}"/usr/share/${PN} + + make_wrapper "gdb-peda" \ + "gdb -x \"${EPREFIX}/usr/share/${PN}/peda.py\"" || die + + dodoc README{,.md} +} + +pkg_postinst() { + einfo "\nUsage:" + einfo " ~$ gdb-peda <program>\n" +} diff --git a/dev-debug/pwndbg/Manifest b/dev-debug/pwndbg/Manifest new file mode 100644 index 000000000000..92bfa9f661c1 --- /dev/null +++ b/dev-debug/pwndbg/Manifest @@ -0,0 +1,6 @@ +AUX pwndbg-20230717-no-venv.patch 1623 BLAKE2B abab8d6cec25a8efc8fc6e3b16159b0ace65ed2b11d5dc64686ea09aa5efdfddc4bf704c2fbfb24e4e2fdb542d41b2ac7c1737cd1211717b72bebe50cd075ba5 SHA512 2eb2441fa27e8e3a024bb88731ab81d81370648cc7f8e3f2694809fa64beacfdfcb61a06b7689fa97a3f046775a1d12eaf9310ac3beea44ba28c67175e5e89fb +DIST gdb-pt-dump-ebdc24573a4bf075cf3ab6016add9db6baacf977.tar.gz 385989 BLAKE2B b7582289f83fd0c76b8ef2a04540db979b0f599b6b711e17541e2804b93bcffe6fd611d43101c96644a7324398eea5df02326267b4e201564929de956849b719 SHA512 57701b5fdd4c69be79a451f08fa6d7cbd43a0963cfd7689443676b68ece96154ccb61121d4a770d6e519d3142f99c589df1143b0ff8308547c06fb0e87e187db +DIST pwndbg-20230717.tar.gz 8392017 BLAKE2B e373a7408366090f58385dac8dfcdd13702c475117a35158a1a149d149c9a2cbf5f2702be33aeab537451cfd990b5253e9bc0283fa5ae197c9cceb680e65a724 SHA512 d261ed992327d62b0b3e7cc002d3185435748e27cc2ce0085d438848ef1bdb0b3921ae5c1ce19c25e49d52b10f8340eb67c4e05fc197d2adeb888b47e2c158ba +EBUILD pwndbg-20230717-r1.ebuild 2561 BLAKE2B 368be41db6679ae094ab0c6b0bec4ad08f86a5c0d9567801d87859f741dcf4d23b6e4189fb0613ba1b22fbf8b8c61d819c099e38c5ce36cff423827f4f58c542 SHA512 b64476c5dbf9cd48d3a34b3aaab012ce2882f08439acdc95bfa1d2e0a485c6d0e922e455de0c8fdbb67d1ad3dafe394b190f9b15cddf596ec7c11f3382e9b661 +EBUILD pwndbg-99999999.ebuild 2392 BLAKE2B e007895a4cd8bf5bbbfc12f2bb12ae875749f5278391dc41f501c44dda635cad426cd2705b7d200be59b72fb89aa22b098eb806c4eca502a8180a81fdd34a8df SHA512 fb2c9641dd2a09a02a5ded28c01d8c716a4c1933859133d6e4ccf4ccd7bf6a9919eb23161610f0859d2ac12581cd61bf2ab913b5e603b2dd6fc43cd1c4316cac +MISC metadata.xml 692 BLAKE2B bb74dda183fe35e5873e7cbaa5886dec5beaf082968b16352bcda55f2e14dbdb78ee48d2e0195baa735b0f615b0469f8fd48429c47f4a81d2fc0391cafaade76 SHA512 8a6a9ec3aa03e597d8302a5b1001fbfd569e6efb08157445bedb58ec82b4d7812aad7a852ae3eb0d0f245cbf89c85a357e532855c19e6dbc9d438c16e0bd549d diff --git a/dev-debug/pwndbg/files/pwndbg-20230717-no-venv.patch b/dev-debug/pwndbg/files/pwndbg-20230717-no-venv.patch new file mode 100644 index 000000000000..4011236240f9 --- /dev/null +++ b/dev-debug/pwndbg/files/pwndbg-20230717-no-venv.patch @@ -0,0 +1,46 @@ +From 6a351680675123ccc0d8fb192f28f3c654979c92 Mon Sep 17 00:00:00 2001 +From: Stefan Gloor <code@stefan-gloor.ch> +Date: Tue, 28 Nov 2023 20:24:26 +0100 +Subject: [PATCH] Use global python packages instead of virtualenv +Bug: https://bugs.gentoo.org/918705 + +The upstream install script creates a .venv and installs the +dependencies there. This patch allows the normal python packages to be +used. + +Signed-off-by: Stefan Gloor <code@stefan-gloor.ch> +--- a/gdbinit.py ++++ b/gdbinit.py +@@ -20,29 +20,6 @@ directory, file = path.split(__file__) + directory = path.expanduser(directory) + directory = path.abspath(directory) + +-# Get virtualenv's site-packages path +-venv_path = os.environ.get("PWNDBG_VENV_PATH") +-if not venv_path: +- venv_path = os.path.join(directory, ".venv") +- +-if not os.path.exists(venv_path): +- print(f"Cannot find Pwndbg virtualenv directory: {venv_path}: please re-run setup.sh") +- sys.exit(1) +- +-site_pkgs_path = glob(os.path.join(venv_path, "lib/*/site-packages"))[0] +- +-# add virtualenv's site-packages to sys.path and run .pth files +-site.addsitedir(site_pkgs_path) +- +-# remove existing, system-level site-packages from sys.path +-for site_packages in site.getsitepackages(): +- if site_packages in sys.path: +- sys.path.remove(site_packages) +- +-# Set virtualenv's bin path (needed for utility tools like ropper, pwntools etc) +-bin_path = os.path.join(venv_path, "bin") +-os.environ["PATH"] = bin_path + os.pathsep + os.environ.get("PATH") +- + # Add gdb-pt-dump directory to sys.path so it can be imported + gdbpt = path.join(directory, "gdb-pt-dump") + sys.path.append(directory) +-- +2.41.0 + diff --git a/dev-debug/pwndbg/metadata.xml b/dev-debug/pwndbg/metadata.xml new file mode 100644 index 000000000000..707da35acff7 --- /dev/null +++ b/dev-debug/pwndbg/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>mario.haustein@hrz.tu-chemnitz.de</email> + <name>Mario Haustein</name> + </maintainer> + <maintainer type="person"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <longdescription> + pwndbg is a GDB plug-in that makes debugging with GDB suck less, with a + focus on features needed by low-level software developers, hardware + hackers, reverse-engineers and exploit developers. + </longdescription> + <upstream> + <remote-id type="github">pwndbg/pwndbg</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-debug/pwndbg/pwndbg-20230717-r1.ebuild b/dev-debug/pwndbg/pwndbg-20230717-r1.ebuild new file mode 100644 index 000000000000..a38b9180e566 --- /dev/null +++ b/dev-debug/pwndbg/pwndbg-20230717-r1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) + +inherit python-single-r1 wrapper + +DESCRIPTION="A GDB plug-in that makes debugging with GDB suck less" +HOMEPAGE="https://github.com/pwndbg/pwndbg" + +if [[ ${PV} == "99999999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pwndbg/pwndbg" +else + MY_PV="${PV:0:4}.${PV:4:2}.${PV:6:2}" + GDB_PT_DUMP_COMMIT="ebdc24573a4bf075cf3ab6016add9db6baacf977" + SRC_URI=" + https://github.com/pwndbg/pwndbg/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + https://github.com/martinradev/gdb-pt-dump/archive/${GDB_PT_DUMP_COMMIT}.tar.gz -> gdb-pt-dump-${GDB_PT_DUMP_COMMIT}.tar.gz + " + KEYWORDS="amd64 ~arm64 x86" + S="${WORKDIR}/${PN}-${MY_PV}" +fi + +LICENSE="MIT" +SLOT="0" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + dev-debug/gdb[python,${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + >=dev-libs/capstone-5.0_rc4[python,${PYTHON_USEDEP}] + >=dev-python/psutil-5.9.5[${PYTHON_USEDEP}] + >=dev-python/pycparser-2.21[${PYTHON_USEDEP}] + >=dev-python/pyelftools-0.29[${PYTHON_USEDEP}] + >=dev-python/pygments-2.15.1[${PYTHON_USEDEP}] + >=dev-python/tabulate-0.9.0[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.6.1[${PYTHON_USEDEP}] + >=dev-util/pwntools-4.10.0[${PYTHON_USEDEP}] + >=dev-util/ROPgadget-7.2[${PYTHON_USEDEP}] + >=dev-util/unicorn-2.0.1[python,${PYTHON_USEDEP}] + ')" + +PATCHES=( + "${FILESDIR}/${P}-no-venv.patch" # Bug 918705 +) + +src_prepare() { + if [[ ${PV} == *9999 ]]; then + rm -r gdb-pt-dump/.git || die + else + sed -e "s/__version__ = '\(.*\)'/__version__ = '${PV}'/" \ + -i pwndbg/lib/version.py || die + + rm -r gdb-pt-dump || die + mv "${WORKDIR}/gdb-pt-dump-${GDB_PT_DUMP_COMMIT}" gdb-pt-dump || die + fi + + python_fix_shebang "${S}" + default +} + +src_install() { + insinto /usr/share/${PN} + doins -r pwndbg/ gdbinit.py # ida_script.py + doins -r gdb-pt-dump/ + + python_optimize "${ED}"/usr/share/${PN} + + make_wrapper "pwndbg" \ + "gdb -x \"${EPREFIX}/usr/share/${PN}/gdbinit.py\"" || die + + dodoc {README,DEVELOPING,FEATURES}.md +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + einfo "\nUsage:" + einfo " ~$ pwndbg <program>" + ewarn "\nWARNING!!!" + ewarn "Some pwndbg commands only works with libc debug symbols.\n" + ewarn "See also:" + ewarn " * https://github.com/pentoo/pentoo-overlay/issues/521#issuecomment-548975884" + ewarn " * https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html" + ewarn " * https://wiki.gentoo.org/wiki/Debugging" + fi +} diff --git a/dev-debug/pwndbg/pwndbg-99999999.ebuild b/dev-debug/pwndbg/pwndbg-99999999.ebuild new file mode 100644 index 000000000000..304326ef2983 --- /dev/null +++ b/dev-debug/pwndbg/pwndbg-99999999.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=poetry +DISTUTILS_SINGLE_IMPL=1 +PYTHON_COMPAT=( python3_{10..11} ) + +inherit distutils-r1 wrapper + +DESCRIPTION="A GDB plug-in that makes debugging with GDB suck less" +HOMEPAGE="https://github.com/pwndbg/pwndbg" + +if [[ ${PV} == "99999999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pwndbg/pwndbg" +else + MY_PV="${PV:0:4}.${PV:4:2}.${PV:6:2}" + SRC_URI="https://github.com/pwndbg/pwndbg/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~x86" + S="${WORKDIR}/${PN}-${MY_PV}" +fi + +LICENSE="MIT" +SLOT="0" + +RDEPEND=" + dev-debug/gdb[python,${PYTHON_SINGLE_USEDEP}] + ~dev-python/gdb-pt-dump-0.0.0_p20231111[${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + >=dev-libs/capstone-5.0_rc4[python,${PYTHON_USEDEP}] + >=dev-python/psutil-5.9.5[${PYTHON_USEDEP}] + >=dev-python/pycparser-2.21[${PYTHON_USEDEP}] + >=dev-python/pyelftools-0.29[${PYTHON_USEDEP}] + >=dev-python/pygments-2.15.1[${PYTHON_USEDEP}] + >=dev-python/tabulate-0.9.0[${PYTHON_USEDEP}] + >=dev-python/typing-extensions-4.6.1[${PYTHON_USEDEP}] + >=dev-util/pwntools-4.10.0[${PYTHON_USEDEP}] + >=dev-util/ROPgadget-7.2[${PYTHON_USEDEP}] + >=dev-util/unicorn-2.0.1[python,${PYTHON_USEDEP}] + ') +" + +src_prepare() { + if [[ ${PV} != 99999999 ]]; then + sed -e "s/__version__ = '\(.*\)'/__version__ = '${PV}'/" \ + -i pwndbg/lib/version.py || die + fi + + default +} + +src_install() { + distutils-r1_src_install + + insinto /usr/share/${PN} + doins gdbinit.py + + # Signal pwndbg not to create it's own python venv (Bug #918705). + # See: https://github.com/pwndbg/pwndbg/commit/139b7542cd9567eaff32bd713df971b6ac5b81de + touch "${ED}/usr/share/${PN}/.skip-venv" || die + + python_optimize "${ED}"/usr/share/${PN} + + make_wrapper "pwndbg" \ + "gdb -x \"${EPREFIX}/usr/share/${PN}/gdbinit.py\"" || die + + dodoc {README,DEVELOPING,FEATURES}.md +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + einfo "\nUsage:" + einfo " ~$ pwndbg <program>" + ewarn "\nWARNING!!!" + ewarn "Some pwndbg commands only works with libc debug symbols.\n" + ewarn "See also:" + ewarn " * https://github.com/pentoo/pentoo-overlay/issues/521#issuecomment-548975884" + ewarn " * https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html" + ewarn " * https://wiki.gentoo.org/wiki/Debugging" + fi +} |