public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/gef/
Date: Fri, 28 Jan 2022 05:18:42 +0000 (UTC)	[thread overview]
Message-ID: <1643347008.2627b3cc74876e07a34fe1766997d4faea723ebf.sam@gentoo> (raw)

commit:     2627b3cc74876e07a34fe1766997d4faea723ebf
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 28 05:13:54 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 28 05:16:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2627b3cc

dev-util/gef: respect EPREFIX; wire up test dependencies

Tests still hang though.

See: https://github.com/gentoo/gentoo/pull/23806
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/gef/gef-2021.10.ebuild | 31 ++++++++++++++++++-------------
 dev-util/gef/gef-9999.ebuild    | 31 ++++++++++++++++++-------------
 2 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/dev-util/gef/gef-2021.10.ebuild b/dev-util/gef/gef-2021.10.ebuild
index e69d14c8d8a6..0d0db6c0ae2b 100644
--- a/dev-util/gef/gef-2021.10.ebuild
+++ b/dev-util/gef/gef-2021.10.ebuild
@@ -10,7 +10,7 @@ inherit python-single-r1 wrapper
 DESCRIPTION="A GDB Enhanced Features for exploit devs & reversers"
 HOMEPAGE="https://github.com/hugsy/gef"
 
-if [[ "${PV}" == *9999 ]]; then
+if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	EGIT_REPO_URI="https://github.com/hugsy/gef"
 else
@@ -20,9 +20,9 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="doc"
-RESTRICT="test"
-
+IUSE="doc test"
+# Seem to hang right now?
+RESTRICT="!test? ( test ) test"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
@@ -36,28 +36,33 @@ RDEPEND="
 		dev-util/unicorn[python,${PYTHON_USEDEP}]
 	')"
 
-BDEPEND="doc? ( dev-python/mkdocs )"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-}
+BDEPEND="doc? ( dev-python/mkdocs )
+	test? (
+		$(python_gen_cond_dep '
+			dev-python/pytest[${PYTHON_USEDEP}]
+			dev-python/pytest-xdist[${PYTHON_USEDEP}]
+		')
+	)"
 
 src_compile() {
+	# Tries to compile tests
 	:
 }
 
 src_install() {
-	insinto "/usr/share/${PN}"
+	insinto /usr/share/${PN}
 	doins -r *.py
 
-	python_optimize "${D}/usr/share/${PN}"
+	python_optimize "${ED}"/usr/share/${PN}
 
 	make_wrapper "gdb-gef" \
-	"gdb -ex \"source /usr/share/${PN}/gef.py\"" || die
+	"gdb -ex \"source ${EPREFIX}/usr/share/${PN}/gef.py\"" || die
 
 	if use doc; then
+		# TODO: docs.eclass?
 		mkdocs build -d html || die
-		rm "${WORKDIR}/${P}/html/sitemap.xml.gz" || die
+
+		rm "${WORKDIR}"/${P}/html/sitemap.xml.gz || die
 		dodoc -r html/
 	fi
 

diff --git a/dev-util/gef/gef-9999.ebuild b/dev-util/gef/gef-9999.ebuild
index e69d14c8d8a6..0d0db6c0ae2b 100644
--- a/dev-util/gef/gef-9999.ebuild
+++ b/dev-util/gef/gef-9999.ebuild
@@ -10,7 +10,7 @@ inherit python-single-r1 wrapper
 DESCRIPTION="A GDB Enhanced Features for exploit devs & reversers"
 HOMEPAGE="https://github.com/hugsy/gef"
 
-if [[ "${PV}" == *9999 ]]; then
+if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	EGIT_REPO_URI="https://github.com/hugsy/gef"
 else
@@ -20,9 +20,9 @@ fi
 
 LICENSE="MIT"
 SLOT="0"
-IUSE="doc"
-RESTRICT="test"
-
+IUSE="doc test"
+# Seem to hang right now?
+RESTRICT="!test? ( test ) test"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
@@ -36,28 +36,33 @@ RDEPEND="
 		dev-util/unicorn[python,${PYTHON_USEDEP}]
 	')"
 
-BDEPEND="doc? ( dev-python/mkdocs )"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-}
+BDEPEND="doc? ( dev-python/mkdocs )
+	test? (
+		$(python_gen_cond_dep '
+			dev-python/pytest[${PYTHON_USEDEP}]
+			dev-python/pytest-xdist[${PYTHON_USEDEP}]
+		')
+	)"
 
 src_compile() {
+	# Tries to compile tests
 	:
 }
 
 src_install() {
-	insinto "/usr/share/${PN}"
+	insinto /usr/share/${PN}
 	doins -r *.py
 
-	python_optimize "${D}/usr/share/${PN}"
+	python_optimize "${ED}"/usr/share/${PN}
 
 	make_wrapper "gdb-gef" \
-	"gdb -ex \"source /usr/share/${PN}/gef.py\"" || die
+	"gdb -ex \"source ${EPREFIX}/usr/share/${PN}/gef.py\"" || die
 
 	if use doc; then
+		# TODO: docs.eclass?
 		mkdocs build -d html || die
-		rm "${WORKDIR}/${P}/html/sitemap.xml.gz" || die
+
+		rm "${WORKDIR}"/${P}/html/sitemap.xml.gz || die
 		dodoc -r html/
 	fi
 


             reply	other threads:[~2022-01-28  5:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  5:18 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-14  4:57 [gentoo-commits] repo/gentoo:master commit in: dev-util/gef/ Sam James
2024-01-14  4:53 Sam James
2024-01-14  4:53 Sam James
2024-01-14  4:53 Sam James
2024-01-14  4:53 Sam James
2023-10-04 21:56 Conrad Kostecki
2023-09-26 18:25 Sam James
2023-09-26 17:58 Sam James
2023-08-26  4:01 Sam James
2023-08-26  4:01 Sam James
2023-08-26  4:01 Sam James
2023-05-25  8:25 Arthur Zamarin
2023-05-25  8:12 Arthur Zamarin
2023-04-25  1:57 Sam James
2023-04-25  1:57 Sam James
2023-04-14 19:43 Sam James
2023-04-14  4:04 Sam James
2023-02-25  5:47 Arthur Zamarin
2023-01-14 10:00 Arthur Zamarin
2023-01-10  4:13 Sam James
2023-01-05 16:42 Arthur Zamarin
2023-01-05 16:42 Arthur Zamarin
2022-10-30  9:35 Sam James
2022-10-30  9:35 Sam James
2022-07-26  4:26 Sam James
2022-06-28  9:31 Sam James
2022-01-31  3:55 Sam James
2022-01-31  3:54 Sam James
2022-01-31  3:54 Sam James
2022-01-28  8:22 Sam James
2022-01-28  5:18 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1643347008.2627b3cc74876e07a34fe1766997d4faea723ebf.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox