From 00324eda9d3a61574ac7808ca09d6d0c8185117e Mon Sep 17 00:00:00 2001 From: John Turner Date: Mon, 6 Dec 2021 20:07:41 -0500 Subject: [PATCH] app-emacs/lsp-mode: new ebuild for lsp-mode --- app-emacs/lsp-mode/Manifest | 1 + app-emacs/lsp-mode/files/50lsp-mode-gentoo.el | 2 + app-emacs/lsp-mode/lsp-mode-8.0.0.ebuild | 56 +++++++++++++++++++ app-emacs/lsp-mode/metadata.xml | 21 +++++++ 4 files changed, 80 insertions(+) create mode 100644 app-emacs/lsp-mode/Manifest create mode 100644 app-emacs/lsp-mode/files/50lsp-mode-gentoo.el create mode 100644 app-emacs/lsp-mode/lsp-mode-8.0.0.ebuild create mode 100644 app-emacs/lsp-mode/metadata.xml diff --git a/app-emacs/lsp-mode/Manifest b/app-emacs/lsp-mode/Manifest new file mode 100644 index 0000000..a66229b --- /dev/null +++ b/app-emacs/lsp-mode/Manifest @@ -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 index 0000000..4678dde --- /dev/null +++ b/app-emacs/lsp-mode/files/50lsp-mode-gentoo.el @@ -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 index 0000000..1ad5bb1 --- /dev/null +++ b/app-emacs/lsp-mode/lsp-mode-8.0.0.ebuild @@ -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 index 0000000..ce18f2e --- /dev/null +++ b/app-emacs/lsp-mode/metadata.xml @@ -0,0 +1,21 @@ + + + + + jturner.usa+gentoo@gmail.com + John Turner + + + proxy-maint@gentoo.org + Proxy Maintainers + + + emacs-lsp/lsp-mode + https://github.com/emacs-lsp/lsp-mode/blob/master/README.md + + + 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. + + -- 2.39.5