summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2022-07-17 20:57:43 +0200
committerMaciej Barć <xgqt@gentoo.org>2022-07-17 21:01:12 +0200
commit69388a02dfa3d76657f9ab1a75f26f493943a3d2 (patch)
tree26d1e393970a2fef27dc2d26b8284ce837d59a51 /app-emacs/emacs-bazel-mode
parentgames-board/xscrabble: filter LTO (type mismatch) (diff)
downloadgentoo-69388a02dfa3d76657f9ab1a75f26f493943a3d2.tar.gz
gentoo-69388a02dfa3d76657f9ab1a75f26f493943a3d2.tar.bz2
gentoo-69388a02dfa3d76657f9ab1a75f26f493943a3d2.zip
app-emacs/emacs-bazel-mode: new package; add version 0_p20220707
2022.07.07 snapshot Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-emacs/emacs-bazel-mode')
-rw-r--r--app-emacs/emacs-bazel-mode/Manifest1
-rw-r--r--app-emacs/emacs-bazel-mode/emacs-bazel-mode-0_p20220707.ebuild40
-rw-r--r--app-emacs/emacs-bazel-mode/files/50emacs-bazel-mode-gentoo.el2
-rw-r--r--app-emacs/emacs-bazel-mode/files/emacs-bazel-mode-bazel-test--directory.patch11
-rw-r--r--app-emacs/emacs-bazel-mode/metadata.xml19
5 files changed, 73 insertions, 0 deletions
diff --git a/app-emacs/emacs-bazel-mode/Manifest b/app-emacs/emacs-bazel-mode/Manifest
new file mode 100644
index 000000000000..65356b4188a0
--- /dev/null
+++ b/app-emacs/emacs-bazel-mode/Manifest
@@ -0,0 +1 @@
+DIST emacs-bazel-mode-0_p20220707.tar.gz 63821 BLAKE2B fadd0a26c02d0fd6ee92d34ca70cbb1ae3ea873317f97195849993ed94c55e404cfa1eae3f0e94eb81b80ec814dbf5e705ef98f1b23bfc7158a8a14ed32e6276 SHA512 cf654de1b46e562a090b933bc08e2651a5c88b9a01502413cc38f86d849cd1fd698e52d7ad737f4d0b43ea49180fb33eb200c5102ac57df1ca9b65bd175f431d
diff --git a/app-emacs/emacs-bazel-mode/emacs-bazel-mode-0_p20220707.ebuild b/app-emacs/emacs-bazel-mode/emacs-bazel-mode-0_p20220707.ebuild
new file mode 100644
index 000000000000..d25b697c94b8
--- /dev/null
+++ b/app-emacs/emacs-bazel-mode/emacs-bazel-mode-0_p20220707.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+H=8f7875998f233d248097006df224a33873bbc4f2
+NEED_EMACS=27.1
+
+inherit elisp
+
+DESCRIPTION="Emacs major modes for the Bazel build system support"
+HOMEPAGE="https://bazel.build/
+ https://github.com/bazelbuild/emacs-bazel-mode/"
+SRC_URI="https://github.com/bazelbuild/${PN}/archive/${H}.tar.gz
+ -> ${P}.tar.gz"
+S="${WORKDIR}"/${PN}-${H}
+
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+
+DOCS=( CONTRIBUTING.md README.md )
+PATCHES=( "${FILESDIR}"/${PN}-bazel-test--directory.patch )
+SITEFILE="50${PN}-gentoo.el"
+
+src_compile() {
+ elisp-compile bazel.el
+ elisp-make-autoload-file
+}
+
+src_test() {
+ ${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS} \
+ -l ./test.el -f ert-run-tests-batch-and-exit || die "Testing failed"
+}
+
+src_install() {
+ rm test.el || die
+
+ elisp_src_install
+}
diff --git a/app-emacs/emacs-bazel-mode/files/50emacs-bazel-mode-gentoo.el b/app-emacs/emacs-bazel-mode/files/50emacs-bazel-mode-gentoo.el
new file mode 100644
index 000000000000..a45c0a3b76c7
--- /dev/null
+++ b/app-emacs/emacs-bazel-mode/files/50emacs-bazel-mode-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(load "emacs-bazel-mode-autoloads" nil t)
diff --git a/app-emacs/emacs-bazel-mode/files/emacs-bazel-mode-bazel-test--directory.patch b/app-emacs/emacs-bazel-mode/files/emacs-bazel-mode-bazel-test--directory.patch
new file mode 100644
index 000000000000..81cdce53e80f
--- /dev/null
+++ b/app-emacs/emacs-bazel-mode/files/emacs-bazel-mode-bazel-test--directory.patch
@@ -0,0 +1,11 @@
+--- a/test.el
++++ b/test.el
+@@ -47,7 +47,7 @@
+
+ (defconst bazel-test--directory
+ ;; https://docs.bazel.build/versions/2.2.0/test-encyclopedia.html#initial-conditions.
+- (substitute-in-file-name "$TEST_SRCDIR/$TEST_WORKSPACE/")
++ (substitute-in-file-name "$PWD/")
+ "Directory with data dependencies for this package.")
+
+ ;;;; Helper macros
diff --git a/app-emacs/emacs-bazel-mode/metadata.xml b/app-emacs/emacs-bazel-mode/metadata.xml
new file mode 100644
index 000000000000..a5544ccebfd0
--- /dev/null
+++ b/app-emacs/emacs-bazel-mode/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="project">
+ <email>gnu-emacs@gentoo.org</email>
+ <name>Gentoo GNU Emacs project</name>
+ </maintainer>
+ <longdescription>
+ The library provides major modes for editing Bazel BUILD files, WORKSPACE
+ files, .bazelrc files, as well as Starlark files. It also provides commands
+ to run Bazel commands and integration with core GNU Emacs infrastructure
+ like compilation and xref.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/bazelbuild/emacs-bazel-mode/issues/</bugs-to>
+ <remote-id type="github">bazelbuild/emacs-bazel-mode</remote-id>
+ </upstream>
+</pkgmetadata>