Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: elisp.eclass elisp-common.eclass
Date: Thu, 26 Mar 2009 14:14:25
Message-Id: E1LmqLe-00078g-O7@stork.gentoo.org
1 ulm 09/03/26 14:14:22
2
3 Modified: elisp.eclass elisp-common.eclass
4 Log:
5 Partial sync from Emacs overlay.
6
7 elisp.class:
8 In the "simple elisp" case, explicitly assign S=${WORKDIR} in
9 elisp_src_unpack.
10
11 elisp-common.eclass:
12 Remove function elisp-comp; it is not used by anything in the tree.
13 Reindent documentation to 72 columns for better readability.
14
15 Revision Changes Path
16 1.39 eclass/elisp.eclass
17
18 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.39&view=markup
19 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.39&content-type=text/plain
20 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.38&r2=1.39
21
22 Index: elisp.eclass
23 ===================================================================
24 RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
25 retrieving revision 1.38
26 retrieving revision 1.39
27 diff -u -r1.38 -r1.39
28 --- elisp.eclass 12 Mar 2009 12:08:47 -0000 1.38
29 +++ elisp.eclass 26 Mar 2009 14:14:22 -0000 1.39
30 @@ -1,6 +1,6 @@
31 # Copyright 1999-2009 Gentoo Foundation
32 # Distributed under the terms of the GNU General Public License v2
33 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.38 2009/03/12 12:08:47 ulm Exp $
34 +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.39 2009/03/26 14:14:22 ulm Exp $
35 #
36 # Copyright 2002-2003 Matthew Kennedy <mkennedy@g.o>
37 # Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com>
38 @@ -69,7 +69,9 @@
39 elisp_src_unpack() {
40 [ -n "${A}" ] && unpack ${A}
41 if [ -f ${P}.el ]; then
42 + # the "simple elisp" case with a single *.el file in WORKDIR
43 mv ${P}.el ${PN}.el || die
44 + [ -d "${S}" ] || S=${WORKDIR}
45 fi
46 }
47
48
49
50
51 1.58 eclass/elisp-common.eclass
52
53 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.58&view=markup
54 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.58&content-type=text/plain
55 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.57&r2=1.58
56
57 Index: elisp-common.eclass
58 ===================================================================
59 RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
60 retrieving revision 1.57
61 retrieving revision 1.58
62 diff -u -r1.57 -r1.58
63 --- elisp-common.eclass 12 Mar 2009 14:10:48 -0000 1.57
64 +++ elisp-common.eclass 26 Mar 2009 14:14:22 -0000 1.58
65 @@ -1,6 +1,6 @@
66 # Copyright 1999-2009 Gentoo Foundation
67 # Distributed under the terms of the GNU General Public License v2
68 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.57 2009/03/12 14:10:48 ulm Exp $
69 +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.58 2009/03/26 14:14:22 ulm Exp $
70 #
71 # Copyright 2002-2004 Matthew Kennedy <mkennedy@g.o>
72 # Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com>
73 @@ -10,61 +10,60 @@
74 #
75 # @ECLASS: elisp-common.eclass
76 # @MAINTAINER:
77 -# Feel free to contact the Emacs team through <emacs@g.o> if you have
78 -# problems, suggestions or questions.
79 +# Feel free to contact the Emacs team through <emacs@g.o> if you
80 +# have problems, suggestions or questions.
81 # @BLURB: Emacs-related installation utilities
82 # @DESCRIPTION:
83 #
84 -# Usually you want to use this eclass for (optional) GNU Emacs support of
85 -# your package. This is NOT for XEmacs!
86 +# Usually you want to use this eclass for (optional) GNU Emacs support
87 +# of your package. This is NOT for XEmacs!
88 #
89 # Many of the steps here are sometimes done by the build system of your
90 -# package (especially compilation), so this is mainly for standalone elisp
91 -# files you gathered from somewhere else.
92 +# package (especially compilation), so this is mainly for standalone
93 +# elisp files you gathered from somewhere else.
94 #
95 # When relying on the emacs USE flag, you need to add
96 #
97 # emacs? ( virtual/emacs )
98 #
99 -# to your DEPEND/RDEPEND line and use the functions provided here to bring
100 -# the files to the correct locations.
101 +# to your DEPEND/RDEPEND line and use the functions provided here to
102 +# bring the files to the correct locations.
103 #
104 # .SS
105 # src_compile() usage:
106 #
107 -# An elisp file is compiled by the elisp-compile() function defined here and
108 -# simply takes the source files as arguments. The case of interdependent
109 -# elisp files is also supported, since the current directory is added to the
110 -# load-path which makes sure that all files are loadable.
111 +# An elisp file is compiled by the elisp-compile() function defined
112 +# here and simply takes the source files as arguments. The case of
113 +# interdependent elisp files is also supported, since the current
114 +# directory is added to the load-path which makes sure that all files
115 +# are loadable.
116 #
117 # elisp-compile *.el || die
118 #
119 -# Formerly, function elisp-comp() was used for compilation of interdependent
120 -# elisp files. This usage is considered as obsolete.
121 -#
122 -# Function elisp-make-autoload-file() can be used to generate a file with
123 -# autoload definitions for the lisp functions. It takes the output file name
124 -# (default: "${PN}-autoloads.el") and a list of directories (default: working
125 -# directory) as its arguments. Use of this function requires that the elisp
126 -# source files contain magic ";;;###autoload" comments. See the Emacs Lisp
127 -# Reference Manual (node "Autoload") for a detailed explanation.
128 +# Function elisp-make-autoload-file() can be used to generate a file
129 +# with autoload definitions for the lisp functions. It takes the output
130 +# file name (default: "${PN}-autoloads.el") and a list of directories
131 +# (default: working directory) as its arguments. Use of this function
132 +# requires that the elisp source files contain magic ";;;###autoload"
133 +# comments. See the Emacs Lisp Reference Manual (node "Autoload") for
134 +# a detailed explanation.
135 #
136 # .SS
137 # src_install() usage:
138 #
139 # The resulting compiled files (.elc) should be put in a subdirectory of
140 # /usr/share/emacs/site-lisp/ which is named after the first argument
141 -# of elisp-install(). The following parameters are the files to be put in
142 -# that directory. Usually the subdirectory should be ${PN}, you can choose
143 -# something else, but remember to tell elisp-site-file-install() (see below)
144 -# the change, as it defaults to ${PN}.
145 +# of elisp-install(). The following parameters are the files to be put
146 +# in that directory. Usually the subdirectory should be ${PN}, you can
147 +# choose something else, but remember to tell elisp-site-file-install()
148 +# (see below) the change, as it defaults to ${PN}.
149 #
150 # elisp-install ${PN} *.el *.elc || die
151 #
152 # To let the Emacs support be activated by Emacs on startup, you need
153 -# to provide a site file (shipped in ${FILESDIR}) which contains the startup
154 -# code (have a look in the documentation of your software). Normally this
155 -# would look like this:
156 +# to provide a site file (shipped in ${FILESDIR}) which contains the
157 +# startup code (have a look in the documentation of your software).
158 +# Normally this would look like this:
159 #
160 # ;;; csv-mode site-lisp configuration
161 #
162 @@ -73,29 +72,29 @@
163 # (autoload 'csv-mode "csv-mode" "Major mode for csv files." t)
164 #
165 # If your Emacs support files are installed in a subdirectory of
166 -# /usr/share/emacs/site-lisp/ (which is recommended), you need to extend
167 -# Emacs' load-path as shown in the first non-comment.
168 +# /usr/share/emacs/site-lisp/ (which is strongly recommended), you need
169 +# to extend Emacs' load-path as shown in the first non-comment line.
170 # The elisp-site-file-install() function of this eclass will replace
171 -# "@SITELISP@" by the actual path.
172 +# "@SITELISP@" and "@SITEETC@" by the actual paths.
173 #
174 -# The next line tells Emacs to load the mode opening a file ending with
175 -# ".csv" and load functions depending on the context and needed features.
176 -# Be careful though. Commands as "load-library" or "require" bloat the
177 -# editor as they are loaded on every startup. When having a lot of Emacs
178 -# support files, users may be annoyed by the start-up time. Also avoid
179 -# keybindings as they might interfere with the user's settings. Give a hint
180 -# in pkg_postinst(), which should be enough.
181 +# The next line tells Emacs to load the mode opening a file ending
182 +# with ".csv" and load functions depending on the context and needed
183 +# features. Be careful though. Commands as "load-library" or "require"
184 +# bloat the editor as they are loaded on every startup. When having
185 +# many Emacs support files, users may be annoyed by the start-up time.
186 +# Also avoid keybindings as they might interfere with the user's
187 +# settings. Give a hint in pkg_postinst(), which should be enough.
188 #
189 # The naming scheme for this site-init file matches the shell pattern
190 -# "[1-8][0-9]*-gentoo.el", where the two digits at the beginning define the
191 -# loading order (numbers below 10 or above 89 are reserved for internal use).
192 -# So if you depend on another Emacs package, your site file's number must be
193 -# higher!
194 +# "[1-8][0-9]*-gentoo.el", where the two digits at the beginning define
195 +# the loading order (numbers below 10 or above 89 are reserved for
196 +# internal use). So if your initialisation depends on another Emacs
197 +# package, your site file's number must be higher!
198 #
199 -# Best practice is to define a SITEFILE variable in the global scope of your
200 -# ebuild (e.g., right after DEPEND):
201 +# Best practice is to define a SITEFILE variable in the global scope of
202 +# your ebuild (e.g., right after S or RDEPEND):
203 #
204 -# SITEFILE=50${PN}-gentoo.el
205 +# SITEFILE="50${PN}-gentoo.el"
206 #
207 # Which is then installed by
208 #
209 @@ -107,8 +106,8 @@
210 # .SS
211 # pkg_postinst() / pkg_postrm() usage:
212 #
213 -# After that you need to recreate the start-up file of Emacs after emerging
214 -# and unmerging by using
215 +# After that you need to recreate the start-up file of Emacs after
216 +# emerging and unmerging by using
217 #
218 # pkg_postinst() {
219 # elisp-site-regen
220 @@ -118,11 +117,12 @@
221 # elisp-site-regen
222 # }
223 #
224 -# When having optional Emacs support, you should prepend "use emacs &&" to
225 -# above calls of elisp-site-regen(). Don't use "has_version virtual/emacs"!
226 -# When unmerging the state of the emacs USE flag is taken from the package
227 -# database and not from the environment, so it is no problem when you unset
228 -# USE=emacs between merge and unmerge of a package.
229 +# When having optional Emacs support, you should prepend "use emacs &&"
230 +# to above calls of elisp-site-regen().
231 +# Don't use "has_version virtual/emacs"! When unmerging the state of
232 +# the emacs USE flag is taken from the package database and not from the
233 +# environment, so it is no problem when you unset USE=emacs between
234 +# merge and unmerge of a package.
235 #
236 # .SS
237 # Miscellaneous functions:
238 @@ -160,13 +160,13 @@
239 # @DESCRIPTION:
240 # Byte-compile Emacs Lisp files.
241 #
242 -# This function uses GNU Emacs to byte-compile all ".el" specified by its
243 -# arguments. The resulting byte-code (".elc") files are placed in the same
244 -# directory as their corresponding source file.
245 -#
246 -# The current directory is added to the load-path. This will ensure that
247 -# interdependent Emacs Lisp files are visible between themselves, in case
248 -# they require or load one another.
249 +# This function uses GNU Emacs to byte-compile all ".el" specified by
250 +# its arguments. The resulting byte-code (".elc") files are placed in
251 +# the same directory as their corresponding source file.
252 +#
253 +# The current directory is added to the load-path. This will ensure
254 +# that interdependent Emacs Lisp files are visible between themselves,
255 +# in case they require or load one another.
256
257 elisp-compile() {
258 ebegin "Compiling GNU Emacs Elisp files"
259 @@ -174,49 +174,8 @@
260 eend $? "elisp-compile: batch-byte-compile failed"
261 }
262
263 -# #FUNCTION: elisp-comp
264 -# #USAGE: <list of elisp files>
265 -# #DESCRIPTION:
266 -# Byte-compile interdependent Emacs Lisp files.
267 -# THIS FUNCTION IS DEPRECATED.
268 -#
269 -# This function byte-compiles all ".el" files which are part of its
270 -# arguments, using GNU Emacs, and puts the resulting ".elc" files into the
271 -# current directory, so disregarding the original directories used in ".el"
272 -# arguments.
273 -#
274 -# This function manages in such a way that all Emacs Lisp files to be
275 -# compiled are made visible between themselves, in the event they require or
276 -# load one another.
277 -
278 elisp-comp() {
279 - # Copyright 1995 Free Software Foundation, Inc.
280 - # François Pinard <pinard@×××××××××××××.ca>, 1995.
281 - # Originally taken from GNU autotools.
282 -
283 - ewarn "Function elisp-comp is deprecated and may be removed in future."
284 - ewarn "Please use function elisp-compile instead, or report a bug about"
285 - ewarn "${CATEGORY}/${PF} at <http://bugs.gentoo.org/>."
286 - echo
287 -
288 - [ $# -gt 0 ] || return 1
289 -
290 - ebegin "Compiling GNU Emacs Elisp files"
291 -
292 - local tempdir=elc.$$
293 - mkdir ${tempdir}
294 - cp "$@" ${tempdir}
295 - pushd ${tempdir}
296 -
297 - echo "(add-to-list 'load-path \"../\")" > script
298 - ${EMACS} ${EMACSFLAGS} -l script -f batch-byte-compile *.el
299 - local ret=$?
300 - mv *.elc ..
301 -
302 - popd
303 - rm -fr ${tempdir}
304 -
305 - eend ${ret} "elisp-comp: batch-byte-compile failed"
306 + die "Function elisp-comp is not supported any more, see bug 235442"
307 }
308
309 # @FUNCTION: elisp-emacs-version
310 @@ -303,12 +262,13 @@
311
312 # @FUNCTION: elisp-site-regen
313 # @DESCRIPTION:
314 -# Regenerate the site-gentoo.el file, based on packages' site initialisation
315 -# files in the /usr/share/emacs/site-lisp/site-gentoo.d/ directory.
316 -#
317 -# Note: Before December 2007, site initialisation files were installed in
318 -# /usr/share/emacs/site-lisp/. For backwards compatibility, this location is
319 -# still supported when generating site-gentoo.el.
320 +# Regenerate the site-gentoo.el file, based on packages' site
321 +# initialisation files in the /usr/share/emacs/site-lisp/site-gentoo.d/
322 +# directory.
323 +#
324 +# Note: Before December 2007, site initialisation files were installed
325 +# in /usr/share/emacs/site-lisp/. For backwards compatibility, this
326 +# location is still supported when generating site-gentoo.el.
327
328 elisp-site-regen() {
329 local i sf line firstrun obsolete
330 @@ -347,7 +307,8 @@
331
332 einfon "Regenerating site-gentoo.el (${EBUILD_PHASE}) ..."
333
334 - # remove any auxiliary file (from previous run)
335 + # Until January 2009, elisp-common.eclass sometimes created an
336 + # auxiliary file for backwards compatibility. Remove any such file.
337 rm -f "${ROOT}${SITELISP}"/00site-gentoo.el
338
339 # set nullglob option, there may be a directory without matching files