Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/peda/
Date: Tue, 23 Aug 2022 05:34:46
Message-Id: 1661232824.0426e074b47de6ebbe6c48291d2d13ffac8d638e.sam@gentoo
1 commit: 0426e074b47de6ebbe6c48291d2d13ffac8d638e
2 Author: Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
3 AuthorDate: Wed Aug 3 21:25:35 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 23 05:33:44 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0426e074
7
8 dev-util/peda: new package, add 1.2, 9999
9
10 Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
11 Closes: https://github.com/gentoo/gentoo/pull/26732
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 dev-util/peda/Manifest | 1 +
15 dev-util/peda/metadata.xml | 15 +++++++++++++
16 dev-util/peda/peda-1.2.ebuild | 49 ++++++++++++++++++++++++++++++++++++++++++
17 dev-util/peda/peda-9999.ebuild | 49 ++++++++++++++++++++++++++++++++++++++++++
18 4 files changed, 114 insertions(+)
19
20 diff --git a/dev-util/peda/Manifest b/dev-util/peda/Manifest
21 new file mode 100644
22 index 000000000000..91865e140d1d
23 --- /dev/null
24 +++ b/dev-util/peda/Manifest
25 @@ -0,0 +1 @@
26 +DIST peda-1.2.tar.gz 65331 BLAKE2B 6942b99d714eb1114167b80ba202d86f6dee52cd47c8047b4cb78d4a91f45e1594521440a3318a968e35c5dc56a616393c0837d6f9db5ba41505641a385fb573 SHA512 e69844b8c3a51af96096d97ebfa4a67ac8ff16e4a9e0edb64bbb5e946b1ebeaa56260663718b90145f4191cc25762f3e351a8de92bf9b56f9f1d11389c563c43
27
28 diff --git a/dev-util/peda/metadata.xml b/dev-util/peda/metadata.xml
29 new file mode 100644
30 index 000000000000..a4d70b1a53ea
31 --- /dev/null
32 +++ b/dev-util/peda/metadata.xml
33 @@ -0,0 +1,15 @@
34 +<?xml version="1.0" encoding="UTF-8"?>
35 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
36 +<pkgmetadata>
37 + <maintainer type="person" proxied="yes">
38 + <email>mario.haustein@×××××××××××××××.de</email>
39 + <name>Mario Haustein</name>
40 + </maintainer>
41 + <maintainer type="project" proxied="proxy">
42 + <email>proxy-maint@g.o</email>
43 + <name>Proxy Maintainers</name>
44 + </maintainer>
45 + <upstream>
46 + <remote-id type="github">longld/peda</remote-id>
47 + </upstream>
48 +</pkgmetadata>
49
50 diff --git a/dev-util/peda/peda-1.2.ebuild b/dev-util/peda/peda-1.2.ebuild
51 new file mode 100644
52 index 000000000000..e3fd8e0aa2bb
53 --- /dev/null
54 +++ b/dev-util/peda/peda-1.2.ebuild
55 @@ -0,0 +1,49 @@
56 +# Copyright 1999-2022 Gentoo Authors
57 +# Distributed under the terms of the GNU General Public License v2
58 +
59 +EAPI=8
60 +
61 +PYTHON_COMPAT=( python3_{9..11} )
62 +
63 +inherit python-single-r1 wrapper
64 +
65 +DESCRIPTION="Python Exploit Development Assistance for GDB"
66 +HOMEPAGE="https://github.com/longld/peda"
67 +
68 +if [[ ${PV} == "9999" ]]; then
69 + inherit git-r3
70 + EGIT_REPO_URI="https://github.com/longld/peda"
71 +else
72 + SRC_URI="https://github.com/longld/peda/archive/v${PV}.tar.gz -> ${P}.tar.gz"
73 + KEYWORDS="~amd64 ~x86"
74 +fi
75 +
76 +LICENSE="CC-BY-NC-SA-3.0"
77 +SLOT="0"
78 +
79 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
80 +
81 +RDEPEND="
82 + ${PYTHON_DEPS}
83 + $(python_gen_cond_dep '
84 + dev-python/six[${PYTHON_USEDEP}]
85 + sys-devel/gdb[python,${PYTHON_SINGLE_USEDEP}]
86 + ')
87 +"
88 +
89 +src_install() {
90 + insinto /usr/share/${PN}
91 + doins -r lib/ *.py
92 +
93 + python_optimize "${ED}"/usr/share/${PN}
94 +
95 + make_wrapper "gdb-peda" \
96 + "gdb -x \"${EPREFIX}/usr/share/${PN}/peda.py\"" || die
97 +
98 + dodoc README{,.md}
99 +}
100 +
101 +pkg_postinst() {
102 + einfo "\nUsage:"
103 + einfo " ~$ gdb-peda <program>\n"
104 +}
105
106 diff --git a/dev-util/peda/peda-9999.ebuild b/dev-util/peda/peda-9999.ebuild
107 new file mode 100644
108 index 000000000000..e3fd8e0aa2bb
109 --- /dev/null
110 +++ b/dev-util/peda/peda-9999.ebuild
111 @@ -0,0 +1,49 @@
112 +# Copyright 1999-2022 Gentoo Authors
113 +# Distributed under the terms of the GNU General Public License v2
114 +
115 +EAPI=8
116 +
117 +PYTHON_COMPAT=( python3_{9..11} )
118 +
119 +inherit python-single-r1 wrapper
120 +
121 +DESCRIPTION="Python Exploit Development Assistance for GDB"
122 +HOMEPAGE="https://github.com/longld/peda"
123 +
124 +if [[ ${PV} == "9999" ]]; then
125 + inherit git-r3
126 + EGIT_REPO_URI="https://github.com/longld/peda"
127 +else
128 + SRC_URI="https://github.com/longld/peda/archive/v${PV}.tar.gz -> ${P}.tar.gz"
129 + KEYWORDS="~amd64 ~x86"
130 +fi
131 +
132 +LICENSE="CC-BY-NC-SA-3.0"
133 +SLOT="0"
134 +
135 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
136 +
137 +RDEPEND="
138 + ${PYTHON_DEPS}
139 + $(python_gen_cond_dep '
140 + dev-python/six[${PYTHON_USEDEP}]
141 + sys-devel/gdb[python,${PYTHON_SINGLE_USEDEP}]
142 + ')
143 +"
144 +
145 +src_install() {
146 + insinto /usr/share/${PN}
147 + doins -r lib/ *.py
148 +
149 + python_optimize "${ED}"/usr/share/${PN}
150 +
151 + make_wrapper "gdb-peda" \
152 + "gdb -x \"${EPREFIX}/usr/share/${PN}/peda.py\"" || die
153 +
154 + dodoc README{,.md}
155 +}
156 +
157 +pkg_postinst() {
158 + einfo "\nUsage:"
159 + einfo " ~$ gdb-peda <program>\n"
160 +}