commit:     9dfefe999455c8c29de495bd250b89066de11ec0
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 25 16:11:33 2024 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 16:11:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=9dfefe99

app-xemacs/ebuild-mode: Enable tests

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild 
b/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild
index e8a7b29..08028ad 100644
--- a/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild
+++ b/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild
@@ -17,31 +17,39 @@ S="${WORKDIR}/${PN}"
 
 LICENSE="GPL-2+"
 SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
 
-RDEPEND=">=app-editors/xemacs-21.4.20-r5
+RDEPEND=">=app-editors/xemacs-21.4.24-r9
        app-xemacs/sh-script"
-BDEPEND="${RDEPEND}"
+BDEPEND="${RDEPEND}
+       test? ( || (
+               >=app-editors/xemacs-21.5.35
+               app-xemacs/test-harness
+       ) )"
 
 src_compile() {
-       local XEMACS="${EPREFIX}/usr/bin/xemacs"
+       local EMACS="${EPREFIX}/usr/bin/xemacs"
 
-       "${XEMACS}" -batch -q --no-site-file \
+       "${EMACS}" -batch -q --no-site-file \
                -eval "(add-to-list 'load-path nil)" \
                -f batch-byte-compile \
                ebuild-mode.el gentoo-newsitem-mode.el || die
 
-       "${XEMACS}" -batch -q --no-site-file \
+       "${EMACS}" -batch -q --no-site-file \
                -eval "(setq autoload-package-name \"${PN}\")" \
                -eval "(setq generated-autoload-file 
\"${S}/auto-autoloads.el\")" \
                -l autoload -f batch-update-autoloads \
                ebuild-mode.el gentoo-newsitem-mode.el || die
 }
 
-src_test() { :; }  # ERT is not yet available for XEmacs
+src_test() {
+       emake check EMACS="${EPREFIX}/usr/bin/xemacs"
+}
 
 src_install() {
        insinto /usr/share/xemacs/site-packages/lisp/${PN}
-       doins *.el *.elc
+       doins ebuild-mode.{el,elc} gentoo-newsitem-mode.{el,elc} 
auto-autoloads.el
        # XEmacs 21.4 compatibility
        dosym -r /usr/{share,lib}/xemacs/site-packages/lisp/${PN}
 }

Reply via email to