diff options
author | Ulrich Müller <ulm@gentoo.org> | 2007-12-28 17:48:34 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2007-12-28 17:48:34 +0000 |
commit | e553b4de1500ec122c6969960402d95b61603d28 (patch) | |
tree | 9ccfde52945f149b3414a62a4a316df506c33400 /eclass | |
parent | x86 stable, bug #203576 (diff) | |
download | gentoo-2-e553b4de1500ec122c6969960402d95b61603d28.tar.gz gentoo-2-e553b4de1500ec122c6969960402d95b61603d28.tar.bz2 gentoo-2-e553b4de1500ec122c6969960402d95b61603d28.zip |
Sync eclasses from Emacs overlay (revision 894).
elisp-common.eclass:
Install packages' site-init files in site-gentoo.d subdirectory.
Update documentation and einfo messages accordingly.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/elisp-common.eclass | 46 | ||||
-rw-r--r-- | eclass/elisp.eclass | 4 | ||||
-rw-r--r-- | eclass/ssl-cert.eclass | 39 |
3 files changed, 63 insertions, 26 deletions
diff --git a/eclass/elisp-common.eclass b/eclass/elisp-common.eclass index 7084f41fc22c..a498f8e26c21 100644 --- a/eclass/elisp-common.eclass +++ b/eclass/elisp-common.eclass @@ -1,11 +1,11 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.33 2007/12/12 21:58:57 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.34 2007/12/28 17:48:34 ulm Exp $ # -# Copyright 2007 Christian Faulhammer <opfer@gentoo.org> # Copyright 2002-2004 Matthew Kennedy <mkennedy@gentoo.org> -# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org> # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> +# Copyright 2004-2005 Mamoru Komachi <usata@gentoo.org> +# Copyright 2007 Christian Faulhammer <opfer@gentoo.org> # Copyright 2007 Ulrich Mueller <ulm@gentoo.org> # # @ECLASS: elisp-common.eclass @@ -200,7 +200,7 @@ elisp-comp() { # Output version of currently active Emacs. elisp-emacs-version() { - # The following will work for at least versions 18-23. + # The following will work for at least versions 18--23. echo "(princ emacs-version)" >"${T}"/emacs-version.el ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el } @@ -262,28 +262,28 @@ elisp-install() { # Install Emacs site-init file in SITELISP directory. elisp-site-file-install() { - local sf="$1" my_pn="${2:-${PN}}" + local sf="${1##*/}" my_pn="${2:-${PN}}" ebegin "Installing site initialisation file for GNU Emacs" - cp "${sf}" "${T}" + cp "$1" "${T}/${sf}" sed -i -e "s:@SITELISP@:${SITELISP}/${my_pn}:g" \ - -e "s:@SITEETC@:${SITEETC}/${my_pn}:g" "${T}/${sf##*/}" + -e "s:@SITEETC@:${SITEETC}/${my_pn}:g" "${T}/${sf}" ( # subshell to avoid pollution of calling environment - insinto "${SITELISP}" - doins "${T}/${sf##*/}" + insinto "${SITELISP}/site-gentoo.d" + doins "${T}/${sf}" ) eend $? "doins failed" } # @FUNCTION: elisp-site-regen # @DESCRIPTION: -# Regenerate site-gentoo.el file. - -# Old location for site initialisation files of packages was -# /usr/share/emacs/site-lisp/. It is planned to change this to -# /usr/share/emacs/site-lisp/site-gentoo.d/. +# Regenerate site-gentoo.el file. The old location for site initialisation +# files of packages was /usr/share/emacs/site-lisp/. In December 2007 this +# has been changed to /usr/share/emacs/site-lisp/site-gentoo.d/. Remerge of +# packages with Emacs support is enough, the old location is still supported +# when generating the start-up file. elisp-site-regen() { - local i sf line + local i sf line obsolete local -a sflist if [ ! -e "${ROOT}${SITELISP}"/site-gentoo.el ] \ @@ -324,6 +324,8 @@ elisp-site-regen() { sflist[i]=${sflist[i-1]} done sflist[i]=${sf} + # set a flag if there are obsolete files + [ "${sf%/*}" = "${ROOT}${SITELISP}" ] && obsolete=t done eval "${old_shopts}" @@ -379,17 +381,27 @@ automatically, you can add a line like this: to /usr/share/emacs/site-lisp/site-start.el. Alternatively, that line can be added by individual users to their initialisation files, or, for greater flexibility, users can load individual package-specific -initialisation files from /usr/share/emacs/site-lisp/. +initialisation files from /usr/share/emacs/site-lisp/site-gentoo.d/. EOF echo fi # Kludge for backwards compatibility: During pkg_postrm, old versions - # of this eclass (saved in the PDB) won't find packages' site-init files + # of this eclass (saved in the VDB) won't find packages' site-init files # in the new location. So we copy them to an auxiliary file that is # visible to old eclass versions. for sf in "${sflist[@]}"; do [ "${sf%/*}" = "${ROOT}${SITELISP}/site-gentoo.d" ] \ && cat "${sf}" >>"${ROOT}${SITELISP}"/00site-gentoo.el done + +# if [ "${obsolete}" ]; then +# while read line; do ewarn "${line}"; done <<-EOF +# Site-initialisation files of Emacs packages are now installed in +# /usr/share/emacs/site-lisp/site-gentoo.d/. You may consider using +# /usr/sbin/emacs-updater to rebuild the installed Emacs packages. +# However, the old location is still supported. +# EOF +# echo +# fi } diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass index c616e7f99fb7..159072636f71 100644 --- a/eclass/elisp.eclass +++ b/eclass/elisp.eclass @@ -1,10 +1,10 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.27 2007/12/07 13:52:20 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.28 2007/12/28 17:48:34 ulm Exp $ # -# Copyright 2007 Christian Faulhammer <opfer@gentoo.org> # Copyright 2002-2003 Matthew Kennedy <mkennedy@gentoo.org> # Copyright 2003 Jeremy Maitin-Shepard <jbms@attbi.com> +# Copyright 2007 Christian Faulhammer <opfer@gentoo.org> # Copyright 2007 Ulrich Mueller <ulm@gentoo.org> # # @ECLASS: elisp.eclass diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass index e6a9d4e2e527..c33eb3ed69f7 100644 --- a/eclass/ssl-cert.eclass +++ b/eclass/ssl-cert.eclass @@ -1,17 +1,25 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.12 2007/12/09 08:09:56 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.13 2007/12/28 17:48:34 ulm Exp $ # +# @ECLASS: ssl-cert.eclass +# @MAINTAINER: # Author: Max Kalika <max@gentoo.org> -# +# @BLURB: Eclass for SSL certificates +# @DESCRIPTION: # This eclass implements standard installation procedure for installing # self-signed SSL certificates. +# @EXAMPLE: +# "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem} # Conditionally depend on OpenSSL: allows inheretence # without pulling extra packages if not needed DEPEND="ssl? ( dev-libs/openssl )" IUSE="ssl" +# @FUNCTION: gen_cnf +# @USAGE: +# @DESCRIPTION: # Initializes variables and generates the needed # OpenSSL configuration file and a CA serial file # @@ -60,6 +68,10 @@ gen_cnf() { return $? } +# @FUNCTION: get_base +# @USAGE: [if_ca] +# @RETURN: <base path> +# @DESCRIPTION: # Simple function to determine whether we're creating # a CA (which should only be done once) or final part # @@ -72,6 +84,9 @@ get_base() { fi } +# @FUNCTION: gen_key +# @USAGE: <base path> +# @DESCRIPTION: # Generates an RSA key # # Access: private @@ -85,6 +100,9 @@ gen_key() { return $? } +# @FUNCTION: gen_csr +# @USAGE: <base path> +# @DESCRIPTION: # Generates a certificate signing request using # the key made by gen_key() # @@ -99,6 +117,9 @@ gen_csr() { return $? } +# @FUNCTION: gen_crt +# @USAGE: <base path> +# @DESCRIPTION: # Generates either a self-signed CA certificate using # the csr and key made by gen_csr() and gen_key() or # a signed server certificate using the CA cert previously @@ -125,6 +146,9 @@ gen_crt() { return $? } +# @FUNCTION: gen_pem +# @USAGE: <base path> +# @DESCRIPTION: # Generates a PEM file by concatinating the key # and cert file created by gen_key() and gen_cert() # @@ -208,11 +232,12 @@ docert() { fi } -# Uses all the private functions above to generate -# and install the requested certificates -# -# Usage: install_cert <certificates> -# where <certificates> are full pathnames relative to ROOT, without extension. +# @FUNCTION: install_cert +# @USAGE: <certificates> +# @DESCRIPTION: +# Uses all the private functions above to generate and install the +# requested certificates. +# <certificates> are full pathnames relative to ROOT, without extension. # # Example: "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem} # |