mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-06 08:25:01 +01:00
sys-devel: migrate to PYTHON_MULTI_USEDEP
This commit is contained in:
parent
b797126f1e
commit
383efa1031
8 changed files with 34 additions and 157 deletions
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{5,6,7} )
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit eutils python-single-r1
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ LICENSE="MIT"
|
|||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/pygments[${PYTHON_MULTI_USEDEP}]')
|
||||
sys-devel/gdb[python]"
|
||||
|
||||
pkg_setup() {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
DIST gef-20190408.tar.gz 142371 BLAKE2B 2fbad311cd99a1aa64814df9db35a53cf55aed644222c5a594e35d0a3e705f5d042e3c050d2eb8741c437075caa3602a8f061bff1c86470e42de8db1a9d89ceb SHA512 0e049963070d910f164b6916b0728e9c75142f178eeb8f507c0f7ccdddb638289057ae511f7031bb95220dc769289299ec38b9739a382a182cb0bdd5e6c3d230
|
||||
DIST gef-20200206.tar.gz 145030 BLAKE2B c22d1e64d4f3446f610500ff44ba7c157f736d30e070a9e9af08e78e6d02fec410803ebaef4f118f64b45cf6b72b965491c14fc6af1967271ee52cfdf1c84f55 SHA512 65970b896f5594d72bdeade0e1495d58bc4fa293739c70a99239be62dd5daf04736d6f614dfc45949c24f6254d621a103731c9610f5f2acd1d343901a3598afb
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_COMPAT=( python3_6 )
|
||||
|
||||
inherit eutils python-single-r1
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
|
|||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/hugsy/gef"
|
||||
else
|
||||
HASH_COMMIT="7b773361b356065c2ea851d8893d2f24894d8b85" # 20190408
|
||||
HASH_COMMIT="d3eaed23c2b45e0d0f34f55bf63163418f02c164" # 20200206
|
||||
|
||||
SRC_URI="https://github.com/hugsy/gef/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${HASH_COMMIT}"
|
||||
|
|
@ -31,13 +31,14 @@ SLOT="0"
|
|||
IUSE="doc"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/capstone[python,${PYTHON_USEDEP}]
|
||||
!!dev-libs/capstone-bindings
|
||||
dev-libs/keystone[python,${PYTHON_USEDEP}]
|
||||
dev-python/pylint[${PYTHON_USEDEP}]
|
||||
dev-util/unicorn[python,unicorn_targets_x86(+),${PYTHON_USEDEP}]
|
||||
sys-devel/ropper[${PYTHON_USEDEP}]
|
||||
sys-devel/gdb[python]"
|
||||
sys-devel/gdb[python,${PYTHON_SINGLE_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
app-exploits/ropper[${PYTHON_MULTI_USEDEP}]
|
||||
dev-libs/capstone[python,${PYTHON_MULTI_USEDEP}]
|
||||
dev-libs/keystone[python,${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/pylint[${PYTHON_MULTI_USEDEP}]
|
||||
dev-util/unicorn[python,unicorn_targets_x86(+)]
|
||||
')"
|
||||
|
||||
BDEPEND="doc? ( dev-python/mkdocs )"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{5,6,7} )
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit eutils python-single-r1
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ LICENSE="CC-BY-NC-SA-3.0"
|
|||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/six[${PYTHON_MULTI_USEDEP}]')
|
||||
sys-devel/gdb[python]"
|
||||
|
||||
pkg_setup() {
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
DIST pwndbg-1.1.0_p20191004.tar.gz 4862447 BLAKE2B 2bec2f76306bcb774d56073128d056cb4e3582c51176aa5f02b9093acfa5ee01ba45fc63bbce48e6f2b83ad8ed228f72da5203a154cefec38731b984f7fedbd2 SHA512 462c12a765e2af4bd0d788208ce800cbba69e166ac17be63f6473cf2b61f30309b780ff31609aa5dfc11fe98c7adeb52cf5e92b87ae0a64e03fe13e98a912da2
|
||||
DIST pwndbg-20191209.tar.gz 4862804 BLAKE2B 0f67f0be764e19c1ac7aacfea7012ee74cdb0867b39d5b01ee5902700b0de8337673b6d1f373497830fd7cd6da0f9238ff12dbf7e6d02e00e18b82cdca46c6c3 SHA512 99ebb74ad262a074fe141b052608eed17270b8f72cb598bc802072e4269ef7b3cf86cef7d0131ffa8194321ec000788b668c21202925673d35343de7ed6e75c1
|
||||
|
|
|
|||
|
|
@ -1,123 +0,0 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
# TODO: it can be works fine with python3_{5,6} too but dev-util/unicorn only python2_7 support
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit eutils linux-info python-single-r1
|
||||
|
||||
DESCRIPTION="A GDB plug-in that makes debugging with GDB suck less"
|
||||
HOMEPAGE="https://github.com/pwndbg/pwndbg"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/pwndbg/pwndbg"
|
||||
else
|
||||
HASH_COMMIT="b64674d032850c37603ef51c63d34efa7790f256" # 20191004
|
||||
|
||||
SRC_URI="https://github.com/pwndbg/pwndbg/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
S="${WORKDIR}/${PN}-${HASH_COMMIT}"
|
||||
fi
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
|
||||
# TODO: Add tests and docs support
|
||||
# * tests is works fine outside portage sandbox
|
||||
# * in the current moment, docs are failing
|
||||
#IUSE="doc test"
|
||||
|
||||
CDEPEND="${PYTHON_DEPS}"
|
||||
RDEPEND="${CDEPEND}
|
||||
app-exploits/ROPgadget
|
||||
dev-libs/capstone[python,${PYTHON_USEDEP}]
|
||||
!!dev-libs/capstone-bindings
|
||||
dev-python/future[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/psutil[${PYTHON_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
dev-python/pycparser[${PYTHON_USEDEP}]
|
||||
dev-python/pyelftools[${PYTHON_USEDEP}]
|
||||
dev-python/python-ptrace[${PYTHON_USEDEP}]
|
||||
dev-python/isort[${PYTHON_USEDEP}]
|
||||
dev-util/unicorn[python,unicorn_targets_x86(+),${PYTHON_USEDEP}]
|
||||
sys-devel/gdb[python,${PYTHON_USEDEP}]
|
||||
virtual/python-enum34[${PYTHON_USEDEP}]"
|
||||
|
||||
DEPEND="${CDEPEND}"
|
||||
# test? ( dev-python/pytest )
|
||||
# doc? (
|
||||
# dev-python/sphinx
|
||||
# dev-python/sphinxcontrib-napoleon )"
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~DEBUG_INFO"
|
||||
|
||||
python-single-r1_pkg_setup
|
||||
check_extra_config
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} != *9999 ]]; then
|
||||
sed -e "s/__version__ = '\(.*\)'/__version__ = '${PV}'/" \
|
||||
-i pwndbg/version.py || die
|
||||
fi
|
||||
|
||||
# fix typo... (may be rm -f ida_script.py ??)
|
||||
sed -e "s/type(0L)/type(0)/g" \
|
||||
-i ida_script.py || die
|
||||
|
||||
python_fix_shebang "${S}"
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
insinto "/usr/share/${PN}"
|
||||
doins -r pwndbg/ gdbinit.py # ida_script.py
|
||||
|
||||
python_optimize "${D}/usr/share/${PN}"
|
||||
|
||||
cat > "${D}/usr/share/${PN}/init-pwndbg" <<-_EOF_ || die
|
||||
echo For enabling pwndbg put the 'init-pwndbg' command!\n
|
||||
define init-pwndbg
|
||||
source /usr/share/${PN}/gdbinit.py
|
||||
end
|
||||
document init-pwndbg
|
||||
Initializes PwnGDB
|
||||
end
|
||||
_EOF_
|
||||
|
||||
make_wrapper "pwndbg" \
|
||||
"gdb -x /usr/share/${PN}/init-pwndbg"
|
||||
|
||||
#if use doc; then
|
||||
# pushd docs/ >/dev/null || die
|
||||
# emake man html
|
||||
# popd >/dev/null || die
|
||||
#fi
|
||||
|
||||
dodoc {README,DEVELOPING,FEATURES}.md
|
||||
}
|
||||
|
||||
#src_test() {
|
||||
# pushd tests/binaries >/dev/null || die
|
||||
# emake clean && rm -vf *.out || die
|
||||
# popd >/dev/null || die
|
||||
#
|
||||
# ./tests.sh || die
|
||||
#}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "\nUsage:"
|
||||
einfo " ~$ alias pwndbg='pwndbg -ex init-pwndbg'"
|
||||
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\n"
|
||||
}
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
# TODO: it can be works fine with python3_{5,6} too but dev-util/unicorn only python2_7 support
|
||||
PYTHON_COMPAT=( python3_{5,6} )
|
||||
PYTHON_COMPAT=( python3_{6,7} )
|
||||
|
||||
inherit eutils linux-info python-single-r1
|
||||
|
||||
|
|
@ -33,19 +32,20 @@ SLOT="0"
|
|||
CDEPEND="${PYTHON_DEPS}"
|
||||
RDEPEND="${CDEPEND}
|
||||
app-exploits/ROPgadget
|
||||
dev-libs/capstone[python,${PYTHON_USEDEP}]
|
||||
!!dev-libs/capstone-bindings
|
||||
dev-python/future[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
dev-python/psutil[${PYTHON_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
dev-python/pycparser[${PYTHON_USEDEP}]
|
||||
dev-python/pyelftools[${PYTHON_USEDEP}]
|
||||
dev-python/python-ptrace[${PYTHON_USEDEP}]
|
||||
dev-python/isort[${PYTHON_USEDEP}]
|
||||
dev-util/unicorn[python,unicorn_targets_x86(+),${PYTHON_USEDEP}]
|
||||
sys-devel/gdb[python,${PYTHON_USEDEP}]
|
||||
virtual/python-enum34[${PYTHON_USEDEP}]"
|
||||
sys-devel/gdb[python,${PYTHON_SINGLE_USEDEP}]
|
||||
$(python_gen_cond_dep '
|
||||
dev-libs/capstone[python,${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/future[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/six[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/psutil[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/pycparser[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/pyelftools[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/python-ptrace[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/isort[${PYTHON_MULTI_USEDEP}]
|
||||
dev-util/unicorn[python,unicorn_targets_x86(+),${PYTHON_MULTI_USEDEP}]
|
||||
virtual/python-enum34[${PYTHON_MULTI_USEDEP}]
|
||||
')"
|
||||
|
||||
DEPEND="${CDEPEND}"
|
||||
# test? ( dev-python/pytest )
|
||||
|
|
|
|||
Loading…
Reference in a new issue