diff options
author | Maciej Barć <xgqt@gentoo.org> | 2022-06-21 21:35:49 +0200 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2022-06-21 21:36:11 +0200 |
commit | 98307eefb98e8ec4fa76501aa3bfb877ff59de96 (patch) | |
tree | 2264bee8a708545ba0f932ee258dbab5969184fa /app-emacs/compat | |
parent | sci-libs/hdf5: update EAPI 7 -> 8; drop back to autotools (diff) | |
download | gentoo-98307eefb98e8ec4fa76501aa3bfb877ff59de96.tar.gz gentoo-98307eefb98e8ec4fa76501aa3bfb877ff59de96.tar.bz2 gentoo-98307eefb98e8ec4fa76501aa3bfb877ff59de96.zip |
app-emacs/compat: check for native JSON parsing support
Closes: https://bugs.gentoo.org/853322
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-emacs/compat')
-rw-r--r-- | app-emacs/compat/compat-28.1.1.3.ebuild | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app-emacs/compat/compat-28.1.1.3.ebuild b/app-emacs/compat/compat-28.1.1.3.ebuild index c220c6ceb7a3..e373d5d8f507 100644 --- a/app-emacs/compat/compat-28.1.1.3.ebuild +++ b/app-emacs/compat/compat-28.1.1.3.ebuild @@ -29,3 +29,19 @@ 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}. + Use "eselect emacs" to select an Emacs version with such feature. + EOF + else + emake test + fi +} |