commit:     b506dc58cbbb462610346bd332a27d16a06fec20
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  6 17:50:34 2024 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Sun Oct  6 19:51:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b506dc58

app-emacs/ert-runner: enable tests; minor tweaks

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild | 87 +++++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild 
b/app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild
new file mode 100644
index 000000000000..2124baa14fb0
--- /dev/null
+++ b/app-emacs/ert-runner/ert-runner-0.8.0-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp edo
+
+DESCRIPTION="Opinionated Emacs Ert testing workflow"
+HOMEPAGE="https://github.com/rejeep/ert-runner.el/";
+
+if [[ "${PV}" == *9999* ]] ; then
+       inherit git-r3
+
+       EGIT_REPO_URI="https://github.com/rejeep/${PN}.el.git";
+else
+       SRC_URI="https://github.com/rejeep/${PN}.el/archive/v${PV}.tar.gz
+               -> ${P}.tar.gz"
+       S="${WORKDIR}/${PN}.el-${PV}"
+
+       KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+LICENSE="GPL-3+"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       app-emacs/ansi
+       app-emacs/commander
+       app-emacs/dash
+       app-emacs/f
+       app-emacs/dash
+       app-emacs/shut-up
+"
+BDEPEND="
+       ${RDEPEND}
+       test? (
+               app-emacs/ecukes
+       )
+"
+
+ELISP_REMOVE="
+       Makefile
+       features/reporter.feature
+"
+PATCHES=(
+       "${FILESDIR}/${PN}-bin-launcher-fix.patch"
+)
+
+DOCS=( README.md )
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+       elisp_src_prepare
+
+       sed "s|@SITELISP@|${EPREFIX}${SITELISP}/${PN}|" -i "./bin/${PN}" || die
+}
+
+src_compile() {
+       elisp_src_compile
+       elisp-compile ./reporters/*.el
+}
+
+src_test() {
+       # Set up fake Cask for tests.
+       mkdir -p "${T}/bin" || die
+       cat <<-EOF >> "${T}/bin/cask" || die
+       #!/usr/bin/env bash
+       set -e
+       if [[ "\${1}" != exec ]] ; then echo "Not a exec call!" ; exit 1 ; fi
+       shift
+       "\${@}"
+       EOF
+       chmod +x "${T}/bin/cask" || die
+       local -x PATH="${T}/bin:${PATH}" || die
+
+       edo ecukes --debug --reporter spec --script --verbose features
+}
+
+src_install() {
+       elisp_src_install
+       elisp-install "${PN}/reporters" reporters/*.el{,c}
+
+       exeinto /usr/bin
+       doexe "./bin/${PN}"
+}

Reply via email to