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
