From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/pkgcheck/, dev-util/pkgcheck/files/
Date: Mon, 1 Aug 2022 20:39:58 +0000 (UTC) [thread overview]
Message-ID: <1659386392.9b014e793af83734542ff47e16bfdc5bead3bbd9.sam@gentoo> (raw)
commit: 9b014e793af83734542ff47e16bfdc5bead3bbd9
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 1 19:50:50 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 1 20:39:52 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b014e79
dev-util/pkgcheck: emacs support for live version
Bug: https://github.com/pkgcore/pkgcheck/pull/420
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/26700
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-util/pkgcheck/files/50pkgcheck-gentoo.el | 4 ++++
dev-util/pkgcheck/pkgcheck-9999.ebuild | 32 +++++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/dev-util/pkgcheck/files/50pkgcheck-gentoo.el b/dev-util/pkgcheck/files/50pkgcheck-gentoo.el
new file mode 100644
index 000000000000..7808713be94a
--- /dev/null
+++ b/dev-util/pkgcheck/files/50pkgcheck-gentoo.el
@@ -0,0 +1,4 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'flycheck-pkgcheck-setup "flycheck-pkgcheck"
+ "Flycheck pkgcheck setup." t)
+(add-hook 'ebuild-mode-hook 'flycheck-pkgcheck-setup)
diff --git a/dev-util/pkgcheck/pkgcheck-9999.ebuild b/dev-util/pkgcheck/pkgcheck-9999.ebuild
index 44a8666a2eac..80366db8e2e5 100644
--- a/dev-util/pkgcheck/pkgcheck-9999.ebuild
+++ b/dev-util/pkgcheck/pkgcheck-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_IN_SOURCE_BUILD=1
-inherit distutils-r1 optfeature
+inherit elisp-common distutils-r1 optfeature
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://github.com/pkgcore/pkgcheck.git"
@@ -20,6 +20,7 @@ HOMEPAGE="https://github.com/pkgcore/pkgcheck"
LICENSE="BSD MIT"
SLOT="0"
+IUSE="emacs"
if [[ ${PV} == *9999 ]]; then
RDEPEND="
@@ -38,8 +39,14 @@ RDEPEND+="
dev-python/lxml[${PYTHON_USEDEP}]
dev-python/pathspec[${PYTHON_USEDEP}]
>=dev-python/tree-sitter-0.19.0[${PYTHON_USEDEP}]
+ emacs? (
+ >=app-editors/emacs-24.1:*
+ app-emacs/ebuild-mode
+ app-emacs/flycheck
+ )
"
BDEPEND="
+ ${RDEPEND}
test? (
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
@@ -47,10 +54,22 @@ BDEPEND="
)
"
+SITEFILE="50${PN}-gentoo.el"
+
distutils_enable_tests setup.py
export USE_SYSTEM_TREE_SITTER_BASH=1
+src_compile() {
+ distutils-r1_src_compile
+
+ if use emacs ; then
+ pushd "${S}"/contrib/emacs >/dev/null || die
+ elisp-compile *.el
+ popd >/dev/null || die
+ fi
+}
+
src_test() {
local -x PYTHONDONTWRITEBYTECODE=
distutils-r1_src_test
@@ -60,9 +79,20 @@ python_install_all() {
local DOCS=( NEWS.rst )
[[ ${PV} == *9999 ]] || doman man/*
distutils-r1_python_install_all
+
+ if use emacs ; then
+ elisp-install ${PN} "${S}"/contrib/emacs/*.el{,c}
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
}
pkg_postinst() {
+ use emacs && elisp-site-regen
+
optfeature "Network check support" dev-python/requests
optfeature "Perl module version check support" dev-perl/Gentoo-PerlMod-Version
}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
next reply other threads:[~2022-08-01 20:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 20:39 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-04 18:23 [gentoo-commits] repo/gentoo:master commit in: dev-util/pkgcheck/, dev-util/pkgcheck/files/ Arthur Zamarin
2023-02-03 12:52 Arthur Zamarin
2022-12-31 11:32 Arthur Zamarin
2021-08-25 16:55 Michał Górny
2021-05-09 9:13 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1659386392.9b014e793af83734542ff47e16bfdc5bead3bbd9.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox