1 |
ulm 08/11/29 20:38:52 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-22.3-r1.ebuild |
5 |
Log: |
6 |
Add site initialisation for Info. Rename site-init file. |
7 |
(Portage version: 2.2_rc16/cvs/Linux 2.6.27-gentoo-r4 i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.288 app-editors/emacs/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.288&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.288&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.287&r2=1.288 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v |
19 |
retrieving revision 1.287 |
20 |
retrieving revision 1.288 |
21 |
diff -u -r1.287 -r1.288 |
22 |
--- ChangeLog 26 Nov 2008 21:11:49 -0000 1.287 |
23 |
+++ ChangeLog 29 Nov 2008 20:38:52 -0000 1.288 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for app-editors/emacs |
26 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.287 2008/11/26 21:11:49 ulm Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.288 2008/11/29 20:38:52 ulm Exp $ |
29 |
+ |
30 |
+*emacs-22.3-r1 (29 Nov 2008) |
31 |
+ |
32 |
+ 29 Nov 2008; Ulrich Mueller <ulm@g.o> +emacs-22.3-r1.ebuild: |
33 |
+ Add site initialisation for Info, so that Emacs' dir is first in list; |
34 |
+ this will also help to get the right documentation if Emacs is started |
35 |
+ as emacs-${SLOT}. Rename site-init file to 20${PN}-${SLOT}-gentoo.el. |
36 |
|
37 |
26 Nov 2008; Ulrich Mueller <ulm@g.o> emacs-21.4-r17.ebuild, |
38 |
emacs-22.3.ebuild: |
39 |
|
40 |
|
41 |
|
42 |
1.1 app-editors/emacs/emacs-22.3-r1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-22.3-r1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-editors/emacs/emacs-22.3-r1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: emacs-22.3-r1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2008 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-22.3-r1.ebuild,v 1.1 2008/11/29 20:38:52 ulm Exp $ |
52 |
|
53 |
inherit autotools elisp-common eutils flag-o-matic |
54 |
|
55 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
56 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
57 |
SRC_URI="mirror://gnu/emacs/${P}.tar.gz" |
58 |
|
59 |
LICENSE="GPL-3 FDL-1.2 BSD as-is X11" |
60 |
SLOT="22" |
61 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
62 |
IUSE="alsa gif gtk gzip-el hesiod jpeg kerberos motif png spell sound source tiff toolkit-scroll-bars X Xaw3d xpm" |
63 |
RESTRICT="strip" |
64 |
|
65 |
RDEPEND="!<app-editors/emacs-cvs-22.1 |
66 |
sys-libs/ncurses |
67 |
>=app-admin/eselect-emacs-1.2 |
68 |
net-libs/liblockfile |
69 |
hesiod? ( net-dns/hesiod ) |
70 |
kerberos? ( virtual/krb5 ) |
71 |
spell? ( || ( app-text/ispell app-text/aspell ) ) |
72 |
alsa? ( media-libs/alsa-lib ) |
73 |
X? ( |
74 |
x11-libs/libXmu |
75 |
x11-libs/libXt |
76 |
x11-misc/xbitmaps |
77 |
x11-misc/emacs-desktop |
78 |
gif? ( media-libs/giflib ) |
79 |
jpeg? ( media-libs/jpeg ) |
80 |
tiff? ( media-libs/tiff ) |
81 |
png? ( media-libs/libpng ) |
82 |
xpm? ( x11-libs/libXpm ) |
83 |
gtk? ( =x11-libs/gtk+-2* ) |
84 |
!gtk? ( |
85 |
Xaw3d? ( x11-libs/Xaw3d ) |
86 |
!Xaw3d? ( motif? ( x11-libs/openmotif ) ) |
87 |
) |
88 |
)" |
89 |
|
90 |
DEPEND="${RDEPEND} |
91 |
alsa? ( dev-util/pkgconfig ) |
92 |
X? ( gtk? ( dev-util/pkgconfig ) ) |
93 |
gzip-el? ( app-arch/gzip )" |
94 |
|
95 |
# FULL_VERSION keeps the full version number, which is needed in order to |
96 |
# determine some path information correctly for copy/move operations later on |
97 |
FULL_VERSION="${PV}" |
98 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
99 |
|
100 |
src_unpack() { |
101 |
unpack ${A} |
102 |
cd "${S}" |
103 |
|
104 |
epatch "${FILESDIR}/emacs-22.1-Xaw3d-headers.patch" |
105 |
epatch "${FILESDIR}/emacs-22.3-freebsd-sparc.patch" |
106 |
# SuperH support (bug 238210) |
107 |
epatch "${FILESDIR}/emacs-22.2-sh.patch" |
108 |
# Fix sporadic segmentation faults in unexec (bug 236579) |
109 |
epatch "${FILESDIR}/emacs-22.3-linux-random-heap.patch" |
110 |
|
111 |
sed -i -e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \ |
112 |
-e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \ |
113 |
"${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings" |
114 |
|
115 |
if ! use alsa; then |
116 |
# ALSA is detected even if not requested by its USE flag. |
117 |
# Suppress it by supplying pkg-config with a wrong library name. |
118 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
119 |
|| die "unable to sed configure.in" |
120 |
fi |
121 |
if ! use gzip-el; then |
122 |
# Emacs' build system automatically detects the gzip binary and |
123 |
# compresses el files. We don't want that so confuse it with a |
124 |
# wrong binary name |
125 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
126 |
|| die "unable to sed configure.in" |
127 |
fi |
128 |
|
129 |
eautoreconf |
130 |
} |
131 |
|
132 |
src_compile() { |
133 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
134 |
ALLOWED_FLAGS="" |
135 |
strip-flags |
136 |
#unset LDFLAGS |
137 |
if use hppa; then # bug #193703 |
138 |
replace-flags -O[2-9] -O |
139 |
else |
140 |
replace-flags -O[3-9] -O2 |
141 |
fi |
142 |
sed -i -e "s/-lungif/-lgif/g" configure* src/Makefile* || die |
143 |
|
144 |
local myconf |
145 |
|
146 |
if use alsa && ! use sound; then |
147 |
echo |
148 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
149 |
einfo "so sound is switched on anyway." |
150 |
echo |
151 |
myconf="${myconf} --with-sound" |
152 |
else |
153 |
myconf="${myconf} $(use_with sound)" |
154 |
fi |
155 |
|
156 |
if use X; then |
157 |
myconf="${myconf} --with-x" |
158 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
159 |
myconf="${myconf} $(use_with jpeg) $(use_with tiff)" |
160 |
myconf="${myconf} $(use_with gif) $(use_with png)" |
161 |
myconf="${myconf} $(use_with xpm)" |
162 |
|
163 |
# GTK+ is the default toolkit if USE=gtk is chosen with other |
164 |
# possibilities. Emacs upstream thinks this should be standard |
165 |
# policy on all distributions |
166 |
if use gtk; then |
167 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
168 |
myconf="${myconf} --with-x-toolkit=gtk" |
169 |
elif use Xaw3d; then |
170 |
einfo "Configuring to build with Xaw3d (Athena) toolkit" |
171 |
myconf="${myconf} --with-x-toolkit=athena" |
172 |
myconf="${myconf} --without-gtk" |
173 |
elif use motif; then |
174 |
einfo "Configuring to build with Motif toolkit" |
175 |
myconf="${myconf} --with-x-toolkit=motif" |
176 |
myconf="${myconf} --without-gtk" |
177 |
else |
178 |
einfo "Configuring to build with no toolkit" |
179 |
myconf="${myconf} --with-x-toolkit=no" |
180 |
myconf="${myconf} --without-gtk" |
181 |
fi |
182 |
|
183 |
local f tk= |
184 |
for f in gtk Xaw3d motif; do |
185 |
use ${f} || continue |
186 |
[ "${tk}" ] \ |
187 |
&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")" |
188 |
tk="${tk}${tk:+ }${f}" |
189 |
done |
190 |
else |
191 |
myconf="${myconf} --without-x" |
192 |
fi |
193 |
|
194 |
myconf="${myconf} $(use_with hesiod)" |
195 |
myconf="${myconf} $(use_with kerberos) $(use_with kerberos kerberos5)" |
196 |
|
197 |
econf \ |
198 |
--program-suffix=-emacs-${SLOT} \ |
199 |
--infodir=/usr/share/info/emacs-${SLOT} \ |
200 |
--without-carbon \ |
201 |
${myconf} || die "econf emacs failed" |
202 |
|
203 |
emake CC="$(tc-getCC)" || die "emake failed" |
204 |
} |
205 |
|
206 |
src_install () { |
207 |
local i m |
208 |
|
209 |
emake install DESTDIR="${D}" || die "make install failed" |
210 |
|
211 |
rm "${D}"/usr/bin/emacs-${FULL_VERSION}-emacs-${SLOT} \ |
212 |
|| die "removing duplicate emacs executable failed" |
213 |
mv "${D}"/usr/bin/emacs-emacs-${SLOT} "${D}"/usr/bin/emacs-${SLOT} \ |
214 |
|| die "moving Emacs executable failed" |
215 |
|
216 |
# move info documentation to the correct place |
217 |
for i in "${D}"/usr/share/info/emacs-${SLOT}/*; do |
218 |
mv "${i}" "${i}.info" || die "mv info failed" |
219 |
done |
220 |
|
221 |
# move man pages to the correct place |
222 |
for m in "${D}"/usr/share/man/man1/* ; do |
223 |
mv "${m}" "${m%.1}-emacs-${SLOT}.1" || die "mv man failed" |
224 |
done |
225 |
|
226 |
# avoid collision between slots, see bug #169033 e.g. |
227 |
rm "${D}"/usr/share/emacs/site-lisp/subdirs.el |
228 |
rm "${D}"/var/lib/games/emacs/{snake,tetris}-scores |
229 |
keepdir /usr/share/emacs/site-lisp |
230 |
keepdir /var/lib/games/emacs |
231 |
|
232 |
local c=";;" |
233 |
if use source; then |
234 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
235 |
# This is not meant to install all the source -- just the |
236 |
# C source you might find via find-function |
237 |
doins src/*.[ch] |
238 |
c="" |
239 |
fi |
240 |
|
241 |
sed 's/^X//' >"${SITEFILE}" <<-EOF |
242 |
X |
243 |
;;; ${PN}-${SLOT} site-lisp configuration |
244 |
X |
245 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
246 |
X ${c}(setq find-function-C-source-directory |
247 |
X ${c} "/usr/share/emacs/${FULL_VERSION}/src") |
248 |
X (let ((path (getenv "INFOPATH")) |
249 |
X (dir "/usr/share/info/emacs-${SLOT}")) |
250 |
X (and path |
251 |
X ;; move Emacs Info dir to beginning of list |
252 |
X (setq Info-directory-list |
253 |
X (cons dir (delete dir (split-string path ":" t))))))) |
254 |
EOF |
255 |
elisp-site-file-install "${SITEFILE}" || die |
256 |
|
257 |
dodoc AUTHORS BUGS CONTRIBUTE README || die "dodoc failed" |
258 |
} |
259 |
|
260 |
emacs-infodir-rebuild() { |
261 |
# Depending on the Portage version, the Info dir file is compressed |
262 |
# or removed. It is only rebuilt by Portage if our directory is in |
263 |
# INFOPATH, which is not guaranteed. So we rebuild it ourselves. |
264 |
|
265 |
local infodir=/usr/share/info/emacs-${SLOT} f |
266 |
[ -d "${ROOT}"${infodir} ] || return # may occur with FEATURES=noinfo |
267 |
einfo "Regenerating Info directory index in ${infodir} ..." |
268 |
rm -f "${ROOT}"${infodir}/dir{,.*} |
269 |
for f in "${ROOT}"${infodir}/*.info*; do |
270 |
[[ ${f##*/} != *[0-9].info* && -e ${f} ]] \ |
271 |
&& install-info --info-dir="${ROOT}"${infodir} "${f}" &>/dev/null |
272 |
done |
273 |
rmdir "${ROOT}"${infodir} 2>/dev/null # remove dir if it is empty |
274 |
echo |
275 |
} |
276 |
|
277 |
pkg_postinst() { |
278 |
[ -f "${ROOT}"/usr/share/emacs/site-lisp/subdirs.el ] \ |
279 |
|| cp "${ROOT}"/usr/share/emacs{/${FULL_VERSION},}/site-lisp/subdirs.el |
280 |
|
281 |
local f |
282 |
for f in "${ROOT}"/var/lib/games/emacs/{snake,tetris}-scores; do |
283 |
[ -e "${f}" ] || touch "${f}" |
284 |
done |
285 |
|
286 |
elisp-site-regen |
287 |
emacs-infodir-rebuild |
288 |
|
289 |
if [[ $(readlink "${ROOT}"/usr/bin/emacs) == emacs.emacs-${SLOT}* ]]; then |
290 |
# transition from pre-eselect revision |
291 |
eselect emacs set emacs-${SLOT} |
292 |
else |
293 |
eselect emacs update ifunset |
294 |
fi |
295 |
|
296 |
echo |
297 |
elog "You can set the version to be started by /usr/bin/emacs through" |
298 |
elog "the Emacs eselect module, which also redirects man and info pages." |
299 |
elog "Therefore, several Emacs versions can be installed at the same time." |
300 |
elog "\"man emacs.eselect\" for details." |
301 |
} |
302 |
|
303 |
pkg_postrm() { |
304 |
elisp-site-regen |
305 |
emacs-infodir-rebuild |
306 |
eselect emacs update ifunset |
307 |
} |