commit:     05034fa79288de5195a6a8ff0636243f55f1ed3c
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 17:24:26 2022 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 17:27:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05034fa7

app-emacs/ert-runner: new package; add version 0.8.0

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

 app-emacs/ert-runner/Manifest                      |  1 +
 app-emacs/ert-runner/ert-runner-0.8.0.ebuild       | 49 ++++++++++++++++++++++
 app-emacs/ert-runner/files/50ert-runner-gentoo.el  |  1 +
 .../files/ert-runner-bin-launcher-fix.patch        | 30 +++++++++++++
 app-emacs/ert-runner/metadata.xml                  | 13 ++++++
 5 files changed, 94 insertions(+)

diff --git a/app-emacs/ert-runner/Manifest b/app-emacs/ert-runner/Manifest
new file mode 100644
index 000000000000..2cc23ef2d85a
--- /dev/null
+++ b/app-emacs/ert-runner/Manifest
@@ -0,0 +1 @@
+DIST ert-runner-0.8.0.tar.gz 36263 BLAKE2B 
8eceabea446ffde87c10cd5257264b61ad2e2617cd9a3243c9be5548298a61d5872b46359a798180e3bf450fc8c474f4651fb834959c30f93df807d4ba006401
 SHA512 
a8d17c10b7c4db3fb784725c22d382e7cf213c7a6bc320658b64f1aaf9597cfe9cedc436771ade239cc9ad59e0d3457c257ce9342f9bee8a3fd65f76eb6d9e9b

diff --git a/app-emacs/ert-runner/ert-runner-0.8.0.ebuild 
b/app-emacs/ert-runner/ert-runner-0.8.0.ebuild
new file mode 100644
index 000000000000..b36b3923ccf6
--- /dev/null
+++ b/app-emacs/ert-runner/ert-runner-0.8.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit elisp
+
+DESCRIPTION="Opinionated Emacs Ert testing workflow"
+HOMEPAGE="https://github.com/rejeep/ert-runner.el/";
+SRC_URI="https://github.com/rejeep/${PN}.el/archive/v${PV}.tar.gz
+                       -> ${P}.tar.gz"
+S="${WORKDIR}"/${PN}.el-${PV}
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RESTRICT="test"  # Needs Cask
+
+RDEPEND="
+       app-emacs/ansi
+       app-emacs/commander
+       app-emacs/dash
+       app-emacs/f
+       app-emacs/dash
+       app-emacs/shut-up
+"
+BDEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+PATCHES=( "${FILESDIR}"/${PN}-bin-launcher-fix.patch )
+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_install() {
+       elisp_src_install
+       elisp-install ${PN}/reporters reporters/*.el{,c}
+
+       dobin bin/${PN}
+}

diff --git a/app-emacs/ert-runner/files/50ert-runner-gentoo.el 
b/app-emacs/ert-runner/files/50ert-runner-gentoo.el
new file mode 100644
index 000000000000..431f7e90ae73
--- /dev/null
+++ b/app-emacs/ert-runner/files/50ert-runner-gentoo.el
@@ -0,0 +1 @@
+(add-to-list 'load-path "@SITELISP@")

diff --git a/app-emacs/ert-runner/files/ert-runner-bin-launcher-fix.patch 
b/app-emacs/ert-runner/files/ert-runner-bin-launcher-fix.patch
new file mode 100644
index 000000000000..80f079ba867b
--- /dev/null
+++ b/app-emacs/ert-runner/files/ert-runner-bin-launcher-fix.patch
@@ -0,0 +1,30 @@
+index 97d4ff4..fc14077 100755
+--- a/bin/ert-runner
++++ b/bin/ert-runner
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env bash
+ 
+-ERT_RUNNER="$(dirname $(dirname $0))/ert-runner.el"
++ERT_RUNNER="@SITELISP@/ert-runner.el"
+ 
+ function inside_emacs_24 {
+   if [[ -n $INSIDE_EMACS ]] &&
+@@ -31,9 +31,9 @@ if has_option "--win" $@ || has_option "--no-win" $@ ; then
+   export ERT_RUNNER_OUTFILE=$(mktemp /tmp/ert-runner.XXX)
+ 
+   if has_option "--win" $@; then
+-    "$ERT_RUNNER_EMACS" --load "$ERT_RUNNER" -Q
++    "$ERT_RUNNER_EMACS" --load "$ERT_RUNNER" -q
+   else
+-    "$ERT_RUNNER_EMACS" -nw --load "$ERT_RUNNER" -Q
++    "$ERT_RUNNER_EMACS" -nw --load "$ERT_RUNNER" -q
+   fi
+ 
+   STATUS=$?
+@@ -43,5 +43,5 @@ if has_option "--win" $@ || has_option "--no-win" $@ ; then
+ 
+   exit $STATUS
+ else
+-  "$ERT_RUNNER_EMACS" --script "$ERT_RUNNER" -Q
++  "$ERT_RUNNER_EMACS" --script "$ERT_RUNNER" -q
+ fi

diff --git a/app-emacs/ert-runner/metadata.xml 
b/app-emacs/ert-runner/metadata.xml
new file mode 100644
index 000000000000..c98b3df1e827
--- /dev/null
+++ b/app-emacs/ert-runner/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+
+<pkgmetadata>
+  <maintainer type="project">
+    <email>[email protected]</email>
+    <name>Gentoo GNU Emacs project</name>
+  </maintainer>
+  <upstream>
+    <bugs-to>https://github.com/rejeep/ert-runner.el/issues/</bugs-to>
+    <remote-id type="github">rejeep/ert-runner.el</remote-id>
+  </upstream>
+</pkgmetadata>

Reply via email to