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/gef/
Date: Fri, 28 Jan 2022 05:18:50
Message-Id: 1643347008.2627b3cc74876e07a34fe1766997d4faea723ebf.sam@gentoo
1 commit: 2627b3cc74876e07a34fe1766997d4faea723ebf
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 28 05:13:54 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 28 05:16:48 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2627b3cc
7
8 dev-util/gef: respect EPREFIX; wire up test dependencies
9
10 Tests still hang though.
11
12 See: https://github.com/gentoo/gentoo/pull/23806
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-util/gef/gef-2021.10.ebuild | 31 ++++++++++++++++++-------------
16 dev-util/gef/gef-9999.ebuild | 31 ++++++++++++++++++-------------
17 2 files changed, 36 insertions(+), 26 deletions(-)
18
19 diff --git a/dev-util/gef/gef-2021.10.ebuild b/dev-util/gef/gef-2021.10.ebuild
20 index e69d14c8d8a6..0d0db6c0ae2b 100644
21 --- a/dev-util/gef/gef-2021.10.ebuild
22 +++ b/dev-util/gef/gef-2021.10.ebuild
23 @@ -10,7 +10,7 @@ inherit python-single-r1 wrapper
24 DESCRIPTION="A GDB Enhanced Features for exploit devs & reversers"
25 HOMEPAGE="https://github.com/hugsy/gef"
26
27 -if [[ "${PV}" == *9999 ]]; then
28 +if [[ ${PV} == *9999 ]]; then
29 inherit git-r3
30 EGIT_REPO_URI="https://github.com/hugsy/gef"
31 else
32 @@ -20,9 +20,9 @@ fi
33
34 LICENSE="MIT"
35 SLOT="0"
36 -IUSE="doc"
37 -RESTRICT="test"
38 -
39 +IUSE="doc test"
40 +# Seem to hang right now?
41 +RESTRICT="!test? ( test ) test"
42 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
43
44 RDEPEND="
45 @@ -36,28 +36,33 @@ RDEPEND="
46 dev-util/unicorn[python,${PYTHON_USEDEP}]
47 ')"
48
49 -BDEPEND="doc? ( dev-python/mkdocs )"
50 -
51 -pkg_setup() {
52 - python-single-r1_pkg_setup
53 -}
54 +BDEPEND="doc? ( dev-python/mkdocs )
55 + test? (
56 + $(python_gen_cond_dep '
57 + dev-python/pytest[${PYTHON_USEDEP}]
58 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
59 + ')
60 + )"
61
62 src_compile() {
63 + # Tries to compile tests
64 :
65 }
66
67 src_install() {
68 - insinto "/usr/share/${PN}"
69 + insinto /usr/share/${PN}
70 doins -r *.py
71
72 - python_optimize "${D}/usr/share/${PN}"
73 + python_optimize "${ED}"/usr/share/${PN}
74
75 make_wrapper "gdb-gef" \
76 - "gdb -ex \"source /usr/share/${PN}/gef.py\"" || die
77 + "gdb -ex \"source ${EPREFIX}/usr/share/${PN}/gef.py\"" || die
78
79 if use doc; then
80 + # TODO: docs.eclass?
81 mkdocs build -d html || die
82 - rm "${WORKDIR}/${P}/html/sitemap.xml.gz" || die
83 +
84 + rm "${WORKDIR}"/${P}/html/sitemap.xml.gz || die
85 dodoc -r html/
86 fi
87
88
89 diff --git a/dev-util/gef/gef-9999.ebuild b/dev-util/gef/gef-9999.ebuild
90 index e69d14c8d8a6..0d0db6c0ae2b 100644
91 --- a/dev-util/gef/gef-9999.ebuild
92 +++ b/dev-util/gef/gef-9999.ebuild
93 @@ -10,7 +10,7 @@ inherit python-single-r1 wrapper
94 DESCRIPTION="A GDB Enhanced Features for exploit devs & reversers"
95 HOMEPAGE="https://github.com/hugsy/gef"
96
97 -if [[ "${PV}" == *9999 ]]; then
98 +if [[ ${PV} == *9999 ]]; then
99 inherit git-r3
100 EGIT_REPO_URI="https://github.com/hugsy/gef"
101 else
102 @@ -20,9 +20,9 @@ fi
103
104 LICENSE="MIT"
105 SLOT="0"
106 -IUSE="doc"
107 -RESTRICT="test"
108 -
109 +IUSE="doc test"
110 +# Seem to hang right now?
111 +RESTRICT="!test? ( test ) test"
112 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
113
114 RDEPEND="
115 @@ -36,28 +36,33 @@ RDEPEND="
116 dev-util/unicorn[python,${PYTHON_USEDEP}]
117 ')"
118
119 -BDEPEND="doc? ( dev-python/mkdocs )"
120 -
121 -pkg_setup() {
122 - python-single-r1_pkg_setup
123 -}
124 +BDEPEND="doc? ( dev-python/mkdocs )
125 + test? (
126 + $(python_gen_cond_dep '
127 + dev-python/pytest[${PYTHON_USEDEP}]
128 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
129 + ')
130 + )"
131
132 src_compile() {
133 + # Tries to compile tests
134 :
135 }
136
137 src_install() {
138 - insinto "/usr/share/${PN}"
139 + insinto /usr/share/${PN}
140 doins -r *.py
141
142 - python_optimize "${D}/usr/share/${PN}"
143 + python_optimize "${ED}"/usr/share/${PN}
144
145 make_wrapper "gdb-gef" \
146 - "gdb -ex \"source /usr/share/${PN}/gef.py\"" || die
147 + "gdb -ex \"source ${EPREFIX}/usr/share/${PN}/gef.py\"" || die
148
149 if use doc; then
150 + # TODO: docs.eclass?
151 mkdocs build -d html || die
152 - rm "${WORKDIR}/${P}/html/sitemap.xml.gz" || die
153 +
154 + rm "${WORKDIR}"/${P}/html/sitemap.xml.gz || die
155 dodoc -r html/
156 fi