dev-util/pwndbg: add 20220830

Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/27076
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Mario Haustein
2022-08-31 02:08:53 +01:00
committed by Sam James
parent 3c89ac8adf
commit 2eb3481679
3 changed files with 101 additions and 2 deletions
+2
View File
@@ -1 +1,3 @@
DIST gdb-pt-dump-f25898adc61d60e5f30c6452b15700bbf1bd630c.tar.gz 385826 BLAKE2B 0cfca93c620f0292d5e0b99f57f6a4090af512d0c12e4cafd3db09960f70cba7efbd7b664235b4c6147d74d368e12fc8ab5d8884db0fc514a135cd6b2ea5db47 SHA512 ef8956a191ba0627ac9070b590e32da9fff452dcd1cef1bebcf2a45266a1f218229b694e617de25da412109a3c4115049519b7f9855ffd7b2e8d7d61bad3f4ed
DIST pwndbg-20220105.tar.gz 8272634 BLAKE2B a221fa3af2145a819bc780f3395a168a91371ce1218dc4acfee2ac3420a78c8550c98921dbb03f4bc928cdac07fdc6bed8be7c642a5be42064492192b3443ea6 SHA512 ebb61b402bb6cbaa516c2b1d885f231f6f591c2226d02d69cdd163f674ed41aba5505e3390b47e431f93a6e5de3867feb93c2be6da03a32c5f4c7a0ff074fa08
DIST pwndbg-20220830.tar.gz 8302318 BLAKE2B fd6821d0846646927a3a7f0f352067360984f90156702bb8d2001b40651e20b11c8a33b07fa522f568f39ce6337f2503d930f745ab424d5ce6948a270e331c1f SHA512 be59544eb959ba05e6a662dbc629eb33a014c39d5ad5fceb44e9c6a9ccfa3ac6c133c082adfda1602002aff9eab3326d5b97aff7b6ce1357116a2d1fe6aa28fb
+87
View File
@@ -0,0 +1,87 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..10} )
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="f25898adc61d60e5f30c6452b15700bbf1bd630c"
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 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
LICENSE="MIT"
SLOT="0"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
sys-devel/gdb[python,${PYTHON_SINGLE_USEDEP}]
$(python_gen_cond_dep '
dev-libs/capstone[python,${PYTHON_USEDEP}]
dev-python/future[${PYTHON_USEDEP}]
dev-python/isort[${PYTHON_USEDEP}]
dev-python/psutil[${PYTHON_USEDEP}]
dev-python/pycparser[${PYTHON_USEDEP}]
dev-python/pyelftools[${PYTHON_USEDEP}]
dev-python/python-ptrace[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-util/ROPgadget[${PYTHON_USEDEP}]
dev-util/unicorn[python,${PYTHON_USEDEP}]
')"
src_prepare() {
if [[ ${PV} == *9999 ]]; then
rm -r gdb-pt-dump/.git || die
else
sed -e "s/__version__ = '\(.*\)'/__version__ = '${PV}'/" \
-i pwndbg/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
}
+12 -2
View File
@@ -15,7 +15,11 @@ if [[ ${PV} == "99999999" ]]; then
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"
GDB_PT_DUMP_COMMIT="f25898adc61d60e5f30c6452b15700bbf1bd630c"
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 ~x86"
S="${WORKDIR}/${PN}-${MY_PV}"
fi
@@ -42,9 +46,14 @@ RDEPEND="
')"
src_prepare() {
if [[ ${PV} != *9999 ]]; then
if [[ ${PV} == *9999 ]]; then
rm -r gdb-pt-dump/.git || die
else
sed -e "s/__version__ = '\(.*\)'/__version__ = '${PV}'/" \
-i pwndbg/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}"
@@ -54,6 +63,7 @@ src_prepare() {
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}