summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2022-03-06 15:04:35 +0000
committerMatthew Smith <matthew@gentoo.org>2022-03-06 15:06:25 +0000
commit5ee53e4e6f8a57b79cb9120501d720eb0790a8a9 (patch)
tree306488c303040fba94e34582f4f68c488cea4bd8 /app-emacs/go-mode
parentdev-lang/haxe: fix build (diff)
downloadgentoo-5ee53e4e6f8a57b79cb9120501d720eb0790a8a9.tar.gz
gentoo-5ee53e4e6f8a57b79cb9120501d720eb0790a8a9.tar.bz2
gentoo-5ee53e4e6f8a57b79cb9120501d720eb0790a8a9.zip
app-emacs/go-mode: add 1.6.0
Also bump to EAPI 8 and run the provided tests. Bug: https://bugs.gentoo.org/582434 Suggested-by: Alessandro Di Marco <dmr@ethzero.com> Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'app-emacs/go-mode')
-rw-r--r--app-emacs/go-mode/Manifest1
-rw-r--r--app-emacs/go-mode/files/50go-mode-1.6.0-gentoo.el2
-rw-r--r--app-emacs/go-mode/go-mode-1.6.0.ebuild47
3 files changed, 50 insertions, 0 deletions
diff --git a/app-emacs/go-mode/Manifest b/app-emacs/go-mode/Manifest
index 5af33b0616db..882da91fac0a 100644
--- a/app-emacs/go-mode/Manifest
+++ b/app-emacs/go-mode/Manifest
@@ -1 +1,2 @@
DIST go-mode-1.5.0.tar.gz 36876 BLAKE2B dca184f1cb79c919067ffecd1111f2404685459dca374a1ff14512067d0235bc862a04cb5fb014620856d0d03c15668149d0c62c238098b8561ea2512b26ec36 SHA512 fee67461467feb272dbb90abbad3df786f984925747ad8588c271784f8d27db888dd1da9d4589fb63ccfded1a833b01bb860d3254b00ca5e3f3aa89f199880c3
+DIST go-mode-1.6.0.tar.xz 40764 BLAKE2B e88be130809da4d00978698c6f2cdd0d844a6c6646c23152fcb5f4c3a9a1596ca8d79199d811f8e7d64f6c245cd7bb80b9a403fc0e1362e6b2c556466b45e80d SHA512 24594b1de8ae45922a6a7c7cee8097f4a8ebdac477ae086595a73c5a7757b8c2f8c0249ad4ccf313ca13332790d76495b7c212d2e0e721f98753f23b2d6511c1
diff --git a/app-emacs/go-mode/files/50go-mode-1.6.0-gentoo.el b/app-emacs/go-mode/files/50go-mode-1.6.0-gentoo.el
new file mode 100644
index 000000000000..9b688ab3a239
--- /dev/null
+++ b/app-emacs/go-mode/files/50go-mode-1.6.0-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(load "@SITELISP@/go-mode-autoloads" nil t)
diff --git a/app-emacs/go-mode/go-mode-1.6.0.ebuild b/app-emacs/go-mode/go-mode-1.6.0.ebuild
new file mode 100644
index 000000000000..76def2ac8579
--- /dev/null
+++ b/app-emacs/go-mode/go-mode-1.6.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NEED_EMACS=26
+
+inherit elisp
+
+# Upstream didn't create a git tag for version 1.6.0, this source
+# tarball is from the repository at commit 3273fcece5d, the commit that
+# bumped the version to 1.6.0.
+
+DESCRIPTION="An improved Go mode for emacs"
+HOMEPAGE="https://github.com/dominikh/go-mode.el"
+SRC_URI="https://dev.gentoo.org/~matthew/distfiles/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+SITEFILE="50${PN}-1.6.0-gentoo.el"
+DOCS=( README.md )
+
+src_prepare() {
+ default
+
+ # fix path to testdata directory when running tests
+ sed -i 's|testdata|test/&|g' \
+ test/go-indentation-test.el || die
+}
+
+src_compile() {
+ elisp_src_compile
+ elisp-make-autoload-file
+}
+
+src_test() {
+ for suite in test/*-test.el; do
+ ${EMACS} ${EMACSFLAGS} \
+ -L . \
+ -l ert \
+ -l go-mode \
+ -l "${suite}" \
+ -f ert-run-tests-batch-and-exit || die "test ${suite} failed"
+ done
+}