summaryrefslogtreecommitdiff
path: root/app-emacs/compat/compat-28.1.2.0.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/compat/compat-28.1.2.0.ebuild')
-rw-r--r--app-emacs/compat/compat-28.1.2.0.ebuild43
1 files changed, 43 insertions, 0 deletions
diff --git a/app-emacs/compat/compat-28.1.2.0.ebuild b/app-emacs/compat/compat-28.1.2.0.ebuild
new file mode 100644
index 000000000000..8a61c3a356a2
--- /dev/null
+++ b/app-emacs/compat/compat-28.1.2.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+H=2c3233c0e09ef34176787b6e3da4319751ad91e7
+NEED_EMACS=24
+
+inherit elisp
+
+DESCRIPTION="Compatibility libraries for Emacs"
+HOMEPAGE="https://git.sr.ht/~pkal/compat/"
+SRC_URI="https://git.sr.ht/~pkal/${PN}/archive/${H}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/${PN}-${H}
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="sys-apps/texinfo"
+
+ELISP_TEXINFO="${PN}.texi"
+
+src_compile() {
+ emake compile ${PN}.info
+}
+
+src_test() {
+ local has_json="$("${EMACS}" ${EMACSFLAGS} --eval "(princ (fboundp 'json-parse-string))")"
+ if [[ "${has_json}" != t ]] ; then
+ local line
+ while read line ; do
+ ewarn "${line}"
+ done <<-EOF
+ Your current Emacs version does not support native JSON parsing,
+ which is required for running tests of ${CATEGORY}/${PN}.
+ Emerge >=app-editors/emacs-27 with USE="json" and use "eselect emacs"
+ to select that version.
+ EOF
+ else
+ emake test
+ fi
+}