diff options
author | Ulrich Müller <ulm@gentoo.org> | 2009-03-29 19:08:16 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2009-03-29 19:08:16 +0000 |
commit | bf5aa9ed16433f09cff3351095a086d44f97703e (patch) | |
tree | ca76d20d27bc0c078efe32f1928b2c44cdfbbdce | |
parent | Sync from Portage tree. (diff) | |
download | emacs-bf5aa9ed16433f09cff3351095a086d44f97703e.tar.gz emacs-bf5aa9ed16433f09cff3351095a086d44f97703e.tar.bz2 emacs-bf5aa9ed16433f09cff3351095a086d44f97703e.zip |
Try a different approach using CONFIG_PROTECT.
svn path=/emacs-overlay/; revision=1362
-rw-r--r-- | app-emacs/emacs-common-gentoo/ChangeLog | 8 | ||||
-rw-r--r-- | app-emacs/emacs-common-gentoo/Manifest | 5 | ||||
-rw-r--r-- | app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0-r20.ebuild | 79 | ||||
-rw-r--r-- | app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0.ebuild | 122 | ||||
-rw-r--r-- | app-emacs/emacs-common-gentoo/files/site-start.el | 12 | ||||
-rw-r--r-- | profiles/package.mask | 4 |
6 files changed, 103 insertions, 127 deletions
diff --git a/app-emacs/emacs-common-gentoo/ChangeLog b/app-emacs/emacs-common-gentoo/ChangeLog index f316c11..ee26414 100644 --- a/app-emacs/emacs-common-gentoo/ChangeLog +++ b/app-emacs/emacs-common-gentoo/ChangeLog @@ -2,9 +2,11 @@ # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ - 29 Mar 2009; Ulrich Mueller <ulm@gentoo.org> - emacs-common-gentoo-1.0.ebuild: - Sync from Portage tree. +*emacs-common-gentoo-1.0-r20 (29 Mar 2009) + + 29 Mar 2009; Ulrich Mueller <ulm@gentoo.org> +files/site-start.el, + -emacs-common-gentoo-1.0.ebuild, +emacs-common-gentoo-1.0-r20.ebuild: + Sync from Portage tree. Try a different approach using CONFIG_PROTECT. 08 Mar 2009; Ulrich Mueller <ulm@gentoo.org> emacs-common-gentoo-1.0.ebuild: diff --git a/app-emacs/emacs-common-gentoo/Manifest b/app-emacs/emacs-common-gentoo/Manifest index eed094f..295aa5d 100644 --- a/app-emacs/emacs-common-gentoo/Manifest +++ b/app-emacs/emacs-common-gentoo/Manifest @@ -1,4 +1,5 @@ +AUX site-start.el 362 RMD160 76e7bcac5b67caa4f60af42e1a6a3aef0eb461fc SHA1 26fe13924f86abe3989bdc43a6e744d52b9547b2 SHA256 6ab443ae7a80865827efd77124d2840c06b251d9a465e9797b85839db20ffd39 DIST emacs-common-gentoo-1.0.tar.gz 14268 RMD160 3dad4c2955fc8d9be095500305d67c36e587eef0 SHA1 2d646e3761a2eb23c359e0fb45743f553ade07b6 SHA256 eafc05a71b7b77084073ab82e9bf92c4a4dec1b61feb8a7adaa0b3194f95e2cd -EBUILD emacs-common-gentoo-1.0.ebuild 3377 RMD160 9e1e2972410392113e0227bd5ea7796eac496ab4 SHA1 0fe28f771c27ad6984a91ffbeb69862541e15b8c SHA256 ac40ec65b7fcdbf4f13b63517b5edbfa9eedaa0f7ad7f2418ecb7fba75e04f80 -MISC ChangeLog 661 RMD160 5d29305303bbc72d16ba0b5b8220489e23b35793 SHA1 ec6a01681aa306e04f6b6c5e20ba1f49eeb0935b SHA256 3e9cfbbc4045c3e1f953596e6f4c880fa71ed43c95369bd5e26bef06f51573a5 +EBUILD emacs-common-gentoo-1.0-r20.ebuild 2104 RMD160 0f9a09368ec3b638db987a583fd09a672e30ca4c SHA1 03d065534d3a76ff7d47256b4775497b77d2cfe0 SHA256 5f7070f883663a363291eaba0c9bb3ac053b74e03b4eb6cc852adee97cd12516 +MISC ChangeLog 812 RMD160 60d1975d1cd269e2c0869dc861739749c81f74f1 SHA1 24364ab50dece6b74d4f9eb0a3643f1de2c9593f SHA256 19f95d804b3cc00669c6671dc593c0807d0118178dfe1211612ab4feded01d28 MISC metadata.xml 158 RMD160 415d172437ca754d24fc5ab186ba8e77934d96e4 SHA1 61f6eff9729cd87a725c2a70c81aca4270a17fc4 SHA256 1393bdef3a74343fdb40a112c7096a1af16f67e7a43413250de28dfe73810eab diff --git a/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0-r20.ebuild b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0-r20.ebuild new file mode 100644 index 0000000..45e361c --- /dev/null +++ b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0-r20.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +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-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="X" + +PDEPEND="virtual/emacs" + +pkg_setup() { + if [ -e "${ROOT}${SITELISP}/subdirs.el" ] \ + && ! has_version ">=${CATEGORY}/${PN}-1" + then + ewarn "Removing orphan subdirs.el (installed by old Emacs ebuilds)" + rm -f "${ROOT}${SITELISP}/subdirs.el" + fi +} + +src_install() { + elisp-install . subdirs.el "${FILESDIR}/site-start.el" || die + + echo "CONFIG_PROTECT=\"${SITELISP}/site-start.el\"" >"${T}/50${PN}" || die + doenvd "${T}/50${PN}" || die + + if use X; then + local i + domenu emacs.desktop emacsclient.desktop || die + newicon emacs_48.png emacs.png || die + for i in 16 24 32 48; do + insinto /usr/share/icons/hicolor/${i}x${i}/apps + newins emacs_${i}.png emacs.png || die + done + fi +} + +pkg_postinst() { + local line + + 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 + + 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 +} + +pkg_postrm() { + if use X; then + fdo-mime_desktop_database_update + gnome2_icon_cache_update + fi +} diff --git a/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0.ebuild b/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0.ebuild deleted file mode 100644 index eec5688..0000000 --- a/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.0.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -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-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" -IUSE="X" - -PDEPEND="virtual/emacs" - -pkg_setup() { - if [ -e "${ROOT}${SITELISP}/subdirs.el" ] \ - && ! has_version ">=${CATEGORY}/${PN}-1" - then - ewarn "Removing orphan subdirs.el (installed by old Emacs ebuilds)" - rm -f "${ROOT}${SITELISP}/subdirs.el" - fi - - NEW_INSTALL="" - has_version ${CATEGORY}/${PN} || NEW_INSTALL="true" -} - -src_install() { - elisp-install . subdirs.el || die - - if use X; then - local i - domenu emacs.desktop emacsclient.desktop || die - newicon emacs_48.png emacs.png || die - for i in 16 24 32 48; do - insinto /usr/share/icons/hicolor/${i}x${i}/apps - newins emacs_${i}.png emacs.png || die - done - 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" "${ROOT}${SITELISP}/site-start.el" - eend $? "Installation of site-start.el failed" -} - -pkg_config() { - if [ ! -e "${ROOT}${SITELISP}/site-start.el" ]; then - 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 "${ROOT}${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 [ "${NEW_INSTALL}" ]; 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 -} diff --git a/app-emacs/emacs-common-gentoo/files/site-start.el b/app-emacs/emacs-common-gentoo/files/site-start.el new file mode 100644 index 0000000..4d14537 --- /dev/null +++ b/app-emacs/emacs-common-gentoo/files/site-start.el @@ -0,0 +1,12 @@ +;;; site-start.el -*- no-byte-compile: t -*- + +;;; Commentary: +;; This default site startup file for Emacs was created by package +;; app-emacs/emacs-common-gentoo. You may modify this file or replace +;; it by your own site initialisation. + +;;; Code: +;; Load site initialisation for Gentoo installed packages. +(require 'site-gentoo) + +;;; site-start.el ends here diff --git a/profiles/package.mask b/profiles/package.mask index ee17a15..4033ba0 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -1,5 +1,9 @@ # package.mask +# Ulrich Mueller <ulm@gentoo.org> (29 Mar 2009) +# Experimental ebuild, masked for internal testing. +~app-emacs/emacs-common-gentoo-1.0-r20 + # Christian Faulhammer <fauli@gentoo.org> # Ulrich Mueller <ulm@gentoo.org> (18 Mar 2009) # Live ebuilds directly from the repository |