/[gentoo-x86]/eclass/elisp-common.eclass
Gentoo

Diff of /eclass/elisp-common.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.82 Revision 1.83
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.82 2012/09/01 09:39:07 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.83 2013/01/04 21:22:43 ulm Exp $
4# 4#
5# @ECLASS: elisp-common.eclass 5# @ECLASS: elisp-common.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Gentoo Emacs team <emacs@gentoo.org> 7# Gentoo Emacs team <emacs@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
184 return ${ret} 184 return ${ret}
185} 185}
186 186
187# @FUNCTION: elisp-need-emacs 187# @FUNCTION: elisp-need-emacs
188# @USAGE: <version> 188# @USAGE: <version>
189# @RETURN: 0 if true, 1 otherwise 189# @RETURN: 0 if true, 1 if false, 2 if trouble
190# @DESCRIPTION: 190# @DESCRIPTION:
191# Test if the eselected Emacs version is at least the major version 191# Test if the eselected Emacs version is at least the major version
192# specified as argument. 192# of GNU Emacs specified as argument.
193 193
194elisp-need-emacs() { 194elisp-need-emacs() {
195 local need_emacs=$1 have_emacs 195 local need_emacs=$1 have_emacs
196 have_emacs=$(elisp-emacs-version) || return 196 have_emacs=$(elisp-emacs-version) || return 2
197 einfo "Emacs version: ${have_emacs}" 197 einfo "Emacs version: ${have_emacs}"
198 if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then 198 if [[ ${have_emacs} =~ XEmacs|Lucid ]]; then
199 eerror "This package needs GNU Emacs." 199 eerror "This package needs GNU Emacs."
200 return 1 200 return 1
201 fi 201 fi
332 eerror "elisp-site-regen: Temporary directory ${T} does not exist" 332 eerror "elisp-site-regen: Temporary directory ${T} does not exist"
333 return 1 333 return 1
334 fi 334 fi
335 335
336 ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})" 336 ebegin "Regenerating site-gentoo.el for GNU Emacs (${EBUILD_PHASE})"
337
338 # Until January 2009, elisp-common.eclass sometimes created an
339 # auxiliary file for backwards compatibility. Remove any such file.
340 rm -f "${sitelisp}"/00site-gentoo.el
341 337
342 for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \ 338 for sf in "${sitelisp}"/[0-9][0-9]*-gentoo.el \
343 "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el 339 "${sitelisp}"/site-gentoo.d/[0-9][0-9]*.el
344 do 340 do
345 [[ -r ${sf} ]] || continue 341 [[ -r ${sf} ]] || continue

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83

  ViewVC Help
Powered by ViewVC 1.1.20