Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emacs/emacs-common-gentoo: ChangeLog emacs-common-gentoo-1.2-r2.ebuild
Date: Mon, 31 Jan 2011 19:02:22
Message-Id: 20110131190211.D763E20054@flycatcher.gentoo.org
1 ulm 11/01/31 19:02:11
2
3 Modified: ChangeLog
4 Added: emacs-common-gentoo-1.2-r2.ebuild
5 Log:
6 Test REPLACING_VERSIONS to detect a new install. Change ebuild to EAPI 4.
7
8 (Portage version: 2.1.9.35/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.36 app-emacs/emacs-common-gentoo/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog?rev=1.36&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog?rev=1.36&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog?r1=1.35&r2=1.36
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v
20 retrieving revision 1.35
21 retrieving revision 1.36
22 diff -u -r1.35 -r1.36
23 --- ChangeLog 13 Jan 2011 16:58:08 -0000 1.35
24 +++ ChangeLog 31 Jan 2011 19:02:11 -0000 1.36
25 @@ -1,6 +1,12 @@
26 # ChangeLog for app-emacs/emacs-common-gentoo
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v 1.35 2011/01/13 16:58:08 ulm Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emacs/emacs-common-gentoo/ChangeLog,v 1.36 2011/01/31 19:02:11 ulm Exp $
30 +
31 +*emacs-common-gentoo-1.2-r2 (31 Jan 2011)
32 +
33 + 31 Jan 2011; Ulrich Mueller <ulm@g.o>
34 + +emacs-common-gentoo-1.2-r2.ebuild:
35 + Test REPLACING_VERSIONS to detect a new install. Change ebuild to EAPI 4.
36
37 13 Jan 2011; Ulrich Mueller <ulm@g.o> -emacs-common-gentoo-1.2.ebuild:
38 Remove old.
39
40
41
42 1.1 app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emacs/emacs-common-gentoo/emacs-common-gentoo-1.2-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: emacs-common-gentoo-1.2-r2.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $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 $
52
53 EAPI=4
54
55 inherit elisp-common eutils fdo-mime gnome2-utils
56
57 DESCRIPTION="Common files needed by all GNU Emacs versions"
58 HOMEPAGE="http://www.gentoo.org/proj/en/lisp/emacs/"
59 SRC_URI="mirror://gentoo/${P}.tar.gz"
60
61 LICENSE="GPL-3"
62 SLOT="0"
63 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"
64 IUSE="X emacs22icons"
65
66 PDEPEND="virtual/emacs"
67
68 pkg_setup() {
69 if [ -e "${EROOT}${SITELISP}/subdirs.el" ] \
70 && ! has_version ">=${CATEGORY}/${PN}-1"
71 then
72 ewarn "Removing orphan subdirs.el (installed by old Emacs ebuilds)"
73 rm -f "${EROOT}${SITELISP}/subdirs.el"
74 fi
75 }
76
77 src_install() {
78 elisp-install . subdirs.el || die
79
80 if use X; then
81 local i
82 domenu emacs.desktop emacsclient.desktop || die
83 newicon icons/sink.png emacs-sink.png || die
84 if use emacs22icons; then
85 newicon icons/emacs22_48.png emacs.png || die
86 for i in 16 24 32 48; do
87 insinto /usr/share/icons/hicolor/${i}x${i}/apps
88 newins icons/emacs22_${i}.png emacs.png
89 done
90 else
91 newicon icons/emacs_48.png emacs.png || die
92 for i in 16 24 32 48 128; do
93 insinto /usr/share/icons/hicolor/${i}x${i}/apps
94 newins icons/emacs_${i}.png emacs.png
95 done
96 insinto /usr/share/icons/hicolor/scalable/apps
97 doins icons/emacs.svg
98 fi
99 gnome2_icon_savelist
100 fi
101 }
102
103 make-site-start() {
104 ebegin "Creating default ${SITELISP}/site-start.el"
105 cat <<-EOF >"${T}/site-start.el"
106 ;;; site-start.el -*- no-byte-compile: t -*-
107
108 ;;; Commentary:
109 ;; This default site startup file for Emacs was created by package
110 ;; ${CATEGORY}/${PF}. You may modify this file, replace
111 ;; it by your own site initialisation, or even remove it completely.
112
113 ;;; Code:
114 ;; Load site initialisation for Gentoo installed packages.
115 (require 'site-gentoo)
116
117 ;;; site-start.el ends here
118 EOF
119 mv "${T}/site-start.el" "${EROOT}${SITELISP}/site-start.el"
120 eend $? "Installation of site-start.el failed"
121 }
122
123 pkg_config() {
124 # make sure that site-gentoo.el exists since site-start.el requires it
125 elisp-site-regen
126
127 if [ ! -e "${EROOT}${SITELISP}/site-start.el" ]; then
128 echo
129 einfo "Press ENTER to create a default site-start.el file"
130 einfo "for GNU Emacs, or Control-C to abort now ..."
131 read
132 make-site-start
133 else
134 einfo "site-start.el for GNU Emacs already exists."
135 fi
136 }
137
138 pkg_postinst() {
139 if use X; then
140 fdo-mime_desktop_database_update
141 gnome2_icon_cache_update
142 fi
143
144 # make sure that site-gentoo.el exists since site-start.el requires it
145 elisp-site-regen
146
147 if [ ! -e "${EROOT}${SITELISP}/site-start.el" ]; then
148 local line
149 echo
150 while read line; do elog "${line:- }"; done <<-EOF
151 All site initialisation for Gentoo-installed packages is added to
152 /usr/share/emacs/site-lisp/site-gentoo.el. In order for this site
153 initialisation to be loaded for all users automatically, a default
154 site-start.el is created in the same directory. You are responsible
155 for all further maintenance of this file.
156
157 Alternatively, individual users can add the following command:
158
159 (require 'site-gentoo)
160
161 to their ~/.emacs initialisation files, or, for greater flexibility,
162 users may load single package-specific initialisation files from
163 /usr/share/emacs/site-lisp/site-gentoo.d/.
164 EOF
165 echo
166
167 if [ -z "${REPLACING_VERSIONS}" ]; then
168 # This is a new install. Create default site-start.el, so that
169 # Gentoo packages will work.
170 make-site-start
171 else
172 # This package was already installed, but site-start.el does
173 # not exist. Give a hint how to (re-)create it.
174 elog "If this is a new install, you may want to run:"
175 elog "emerge --config =${CATEGORY}/${PF}"
176 fi
177 fi
178 }
179
180 pkg_postrm() {
181 if use X; then
182 fdo-mime_desktop_database_update
183 gnome2_icon_cache_update
184 fi
185 }