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-editors/emacs-vcs: emacs-vcs-25.0.50_pre20150630.ebuild ChangeLog emacs-vcs-25.0.50_pre20150531.ebuild emacs-vcs-25.0.9999-r1.ebuild emacs-vcs-25.0.50_pre20150228.ebuild emacs-vcs-25.0.50_pre20150131.ebuild
Date: Thu, 02 Jul 2015 16:22:20
Message-Id: 20150702162210.4DCCC74C@oystercatcher.gentoo.org
1 ulm 15/07/02 16:22:10
2
3 Modified: ChangeLog emacs-vcs-25.0.50_pre20150531.ebuild
4 emacs-vcs-25.0.9999-r1.ebuild
5 Added: emacs-vcs-25.0.50_pre20150630.ebuild
6 Removed: emacs-vcs-25.0.50_pre20150228.ebuild
7 emacs-vcs-25.0.50_pre20150131.ebuild
8 Log:
9 New snapshot. New USE flag for cairo. Remove old.
10
11 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)
12
13 Revision Changes Path
14 1.197 app-editors/emacs-vcs/ChangeLog
15
16 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.197&view=markup
17 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?rev=1.197&content-type=text/plain
18 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/ChangeLog?r1=1.196&r2=1.197
19
20 Index: ChangeLog
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v
23 retrieving revision 1.196
24 retrieving revision 1.197
25 diff -u -r1.196 -r1.197
26 --- ChangeLog 2 Jul 2015 16:16:47 -0000 1.196
27 +++ ChangeLog 2 Jul 2015 16:22:10 -0000 1.197
28 @@ -1,6 +1,14 @@
29 # ChangeLog for app-editors/emacs-vcs
30 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
31 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.196 2015/07/02 16:16:47 ulm Exp $
32 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/ChangeLog,v 1.197 2015/07/02 16:22:10 ulm Exp $
33 +
34 +*emacs-vcs-25.0.50_pre20150630 (02 Jul 2015)
35 +
36 + 02 Jul 2015; Ulrich Müller <ulm@g.o>
37 + -emacs-vcs-25.0.50_pre20150131.ebuild, -emacs-vcs-25.0.50_pre20150228.ebuild,
38 + emacs-vcs-25.0.50_pre20150531.ebuild, +emacs-vcs-25.0.50_pre20150630.ebuild,
39 + emacs-vcs-25.0.9999-r1.ebuild:
40 + New snapshot. New USE flag for cairo. Remove old.
41
42 02 Jul 2015; Ulrich Müller <ulm@g.o> emacs-vcs-24.5.9999.ebuild,
43 emacs-vcs-25.0.9999-r1.ebuild:
44
45
46
47 1.2 app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150531.ebuild
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150531.ebuild?rev=1.2&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150531.ebuild?rev=1.2&content-type=text/plain
51 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150531.ebuild?r1=1.1&r2=1.2
52
53 Index: emacs-vcs-25.0.50_pre20150531.ebuild
54 ===================================================================
55 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150531.ebuild,v
56 retrieving revision 1.1
57 retrieving revision 1.2
58 diff -u -r1.1 -r1.2
59 --- emacs-vcs-25.0.50_pre20150531.ebuild 1 Jun 2015 06:31:50 -0000 1.1
60 +++ emacs-vcs-25.0.50_pre20150531.ebuild 2 Jul 2015 16:22:10 -0000 1.2
61 @@ -1,6 +1,6 @@
62 # Copyright 1999-2015 Gentoo Foundation
63 # Distributed under the terms of the GNU General Public License v2
64 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150531.ebuild,v 1.1 2015/06/01 06:31:50 ulm Exp $
65 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150531.ebuild,v 1.2 2015/07/02 16:22:10 ulm Exp $
66
67 EAPI=5
68
69 @@ -29,7 +29,7 @@
70
71 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
72 SLOT="25"
73 -IUSE="acl alsa aqua athena dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
74 +IUSE="acl alsa aqua athena cairo dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
75 REQUIRED_USE="?? ( aqua X )"
76
77 RDEPEND="sys-libs/ncurses
78 @@ -51,6 +51,7 @@
79 x11-libs/libXmu
80 x11-libs/libXt
81 x11-misc/xbitmaps
82 + cairo? ( >=x11-libs/cairo-1.12.18 )
83 gconf? ( >=gnome-base/gconf-2.26.2 )
84 gsettings? ( >=dev-libs/glib-2.28.6 )
85 gif? ( media-libs/giflib )
86 @@ -143,6 +144,7 @@
87
88 if use X; then
89 myconf+=" --with-x --without-ns"
90 + myconf+=" $(use_with cairo)"
91 myconf+=" $(use_with gconf)"
92 myconf+=" $(use_with gsettings)"
93 myconf+=" $(use_with toolkit-scroll-bars)"
94 @@ -168,6 +170,15 @@
95 local f
96 if use gtk; then
97 einfo "Configuring to build with GIMP Toolkit (GTK+)"
98 + while read line; do ewarn "${line}"; done <<-EOF
99 + Your version of GTK+ will have problems with closing open
100 + displays. This is no problem if you just use one display, but
101 + if you use more than one and close one of them Emacs may crash.
102 + See <http://bugzilla.gnome.org/show_bug.cgi?id=85715>.
103 + If you intend to use more than one display, then it is strongly
104 + recommended that you compile Emacs with the Athena/Lucid or the
105 + Motif toolkit instead.
106 + EOF
107 myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)"
108 for f in motif Xaw3d athena; do
109 use ${f} && ewarn \
110
111
112
113 1.9 app-editors/emacs-vcs/emacs-vcs-25.0.9999-r1.ebuild
114
115 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.9999-r1.ebuild?rev=1.9&view=markup
116 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.9999-r1.ebuild?rev=1.9&content-type=text/plain
117 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.9999-r1.ebuild?r1=1.8&r2=1.9
118
119 Index: emacs-vcs-25.0.9999-r1.ebuild
120 ===================================================================
121 RCS file: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.9999-r1.ebuild,v
122 retrieving revision 1.8
123 retrieving revision 1.9
124 diff -u -r1.8 -r1.9
125 --- emacs-vcs-25.0.9999-r1.ebuild 2 Jul 2015 16:16:47 -0000 1.8
126 +++ emacs-vcs-25.0.9999-r1.ebuild 2 Jul 2015 16:22:10 -0000 1.9
127 @@ -1,6 +1,6 @@
128 # Copyright 1999-2015 Gentoo Foundation
129 # Distributed under the terms of the GNU General Public License v2
130 -# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.9999-r1.ebuild,v 1.8 2015/07/02 16:16:47 ulm Exp $
131 +# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.9999-r1.ebuild,v 1.9 2015/07/02 16:22:10 ulm Exp $
132
133 EAPI=5
134
135 @@ -29,7 +29,7 @@
136
137 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
138 SLOT="25"
139 -IUSE="acl alsa aqua athena dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
140 +IUSE="acl alsa aqua athena cairo dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
141 REQUIRED_USE="?? ( aqua X )"
142
143 RDEPEND="sys-libs/ncurses
144 @@ -51,6 +51,7 @@
145 x11-libs/libXmu
146 x11-libs/libXt
147 x11-misc/xbitmaps
148 + cairo? ( >=x11-libs/cairo-1.12.18 )
149 gconf? ( >=gnome-base/gconf-2.26.2 )
150 gsettings? ( >=dev-libs/glib-2.28.6 )
151 gif? ( media-libs/giflib )
152 @@ -143,6 +144,7 @@
153
154 if use X; then
155 myconf+=" --with-x --without-ns"
156 + myconf+=" $(use_with cairo)"
157 myconf+=" $(use_with gconf)"
158 myconf+=" $(use_with gsettings)"
159 myconf+=" $(use_with toolkit-scroll-bars)"
160
161
162
163 1.1 app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150630.ebuild
164
165 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150630.ebuild?rev=1.1&view=markup
166 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150630.ebuild?rev=1.1&content-type=text/plain
167
168 Index: emacs-vcs-25.0.50_pre20150630.ebuild
169 ===================================================================
170 # Copyright 1999-2015 Gentoo Foundation
171 # Distributed under the terms of the GNU General Public License v2
172 # $Header: /var/cvsroot/gentoo-x86/app-editors/emacs-vcs/emacs-vcs-25.0.50_pre20150630.ebuild,v 1.1 2015/07/02 16:22:10 ulm Exp $
173
174 EAPI=5
175
176 inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo
177
178 if [[ ${PV##*.} = 9999 ]]; then
179 inherit git-r3
180 EGIT_REPO_URI="git://git.sv.gnu.org/emacs.git"
181 EGIT_BRANCH="master"
182 EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
183 S="${EGIT_CHECKOUT_DIR}"
184 else
185 SRC_URI="http://dev.gentoo.org/~ulm/distfiles/emacs-${PV}.tar.xz
186 mirror://gnu-alpha/emacs/pretest/emacs-${PV}.tar.xz"
187 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
188 # FULL_VERSION keeps the full version number, which is needed in
189 # order to determine some path information correctly for copy/move
190 # operations later on
191 FULL_VERSION="${PV%%_*}"
192 #S="${WORKDIR}/emacs-${FULL_VERSION}"
193 S="${WORKDIR}/emacs"
194 fi
195
196 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
197 HOMEPAGE="http://www.gnu.org/software/emacs/"
198
199 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
200 SLOT="25"
201 IUSE="acl alsa aqua athena cairo dbus games gconf gfile gif gnutls gpm gsettings gtk +gtk3 gzip-el hesiod imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif pax_kernel png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
202 REQUIRED_USE="?? ( aqua X )"
203
204 RDEPEND="sys-libs/ncurses
205 >=app-eselect/eselect-emacs-1.16
206 >=app-emacs/emacs-common-gentoo-1.5[games?,X?]
207 net-libs/liblockfile
208 acl? ( virtual/acl )
209 alsa? ( media-libs/alsa-lib )
210 dbus? ( sys-apps/dbus )
211 gfile? ( >=dev-libs/glib-2.28.6 )
212 gnutls? ( net-libs/gnutls )
213 gpm? ( sys-libs/gpm )
214 hesiod? ( net-dns/hesiod )
215 kerberos? ( virtual/krb5 )
216 libxml2? ( >=dev-libs/libxml2-2.2.0 )
217 selinux? ( sys-libs/libselinux )
218 zlib? ( sys-libs/zlib )
219 X? (
220 x11-libs/libXmu
221 x11-libs/libXt
222 x11-misc/xbitmaps
223 cairo? ( >=x11-libs/cairo-1.12.18 )
224 gconf? ( >=gnome-base/gconf-2.26.2 )
225 gsettings? ( >=dev-libs/glib-2.28.6 )
226 gif? ( media-libs/giflib )
227 jpeg? ( virtual/jpeg:0= )
228 png? ( >=media-libs/libpng-1.4:0= )
229 svg? ( >=gnome-base/librsvg-2.0 )
230 tiff? ( media-libs/tiff:0 )
231 xpm? ( x11-libs/libXpm )
232 imagemagick? ( >=media-gfx/imagemagick-6.6.2 )
233 xft? (
234 media-libs/fontconfig
235 media-libs/freetype
236 x11-libs/libXft
237 m17n-lib? (
238 >=dev-libs/libotf-0.9.4
239 >=dev-libs/m17n-lib-1.5.1
240 )
241 )
242 gtk? (
243 gtk3? ( x11-libs/gtk+:3 )
244 !gtk3? ( x11-libs/gtk+:2 )
245 )
246 !gtk? (
247 motif? ( >=x11-libs/motif-2.3:0 )
248 !motif? (
249 Xaw3d? ( x11-libs/libXaw3d )
250 !Xaw3d? ( athena? ( x11-libs/libXaw ) )
251 )
252 )
253 )"
254
255 DEPEND="${RDEPEND}
256 virtual/pkgconfig
257 gzip-el? ( app-arch/gzip )
258 pax_kernel? (
259 sys-apps/attr
260 sys-apps/paxctl
261 )"
262
263 if [[ ${PV##*.} = 9999 ]]; then
264 DEPEND="${DEPEND}
265 sys-apps/texinfo"
266 fi
267
268 EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
269 SITEFILE="20${PN}-${SLOT}-gentoo.el"
270
271 src_prepare() {
272 if [[ ${PV##*.} = 9999 ]]; then
273 FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
274 configure.ac)
275 [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
276 einfo "Emacs branch: ${EGIT_BRANCH}"
277 einfo "Commit: ${EGIT_VERSION}"
278 einfo "Emacs version number: ${FULL_VERSION}"
279 [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
280 || die "Upstream version number changed to ${FULL_VERSION}"
281 fi
282
283 epatch_user
284
285 # Fix filename reference in redirected man page
286 sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
287 || die "unable to sed ctags.1"
288
289 AT_M4DIR=m4 eautoreconf
290 }
291
292 src_configure() {
293 strip-flags
294 filter-flags -pie #526948
295
296 if use sh; then
297 replace-flags "-O[1-9]" -O0 #262359
298 elif use ia64; then
299 replace-flags "-O[2-9]" -O1 #325373
300 else
301 replace-flags "-O[3-9]" -O2
302 fi
303
304 local myconf
305
306 if use alsa; then
307 use sound || ewarn \
308 "USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
309 myconf+=" --with-sound=alsa"
310 else
311 myconf+=" --with-sound=$(usex sound oss)"
312 fi
313
314 if use X; then
315 myconf+=" --with-x --without-ns"
316 myconf+=" $(use_with cairo)"
317 myconf+=" $(use_with gconf)"
318 myconf+=" $(use_with gsettings)"
319 myconf+=" $(use_with toolkit-scroll-bars)"
320 myconf+=" $(use_with gif)"
321 myconf+=" $(use_with jpeg)"
322 myconf+=" $(use_with png)"
323 myconf+=" $(use_with svg rsvg)"
324 myconf+=" $(use_with tiff)"
325 myconf+=" $(use_with xpm)"
326 myconf+=" $(use_with imagemagick)"
327
328 if use xft; then
329 myconf+=" --with-xft"
330 myconf+=" $(use_with m17n-lib libotf)"
331 myconf+=" $(use_with m17n-lib m17n-flt)"
332 else
333 myconf+=" --without-xft"
334 myconf+=" --without-libotf --without-m17n-flt"
335 use m17n-lib && ewarn \
336 "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
337 fi
338
339 local f
340 if use gtk; then
341 einfo "Configuring to build with GIMP Toolkit (GTK+)"
342 while read line; do ewarn "${line}"; done <<-EOF
343 Your version of GTK+ will have problems with closing open
344 displays. This is no problem if you just use one display, but
345 if you use more than one and close one of them Emacs may crash.
346 See <http://bugzilla.gnome.org/show_bug.cgi?id=85715>.
347 If you intend to use more than one display, then it is strongly
348 recommended that you compile Emacs with the Athena/Lucid or the
349 Motif toolkit instead.
350 EOF
351 myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)"
352 for f in motif Xaw3d athena; do
353 use ${f} && ewarn \
354 "USE flag \"${f}\" has no effect if \"gtk\" is set."
355 done
356 elif use motif; then
357 einfo "Configuring to build with Motif toolkit"
358 myconf+=" --with-x-toolkit=motif"
359 for f in Xaw3d athena; do
360 use ${f} && ewarn \
361 "USE flag \"${f}\" has no effect if \"motif\" is set."
362 done
363 elif use athena || use Xaw3d; then
364 einfo "Configuring to build with Athena/Lucid toolkit"
365 myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
366 else
367 einfo "Configuring to build with no toolkit"
368 myconf+=" --with-x-toolkit=no"
369 fi
370 elif use aqua; then
371 einfo "Configuring to build with Nextstep (Cocoa) support"
372 myconf+=" --with-ns --disable-ns-self-contained"
373 myconf+=" --without-x"
374 else
375 myconf+=" --without-x --without-ns"
376 fi
377
378 # Save version information in the Emacs binary. It will be available
379 # in variable "system-configuration-options".
380 myconf+=" GENTOO_PACKAGE=${CATEGORY}/${PF}"
381 if [[ ${PV##*.} = 9999 ]]; then
382 myconf+=" EGIT_BRANCH=${EGIT_BRANCH} EGIT_VERSION=${EGIT_VERSION}"
383 fi
384
385 econf \
386 --program-suffix="-${EMACS_SUFFIX}" \
387 --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
388 --localstatedir="${EPREFIX}"/var \
389 --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
390 --with-gameuser=":gamestat" \
391 --without-compress-install \
392 --with-file-notification=$(usev gfile || usev inotify || echo no) \
393 $(use_enable acl) \
394 $(use_with dbus) \
395 $(use_with gnutls) \
396 $(use_with gpm) \
397 $(use_with hesiod) \
398 $(use_with kerberos) $(use_with kerberos kerberos5) \
399 $(use_with libxml2 xml2) \
400 $(use_with selinux) \
401 $(use_with wide-int) \
402 $(use_with zlib) \
403 ${myconf}
404 }
405
406 src_compile() {
407 export SANDBOX_ON=0 # for the unbelievers, see Bug #131505
408 emake
409 }
410
411 src_install () {
412 emake DESTDIR="${D}" NO_BIN_LINK=t install
413
414 mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \
415 || die "moving emacs executable failed"
416 mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \
417 || die "moving emacs man page failed"
418
419 # move info dir to avoid collisions with the dir file generated by portage
420 mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
421 || die "moving info dir failed"
422 touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
423 docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
424
425 # avoid collision between slots, see bug #169033 e.g.
426 rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
427 rm -rf "${ED}"/usr/share/{appdata,applications,icons}
428 rm -rf "${ED}"/var
429
430 # remove unused <version>/site-lisp dir
431 rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
432
433 # remove COPYING file (except for etc/COPYING used by describe-copying)
434 rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
435
436 if use gzip-el; then
437 # compress .el files when a corresponding .elc exists
438 find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
439 -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
440 assert "gzip .el failed"
441 fi
442
443 local cdir
444 if use source; then
445 cdir="/usr/share/emacs/${FULL_VERSION}/src"
446 insinto "${cdir}"
447 # This is not meant to install all the source -- just the
448 # C source you might find via find-function
449 doins src/*.{c,h,m}
450 elif has installsources ${FEATURES}; then
451 cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
452 fi
453
454 sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF
455 X
456 ;;; ${PN}-${SLOT} site-lisp configuration
457 X
458 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
459 Y (setq find-function-C-source-directory
460 Y "${EPREFIX}${cdir}")
461 X (let ((path (getenv "INFOPATH"))
462 X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
463 X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
464 X (and path
465 X ;; move Emacs Info dir before anything else in /usr/share/info
466 X (let* ((p (cons nil (split-string path ":" t))) (q p))
467 X (while (and (cdr q) (not (string-match re (cadr q))))
468 X (setq q (cdr q)))
469 X (setcdr q (cons dir (delete dir (cdr q))))
470 X (setq Info-directory-list (prune-directory-list (cdr p)))))))
471 EOF
472 elisp-site-file-install "${T}/${SITEFILE}" || die
473
474 dodoc README BUGS CONTRIBUTE
475
476 if use aqua; then
477 dodir /Applications/Gentoo
478 rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app
479 mv nextstep/Emacs.app \
480 "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die
481 fi
482
483 DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs
484 through the Emacs eselect module, which also redirects man and info
485 pages. Therefore, several Emacs versions can be installed at the
486 same time. \"man emacs.eselect\" for details.
487 \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is
488 strongly recommended that you use app-admin/emacs-updater to rebuild
489 all byte-compiled elisp files of the installed Emacs packages."
490 use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
491 Installing media-fonts/font-adobe-{75,100}dpi on the X server's
492 machine would satisfy basic Emacs requirements under X11.
493 See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
494 for how to enable anti-aliased fonts."
495 use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in
496 \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
497 it into /Applications by yourself."
498 readme.gentoo_create_doc
499 }
500
501 pkg_preinst() {
502 # move Info dir file to correct name
503 local infodir=/usr/share/info/${EMACS_SUFFIX} f
504 if [[ -f ${ED}${infodir}/dir.orig ]]; then
505 mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
506 elif [[ -d "${ED}"${infodir} ]]; then
507 # this should not happen in EAPI 4
508 ewarn "Regenerating Info directory index in ${infodir} ..."
509 rm -f "${ED}"${infodir}/dir{,.*}
510 for f in "${ED}"${infodir}/*; do
511 if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
512 install-info --info-dir="${ED}"${infodir} "${f}" \
513 || die "install-info failed"
514 fi
515 done
516 fi
517 }
518
519 pkg_postinst() {
520 elisp-site-regen
521
522 local pvr
523 for pvr in ${REPLACING_VERSIONS}; do
524 [[ ${pvr%%[-_]*} = 24.[12] ]] && FORCE_PRINT_ELOG=1
525 done
526 readme.gentoo_print_elog
527
528 if use livecd; then
529 # force an update of the emacs symlink for the livecd/dvd,
530 # because some microemacs packages set it with USE=livecd
531 eselect emacs update
532 elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
533 # refresh symlinks in case any installed files have changed
534 eselect emacs set ${EMACS_SUFFIX}
535 else
536 eselect emacs update ifunset
537 fi
538 }
539
540 pkg_postrm() {
541 elisp-site-regen
542 eselect emacs update ifunset
543 }