diff options
author | 2011-01-31 19:02:11 +0000 | |
---|---|---|
committer | 2011-01-31 19:02:11 +0000 | |
commit | 2fcd9517e491c723c37134ed2f52eab67fb0fa68 (patch) | |
tree | 8e273d9f0edb59c89c9f9a0795299b8be7b21162 /app-emacs | |
parent | drop older version (diff) | |
download | historical-2fcd9517e491c723c37134ed2f52eab67fb0fa68.tar.gz historical-2fcd9517e491c723c37134ed2f52eab67fb0fa68.tar.bz2 historical-2fcd9517e491c723c37134ed2f52eab67fb0fa68.zip |
Test REPLACING_VERSIONS to detect a new install. Change ebuild to EAPI 4.
Package-Manager: portage-2.1.9.35/cvs/Linux x86_64
Diffstat (limited to 'app-emacs')
-rw-r--r-- | app-emacs/emacs-common-gentoo/ChangeLog | 8 | ||||
-rw-r--r-- | app-emacs/emacs-common-gentoo/Manifest | 11 | ||||
-rw-r--r-- | app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild | 137 |
3 files changed, 150 insertions, 6 deletions
diff --git a/app-emacs/emacs-common-gentoo/ChangeLog b/app-emacs/emacs-common-gentoo/ChangeLog index 567bc7a9a612..2492addbe98d 100644 --- a/app-emacs/emacs-common-gentoo/ChangeLog +++ b/app-emacs/emacs-common-gentoo/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emacs/emacs-common-gentoo # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v 1.35 2011/01/13 16:58:08 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v 1.36 2011/01/31 19:02:11 ulm Exp $ + +*emacs-common-gentoo-1.2-r2 (31 Jan 2011) + + 31 Jan 2011; Ulrich Mueller <ulm@gentoo.org> + +emacs-common-gentoo-1.2-r2.ebuild: + Test REPLACING_VERSIONS to detect a new install. Change ebuild to EAPI 4. 13 Jan 2011; Ulrich Mueller <ulm@gentoo.org> -emacs-common-gentoo-1.2.ebuild: Remove old. diff --git a/app-emacs/emacs-common-gentoo/Manifest b/app-emacs/emacs-common-gentoo/Manifest index fd6bcfa34b60..a03aac07e4f0 100644 --- a/app-emacs/emacs-common-gentoo/Manifest +++ b/app-emacs/emacs-common-gentoo/Manifest @@ -3,12 +3,13 @@ Hash: SHA1 DIST emacs-common-gentoo-1.2.tar.gz 46622 RMD160 88c923d05286b53687e1099294fb579a2f4f5d39 SHA1 4712b6186d4620aaa5258236367d3228f515f341 SHA256 d15f9654214b10e9efc9e38fe45b4e08c3f0cc1c975de34058e4d360d3053108 EBUILD emacs-common-gentoo-1.2-r1.ebuild 4119 RMD160 7c8b2bdbd5542ab1688e5f8ffaf354ae06c5f165 SHA1 4b59edd153dc66fa01b87b58a7fdde27da8d5914 SHA256 df31a30e2a83d61fc6cbce85fb4ba008f868529b379306a5f826233b6b7694d0 -MISC ChangeLog 8021 RMD160 a3d3aa6c642f080f7c3cf21e588a2218c95c2e41 SHA1 acf25c79e57b352cb954098313feef8115d37b5d SHA256 9387c118825f7164278f71e43b4a364d93ff7a1f2d599e4cd713e40c973ffaa0 +EBUILD emacs-common-gentoo-1.2-r2.ebuild 4042 RMD160 c90701734bf8c2818f8cef480b90c902c821fa1c SHA1 308411d1868db1c39da905c6685c9cd0a23a4d08 SHA256 47fd65971d794b37ebba4a578606ea90a01ad09874eb929660f6f30a38f51628 +MISC ChangeLog 8226 RMD160 120ca3654e0a6f22cfb98ba4ff8b8ff94653dc44 SHA1 ebf5c876f8a14667860540e1bd78dba3e58aaf82 SHA256 621e984ac01a43935983aaf4e0fb7d89b11cd0770c9d14b0b22a12fec3d69a2f MISC metadata.xml 235 RMD160 94ec7acf062c24ce7a5c9b98fff11c2a68baf269 SHA1 c948e0bb625876a97f14834fe5848367dda93628 SHA256 81f928a2ff996d91f098bc1d718adec61bbb6afa1f8e5f1b29f0931a73902ec1 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.16 (GNU/Linux) +Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk0vMFsACgkQOeoy/oIi7uymOwCgibdH6+UNyCsR1dgNylZA6Uvi -XNIAoJ9jJa9ZnHrw2pKXGyJ6Y4zRPj9g -=PxKJ +iEYEARECAAYFAk1HCKAACgkQOeoy/oIi7uxhXQCff0rNOx71CMTeecIPkgiez56I +6w0AoJV/MFbziKizwX3HhiG0wlK10Cnn +=5+9f -----END PGP SIGNATURE----- diff --git a/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild new file mode 100644 index 000000000000..a6097fb23573 --- /dev/null +++ b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild,v 1.1 2011/01/31 19:02:11 ulm Exp $ + +EAPI=4 + +inherit elisp-common eutils fdo-mime gnome2-utils + +DESCRIPTION="Common files needed by all GNU Emacs versions" +HOMEPAGE="http://www.gentoo.org/proj/en/lisp/emacs/" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="X emacs22icons" + +PDEPEND="virtual/emacs" + +pkg_setup() { + if [ -e "${EROOT}${SITELISP}/subdirs.el" ] \ + && ! has_version ">=${CATEGORY}/${PN}-1" + then + ewarn "Removing orphan subdirs.el (installed by old Emacs ebuilds)" + rm -f "${EROOT}${SITELISP}/subdirs.el" + fi +} + +src_install() { + elisp-install . subdirs.el || die + + if use X; then + local i + domenu emacs.desktop emacsclient.desktop || die + newicon icons/sink.png emacs-sink.png || die + if use emacs22icons; then + newicon icons/emacs22_48.png emacs.png || die + for i in 16 24 32 48; do + insinto /usr/share/icons/hicolor/${i}x${i}/apps + newins icons/emacs22_${i}.png emacs.png + done + else + newicon icons/emacs_48.png emacs.png || die + for i in 16 24 32 48 128; do + insinto /usr/share/icons/hicolor/${i}x${i}/apps + newins icons/emacs_${i}.png emacs.png + done + insinto /usr/share/icons/hicolor/scalable/apps + doins icons/emacs.svg + fi + gnome2_icon_savelist + fi +} + +make-site-start() { + ebegin "Creating default ${SITELISP}/site-start.el" + cat <<-EOF >"${T}/site-start.el" + ;;; site-start.el -*- no-byte-compile: t -*- + + ;;; Commentary: + ;; This default site startup file for Emacs was created by package + ;; ${CATEGORY}/${PF}. You may modify this file, replace + ;; it by your own site initialisation, or even remove it completely. + + ;;; Code: + ;; Load site initialisation for Gentoo installed packages. + (require 'site-gentoo) + + ;;; site-start.el ends here + EOF + mv "${T}/site-start.el" "${EROOT}${SITELISP}/site-start.el" + eend $? "Installation of site-start.el failed" +} + +pkg_config() { + # make sure that site-gentoo.el exists since site-start.el requires it + elisp-site-regen + + if [ ! -e "${EROOT}${SITELISP}/site-start.el" ]; then + echo + einfo "Press ENTER to create a default site-start.el file" + einfo "for GNU Emacs, or Control-C to abort now ..." + read + make-site-start + else + einfo "site-start.el for GNU Emacs already exists." + fi +} + +pkg_postinst() { + if use X; then + fdo-mime_desktop_database_update + gnome2_icon_cache_update + fi + + # make sure that site-gentoo.el exists since site-start.el requires it + elisp-site-regen + + if [ ! -e "${EROOT}${SITELISP}/site-start.el" ]; then + local line + echo + while read line; do elog "${line:- }"; done <<-EOF + All site initialisation for Gentoo-installed packages is added to + /usr/share/emacs/site-lisp/site-gentoo.el. In order for this site + initialisation to be loaded for all users automatically, a default + site-start.el is created in the same directory. You are responsible + for all further maintenance of this file. + + Alternatively, individual users can add the following command: + + (require 'site-gentoo) + + to their ~/.emacs initialisation files, or, for greater flexibility, + users may load single package-specific initialisation files from + /usr/share/emacs/site-lisp/site-gentoo.d/. + EOF + echo + + if [ -z "${REPLACING_VERSIONS}" ]; then + # This is a new install. Create default site-start.el, so that + # Gentoo packages will work. + make-site-start + else + # This package was already installed, but site-start.el does + # not exist. Give a hint how to (re-)create it. + elog "If this is a new install, you may want to run:" + elog "emerge --config =${CATEGORY}/${PF}" + fi + fi +} + +pkg_postrm() { + if use X; then + fdo-mime_desktop_database_update + gnome2_icon_cache_update + fi +} |