1 |
ulm 14/05/05 07:06:01 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: emacs-22.3-r12.ebuild emacs-23.4-r8.ebuild |
5 |
emacs-24.3-r4.ebuild |
6 |
Removed: emacs-23.4-r7.ebuild emacs-22.3-r11.ebuild |
7 |
emacs-24.3-r3.ebuild |
8 |
Log: |
9 |
Access shared game score files in /var/games/emacs, compliant with the FHS. |
10 |
|
11 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!) |
12 |
|
13 |
Revision Changes Path |
14 |
1.614 app-editors/emacs/ChangeLog |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.614&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/ChangeLog?rev=1.614&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/ChangeLog?r1=1.613&r2=1.614 |
19 |
|
20 |
Index: ChangeLog |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v |
23 |
retrieving revision 1.613 |
24 |
retrieving revision 1.614 |
25 |
diff -u -r1.613 -r1.614 |
26 |
--- ChangeLog 23 Apr 2014 11:38:37 -0000 1.613 |
27 |
+++ ChangeLog 5 May 2014 07:06:01 -0000 1.614 |
28 |
@@ -1,6 +1,15 @@ |
29 |
# ChangeLog for app-editors/emacs |
30 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.613 2014/04/23 11:38:37 ulm Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.614 2014/05/05 07:06:01 ulm Exp $ |
33 |
+ |
34 |
+*emacs-24.3-r4 (05 May 2014) |
35 |
+*emacs-23.4-r8 (05 May 2014) |
36 |
+*emacs-22.3-r12 (05 May 2014) |
37 |
+ |
38 |
+ 05 May 2014; Ulrich Müller <ulm@g.o> -emacs-22.3-r11.ebuild, |
39 |
+ +emacs-22.3-r12.ebuild, -emacs-23.4-r7.ebuild, +emacs-23.4-r8.ebuild, |
40 |
+ -emacs-24.3-r3.ebuild, +emacs-24.3-r4.ebuild: |
41 |
+ Access shared game score files in /var/games/emacs, compliant with the FHS. |
42 |
|
43 |
23 Apr 2014; Ulrich Müller <ulm@g.o> -emacs-18.59-r8.ebuild: |
44 |
Remove old. |
45 |
|
46 |
|
47 |
|
48 |
1.1 app-editors/emacs/emacs-22.3-r12.ebuild |
49 |
|
50 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-22.3-r12.ebuild?rev=1.1&view=markup |
51 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-22.3-r12.ebuild?rev=1.1&content-type=text/plain |
52 |
|
53 |
Index: emacs-22.3-r12.ebuild |
54 |
=================================================================== |
55 |
# Copyright 1999-2014 Gentoo Foundation |
56 |
# Distributed under the terms of the GNU General Public License v2 |
57 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-22.3-r12.ebuild,v 1.1 2014/05/05 07:06:01 ulm Exp $ |
58 |
|
59 |
EAPI=5 |
60 |
WANT_AUTOMAKE="none" |
61 |
|
62 |
inherit autotools elisp-common eutils flag-o-matic |
63 |
|
64 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
65 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
66 |
SRC_URI="mirror://gnu/emacs/${P}.tar.gz |
67 |
mirror://gentoo/${P}-patches-8.tar.bz2" |
68 |
|
69 |
LICENSE="GPL-3+ FDL-1.2+ BSD HPND MIT" |
70 |
SLOT="22" |
71 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
72 |
IUSE="alsa games gif gtk gzip-el hesiod jpeg kerberos motif png sound source tiff toolkit-scroll-bars X Xaw3d +xpm" |
73 |
|
74 |
RDEPEND="sys-libs/ncurses |
75 |
>=app-admin/eselect-emacs-1.16 |
76 |
>=app-emacs/emacs-common-gentoo-1.4-r1[games?,X?] |
77 |
net-libs/liblockfile |
78 |
hesiod? ( net-dns/hesiod ) |
79 |
kerberos? ( virtual/krb5 ) |
80 |
alsa? ( media-libs/alsa-lib ) |
81 |
X? ( |
82 |
x11-libs/libXmu |
83 |
x11-libs/libXt |
84 |
x11-misc/xbitmaps |
85 |
gif? ( media-libs/giflib ) |
86 |
jpeg? ( virtual/jpeg:0= ) |
87 |
png? ( >=media-libs/libpng-1.4:0= ) |
88 |
tiff? ( media-libs/tiff ) |
89 |
xpm? ( x11-libs/libXpm ) |
90 |
gtk? ( x11-libs/gtk+:2 ) |
91 |
!gtk? ( |
92 |
Xaw3d? ( x11-libs/libXaw3d ) |
93 |
!Xaw3d? ( motif? ( >=x11-libs/motif-2.3:0 ) ) |
94 |
) |
95 |
)" |
96 |
|
97 |
DEPEND="${RDEPEND} |
98 |
alsa? ( virtual/pkgconfig ) |
99 |
X? ( gtk? ( virtual/pkgconfig ) ) |
100 |
gzip-el? ( app-arch/gzip )" |
101 |
|
102 |
# FULL_VERSION keeps the full version number, which is needed in order to |
103 |
# determine some path information correctly for copy/move operations later on |
104 |
FULL_VERSION="${PV}" |
105 |
EMACS_SUFFIX="emacs-${SLOT}" |
106 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
107 |
|
108 |
src_prepare() { |
109 |
EPATCH_SUFFIX=patch epatch |
110 |
|
111 |
sed -i \ |
112 |
-e "s:/usr/lib/crtbegin.o:$(`tc-getCC` -print-file-name=crtbegin.o):g" \ |
113 |
-e "s:/usr/lib/crtend.o:$(`tc-getCC` -print-file-name=crtend.o):g" \ |
114 |
"${S}"/src/s/freebsd.h || die "unable to sed freebsd.h settings" |
115 |
|
116 |
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" etc/ctags.1 \ |
117 |
|| die "unable to sed ctags.1" |
118 |
|
119 |
if ! use alsa; then |
120 |
# ALSA is detected even if not requested by its USE flag. |
121 |
# Suppress it by supplying pkg-config with a wrong library name. |
122 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
123 |
|| die "unable to sed configure.in" |
124 |
fi |
125 |
if ! use gzip-el; then |
126 |
# Emacs' build system automatically detects the gzip binary and |
127 |
# compresses el files. We don't want that so confuse it with a |
128 |
# wrong binary name |
129 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
130 |
|| die "unable to sed configure.in" |
131 |
fi |
132 |
|
133 |
eautoreconf |
134 |
} |
135 |
|
136 |
src_configure() { |
137 |
strip-flags |
138 |
filter-flags -fstack-protector -fstack-protector-all #285778 |
139 |
replace-flags "-O[3-9]" -O2 |
140 |
sed -i -e "s/-lungif/-lgif/g" configure* src/Makefile* || die |
141 |
|
142 |
local myconf |
143 |
|
144 |
if use alsa && ! use sound; then |
145 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
146 |
einfo "so sound is switched on anyway." |
147 |
myconf="${myconf} --with-sound" |
148 |
else |
149 |
myconf="${myconf} $(use_with sound)" |
150 |
fi |
151 |
|
152 |
if use X; then |
153 |
myconf="${myconf} --with-x" |
154 |
myconf="${myconf} $(use_with toolkit-scroll-bars)" |
155 |
myconf="${myconf} $(use_with gif) $(use_with jpeg)" |
156 |
myconf="${myconf} $(use_with png) $(use_with tiff)" |
157 |
myconf="${myconf} $(use_with xpm)" |
158 |
|
159 |
# GTK+ is the default toolkit if USE=gtk is chosen with other |
160 |
# possibilities. Emacs upstream thinks this should be standard |
161 |
# policy on all distributions |
162 |
if use gtk; then |
163 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
164 |
myconf="${myconf} --with-x-toolkit=gtk" |
165 |
elif use Xaw3d; then |
166 |
einfo "Configuring to build with Xaw3d (Athena/Lucid) toolkit" |
167 |
myconf="${myconf} --with-x-toolkit=athena" |
168 |
myconf="${myconf} --without-gtk" |
169 |
elif use motif; then |
170 |
einfo "Configuring to build with Motif toolkit" |
171 |
myconf="${myconf} --with-x-toolkit=motif" |
172 |
myconf="${myconf} --without-gtk" |
173 |
else |
174 |
einfo "Configuring to build with no toolkit" |
175 |
myconf="${myconf} --with-x-toolkit=no" |
176 |
myconf="${myconf} --without-gtk" |
177 |
fi |
178 |
|
179 |
local f tk= |
180 |
for f in gtk Xaw3d motif; do |
181 |
use ${f} || continue |
182 |
[ "${tk}" ] \ |
183 |
&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")" |
184 |
tk="${tk}${tk:+ }${f}" |
185 |
done |
186 |
else |
187 |
myconf="${myconf} --without-x" |
188 |
fi |
189 |
|
190 |
econf \ |
191 |
--program-suffix=-${EMACS_SUFFIX} \ |
192 |
--infodir=/usr/share/info/${EMACS_SUFFIX} \ |
193 |
--localstatedir=/var \ |
194 |
--enable-locallisppath="/etc/emacs:${SITELISP}" \ |
195 |
--without-carbon \ |
196 |
--with-gameuser="${GAMES_USER_DED:-games}" \ |
197 |
$(use_with hesiod) \ |
198 |
$(use_with kerberos) $(use_with kerberos kerberos5) \ |
199 |
${myconf} |
200 |
} |
201 |
|
202 |
src_compile() { |
203 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
204 |
emake CC="$(tc-getCC)" |
205 |
} |
206 |
|
207 |
src_install () { |
208 |
emake DESTDIR="${D}" install |
209 |
|
210 |
rm "${D}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \ |
211 |
|| die "removing duplicate emacs executable failed" |
212 |
mv "${D}"/usr/bin/emacs-${EMACS_SUFFIX} "${D}"/usr/bin/${EMACS_SUFFIX} \ |
213 |
|| die "moving emacs executable failed" |
214 |
|
215 |
# move man pages to the correct place |
216 |
local m |
217 |
mv "${D}"/usr/share/man/man1/{emacs,${EMACS_SUFFIX}}.1 \ |
218 |
|| die "moving emacs man page failed" |
219 |
for m in ctags emacsclient etags; do |
220 |
mv "${D}"/usr/share/man/man1/${m}{,-${EMACS_SUFFIX}}.1 \ |
221 |
|| die "moving ${m} man page failed" |
222 |
done |
223 |
|
224 |
# move info dir to avoid collisions with the dir file generated by portage |
225 |
mv "${D}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
226 |
|| die "moving info dir failed" |
227 |
touch "${D}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
228 |
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
229 |
|
230 |
# avoid collision between slots, see bug #169033 e.g. |
231 |
rm "${D}"/usr/share/emacs/site-lisp/subdirs.el |
232 |
rm -rf "${D}"/var |
233 |
|
234 |
# remove unused <version>/site-lisp dir |
235 |
rm -rf "${D}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
236 |
|
237 |
local c=";;" |
238 |
if use source; then |
239 |
insinto /usr/share/emacs/${FULL_VERSION}/src |
240 |
# This is not meant to install all the source -- just the |
241 |
# C source you might find via find-function |
242 |
doins src/*.[ch] |
243 |
c="" |
244 |
fi |
245 |
|
246 |
sed 's/^X//' >"${T}/${SITEFILE}" <<-EOF |
247 |
X |
248 |
;;; ${PN}-${SLOT} site-lisp configuration |
249 |
X |
250 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
251 |
X ${c}(setq find-function-C-source-directory |
252 |
X ${c} "/usr/share/emacs/${FULL_VERSION}/src") |
253 |
X (let ((path (getenv "INFOPATH")) |
254 |
X (dir "/usr/share/info/${EMACS_SUFFIX}") |
255 |
X (re "\\\\\`/usr/share/info\\\\>")) |
256 |
X (and path |
257 |
X ;; move Emacs Info dir before anything else in /usr/share/info |
258 |
X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
259 |
X (while (and (cdr q) (not (string-match re (cadr q)))) |
260 |
X (setq q (cdr q))) |
261 |
X (setcdr q (cons dir (delete dir (cdr q)))) |
262 |
X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
263 |
EOF |
264 |
elisp-site-file-install "${T}/${SITEFILE}" || die |
265 |
|
266 |
dodoc AUTHORS BUGS CONTRIBUTE README |
267 |
} |
268 |
|
269 |
pkg_preinst() { |
270 |
# move Info dir file to correct name |
271 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
272 |
if [ -f "${D}"${infodir}/dir.orig ]; then |
273 |
mv "${D}"${infodir}/dir{.orig,} || die "moving info dir failed" |
274 |
elif [[ -d "${D}"${infodir} ]]; then |
275 |
# this should not happen in EAPI 4 |
276 |
ewarn "Regenerating Info directory index in ${infodir} ..." |
277 |
rm -f "${D}"${infodir}/dir{,.*} |
278 |
for f in "${D}"${infodir}/*; do |
279 |
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
280 |
install-info --info-dir="${D}"${infodir} "${f}" \ |
281 |
|| die "install-info failed" |
282 |
fi |
283 |
done |
284 |
fi |
285 |
} |
286 |
|
287 |
pkg_postinst() { |
288 |
elisp-site-regen |
289 |
eselect emacs update ifunset |
290 |
|
291 |
if use X; then |
292 |
elog "You need to install some fonts for Emacs." |
293 |
elog "Installing media-fonts/font-adobe-{75,100}dpi on the X server's" |
294 |
elog "machine would satisfy basic Emacs requirements under X11." |
295 |
elog |
296 |
fi |
297 |
|
298 |
elog "You can set the version to be started by /usr/bin/emacs through" |
299 |
elog "the Emacs eselect module, which also redirects man and info pages." |
300 |
elog "Therefore, several Emacs versions can be installed at the same time." |
301 |
elog "\"man emacs.eselect\" for details." |
302 |
} |
303 |
|
304 |
pkg_postrm() { |
305 |
elisp-site-regen |
306 |
eselect emacs update ifunset |
307 |
} |
308 |
|
309 |
|
310 |
|
311 |
1.1 app-editors/emacs/emacs-23.4-r8.ebuild |
312 |
|
313 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-23.4-r8.ebuild?rev=1.1&view=markup |
314 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-23.4-r8.ebuild?rev=1.1&content-type=text/plain |
315 |
|
316 |
Index: emacs-23.4-r8.ebuild |
317 |
=================================================================== |
318 |
# Copyright 1999-2014 Gentoo Foundation |
319 |
# Distributed under the terms of the GNU General Public License v2 |
320 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-23.4-r8.ebuild,v 1.1 2014/05/05 07:06:01 ulm Exp $ |
321 |
|
322 |
EAPI=5 |
323 |
WANT_AUTOMAKE="none" |
324 |
|
325 |
inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo |
326 |
|
327 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
328 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
329 |
SRC_URI="mirror://gnu/emacs/${P}.tar.bz2 |
330 |
http://dev.gentoo.org/~ulm/emacs/${P}-patches-10.tar.xz" |
331 |
|
332 |
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
333 |
SLOT="23" |
334 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
335 |
IUSE="alsa aqua athena dbus games gconf gif gpm gtk gzip-el hesiod jpeg kerberos livecd m17n-lib motif pax_kernel png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm" |
336 |
REQUIRED_USE="?? ( aqua X )" |
337 |
|
338 |
RDEPEND="sys-libs/ncurses |
339 |
>=app-admin/eselect-emacs-1.16 |
340 |
>=app-emacs/emacs-common-gentoo-1.4-r1[games?,X?] |
341 |
net-libs/liblockfile |
342 |
hesiod? ( net-dns/hesiod ) |
343 |
kerberos? ( virtual/krb5 ) |
344 |
alsa? ( media-libs/alsa-lib ) |
345 |
gpm? ( sys-libs/gpm ) |
346 |
dbus? ( sys-apps/dbus ) |
347 |
X? ( |
348 |
x11-libs/libXmu |
349 |
x11-libs/libXt |
350 |
x11-misc/xbitmaps |
351 |
gconf? ( >=gnome-base/gconf-2.26.2 ) |
352 |
gif? ( media-libs/giflib ) |
353 |
jpeg? ( virtual/jpeg:0= ) |
354 |
png? ( >=media-libs/libpng-1.4:0= ) |
355 |
svg? ( >=gnome-base/librsvg-2.0 ) |
356 |
tiff? ( media-libs/tiff ) |
357 |
xpm? ( x11-libs/libXpm ) |
358 |
xft? ( |
359 |
media-libs/fontconfig |
360 |
media-libs/freetype |
361 |
x11-libs/libXft |
362 |
m17n-lib? ( |
363 |
>=dev-libs/libotf-0.9.4 |
364 |
>=dev-libs/m17n-lib-1.5.1 |
365 |
) |
366 |
) |
367 |
gtk? ( x11-libs/gtk+:2 ) |
368 |
!gtk? ( |
369 |
motif? ( >=x11-libs/motif-2.3:0 ) |
370 |
!motif? ( |
371 |
Xaw3d? ( x11-libs/libXaw3d ) |
372 |
!Xaw3d? ( athena? ( x11-libs/libXaw ) ) |
373 |
) |
374 |
) |
375 |
)" |
376 |
|
377 |
DEPEND="${RDEPEND} |
378 |
alsa? ( virtual/pkgconfig ) |
379 |
dbus? ( virtual/pkgconfig ) |
380 |
X? ( virtual/pkgconfig ) |
381 |
gzip-el? ( app-arch/gzip ) |
382 |
pax_kernel? ( |
383 |
sys-apps/attr |
384 |
sys-apps/paxctl |
385 |
)" |
386 |
|
387 |
RDEPEND="${RDEPEND} |
388 |
!<app-editors/emacs-vcs-${PV}" |
389 |
|
390 |
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
391 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
392 |
# FULL_VERSION keeps the full version number, which is needed in |
393 |
# order to determine some path information correctly for copy/move |
394 |
# operations later on |
395 |
FULL_VERSION="${PV%%_*}" |
396 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
397 |
|
398 |
src_prepare() { |
399 |
EPATCH_SUFFIX=patch epatch |
400 |
epatch_user |
401 |
|
402 |
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ |
403 |
|| die "unable to sed ctags.1" |
404 |
|
405 |
if ! use alsa; then |
406 |
# ALSA is detected even if not requested by its USE flag. |
407 |
# Suppress it by supplying pkg-config with a wrong library name. |
408 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \ |
409 |
|| die "unable to sed configure.in" |
410 |
fi |
411 |
if ! use gzip-el; then |
412 |
# Emacs' build system automatically detects the gzip binary and |
413 |
# compresses el files. We don't want that so confuse it with a |
414 |
# wrong binary name |
415 |
sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \ |
416 |
|| die "unable to sed configure.in" |
417 |
fi |
418 |
|
419 |
eautoreconf |
420 |
} |
421 |
|
422 |
src_configure() { |
423 |
strip-flags |
424 |
filter-flags -fstrict-aliasing |
425 |
append-flags $(test-flags -fno-strict-aliasing) |
426 |
|
427 |
if use sh; then |
428 |
replace-flags "-O[1-9]" -O0 #262359 |
429 |
elif use ia64; then |
430 |
replace-flags "-O[2-9]" -O1 #325373 |
431 |
else |
432 |
replace-flags "-O[3-9]" -O2 |
433 |
fi |
434 |
|
435 |
local myconf |
436 |
|
437 |
if use alsa && ! use sound; then |
438 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
439 |
einfo "so sound is switched on anyway." |
440 |
myconf+=" --with-sound" |
441 |
else |
442 |
myconf+=" $(use_with sound)" |
443 |
fi |
444 |
|
445 |
if use X; then |
446 |
myconf+=" --with-x --without-ns" |
447 |
myconf+=" $(use_with gconf)" |
448 |
myconf+=" $(use_with toolkit-scroll-bars)" |
449 |
myconf+=" $(use_with gif)" |
450 |
myconf+=" $(use_with jpeg)" |
451 |
myconf+=" $(use_with png)" |
452 |
myconf+=" $(use_with svg rsvg)" |
453 |
myconf+=" $(use_with tiff)" |
454 |
myconf+=" $(use_with xpm)" |
455 |
|
456 |
if use xft; then |
457 |
myconf+=" --with-xft" |
458 |
myconf+=" $(use_with m17n-lib libotf)" |
459 |
myconf+=" $(use_with m17n-lib m17n-flt)" |
460 |
else |
461 |
myconf+=" --without-xft" |
462 |
myconf+=" --without-libotf --without-m17n-flt" |
463 |
use m17n-lib && ewarn \ |
464 |
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
465 |
fi |
466 |
|
467 |
# GTK+ is the default toolkit if USE=gtk is chosen with other |
468 |
# possibilities. Emacs upstream thinks this should be standard |
469 |
# policy on all distributions |
470 |
local f |
471 |
if use gtk; then |
472 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
473 |
myconf+=" --with-x-toolkit=gtk" |
474 |
for f in motif Xaw3d athena; do |
475 |
use ${f} && ewarn \ |
476 |
"USE flag \"${f}\" has no effect if \"gtk\" is set." |
477 |
done |
478 |
elif use motif; then |
479 |
einfo "Configuring to build with Motif toolkit" |
480 |
myconf+=" --with-x-toolkit=motif" |
481 |
for f in Xaw3d athena; do |
482 |
use ${f} && ewarn \ |
483 |
"USE flag \"${f}\" has no effect if \"motif\" is set." |
484 |
done |
485 |
elif use athena || use Xaw3d; then |
486 |
einfo "Configuring to build with Athena/Lucid toolkit" |
487 |
myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
488 |
else |
489 |
einfo "Configuring to build with no toolkit" |
490 |
myconf+=" --with-x-toolkit=no" |
491 |
fi |
492 |
elif use aqua; then |
493 |
einfo "Configuring to build with Nextstep (Cocoa) support" |
494 |
myconf+=" --with-ns --disable-ns-self-contained" |
495 |
myconf+=" --without-x" |
496 |
else |
497 |
myconf+=" --without-x --without-ns" |
498 |
fi |
499 |
|
500 |
# Save version information in the Emacs binary. It will be available |
501 |
# in variable "system-configuration-options". |
502 |
myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}" |
503 |
|
504 |
# According to configure, this option is only used for GNU/Linux |
505 |
# (x86_64 and s390). For Gentoo Prefix we have to explicitly spell |
506 |
# out the location because $(get_libdir) does not necessarily return |
507 |
# something that matches the host OS's libdir naming (e.g. RHEL). |
508 |
local crtdir=$($(tc-getCC) -print-file-name=crt1.o) |
509 |
crtdir=${crtdir%/*} |
510 |
|
511 |
econf \ |
512 |
--program-suffix="-${EMACS_SUFFIX}" \ |
513 |
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
514 |
--localstatedir="${EPREFIX}"/var \ |
515 |
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
516 |
--with-crt-dir="${crtdir}" \ |
517 |
--with-gameuser="${GAMES_USER_DED:-games}" \ |
518 |
$(use_with hesiod) \ |
519 |
$(use_with kerberos) $(use_with kerberos kerberos5) \ |
520 |
$(use_with gpm) \ |
521 |
$(use_with dbus) \ |
522 |
${myconf} |
523 |
} |
524 |
|
525 |
src_compile() { |
526 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
527 |
emake CC="$(tc-getCC)" \ |
528 |
AR="$(tc-getAR) cq" \ |
529 |
RANLIB="$(tc-getRANLIB)" |
530 |
} |
531 |
|
532 |
src_install () { |
533 |
emake DESTDIR="${D}" install |
534 |
|
535 |
rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \ |
536 |
|| die "removing duplicate emacs executable failed" |
537 |
mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \ |
538 |
|| die "moving emacs executable failed" |
539 |
|
540 |
# move man pages to the correct place |
541 |
local m |
542 |
mv "${ED}"/usr/share/man/man1/{emacs,${EMACS_SUFFIX}}.1 \ |
543 |
|| die "moving emacs man page failed" |
544 |
for m in b2m ctags ebrowse emacsclient etags grep-changelog rcs-checkin; do |
545 |
mv "${ED}"/usr/share/man/man1/${m}{,-${EMACS_SUFFIX}}.1 \ |
546 |
|| die "moving ${m} man page failed" |
547 |
done |
548 |
|
549 |
# move info dir to avoid collisions with the dir file generated by portage |
550 |
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
551 |
|| die "moving info dir failed" |
552 |
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
553 |
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
554 |
|
555 |
# avoid collision between slots, see bug #169033 e.g. |
556 |
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
557 |
rm -rf "${ED}"/usr/share/{applications,icons} |
558 |
rm -rf "${ED}"/var |
559 |
|
560 |
# remove unused <version>/site-lisp dir |
561 |
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
562 |
|
563 |
local cdir |
564 |
if use source; then |
565 |
cdir="/usr/share/emacs/${FULL_VERSION}/src" |
566 |
insinto "${cdir}" |
567 |
# This is not meant to install all the source -- just the |
568 |
# C source you might find via find-function |
569 |
doins src/*.{c,h,m} |
570 |
doins -r src/{m,s} |
571 |
rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/Makefile.c |
572 |
rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/{m,s}/README |
573 |
elif has installsources ${FEATURES}; then |
574 |
cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" |
575 |
fi |
576 |
|
577 |
sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF |
578 |
X |
579 |
;;; ${PN}-${SLOT} site-lisp configuration |
580 |
X |
581 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
582 |
Y (setq find-function-C-source-directory |
583 |
Y "${EPREFIX}${cdir}") |
584 |
X (let ((path (getenv "INFOPATH")) |
585 |
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
586 |
X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
587 |
X (and path |
588 |
X ;; move Emacs Info dir before anything else in /usr/share/info |
589 |
X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
590 |
X (while (and (cdr q) (not (string-match re (cadr q)))) |
591 |
X (setq q (cdr q))) |
592 |
X (setcdr q (cons dir (delete dir (cdr q)))) |
593 |
X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
594 |
EOF |
595 |
elisp-site-file-install "${T}/${SITEFILE}" || die |
596 |
|
597 |
dodoc README BUGS |
598 |
|
599 |
if use aqua; then |
600 |
dodir /Applications/Gentoo |
601 |
rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app |
602 |
mv nextstep/Emacs.app \ |
603 |
"${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die |
604 |
fi |
605 |
|
606 |
DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs |
607 |
through the Emacs eselect module, which also redirects man and info |
608 |
pages. Therefore, several Emacs versions can be installed at the |
609 |
same time. \"man emacs.eselect\" for details. |
610 |
\\n\\nIf you upgrade from a previous major version of Emacs, then |
611 |
it is strongly recommended that you use app-admin/emacs-updater |
612 |
to rebuild all byte-compiled elisp files of the installed Emacs |
613 |
packages." |
614 |
use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs. |
615 |
Installing media-fonts/font-adobe-{75,100}dpi on the X server's |
616 |
machine would satisfy basic Emacs requirements under X11. |
617 |
See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs |
618 |
for how to enable anti-aliased fonts." |
619 |
use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in |
620 |
\"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink |
621 |
it into /Applications by yourself." |
622 |
readme.gentoo_create_doc |
623 |
} |
624 |
|
625 |
pkg_preinst() { |
626 |
# move Info dir file to correct name |
627 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
628 |
if [[ -f ${ED}${infodir}/dir.orig ]]; then |
629 |
mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
630 |
elif [[ -d "${ED}"${infodir} ]]; then |
631 |
# this should not happen in EAPI 4 |
632 |
ewarn "Regenerating Info directory index in ${infodir} ..." |
633 |
rm -f "${ED}"${infodir}/dir{,.*} |
634 |
for f in "${ED}"${infodir}/*; do |
635 |
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
636 |
install-info --info-dir="${ED}"${infodir} "${f}" \ |
637 |
|| die "install-info failed" |
638 |
fi |
639 |
done |
640 |
fi |
641 |
} |
642 |
|
643 |
pkg_postinst() { |
644 |
elisp-site-regen |
645 |
readme.gentoo_print_elog |
646 |
|
647 |
if use livecd; then |
648 |
# force an update of the emacs symlink for the livecd/dvd, |
649 |
# because some microemacs packages set it with USE=livecd |
650 |
eselect emacs update |
651 |
elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then |
652 |
# refresh symlinks in case any installed files have changed |
653 |
eselect emacs set ${EMACS_SUFFIX} |
654 |
else |
655 |
eselect emacs update ifunset |
656 |
fi |
657 |
} |
658 |
|
659 |
pkg_postrm() { |
660 |
elisp-site-regen |
661 |
eselect emacs update ifunset |
662 |
} |
663 |
|
664 |
|
665 |
|
666 |
1.1 app-editors/emacs/emacs-24.3-r4.ebuild |
667 |
|
668 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-24.3-r4.ebuild?rev=1.1&view=markup |
669 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-24.3-r4.ebuild?rev=1.1&content-type=text/plain |
670 |
|
671 |
Index: emacs-24.3-r4.ebuild |
672 |
=================================================================== |
673 |
# Copyright 1999-2014 Gentoo Foundation |
674 |
# Distributed under the terms of the GNU General Public License v2 |
675 |
# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-24.3-r4.ebuild,v 1.1 2014/05/05 07:06:01 ulm Exp $ |
676 |
|
677 |
EAPI=5 |
678 |
|
679 |
inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo |
680 |
|
681 |
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor" |
682 |
HOMEPAGE="http://www.gnu.org/software/emacs/" |
683 |
SRC_URI="mirror://gnu/emacs/${P}.tar.xz |
684 |
http://dev.gentoo.org/~ulm/emacs/${P}-patches-5.tar.xz" |
685 |
|
686 |
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2" |
687 |
SLOT="24" |
688 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
689 |
IUSE="alsa aqua athena dbus games gconf gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm" |
690 |
REQUIRED_USE="?? ( aqua X )" |
691 |
|
692 |
RDEPEND="sys-libs/ncurses |
693 |
>=app-admin/eselect-emacs-1.16 |
694 |
>=app-emacs/emacs-common-gentoo-1.4-r1[games?,X?] |
695 |
net-libs/liblockfile |
696 |
hesiod? ( net-dns/hesiod ) |
697 |
kerberos? ( virtual/krb5 ) |
698 |
alsa? ( media-libs/alsa-lib ) |
699 |
gpm? ( sys-libs/gpm ) |
700 |
dbus? ( sys-apps/dbus ) |
701 |
gnutls? ( net-libs/gnutls ) |
702 |
libxml2? ( >=dev-libs/libxml2-2.2.0 ) |
703 |
selinux? ( sys-libs/libselinux ) |
704 |
X? ( |
705 |
x11-libs/libXmu |
706 |
x11-libs/libXt |
707 |
x11-misc/xbitmaps |
708 |
gconf? ( >=gnome-base/gconf-2.26.2 ) |
709 |
gsettings? ( >=dev-libs/glib-2.28.6 ) |
710 |
gif? ( media-libs/giflib ) |
711 |
jpeg? ( virtual/jpeg:0= ) |
712 |
png? ( >=media-libs/libpng-1.4:0= ) |
713 |
svg? ( >=gnome-base/librsvg-2.0 ) |
714 |
tiff? ( media-libs/tiff ) |
715 |
xpm? ( x11-libs/libXpm ) |
716 |
imagemagick? ( >=media-gfx/imagemagick-6.6.2 ) |
717 |
xft? ( |
718 |
media-libs/fontconfig |
719 |
media-libs/freetype |
720 |
x11-libs/libXft |
721 |
m17n-lib? ( |
722 |
>=dev-libs/libotf-0.9.4 |
723 |
>=dev-libs/m17n-lib-1.5.1 |
724 |
) |
725 |
) |
726 |
gtk? ( |
727 |
gtk3? ( x11-libs/gtk+:3 ) |
728 |
!gtk3? ( x11-libs/gtk+:2 ) |
729 |
) |
730 |
!gtk? ( |
731 |
motif? ( >=x11-libs/motif-2.3:0 ) |
732 |
!motif? ( |
733 |
Xaw3d? ( x11-libs/libXaw3d ) |
734 |
!Xaw3d? ( athena? ( x11-libs/libXaw ) ) |
735 |
) |
736 |
) |
737 |
)" |
738 |
|
739 |
DEPEND="${RDEPEND} |
740 |
app-arch/xz-utils |
741 |
alsa? ( virtual/pkgconfig ) |
742 |
dbus? ( virtual/pkgconfig ) |
743 |
gnutls? ( virtual/pkgconfig ) |
744 |
libxml2? ( virtual/pkgconfig ) |
745 |
X? ( virtual/pkgconfig ) |
746 |
gzip-el? ( app-arch/gzip ) |
747 |
pax_kernel? ( |
748 |
sys-apps/attr |
749 |
sys-apps/paxctl |
750 |
)" |
751 |
|
752 |
RDEPEND="${RDEPEND} |
753 |
!<app-editors/emacs-vcs-${PV}" |
754 |
|
755 |
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}" |
756 |
SITEFILE="20${PN}-${SLOT}-gentoo.el" |
757 |
# FULL_VERSION keeps the full version number, which is needed in |
758 |
# order to determine some path information correctly for copy/move |
759 |
# operations later on |
760 |
FULL_VERSION="${PV%%_*}" |
761 |
S="${WORKDIR}/emacs-${FULL_VERSION}" |
762 |
|
763 |
src_prepare() { |
764 |
EPATCH_SUFFIX=patch epatch |
765 |
epatch_user |
766 |
|
767 |
sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \ |
768 |
|| die "unable to sed ctags.1" |
769 |
|
770 |
if ! use alsa; then |
771 |
# ALSA is detected even if not requested by its USE flag. |
772 |
# Suppress it by supplying pkg-config with a wrong library name. |
773 |
sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.ac \ |
774 |
|| die "unable to sed configure.ac" |
775 |
fi |
776 |
if ! use gzip-el; then |
777 |
# Emacs' build system automatically detects the gzip binary and |
778 |
# compresses el files. We don't want that so confuse it with a |
779 |
# wrong binary name |
780 |
sed -i -e "/AC_PATH_PROG/s/gzip/PrEvEnTcOmPrEsSiOn/" configure.ac \ |
781 |
|| die "unable to sed configure.ac" |
782 |
fi |
783 |
|
784 |
AT_M4DIR=m4 eautoreconf |
785 |
} |
786 |
|
787 |
src_configure() { |
788 |
strip-flags |
789 |
|
790 |
if use sh; then |
791 |
replace-flags "-O[1-9]" -O0 #262359 |
792 |
elif use ia64; then |
793 |
replace-flags "-O[2-9]" -O1 #325373 |
794 |
else |
795 |
replace-flags "-O[3-9]" -O2 |
796 |
fi |
797 |
|
798 |
local myconf |
799 |
|
800 |
if use alsa && ! use sound; then |
801 |
einfo "Although sound USE flag is disabled you chose to have alsa," |
802 |
einfo "so sound is switched on anyway." |
803 |
myconf+=" --with-sound" |
804 |
else |
805 |
myconf+=" $(use_with sound)" |
806 |
fi |
807 |
|
808 |
if use X; then |
809 |
myconf+=" --with-x --without-ns" |
810 |
myconf+=" $(use_with gconf)" |
811 |
myconf+=" $(use_with gsettings)" |
812 |
myconf+=" $(use_with toolkit-scroll-bars)" |
813 |
myconf+=" $(use_with gif)" |
814 |
myconf+=" $(use_with jpeg)" |
815 |
myconf+=" $(use_with png)" |
816 |
myconf+=" $(use_with svg rsvg)" |
817 |
myconf+=" $(use_with tiff)" |
818 |
myconf+=" $(use_with xpm)" |
819 |
myconf+=" $(use_with imagemagick)" |
820 |
|
821 |
if use xft; then |
822 |
myconf+=" --with-xft" |
823 |
myconf+=" $(use_with m17n-lib libotf)" |
824 |
myconf+=" $(use_with m17n-lib m17n-flt)" |
825 |
else |
826 |
myconf+=" --without-xft" |
827 |
myconf+=" --without-libotf --without-m17n-flt" |
828 |
use m17n-lib && ewarn \ |
829 |
"USE flag \"m17n-lib\" has no effect if \"xft\" is not set." |
830 |
fi |
831 |
|
832 |
local f |
833 |
if use gtk; then |
834 |
einfo "Configuring to build with GIMP Toolkit (GTK+)" |
835 |
myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)" |
836 |
for f in motif Xaw3d athena; do |
837 |
use ${f} && ewarn \ |
838 |
"USE flag \"${f}\" has no effect if \"gtk\" is set." |
839 |
done |
840 |
elif use motif; then |
841 |
einfo "Configuring to build with Motif toolkit" |
842 |
myconf+=" --with-x-toolkit=motif" |
843 |
for f in Xaw3d athena; do |
844 |
use ${f} && ewarn \ |
845 |
"USE flag \"${f}\" has no effect if \"motif\" is set." |
846 |
done |
847 |
elif use athena || use Xaw3d; then |
848 |
einfo "Configuring to build with Athena/Lucid toolkit" |
849 |
myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)" |
850 |
else |
851 |
einfo "Configuring to build with no toolkit" |
852 |
myconf+=" --with-x-toolkit=no" |
853 |
fi |
854 |
elif use aqua; then |
855 |
einfo "Configuring to build with Nextstep (Cocoa) support" |
856 |
myconf+=" --with-ns --disable-ns-self-contained" |
857 |
myconf+=" --without-x" |
858 |
else |
859 |
myconf+=" --without-x --without-ns" |
860 |
fi |
861 |
|
862 |
# Save version information in the Emacs binary. It will be available |
863 |
# in variable "system-configuration-options". |
864 |
myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}" |
865 |
|
866 |
# According to configure, this option is only used for GNU/Linux |
867 |
# (x86_64 and s390). For Gentoo Prefix we have to explicitly spell |
868 |
# out the location because $(get_libdir) does not necessarily return |
869 |
# something that matches the host OS's libdir naming (e.g. RHEL). |
870 |
local crtdir=$($(tc-getCC) -print-file-name=crt1.o) |
871 |
crtdir=${crtdir%/*} |
872 |
|
873 |
econf \ |
874 |
--program-suffix="-${EMACS_SUFFIX}" \ |
875 |
--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \ |
876 |
--localstatedir="${EPREFIX}"/var \ |
877 |
--enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \ |
878 |
--with-crt-dir="${crtdir}" \ |
879 |
--with-gameuser="${GAMES_USER_DED:-games}" \ |
880 |
--without-compress-info \ |
881 |
$(use_with hesiod) \ |
882 |
$(use_with kerberos) $(use_with kerberos kerberos5) \ |
883 |
$(use_with gpm) \ |
884 |
$(use_with dbus) \ |
885 |
$(use_with gnutls) \ |
886 |
$(use_with libxml2 xml2) \ |
887 |
$(use_with selinux) \ |
888 |
$(use_with wide-int) \ |
889 |
${myconf} |
890 |
} |
891 |
|
892 |
src_compile() { |
893 |
export SANDBOX_ON=0 # for the unbelievers, see Bug #131505 |
894 |
emake |
895 |
} |
896 |
|
897 |
src_install () { |
898 |
emake DESTDIR="${D}" NO_BIN_LINK=t install |
899 |
|
900 |
mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \ |
901 |
|| die "moving emacs executable failed" |
902 |
mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \ |
903 |
|| die "moving emacs man page failed" |
904 |
|
905 |
# move info dir to avoid collisions with the dir file generated by portage |
906 |
mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \ |
907 |
|| die "moving info dir failed" |
908 |
touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir |
909 |
docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig |
910 |
|
911 |
# avoid collision between slots, see bug #169033 e.g. |
912 |
rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el |
913 |
rm -rf "${ED}"/usr/share/{applications,icons} |
914 |
rm -rf "${ED}"/var |
915 |
|
916 |
# remove unused <version>/site-lisp dir |
917 |
rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp |
918 |
|
919 |
local cdir |
920 |
if use source; then |
921 |
cdir="/usr/share/emacs/${FULL_VERSION}/src" |
922 |
insinto "${cdir}" |
923 |
# This is not meant to install all the source -- just the |
924 |
# C source you might find via find-function |
925 |
doins src/*.{c,h,m} |
926 |
elif has installsources ${FEATURES}; then |
927 |
cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src" |
928 |
fi |
929 |
|
930 |
sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF |
931 |
X |
932 |
;;; ${PN}-${SLOT} site-lisp configuration |
933 |
X |
934 |
(when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version) |
935 |
Y (setq find-function-C-source-directory |
936 |
Y "${EPREFIX}${cdir}") |
937 |
X (let ((path (getenv "INFOPATH")) |
938 |
X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}") |
939 |
X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>")) |
940 |
X (and path |
941 |
X ;; move Emacs Info dir before anything else in /usr/share/info |
942 |
X (let* ((p (cons nil (split-string path ":" t))) (q p)) |
943 |
X (while (and (cdr q) (not (string-match re (cadr q)))) |
944 |
X (setq q (cdr q))) |
945 |
X (setcdr q (cons dir (delete dir (cdr q)))) |
946 |
X (setq Info-directory-list (prune-directory-list (cdr p))))))) |
947 |
EOF |
948 |
elisp-site-file-install "${T}/${SITEFILE}" || die |
949 |
|
950 |
dodoc README BUGS |
951 |
|
952 |
if use aqua; then |
953 |
dodir /Applications/Gentoo |
954 |
rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app |
955 |
mv nextstep/Emacs.app \ |
956 |
"${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die |
957 |
fi |
958 |
|
959 |
DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs |
960 |
through the Emacs eselect module, which also redirects man and info |
961 |
pages. Therefore, several Emacs versions can be installed at the |
962 |
same time. \"man emacs.eselect\" for details. |
963 |
\\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is |
964 |
strongly recommended that you use app-admin/emacs-updater to rebuild |
965 |
all byte-compiled elisp files of the installed Emacs packages." |
966 |
use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs. |
967 |
Installing media-fonts/font-adobe-{75,100}dpi on the X server's |
968 |
machine would satisfy basic Emacs requirements under X11. |
969 |
See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs |
970 |
for how to enable anti-aliased fonts." |
971 |
use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in |
972 |
\"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink |
973 |
it into /Applications by yourself." |
974 |
readme.gentoo_create_doc |
975 |
} |
976 |
|
977 |
pkg_preinst() { |
978 |
# move Info dir file to correct name |
979 |
local infodir=/usr/share/info/${EMACS_SUFFIX} f |
980 |
if [[ -f ${ED}${infodir}/dir.orig ]]; then |
981 |
mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed" |
982 |
elif [[ -d "${ED}"${infodir} ]]; then |
983 |
# this should not happen in EAPI 4 |
984 |
ewarn "Regenerating Info directory index in ${infodir} ..." |
985 |
rm -f "${ED}"${infodir}/dir{,.*} |
986 |
for f in "${ED}"${infodir}/*; do |
987 |
if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then |
988 |
install-info --info-dir="${ED}"${infodir} "${f}" \ |
989 |
|| die "install-info failed" |
990 |
fi |
991 |
done |
992 |
fi |
993 |
} |
994 |
|
995 |
pkg_postinst() { |
996 |
elisp-site-regen |
997 |
|
998 |
local pvr |
999 |
for pvr in ${REPLACING_VERSIONS}; do |
1000 |
[[ ${pvr%%[-_]*} = 24.[12] ]] && FORCE_PRINT_ELOG=1 |
1001 |
done |
1002 |
readme.gentoo_print_elog |
1003 |
|
1004 |
if use livecd; then |
1005 |
# force an update of the emacs symlink for the livecd/dvd, |
1006 |
# because some microemacs packages set it with USE=livecd |
1007 |
eselect emacs update |
1008 |
elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then |
1009 |
# refresh symlinks in case any installed files have changed |
1010 |
eselect emacs set ${EMACS_SUFFIX} |
1011 |
else |
1012 |
eselect emacs update ifunset |
1013 |
fi |
1014 |
} |
1015 |
|
1016 |
pkg_postrm() { |
1017 |
elisp-site-regen |
1018 |
eselect emacs update ifunset |
1019 |
} |