* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2008-10-16 9:28 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-10-16 9:28 UTC (permalink / raw
To: gentoo-commits
ulm 08/10/16 09:28:58
Modified: elisp.eclass elisp-common.eclass
Log:
Partial sync from Emacs overlay (revision 1176).
elisp.class:
Allow for packages without site-init file in elisp_src_install.
Remove "die" messages since elisp-common.eclass is verbose enough.
Document SITEFILE variable.
elisp-common.eclass:
Use sed instead of cat for concatenation of site-init files, since they
may not have a trailing newline.
Add function names to error messages.
Document SITEETC as eclass variable.
Revision Changes Path
1.35 eclass/elisp.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.35&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.35&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.34&r2=1.35
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- elisp.eclass 19 Sep 2008 08:12:48 -0000 1.34
+++ elisp.eclass 16 Oct 2008 09:28:58 -0000 1.35
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.34 2008/09/19 08:12:48 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.35 2008/10/16 09:28:58 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -24,6 +24,13 @@
# file with the file name ${P}.el, then this eclass will move ${P}.el to
# ${PN}.el in src_unpack().
+# @ECLASS-VARIABLE: SITEFILE
+# @DESCRIPTION:
+# Name of package's site-init file. The filename must match the shell
+# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
+# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice
+# in most cases.
+
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
# DOCS="blah.txt ChangeLog" is automatically used to install the given
@@ -59,13 +66,14 @@
}
elisp_src_compile() {
- elisp-compile *.el || die "elisp-compile failed"
+ elisp-compile *.el || die
}
elisp_src_install() {
- elisp-install ${PN} *.el *.elc || die "elisp-install failed"
- elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
- || die "elisp-site-file-install failed"
+ elisp-install ${PN} *.el *.elc || die
+ if [ -n "${SITEFILE}" ]; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
+ fi
if [ -n "${DOCS}" ]; then
dodoc ${DOCS} || die "dodoc failed"
fi
1.50 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.49&r2=1.50
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- elisp-common.eclass 12 Oct 2008 19:48:21 -0000 1.49
+++ elisp-common.eclass 16 Oct 2008 09:28:58 -0000 1.50
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.49 2008/10/12 19:48:21 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.50 2008/10/16 09:28:58 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -37,7 +37,7 @@
# elisp files is also supported, since the current directory is added to the
# load-path which makes sure that all files are loadable.
#
-# elisp-compile *.el || die "elisp-compile failed"
+# elisp-compile *.el || die
#
# Formerly, function elisp-comp() was used for compilation of interdependent
# elisp files. This usage is considered as obsolete.
@@ -59,7 +59,7 @@
# something else, but remember to tell elisp-site-file-install() (see below)
# the change, as it defaults to ${PN}.
#
-# elisp-install ${PN} *.el *.elc || die "elisp-install failed"
+# elisp-install ${PN} *.el *.elc || die
#
# To let the Emacs support be activated by Emacs on startup, you need
# to provide a site file (shipped in ${FILESDIR}) which contains the startup
@@ -86,12 +86,14 @@
# keybindings as they might interfere with the user's settings. Give a hint
# in pkg_postinst(), which should be enough.
#
-# The naming scheme for this site file is "[0-9][0-9]*-gentoo.el", where the
-# two digits at the beginning define the loading order. So if you depend on
-# another Emacs package, your site file's number must be higher!
+# The naming scheme for this site-init file matches the shell pattern
+# "[1-8][0-9]*-gentoo.el", where the two digits at the beginning define the
+# loading order (numbers below 10 or above 89 are reserved for internal use).
+# So if you depend on another Emacs package, your site file's number must be
+# higher!
#
# Best practice is to define a SITEFILE variable in the global scope of your
-# ebuild (right after DEPEND e.g.):
+# ebuild (e.g., right after DEPEND):
#
# SITEFILE=50${PN}-gentoo.el
#
@@ -378,7 +380,8 @@
;;; Code:
EOF
- cat "${sflist[@]}" </dev/null >>"${tmpdir}"/site-gentoo.el
+ # Use sed instead of cat here, since files may miss a trailing newline.
+ sed '$q' "${sflist[@]}" </dev/null >>"${tmpdir}"/site-gentoo.el
cat <<-EOF >>"${tmpdir}"/site-gentoo.el
(provide 'site-gentoo)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2009-03-12 12:08 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-03-12 12:08 UTC (permalink / raw
To: gentoo-commits
ulm 09/03/12 12:08:47
Modified: elisp.eclass elisp-common.eclass
Log:
Partial sync from Emacs overlay, only documentation and einfo output changes.
Revision Changes Path
1.38 eclass/elisp.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.38&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.38&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.37&r2=1.38
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- elisp.eclass 7 Feb 2009 11:32:45 -0000 1.37
+++ elisp.eclass 12 Mar 2009 12:08:47 -0000 1.38
@@ -1,11 +1,11 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.37 2009/02/07 11:32:45 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.38 2009/03/12 12:08:47 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
-# Copyright 2007-2008 Christian Faulhammer <opfer@gentoo.org>
-# Copyright 2007-2008 Ulrich Müller <ulm@gentoo.org>
+# Copyright 2007-2009 Christian Faulhammer <fauli@gentoo.org>
+# Copyright 2007-2009 Ulrich Müller <ulm@gentoo.org>
#
# @ECLASS: elisp.eclass
# @MAINTAINER:
@@ -14,7 +14,10 @@
# @BLURB: Eclass for Emacs Lisp packages
# @DESCRIPTION:
#
-# This eclass sets the site-lisp directory for Emacs-related packages.
+# This eclass is designed to install elisp files of Emacs related
+# packages into the site-lisp directory. The majority of elisp packages
+# will only need to define the standard ebuild variables (like SRC_URI)
+# and optionally SITEFILE for successful installation.
#
# Emacs support for other than pure elisp packages is handled by
# elisp-common.eclass where you won't have a dependency on Emacs itself.
@@ -24,26 +27,30 @@
# file with the file name ${P}.el, then this eclass will move ${P}.el to
# ${PN}.el in src_unpack().
-# @ECLASS-VARIABLE: SITEFILE
+# @ECLASS-VARIABLE: NEED_EMACS
# @DESCRIPTION:
-# Name of package's site-init file. The filename must match the shell
-# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
-# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice
-# in most cases.
+# If you need anything different from Emacs 21, use the NEED_EMACS
+# variable before inheriting elisp.eclass. Set it to the major version
+# your package uses and the dependency will be adjusted.
# @ECLASS-VARIABLE: DOCS
# @DESCRIPTION:
# DOCS="blah.txt ChangeLog" is automatically used to install the given
# files by dodoc in src_install().
-# @ECLASS-VARIABLE: NEED_EMACS
+# @ECLASS-VARIABLE: SITEFILE
# @DESCRIPTION:
-# If you need anything different from Emacs 21, use the NEED_EMACS
-# variable before inheriting elisp.eclass. Set it to the major version
-# your package uses and the dependency will be adjusted.
+# Name of package's site-init file. The filename must match the shell
+# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
+# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice
+# in most cases.
inherit elisp-common versionator
+EXPORT_FUNCTIONS \
+ src_unpack src_compile src_install \
+ pkg_setup pkg_postinst pkg_postrm
+
DEPEND=">=virtual/emacs-${NEED_EMACS:-21}"
RDEPEND=">=virtual/emacs-${NEED_EMACS:-21}"
IUSE=""
@@ -87,7 +94,3 @@
elisp_pkg_postrm() {
elisp-site-regen
}
-
-EXPORT_FUNCTIONS \
- src_unpack src_compile src_install \
- pkg_setup pkg_postinst pkg_postrm
1.56 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.56&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.56&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.55&r2=1.56
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- elisp-common.eclass 13 Feb 2009 17:15:58 -0000 1.55
+++ elisp-common.eclass 12 Mar 2009 12:08:47 -0000 1.56
@@ -1,11 +1,11 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.55 2009/02/13 17:15:58 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.56 2009/03/12 12:08:47 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org>
-# Copyright 2007-2008 Christian Faulhammer <opfer@gentoo.org>
+# Copyright 2007-2008 Christian Faulhammer <fauli@gentoo.org>
# Copyright 2007-2009 Ulrich Müller <ulm@gentoo.org>
#
# @ECLASS: elisp-common.eclass
@@ -327,7 +327,7 @@
[ -e "${ROOT}${SITELISP}"/site-gentoo.el ] || firstrun=t
if [ "${firstrun}" ] && [ ! -e "${ROOT}${SITELISP}"/site-start.el ]; then
- einfo "Creating default ${SITELISP}/site-start.el ..."
+ einfo "Creating default site-start.el ..."
cat <<-EOF >"${T}"/site-start.el
;;; site-start.el
@@ -344,7 +344,7 @@
EOF
fi
- einfon "Regenerating ${SITELISP}/site-gentoo.el ..."
+ einfon "Regenerating site-gentoo.el (${EBUILD_PHASE}) ..."
# remove any auxiliary file (from previous run)
rm -f "${ROOT}${SITELISP}"/00site-gentoo.el
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2009-03-26 14:14 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-03-26 14:14 UTC (permalink / raw
To: gentoo-commits
ulm 09/03/26 14:14:22
Modified: elisp.eclass elisp-common.eclass
Log:
Partial sync from Emacs overlay.
elisp.class:
In the "simple elisp" case, explicitly assign S=${WORKDIR} in
elisp_src_unpack.
elisp-common.eclass:
Remove function elisp-comp; it is not used by anything in the tree.
Reindent documentation to 72 columns for better readability.
Revision Changes Path
1.39 eclass/elisp.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.39&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.39&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.38&r2=1.39
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- elisp.eclass 12 Mar 2009 12:08:47 -0000 1.38
+++ elisp.eclass 26 Mar 2009 14:14:22 -0000 1.39
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.38 2009/03/12 12:08:47 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.39 2009/03/26 14:14:22 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -69,7 +69,9 @@
elisp_src_unpack() {
[ -n "${A}" ] && unpack ${A}
if [ -f ${P}.el ]; then
+ # the "simple elisp" case with a single *.el file in WORKDIR
mv ${P}.el ${PN}.el || die
+ [ -d "${S}" ] || S=${WORKDIR}
fi
}
1.58 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.58&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.58&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.57&r2=1.58
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- elisp-common.eclass 12 Mar 2009 14:10:48 -0000 1.57
+++ elisp-common.eclass 26 Mar 2009 14:14:22 -0000 1.58
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.57 2009/03/12 14:10:48 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.58 2009/03/26 14:14:22 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -10,61 +10,60 @@
#
# @ECLASS: elisp-common.eclass
# @MAINTAINER:
-# Feel free to contact the Emacs team through <emacs@gentoo.org> if you have
-# problems, suggestions or questions.
+# Feel free to contact the Emacs team through <emacs@gentoo.org> if you
+# have problems, suggestions or questions.
# @BLURB: Emacs-related installation utilities
# @DESCRIPTION:
#
-# Usually you want to use this eclass for (optional) GNU Emacs support of
-# your package. This is NOT for XEmacs!
+# Usually you want to use this eclass for (optional) GNU Emacs support
+# of your package. This is NOT for XEmacs!
#
# Many of the steps here are sometimes done by the build system of your
-# package (especially compilation), so this is mainly for standalone elisp
-# files you gathered from somewhere else.
+# package (especially compilation), so this is mainly for standalone
+# elisp files you gathered from somewhere else.
#
# When relying on the emacs USE flag, you need to add
#
# emacs? ( virtual/emacs )
#
-# to your DEPEND/RDEPEND line and use the functions provided here to bring
-# the files to the correct locations.
+# to your DEPEND/RDEPEND line and use the functions provided here to
+# bring the files to the correct locations.
#
# .SS
# src_compile() usage:
#
-# An elisp file is compiled by the elisp-compile() function defined here and
-# simply takes the source files as arguments. The case of interdependent
-# elisp files is also supported, since the current directory is added to the
-# load-path which makes sure that all files are loadable.
+# An elisp file is compiled by the elisp-compile() function defined
+# here and simply takes the source files as arguments. The case of
+# interdependent elisp files is also supported, since the current
+# directory is added to the load-path which makes sure that all files
+# are loadable.
#
# elisp-compile *.el || die
#
-# Formerly, function elisp-comp() was used for compilation of interdependent
-# elisp files. This usage is considered as obsolete.
-#
-# Function elisp-make-autoload-file() can be used to generate a file with
-# autoload definitions for the lisp functions. It takes the output file name
-# (default: "${PN}-autoloads.el") and a list of directories (default: working
-# directory) as its arguments. Use of this function requires that the elisp
-# source files contain magic ";;;###autoload" comments. See the Emacs Lisp
-# Reference Manual (node "Autoload") for a detailed explanation.
+# Function elisp-make-autoload-file() can be used to generate a file
+# with autoload definitions for the lisp functions. It takes the output
+# file name (default: "${PN}-autoloads.el") and a list of directories
+# (default: working directory) as its arguments. Use of this function
+# requires that the elisp source files contain magic ";;;###autoload"
+# comments. See the Emacs Lisp Reference Manual (node "Autoload") for
+# a detailed explanation.
#
# .SS
# src_install() usage:
#
# The resulting compiled files (.elc) should be put in a subdirectory of
# /usr/share/emacs/site-lisp/ which is named after the first argument
-# of elisp-install(). The following parameters are the files to be put in
-# that directory. Usually the subdirectory should be ${PN}, you can choose
-# something else, but remember to tell elisp-site-file-install() (see below)
-# the change, as it defaults to ${PN}.
+# of elisp-install(). The following parameters are the files to be put
+# in that directory. Usually the subdirectory should be ${PN}, you can
+# choose something else, but remember to tell elisp-site-file-install()
+# (see below) the change, as it defaults to ${PN}.
#
# elisp-install ${PN} *.el *.elc || die
#
# To let the Emacs support be activated by Emacs on startup, you need
-# to provide a site file (shipped in ${FILESDIR}) which contains the startup
-# code (have a look in the documentation of your software). Normally this
-# would look like this:
+# to provide a site file (shipped in ${FILESDIR}) which contains the
+# startup code (have a look in the documentation of your software).
+# Normally this would look like this:
#
# ;;; csv-mode site-lisp configuration
#
@@ -73,29 +72,29 @@
# (autoload 'csv-mode "csv-mode" "Major mode for csv files." t)
#
# If your Emacs support files are installed in a subdirectory of
-# /usr/share/emacs/site-lisp/ (which is recommended), you need to extend
-# Emacs' load-path as shown in the first non-comment.
+# /usr/share/emacs/site-lisp/ (which is strongly recommended), you need
+# to extend Emacs' load-path as shown in the first non-comment line.
# The elisp-site-file-install() function of this eclass will replace
-# "@SITELISP@" by the actual path.
+# "@SITELISP@" and "@SITEETC@" by the actual paths.
#
-# The next line tells Emacs to load the mode opening a file ending with
-# ".csv" and load functions depending on the context and needed features.
-# Be careful though. Commands as "load-library" or "require" bloat the
-# editor as they are loaded on every startup. When having a lot of Emacs
-# support files, users may be annoyed by the start-up time. Also avoid
-# keybindings as they might interfere with the user's settings. Give a hint
-# in pkg_postinst(), which should be enough.
+# The next line tells Emacs to load the mode opening a file ending
+# with ".csv" and load functions depending on the context and needed
+# features. Be careful though. Commands as "load-library" or "require"
+# bloat the editor as they are loaded on every startup. When having
+# many Emacs support files, users may be annoyed by the start-up time.
+# Also avoid keybindings as they might interfere with the user's
+# settings. Give a hint in pkg_postinst(), which should be enough.
#
# The naming scheme for this site-init file matches the shell pattern
-# "[1-8][0-9]*-gentoo.el", where the two digits at the beginning define the
-# loading order (numbers below 10 or above 89 are reserved for internal use).
-# So if you depend on another Emacs package, your site file's number must be
-# higher!
+# "[1-8][0-9]*-gentoo.el", where the two digits at the beginning define
+# the loading order (numbers below 10 or above 89 are reserved for
+# internal use). So if your initialisation depends on another Emacs
+# package, your site file's number must be higher!
#
-# Best practice is to define a SITEFILE variable in the global scope of your
-# ebuild (e.g., right after DEPEND):
+# Best practice is to define a SITEFILE variable in the global scope of
+# your ebuild (e.g., right after S or RDEPEND):
#
-# SITEFILE=50${PN}-gentoo.el
+# SITEFILE="50${PN}-gentoo.el"
#
# Which is then installed by
#
@@ -107,8 +106,8 @@
# .SS
# pkg_postinst() / pkg_postrm() usage:
#
-# After that you need to recreate the start-up file of Emacs after emerging
-# and unmerging by using
+# After that you need to recreate the start-up file of Emacs after
+# emerging and unmerging by using
#
# pkg_postinst() {
# elisp-site-regen
@@ -118,11 +117,12 @@
# elisp-site-regen
# }
#
-# When having optional Emacs support, you should prepend "use emacs &&" to
-# above calls of elisp-site-regen(). Don't use "has_version virtual/emacs"!
-# When unmerging the state of the emacs USE flag is taken from the package
-# database and not from the environment, so it is no problem when you unset
-# USE=emacs between merge and unmerge of a package.
+# When having optional Emacs support, you should prepend "use emacs &&"
+# to above calls of elisp-site-regen().
+# Don't use "has_version virtual/emacs"! When unmerging the state of
+# the emacs USE flag is taken from the package database and not from the
+# environment, so it is no problem when you unset USE=emacs between
+# merge and unmerge of a package.
#
# .SS
# Miscellaneous functions:
@@ -160,13 +160,13 @@
# @DESCRIPTION:
# Byte-compile Emacs Lisp files.
#
-# This function uses GNU Emacs to byte-compile all ".el" specified by its
-# arguments. The resulting byte-code (".elc") files are placed in the same
-# directory as their corresponding source file.
-#
-# The current directory is added to the load-path. This will ensure that
-# interdependent Emacs Lisp files are visible between themselves, in case
-# they require or load one another.
+# This function uses GNU Emacs to byte-compile all ".el" specified by
+# its arguments. The resulting byte-code (".elc") files are placed in
+# the same directory as their corresponding source file.
+#
+# The current directory is added to the load-path. This will ensure
+# that interdependent Emacs Lisp files are visible between themselves,
+# in case they require or load one another.
elisp-compile() {
ebegin "Compiling GNU Emacs Elisp files"
@@ -174,49 +174,8 @@
eend $? "elisp-compile: batch-byte-compile failed"
}
-# #FUNCTION: elisp-comp
-# #USAGE: <list of elisp files>
-# #DESCRIPTION:
-# Byte-compile interdependent Emacs Lisp files.
-# THIS FUNCTION IS DEPRECATED.
-#
-# This function byte-compiles all ".el" files which are part of its
-# arguments, using GNU Emacs, and puts the resulting ".elc" files into the
-# current directory, so disregarding the original directories used in ".el"
-# arguments.
-#
-# This function manages in such a way that all Emacs Lisp files to be
-# compiled are made visible between themselves, in the event they require or
-# load one another.
-
elisp-comp() {
- # Copyright 1995 Free Software Foundation, Inc.
- # François Pinard <pinard@iro.umontreal.ca>, 1995.
- # Originally taken from GNU autotools.
-
- ewarn "Function elisp-comp is deprecated and may be removed in future."
- ewarn "Please use function elisp-compile instead, or report a bug about"
- ewarn "${CATEGORY}/${PF} at <http://bugs.gentoo.org/>."
- echo
-
- [ $# -gt 0 ] || return 1
-
- ebegin "Compiling GNU Emacs Elisp files"
-
- local tempdir=elc.$$
- mkdir ${tempdir}
- cp "$@" ${tempdir}
- pushd ${tempdir}
-
- echo "(add-to-list 'load-path \"../\")" > script
- ${EMACS} ${EMACSFLAGS} -l script -f batch-byte-compile *.el
- local ret=$?
- mv *.elc ..
-
- popd
- rm -fr ${tempdir}
-
- eend ${ret} "elisp-comp: batch-byte-compile failed"
+ die "Function elisp-comp is not supported any more, see bug 235442"
}
# @FUNCTION: elisp-emacs-version
@@ -303,12 +262,13 @@
# @FUNCTION: elisp-site-regen
# @DESCRIPTION:
-# Regenerate the site-gentoo.el file, based on packages' site initialisation
-# files in the /usr/share/emacs/site-lisp/site-gentoo.d/ directory.
-#
-# Note: Before December 2007, site initialisation files were installed in
-# /usr/share/emacs/site-lisp/. For backwards compatibility, this location is
-# still supported when generating site-gentoo.el.
+# Regenerate the site-gentoo.el file, based on packages' site
+# initialisation files in the /usr/share/emacs/site-lisp/site-gentoo.d/
+# directory.
+#
+# Note: Before December 2007, site initialisation files were installed
+# in /usr/share/emacs/site-lisp/. For backwards compatibility, this
+# location is still supported when generating site-gentoo.el.
elisp-site-regen() {
local i sf line firstrun obsolete
@@ -347,7 +307,8 @@
einfon "Regenerating site-gentoo.el (${EBUILD_PHASE}) ..."
- # remove any auxiliary file (from previous run)
+ # Until January 2009, elisp-common.eclass sometimes created an
+ # auxiliary file for backwards compatibility. Remove any such file.
rm -f "${ROOT}${SITELISP}"/00site-gentoo.el
# set nullglob option, there may be a directory without matching files
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2009-10-08 10:50 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2009-10-08 10:50 UTC (permalink / raw
To: gentoo-commits
ulm 09/10/08 10:50:35
Modified: elisp.eclass elisp-common.eclass
Log:
Sync from Emacs overlay (revision 1453).
elisp.eclass:
Generate Info files from Texinfo sources listed in ELISP_TEXINFO.
elisp-common.eclass:
Mark site-gentoo.el as buffer-read-only, in order to prevent
unintentional edits. Add null strings to inhibit local variables
detection in the eclass file itself.
Revision Changes Path
1.43 eclass/elisp.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.43&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.43&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.42&r2=1.43
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- elisp.eclass 25 Aug 2009 12:53:55 -0000 1.42
+++ elisp.eclass 8 Oct 2009 10:50:35 -0000 1.43
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.42 2009/08/25 12:53:55 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.43 2009/10/08 10:50:35 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -33,11 +33,6 @@
# variable before inheriting elisp.eclass. Set it to the major version
# your package uses and the dependency will be adjusted.
-# @ECLASS-VARIABLE: DOCS
-# @DESCRIPTION:
-# DOCS="blah.txt ChangeLog" is automatically used to install the given
-# files by dodoc in src_install().
-
# @ECLASS-VARIABLE: ELISP_PATCHES
# @DESCRIPTION:
# Any patches to apply after unpacking the sources. Patches are searched
@@ -50,6 +45,16 @@
# reserved for internal use. "50${PN}-gentoo.el" is a reasonable choice
# in most cases.
+# @ECLASS-VARIABLE: ELISP_TEXINFO
+# @DESCRIPTION:
+# Space separated list of Texinfo sources. Respective GNU Info files
+# will be generated in src_compile() and installed in src_install().
+
+# @ECLASS-VARIABLE: DOCS
+# @DESCRIPTION:
+# DOCS="blah.txt ChangeLog" is automatically used to install the given
+# files by dodoc in src_install().
+
inherit elisp-common eutils
case "${EAPI:-0}" in
@@ -105,6 +110,9 @@
elisp_src_compile() {
elisp-compile *.el || die
+ if [ -n "${ELISP_TEXINFO}" ]; then
+ makeinfo ${ELISP_TEXINFO} || die
+ fi
}
elisp_src_install() {
@@ -112,6 +120,10 @@
if [ -n "${SITEFILE}" ]; then
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
fi
+ if [ -n "${ELISP_TEXINFO}" ]; then
+ set -- ${ELISP_TEXINFO}
+ doinfo ${@/%.*/.info*} || die
+ fi
if [ -n "${DOCS}" ]; then
dodoc ${DOCS} || die
fi
1.62 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.62&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.62&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.61&r2=1.62
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- elisp-common.eclass 25 May 2009 16:25:32 -0000 1.61
+++ elisp-common.eclass 8 Oct 2009 10:50:35 -0000 1.62
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.61 2009/05/25 16:25:32 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.62 2009/10/08 10:50:35 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -196,11 +196,11 @@
# Generate a file with autoload definitions for the lisp functions.
elisp-make-autoload-file() {
- local f="${1:-${PN}-autoloads.el}"
+ local f="${1:-${PN}-autoloads.el}" null="" page=$'\f'
shift
ebegin "Generating autoload file for GNU Emacs"
- sed 's/^FF/\f/' >"${f}" <<-EOF
+ cat >"${f}" <<-EOF
;;; ${f##*/} --- autoloads for ${P}
;;; Commentary:
@@ -208,12 +208,13 @@
;; DO NOT EDIT THIS FILE
;;; Code:
- FF
- ;; Local Variables:
+ ${page}
+ ;; Local ${null}Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
+
;;; ${f##*/} ends here
EOF
@@ -282,7 +283,7 @@
# location is still supported when generating site-gentoo.el.
elisp-site-regen() {
- local i sf line obsolete
+ local i sf line obsolete null="" page=$'\f'
local -a sflist
if [ ! -d "${ROOT}${SITELISP}" ]; then
@@ -336,9 +337,12 @@
(provide 'site-gentoo)
- ;; Local Variables:
+ ${page}
+ ;; Local ${null}Variables:
;; no-byte-compile: t
+ ;; buffer-read-only: t
;; End:
+
;;; site-gentoo.el ends here
EOF
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2010-08-22 8:30 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2010-08-22 8:30 UTC (permalink / raw
To: gentoo-commits
ulm 10/08/22 08:30:32
Modified: elisp.eclass elisp-common.eclass
Log:
Sync eclasses from Emacs overlay (revision 1506).
elisp.eclass:
Update documentation.
elisp-common.eclass:
The nullglob shell option is not needed in elisp-site-regen, because
inside the loop we test for existence of all files. See also bug 328863.
The temporary file needs only be removed in the no changes case.
Revision Changes Path
1.45 eclass/elisp.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.45&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.45&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?r1=1.44&r2=1.45
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- elisp.eclass 30 Jan 2010 22:54:00 -0000 1.44
+++ elisp.eclass 22 Aug 2010 08:30:32 -0000 1.45
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.44 2010/01/30 22:54:00 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.45 2010/08/22 08:30:32 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -28,17 +28,20 @@
# ${PN}.el in src_unpack().
# @ECLASS-VARIABLE: NEED_EMACS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# If you need anything different from Emacs 21, use the NEED_EMACS
# variable before inheriting elisp.eclass. Set it to the major version
# your package uses and the dependency will be adjusted.
# @ECLASS-VARIABLE: ELISP_PATCHES
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Any patches to apply after unpacking the sources. Patches are searched
# both in ${PWD} and ${FILESDIR}.
# @ECLASS-VARIABLE: SITEFILE
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Name of package's site-init file. The filename must match the shell
# pattern "[1-8][0-9]*-gentoo.el"; numbers below 10 and above 89 are
@@ -46,11 +49,13 @@
# in most cases.
# @ECLASS-VARIABLE: ELISP_TEXINFO
+# @DEFAULT_UNSET
# @DESCRIPTION:
# Space separated list of Texinfo sources. Respective GNU Info files
# will be generated in src_compile() and installed in src_install().
# @ECLASS-VARIABLE: DOCS
+# @DEFAULT_UNSET
# @DESCRIPTION:
# DOCS="blah.txt ChangeLog" is automatically used to install the given
# files by dodoc in src_install().
1.66 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.66&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.66&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?r1=1.65&r2=1.66
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- elisp-common.eclass 29 Dec 2009 20:15:12 -0000 1.65
+++ elisp-common.eclass 22 Aug 2010 08:30:32 -0000 1.66
@@ -1,12 +1,12 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.65 2009/12/29 20:15:12 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.66 2010/08/22 08:30:32 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org>
# Copyright 2007-2008 Christian Faulhammer <fauli@gentoo.org>
-# Copyright 2007-2009 Ulrich Müller <ulm@gentoo.org>
+# Copyright 2007-2010 Ulrich Müller <ulm@gentoo.org>
#
# @ECLASS: elisp-common.eclass
# @MAINTAINER:
@@ -303,10 +303,6 @@
# auxiliary file for backwards compatibility. Remove any such file.
rm -f "${sitelisp}"/00site-gentoo.el
- # set nullglob option, there may be a directory without matching files
- local old_shopts=$(shopt -p nullglob)
- shopt -s nullglob
-
for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \
"${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el
do
@@ -319,8 +315,6 @@
sflist[i]=${sf}
done
- eval "${old_shopts}"
-
cat <<-EOF >"${T}"/site-gentoo.el
;;; site-gentoo.el --- site initialisation for Gentoo-installed packages
@@ -349,6 +343,7 @@
# This prevents outputting unnecessary text when there
# was actually no change.
# A case is a remerge where we have doubled output.
+ rm -f "${T}"/site-gentoo.el
echo " no changes."
else
mv "${T}"/site-gentoo.el "${sitelisp}"/site-gentoo.el
@@ -360,8 +355,5 @@
esac
fi
- # cleanup
- rm -f "${T}"/site-gentoo.el
-
return 0
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2010-11-23 20:56 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2010-11-23 20:56 UTC (permalink / raw
To: gentoo-commits
ulm 10/11/23 20:56:08
Modified: elisp.eclass elisp-common.eclass
Log:
Sync eclasses from Emacs overlay (revision 1542).
elisp-common.eclass:
Remove dead function elisp-comp; it has been deprecated more than two
years ago in bug 235442.
New function elisp-need-emacs, tests if the eselected Emacs version is
at least the major version specified as argument.
elisp.eclass:
Use function elisp-need-emacs in elisp_pkg_setup.
Revision Changes Path
1.47 eclass/elisp.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.47&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.47&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?r1=1.46&r2=1.47
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- elisp.eclass 17 Sep 2010 07:39:58 -0000 1.46
+++ elisp.eclass 23 Nov 2010 20:56:08 -0000 1.47
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.46 2010/09/17 07:39:58 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.47 2010/11/23 20:56:08 ulm Exp $
#
# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -79,14 +79,7 @@
# version requirement of the NEED_EMACS variable.
elisp_pkg_setup() {
- local need_emacs=${NEED_EMACS:-21}
- local have_emacs=$(elisp-emacs-version)
- if [ "${have_emacs%%.*}" -lt "${need_emacs%%.*}" ]; then
- eerror "This package needs at least Emacs ${need_emacs%%.*}."
- eerror "Use \"eselect emacs\" to select the active version."
- die "Emacs version ${have_emacs} is too low."
- fi
- einfo "Emacs version: ${have_emacs}"
+ elisp-need-emacs "${NEED_EMACS:-21}" || die "Emacs version too low"
}
# @FUNCTION: elisp_src_unpack
1.69 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.69&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.69&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?r1=1.68&r2=1.69
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- elisp-common.eclass 9 Oct 2010 15:30:43 -0000 1.68
+++ elisp-common.eclass 23 Nov 2010 20:56:08 -0000 1.69
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.68 2010/10/09 15:30:43 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.69 2010/11/23 20:56:08 ulm Exp $
#
# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
@@ -29,6 +29,19 @@
# to your DEPEND/RDEPEND line and use the functions provided here to
# bring the files to the correct locations.
#
+# If your package requires a minimum Emacs version, e.g. Emacs 23, then
+# the dependency should be on >=virtual/emacs-23 instead. Because the
+# user can select the Emacs executable with eselect, you should also
+# make sure that the active Emacs version is sufficient. This can be
+# tested with function elisp-need-emacs(), which would typically be
+# called from pkg_setup(), as in the following example:
+#
+# elisp-need-emacs 23 || die "Emacs version too low"
+#
+# Please note that such tests should be limited to packages that are
+# known to fail with lower Emacs versions; the standard case is to
+# depend on virtual/emacs without version.
+#
# .SS
# src_compile() usage:
#
@@ -126,11 +139,6 @@
# the emacs USE flag is taken from the package database and not from the
# environment, so it is no problem when you unset USE=emacs between
# merge and unmerge of a package.
-#
-# .SS
-# Miscellaneous functions:
-#
-# elisp-emacs-version() outputs the version of the currently active Emacs.
# @ECLASS-VARIABLE: SITELISP
# @DESCRIPTION:
@@ -177,10 +185,6 @@
eend $? "elisp-compile: batch-byte-compile failed"
}
-elisp-comp() {
- die "Function elisp-comp is not supported any more, see bug 235442"
-}
-
# @FUNCTION: elisp-emacs-version
# @DESCRIPTION:
# Output version of currently active Emacs.
@@ -192,6 +196,25 @@
rm -f "${T}"/emacs-version.el
}
+# @FUNCTION: elisp-need-emacs
+# @USAGE: <version>
+# @RETURN: 0 if true, 1 otherwise
+# @DESCRIPTION:
+# Test if the eselected Emacs version is at least the major version
+# specified as argument.
+
+elisp-need-emacs() {
+ local need_emacs=$1
+ local have_emacs=$(elisp-emacs-version)
+ einfo "Emacs version: ${have_emacs}"
+ if ! [[ ${have_emacs%%.*} -ge ${need_emacs%%.*} ]]; then
+ eerror "This package needs at least Emacs ${need_emacs%%.*}."
+ eerror "Use \"eselect emacs\" to select the active version."
+ return 1
+ fi
+ return 0
+}
+
# @FUNCTION: elisp-make-autoload-file
# @USAGE: [output file] [list of directories]
# @DESCRIPTION:
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2011-08-22 6:13 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-08-22 6:13 UTC (permalink / raw
To: gentoo-commits
ulm 11/08/22 06:13:14
Modified: elisp.eclass elisp-common.eclass
Log:
Move authors' list to new @AUTHOR block.
Revision Changes Path
1.50 eclass/elisp.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.50&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.50&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?r1=1.49&r2=1.50
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- elisp.eclass 12 Aug 2011 16:14:55 -0000 1.49
+++ elisp.eclass 22 Aug 2011 06:13:14 -0000 1.50
@@ -1,16 +1,16 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.49 2011/08/12 16:14:55 ulm Exp $
-#
-# Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org>
-# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
-# Copyright 2007-2010 Christian Faulhammer <fauli@gentoo.org>
-# Copyright 2007-2011 Ulrich Müller <ulm@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.50 2011/08/22 06:13:14 ulm Exp $
#
# @ECLASS: elisp.eclass
# @MAINTAINER:
# Feel free to contact the Emacs team through <emacs@gentoo.org> if you
# have problems, suggestions or questions.
+# @AUTHOR:
+# Matthew Kennedy <mkennedy@gentoo.org>
+# Jeremy Maitin-Shepard <jbms@attbi.com>
+# Christian Faulhammer <fauli@gentoo.org>
+# Ulrich Müller <ulm@gentoo.org>
# @BLURB: Eclass for Emacs Lisp packages
# @DESCRIPTION:
#
1.73 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.73&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.73&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?r1=1.72&r2=1.73
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- elisp-common.eclass 13 Aug 2011 12:19:39 -0000 1.72
+++ elisp-common.eclass 22 Aug 2011 06:13:14 -0000 1.73
@@ -1,17 +1,17 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.72 2011/08/13 12:19:39 ulm Exp $
-#
-# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
-# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
-# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org>
-# Copyright 2007-2008 Christian Faulhammer <fauli@gentoo.org>
-# Copyright 2007-2011 Ulrich Müller <ulm@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.73 2011/08/22 06:13:14 ulm Exp $
#
# @ECLASS: elisp-common.eclass
# @MAINTAINER:
# Feel free to contact the Emacs team through <emacs@gentoo.org> if you
# have problems, suggestions or questions.
+# @AUTHOR:
+# Matthew Kennedy <mkennedy@gentoo.org>
+# Jeremy Maitin-Shepard <jbms@attbi.com>
+# Mamoru Komachi <usata@gentoo.org>
+# Christian Faulhammer <fauli@gentoo.org>
+# Ulrich Müller <ulm@gentoo.org>
# @BLURB: Emacs-related installation utilities
# @DESCRIPTION:
#
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2011-08-22 6:56 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-08-22 6:56 UTC (permalink / raw
To: gentoo-commits
ulm 11/08/22 06:56:26
Modified: elisp.eclass elisp-common.eclass
Log:
Doc fix: @MAINTAINER doesn't support paragraphs any more.
Revision Changes Path
1.51 eclass/elisp.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.51&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.51&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?r1=1.50&r2=1.51
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- elisp.eclass 22 Aug 2011 06:13:14 -0000 1.50
+++ elisp.eclass 22 Aug 2011 06:56:26 -0000 1.51
@@ -1,11 +1,10 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.50 2011/08/22 06:13:14 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.51 2011/08/22 06:56:26 ulm Exp $
#
# @ECLASS: elisp.eclass
# @MAINTAINER:
-# Feel free to contact the Emacs team through <emacs@gentoo.org> if you
-# have problems, suggestions or questions.
+# Gentoo Emacs team <emacs@gentoo.org>
# @AUTHOR:
# Matthew Kennedy <mkennedy@gentoo.org>
# Jeremy Maitin-Shepard <jbms@attbi.com>
1.74 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.74&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.74&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?r1=1.73&r2=1.74
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- elisp-common.eclass 22 Aug 2011 06:13:14 -0000 1.73
+++ elisp-common.eclass 22 Aug 2011 06:56:26 -0000 1.74
@@ -1,11 +1,10 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.73 2011/08/22 06:13:14 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.74 2011/08/22 06:56:26 ulm Exp $
#
# @ECLASS: elisp-common.eclass
# @MAINTAINER:
-# Feel free to contact the Emacs team through <emacs@gentoo.org> if you
-# have problems, suggestions or questions.
+# Gentoo Emacs team <emacs@gentoo.org>
# @AUTHOR:
# Matthew Kennedy <mkennedy@gentoo.org>
# Jeremy Maitin-Shepard <jbms@attbi.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
@ 2011-08-30 20:10 Ulrich Mueller (ulm)
0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Mueller (ulm) @ 2011-08-30 20:10 UTC (permalink / raw
To: gentoo-commits
ulm 11/08/30 20:10:13
Modified: elisp.eclass elisp-common.eclass
Log:
Sync eclasses from Emacs overlay (revision 1683).
Change [ ] to [[ ]] throughout.
Revision Changes Path
1.52 eclass/elisp.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.52&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?rev=1.52&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp.eclass?r1=1.51&r2=1.52
Index: elisp.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- elisp.eclass 22 Aug 2011 06:56:26 -0000 1.51
+++ elisp.eclass 30 Aug 2011 20:10:13 -0000 1.52
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.51 2011/08/22 06:56:26 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.52 2011/08/30 20:10:13 ulm Exp $
#
# @ECLASS: elisp.eclass
# @MAINTAINER:
@@ -88,15 +88,15 @@
# src_prepare, call elisp_src_prepare.
elisp_src_unpack() {
- [ -n "${A}" ] && unpack ${A}
- if [ -f ${P}.el ]; then
+ [[ -n ${A} ]] && unpack ${A}
+ if [[ -f ${P}.el ]]; then
# the "simple elisp" case with a single *.el file in WORKDIR
mv ${P}.el ${PN}.el || die
- [ -d "${S}" ] || S=${WORKDIR}
+ [[ -d ${S} ]] || S=${WORKDIR}
fi
case "${EAPI:-0}" in
- 0|1) [ -d "${S}" ] && cd "${S}"
+ 0|1) [[ -d ${S} ]] && cd "${S}"
elisp_src_prepare ;;
esac
}
@@ -109,11 +109,11 @@
elisp_src_prepare() {
local patch
for patch in ${ELISP_PATCHES}; do
- if [ -f "${patch}" ]; then
+ if [[ -f ${patch} ]]; then
epatch "${patch}"
- elif [ -f "${WORKDIR}/${patch}" ]; then
+ elif [[ -f ${WORKDIR}/${patch} ]]; then
epatch "${WORKDIR}/${patch}"
- elif [ -f "${FILESDIR}/${patch}" ]; then
+ elif [[ -f ${FILESDIR}/${patch} ]]; then
epatch "${FILESDIR}/${patch}"
else
die "Cannot find ${patch}"
@@ -135,7 +135,7 @@
elisp_src_compile() {
elisp-compile *.el || die
- if [ -n "${ELISP_TEXINFO}" ]; then
+ if [[ -n ${ELISP_TEXINFO} ]]; then
makeinfo ${ELISP_TEXINFO} || die
fi
}
@@ -149,15 +149,15 @@
elisp_src_install() {
elisp-install ${PN} *.el *.elc || die
- if [ -n "${SITEFILE}" ]; then
+ if [[ -n ${SITEFILE} ]]; then
elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
fi
- if [ -n "${ELISP_TEXINFO}" ]; then
+ if [[ -n ${ELISP_TEXINFO} ]]; then
set -- ${ELISP_TEXINFO}
set -- ${@##*/}
doinfo ${@/%.*/.info*} || die
fi
- if [ -n "${DOCS}" ]; then
+ if [[ -n ${DOCS} ]]; then
dodoc ${DOCS} || die
fi
}
1.75 eclass/elisp-common.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.75&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?rev=1.75&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/elisp-common.eclass?r1=1.74&r2=1.75
Index: elisp-common.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- elisp-common.eclass 22 Aug 2011 06:56:26 -0000 1.74
+++ elisp-common.eclass 30 Aug 2011 20:10:13 -0000 1.75
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.74 2011/08/22 06:56:26 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.75 2011/08/30 20:10:13 ulm Exp $
#
# @ECLASS: elisp-common.eclass
# @MAINTAINER:
@@ -317,12 +317,12 @@
local sf i line null="" page=$'\f'
local -a sflist
- if [ ! -d "${sitelisp}" ]; then
+ if [[ ! -d ${sitelisp} ]]; then
eerror "elisp-site-regen: Directory ${sitelisp} does not exist"
return 1
fi
- if [ ! -d "${T}" ]; then
+ if [[ ! -d ${T} ]]; then
eerror "elisp-site-regen: Temporary directory ${T} does not exist"
return 1
fi
@@ -336,7 +336,7 @@
for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \
"${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el
do
- [ -r "${sf}" ] || continue
+ [[ -r ${sf} ]] || continue
# sort files by their basename. straight insertion sort.
for ((i=${#sflist[@]}; i>0; i--)); do
[[ ${sf##*/} < ${sflist[i-1]##*/} ]] || break
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-08-30 20:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 6:13 [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass Ulrich Mueller (ulm)
-- strict thread matches above, loose matches on Subject: below --
2011-08-30 20:10 Ulrich Mueller (ulm)
2011-08-22 6:56 Ulrich Mueller (ulm)
2010-11-23 20:56 Ulrich Mueller (ulm)
2010-08-22 8:30 Ulrich Mueller (ulm)
2009-10-08 10:50 Ulrich Mueller (ulm)
2009-03-26 14:14 Ulrich Mueller (ulm)
2009-03-12 12:08 Ulrich Mueller (ulm)
2008-10-16 9:28 Ulrich Mueller (ulm)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox