]> jturnerusa.dev Git - ebuilds/commitdiff
app-emacs/lsp-mode: new ebuild for lsp-mode
authorJohn Turner <jturner.usa+gentoo@gmail.com>
Tue, 7 Dec 2021 01:07:41 +0000 (20:07 -0500)
committerJohn Turner <jturner.usa+gentoo@gmail.com>
Tue, 7 Dec 2021 01:07:41 +0000 (20:07 -0500)
app-emacs/lsp-mode/Manifest [new file with mode: 0644]
app-emacs/lsp-mode/files/50lsp-mode-gentoo.el [new file with mode: 0644]
app-emacs/lsp-mode/lsp-mode-8.0.0.ebuild [new file with mode: 0644]
app-emacs/lsp-mode/metadata.xml [new file with mode: 0644]

diff --git a/app-emacs/lsp-mode/Manifest b/app-emacs/lsp-mode/Manifest
new file mode 100644 (file)
index 0000000..a66229b
--- /dev/null
@@ -0,0 +1 @@
+DIST lsp-mode-8.0.0.tar.gz 14703640 BLAKE2B ab7993772cfc127ee94ba4a0af75e8d7f6789ac22c76acce8df250b5579c1dd2f41e353b26cbdcf6e1a2e6a8d1f8a179d4736b67914cdec31c23032f93dffd3c SHA512 2620288142cea7b06ad2725b63e5db945b1d62d0b4c215e8d35d79d6c3f05bcdf2736dab34bd10c2b9f8928caf36ef617182c41c309e62e2ce8ddf45df376cbc
diff --git a/app-emacs/lsp-mode/files/50lsp-mode-gentoo.el b/app-emacs/lsp-mode/files/50lsp-mode-gentoo.el
new file mode 100644 (file)
index 0000000..4678dde
--- /dev/null
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(load "@SITELISP@/lsp-mode-autoload.el")
diff --git a/app-emacs/lsp-mode/lsp-mode-8.0.0.ebuild b/app-emacs/lsp-mode/lsp-mode-8.0.0.ebuild
new file mode 100644 (file)
index 0000000..1ad5bb1
--- /dev/null
@@ -0,0 +1,56 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+NEED_EMACS="26.1"
+
+inherit elisp optfeature
+
+if [[ ${PV} = "9999" ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/emacs-lsp/lsp-mode"
+       EGIT_BRANCH="master"
+       EGIT_CHECKOUT_DIR="${WORKDIR}/${P}"
+       S="${EGIT_CHECKOUT_DIR}"
+else
+       SRC_URI="https://github.com/emacs-lsp/lsp-mode/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="Emacs client/library for the Language Server Protocol"
+HOMEPAGE="https://emacs-lsp.github.io/lsp-mode/"
+
+LICENSE="GPL-3+"
+SLOT="0"
+
+RDEPEND=">=app-emacs/dash-2.18.0
+       >=app-emacs/f-0.20.0
+       >=app-emacs/lv-0.15.0
+       >=app-emacs/markdown-mode-2.4
+       >=app-emacs/spinner-1.7.4"
+DEPEND="${RDEPEND}"
+
+SITEFILE="50${PN}-gentoo.el"
+DOCS=( README.md CHANGELOG.org )
+RESTRICT="test" # test requires ert-runner which is not packaged
+
+src_compile() {
+       ${EMACS} ${EMACSFLAGS} -L . -L "${S}"/clients -f batch-byte-compile *.el "${S}"/clients/*.el
+}
+
+src_install() {
+       elisp-make-autoload-file "${S}"/${PN}-autoload.el "${S}"/
+       elisp-install ${PN} *.el *.elc
+       elisp-install ${PN}/clients "${S}"/clients/{*.el,*.elc}
+       elisp-site-file-install ${FILESDIR}/${SITEFILE}
+}
+
+pkg_postinst() {
+       elisp_pkg_postinst
+       optfeature "lsp-mode UI integration" app-emacs/lsp-ui
+       optfeature "real-time diagnostics" app-emacs/flycheck
+       optfeature "code completion" app-emacs/company-mode
+       optfeature "helm integration" app-emacs/helm
+       optfeature "projectile integration" app-emacs/projectile
+}
diff --git a/app-emacs/lsp-mode/metadata.xml b/app-emacs/lsp-mode/metadata.xml
new file mode 100644 (file)
index 0000000..ce18f2e
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person" proxied="yes">
+    <email>jturner.usa+gentoo@gmail.com</email>
+    <name>John Turner</name>
+  </maintainer>
+  <maintainer type="project" proxied="proxy">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+  <upstream>
+    <remote-id type="github">emacs-lsp/lsp-mode</remote-id>
+    <doc>https://github.com/emacs-lsp/lsp-mode/blob/master/README.md</doc>
+  </upstream>
+  <longdescription>
+    Client for Language Server Protocol. lsp-mode aims to provide IDE-like
+    experience by providing optional integration with the most popular Emacs
+    packages like company, flycheck and projectile.
+  </longdescription>
+</pkgmetadata>