/[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.64 Revision 1.65
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.64 2009/12/07 21:05:08 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.65 2009/12/29 20:15:12 ulm Exp $
4# 4#
5# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org> 5# Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org>
6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> 6# Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com>
7# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org> 7# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org>
8# Copyright 2007-2008 Christian Faulhammer <fauli@gentoo.org> 8# Copyright 2007-2008 Christian Faulhammer <fauli@gentoo.org>
282# in /usr/share/emacs/site-lisp/. For backwards compatibility, this 282# in /usr/share/emacs/site-lisp/. For backwards compatibility, this
283# location is still supported when generating site-gentoo.el. 283# location is still supported when generating site-gentoo.el.
284 284
285elisp-site-regen() { 285elisp-site-regen() {
286 local sitelisp=${ROOT}${EPREFIX}${SITELISP} 286 local sitelisp=${ROOT}${EPREFIX}${SITELISP}
287 local i sf line obsolete null="" page=$'\f' 287 local sf i line null="" page=$'\f'
288 local -a sflist 288 local -a sflist
289 289
290 if [ ! -d "${sitelisp}" ]; then 290 if [ ! -d "${sitelisp}" ]; then
291 eerror "elisp-site-regen: Directory ${sitelisp} does not exist" 291 eerror "elisp-site-regen: Directory ${sitelisp} does not exist"
292 return 1 292 return 1
315 for ((i=${#sflist[@]}; i>0; i--)); do 315 for ((i=${#sflist[@]}; i>0; i--)); do
316 [[ ${sf##*/} < ${sflist[i-1]##*/} ]] || break 316 [[ ${sf##*/} < ${sflist[i-1]##*/} ]] || break
317 sflist[i]=${sflist[i-1]} 317 sflist[i]=${sflist[i-1]}
318 done 318 done
319 sflist[i]=${sf} 319 sflist[i]=${sf}
320 # set a flag if there are obsolete files
321 [ "${sf%/*}" = "${sitelisp}" ] && obsolete=t
322 done 320 done
323 321
324 eval "${old_shopts}" 322 eval "${old_shopts}"
325 323
326 cat <<-EOF >"${T}"/site-gentoo.el 324 cat <<-EOF >"${T}"/site-gentoo.el
360 1) einfo "... ${#sflist[@]} site initialisation file included." ;; 358 1) einfo "... ${#sflist[@]} site initialisation file included." ;;
361 *) einfo "... ${#sflist[@]} site initialisation files included." ;; 359 *) einfo "... ${#sflist[@]} site initialisation files included." ;;
362 esac 360 esac
363 fi 361 fi
364 362
365 if [ "${obsolete}" ]; then
366 echo
367 while read line; do ewarn "${line}"; done <<-EOF
368 Site-initialisation files of Emacs packages are now installed in
369 /usr/share/emacs/site-lisp/site-gentoo.d/. We strongly recommend
370 that you use app-admin/emacs-updater to rebuild the installed
371 Emacs packages.
372 EOF
373 fi
374
375 # cleanup 363 # cleanup
376 rm -f "${T}"/site-gentoo.el 364 rm -f "${T}"/site-gentoo.el
377 365
378 return 0 366 return 0
379} 367}

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

  ViewVC Help
Powered by ViewVC 1.1.20