summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild31
-rw-r--r--app-xemacs/test-harness/Manifest1
-rw-r--r--app-xemacs/test-harness/metadata.xml12
-rw-r--r--app-xemacs/test-harness/test-harness-21.4.24.ebuild31
-rw-r--r--eclass/elisp-common.eclass13
-rw-r--r--eclass/elisp.eclass10
6 files changed, 77 insertions, 21 deletions
diff --git a/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild b/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild
index 713020d..d462d78 100644
--- a/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild
+++ b/app-xemacs/ebuild-mode/ebuild-mode-9999.ebuild
@@ -17,31 +17,42 @@ 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"
+EMACS="${EPREFIX}/usr/bin/xemacs"
+EMACSFLAGS="-batch -q --no-site-file"
- "${XEMACS}" -batch -q --no-site-file \
- -eval "(add-to-list 'load-path \".\")" \
+src_compile() {
+ ${EMACS} ${EMACSFLAGS} \
+ -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} ${EMACSFLAGS} \
-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 available for XEmacs
+src_test() {
+ emake check EMACS="${EMACS}" EMACSFLAGS="${EMACSFLAGS}"
+}
src_install() {
- insinto /usr/share/xemacs/site-packages/lisp/${PN}
- doins *.el *.elc
+ insinto /usr/lib/xemacs/site-packages/lisp/${PN}
+ doins ebuild-mode.{el,elc} ebuild-mode-keywords.el \
+ gentoo-newsitem-mode.{el,elc}
+ doins auto-autoloads.el
}
pkg_postinst() {
diff --git a/app-xemacs/test-harness/Manifest b/app-xemacs/test-harness/Manifest
new file mode 100644
index 0000000..57808d3
--- /dev/null
+++ b/app-xemacs/test-harness/Manifest
@@ -0,0 +1 @@
+DIST xemacs-21.4.24.tar.gz 8543879 BLAKE2B d7e60e4e053a10bfc4591a5d691c849ef5e5436f6951c801f5a169592b160669d0f6b9dc8f10b6b79889a3210de977ed78a5cea826c02e425495364745ef9e10 SHA512 b7a88d5a4a9f74f74c2067ed60f7ea87ac8ccad5d9c2c1033ecf07f540250191f8fa5f9e6d23d9fedd0f2ab1eb5ea6c29a7665a310ec512d85e2e4f337447213
diff --git a/app-xemacs/test-harness/metadata.xml b/app-xemacs/test-harness/metadata.xml
new file mode 100644
index 0000000..84e56b7
--- /dev/null
+++ b/app-xemacs/test-harness/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ulm@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>xemacs@gentoo.org</email>
+ <name>Gentoo XEmacs project</name>
+ </maintainer>
+ <stabilize-allarches/>
+</pkgmetadata>
diff --git a/app-xemacs/test-harness/test-harness-21.4.24.ebuild b/app-xemacs/test-harness/test-harness-21.4.24.ebuild
new file mode 100644
index 0000000..e16e9b4
--- /dev/null
+++ b/app-xemacs/test-harness/test-harness-21.4.24.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Test suite harness for testing XEmacs"
+HOMEPAGE="https://www.xemacs.org/"
+SRC_URI="http://ftp.xemacs.org/pub/xemacs/xemacs-$(ver_cut 1-2)/xemacs-${PV}.tar.gz"
+S="${WORKDIR}/xemacs-${PV}/tests/automated"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=">=app-editors/xemacs-${PV}"
+BDEPEND="${RDEPEND}"
+
+src_compile() {
+ local EMACS="${EPREFIX}/usr/bin/xemacs"
+
+ "${EMACS}" -batch -q --no-site-file \
+ -eval "(add-to-list 'load-path nil)" \
+ -f batch-byte-compile test-harness.el || die
+}
+
+src_test() { :; }
+
+src_install() {
+ insinto /usr/lib/xemacs/site-packages/lisp/${PN}
+ doins test-harness.{el,elc}
+}
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass
index bab7250..ad9d3c7 100644
--- a/eclass/elisp-common.eclass
+++ b/eclass/elisp-common.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: elisp-common.eclass
@@ -322,7 +322,7 @@ elisp-make-autoload-file() {
ebegin "Generating autoload file for GNU Emacs"
cat >"${f}" <<-EOF
- ;;; ${f##*/} --- autoloads for ${PN}
+ ;;; ${f##*/} --- autoloads for ${PN} -*-lexical-binding:t-*-
;;; Commentary:
;; Automatically generated by elisp-common.eclass
@@ -333,7 +333,6 @@ elisp-make-autoload-file() {
;; Local ${null}Variables:
;; version-control: never
;; no-byte-compile: t
- ;; no-native-compile: t
;; no-update-autoloads: t
;; End:
@@ -687,7 +686,7 @@ elisp-make-site-file() {
# directory.
elisp-site-regen() {
- local sitelisp=${ROOT%/}${EPREFIX}${SITELISP}
+ local sitelisp=${EROOT}${SITELISP}
local sf i ret=0 null="" page=$'\f'
local -a sflist
@@ -699,9 +698,6 @@ elisp-site-regen() {
[[ -d ${sitelisp} ]] \
|| die "elisp-site-regen: Directory ${sitelisp} does not exist"
- [[ -d ${T} ]] \
- || die "elisp-site-regen: Temporary directory ${T} does not exist"
-
ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})"
for sf in "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el; do
@@ -709,7 +705,7 @@ elisp-site-regen() {
done
cat <<-EOF >"${T}"/site-gentoo.el || ret=$?
- ;;; site-gentoo.el --- site initialisation for Gentoo-installed packages
+ ;;; site-gentoo.el --- Gentoo site initialisation -*-lexical-binding:t-*-
;;; Commentary:
;; Automatically generated by elisp-common.eclass
@@ -726,7 +722,6 @@ elisp-site-regen() {
;; Local ${null}Variables:
;; no-byte-compile: t
- ;; no-native-compile: t
;; buffer-read-only: t
;; End:
diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
index 2013949..1fa8aab 100644
--- a/eclass/elisp.eclass
+++ b/eclass/elisp.eclass
@@ -1,4 +1,4 @@
-# Copyright 2002-2023 Gentoo Authors
+# Copyright 2002-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: elisp.eclass
@@ -205,5 +205,11 @@ elisp_pkg_postrm() {
elisp-site-regen
}
+elisp_pkg_info() {
+ if [[ -n ${_ELISP_EMACS_VERSION} ]]; then
+ echo "Built with Emacs version: ${_ELISP_EMACS_VERSION}"
+ fi
+}
+
EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,test,install} \
- pkg_{setup,postinst,postrm}
+ pkg_{setup,postinst,postrm,info}