Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/emacs/
Date: Fri, 29 Jan 2021 14:08:31
Message-Id: 1611928980.7ba1e9af2fe2e643892332536389cdeb2388a128.ulm@gentoo
1 commit: 7ba1e9af2fe2e643892332536389cdeb2388a128
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 29 14:02:39 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 29 14:03:00 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ba1e9af
7
8 app-editors/emacs: Pretest version 27.1.91
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
12
13 app-editors/emacs/Manifest | 1 +
14 app-editors/emacs/emacs-27.1.91.ebuild | 458 +++++++++++++++++++++++++++++++++
15 2 files changed, 459 insertions(+)
16
17 diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest
18 index 2814ce630ed..7ceb9dd079b 100644
19 --- a/app-editors/emacs/Manifest
20 +++ b/app-editors/emacs/Manifest
21 @@ -7,4 +7,5 @@ DIST emacs-24.5.tar.xz 39759804 BLAKE2B aec253528038686822d1f8ed9a52dff276789ef7
22 DIST emacs-25.3-patches-2.tar.xz 2488 BLAKE2B 93c6a18e7f729a5b4d299974581c99835e5f197215888253f75827645e440f6579da16d4cd8340f2732f8bf8a6a15713e29848953033dc62b573a1c1fab455bf SHA512 f171cc5699f06523a007aba5aa1a4274c9a875358a60405aa77cdc96ebb229082cb73453940e8c9e76dd7b86979cefc261883db0c130142543befb7a097475f4
23 DIST emacs-25.3.tar.xz 42854740 BLAKE2B 4f4e2572bbef48b75c561497fc22046081e56099b6174725d79b15a5b16d5c886eaf8ff3f75cf561e989ebb092ab9e98ba7503e720a9db7560758b30d5116f23 SHA512 1cce656451b6ca8502ebb229e88bd3ef48b7f9444a10eeac4ea43bd5491b2efacd641dfa35227a33362c3866493d3449cf1df81606563eef44bba0ed668e457f
24 DIST emacs-26.3.tar.xz 44415140 BLAKE2B aa8434e6431992ee40402f03a890dd2c49784ee76f437888efe61d66b9aa2bdb816eb0bfe1055e9e154a8bb3ed065fee71623741b474d465a96964618ec775e3 SHA512 4d5a4319253afb081e105a3697eb6eeb8d8a0da18cd41346e376ca5af1e180a26e641f76c64fad1b0253168f14a511f0a4d9d4141524fb1cf4d04f25b05a76e9
25 +DIST emacs-27.1.91.tar.xz 44608052 BLAKE2B 50d4da099bb542a01f7a62d73ac33cf445fc667af9c81a7c44f4a477d50a29854b14be2fd28eb937d2a039b9d3726b84e5d66d5a667109473e9485ab36b70fcd SHA512 37efc0e472522f498cbd45b6bd734ed34348f7ccf07fb06aed106df6ec86cb0b077d5a54df76abc3147e5d97284f6e9e1a7166d3c32b9a072aecca8c13f8965b
26 DIST emacs-27.1.tar.xz 43752012 BLAKE2B 433fbf234c711954269e7e10348abbd4a2bc4c357a59164c625a5ccee2de85a149636c70ad3fad3c09dbbd24900badfd2c0c645017bb33ab3e25d3decff72057 SHA512 dfb26531d2c19cf9fb56505f03d799654b45e5f9528e777900e8280ed2c1d21e04c52f510528e31e015977c471ae63164cedee6174b7439ebcf479a21fc18064
27
28 diff --git a/app-editors/emacs/emacs-27.1.91.ebuild b/app-editors/emacs/emacs-27.1.91.ebuild
29 new file mode 100644
30 index 00000000000..71b3f312c1d
31 --- /dev/null
32 +++ b/app-editors/emacs/emacs-27.1.91.ebuild
33 @@ -0,0 +1,458 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs
40 +
41 +if [[ ${PV##*.} = 9999 ]]; then
42 + inherit git-r3
43 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
44 + EGIT_BRANCH="emacs-27"
45 + EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
46 + S="${EGIT_CHECKOUT_DIR}"
47 + SLOT="${PV%%.*}-vcs"
48 +else
49 + # FULL_VERSION keeps the full version number, which is needed in
50 + # order to determine some path information correctly for copy/move
51 + # operations later on
52 + FULL_VERSION="${PV%%_*}"
53 + SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
54 + S="${WORKDIR}/emacs-${FULL_VERSION}"
55 + # PV can be in any of the following formats:
56 + # 27.1 released version (slot 27)
57 + # 27.1_rc1 upstream release candidate (27)
58 + # 27.0.9999 live ebuild (slot 27-vcs)
59 + # 27.0.90 upstream prerelease snapshot (27-vcs)
60 + # 27.0.50_pre20191223 snapshot by Gentoo developer (27-vcs)
61 + if [[ ${PV} == *_pre* ]]; then
62 + SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
63 + S="${WORKDIR}/emacs"
64 + elif [[ ${PV//[0-9]} != "." ]]; then
65 + SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
66 + fi
67 + SLOT="${PV%%.*}"
68 + [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
69 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
70 +fi
71 +
72 +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
73 +HOMEPAGE="https://www.gnu.org/software/emacs/"
74 +
75 +LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
76 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 gui gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm xwidgets zlib"
77 +RESTRICT="test"
78 +
79 +RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
80 + sys-libs/ncurses:0=
81 + acl? ( virtual/acl )
82 + alsa? ( media-libs/alsa-lib )
83 + dbus? ( sys-apps/dbus )
84 + games? ( acct-group/gamestat )
85 + gmp? ( dev-libs/gmp:0= )
86 + gpm? ( sys-libs/gpm )
87 + !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
88 + json? ( dev-libs/jansson )
89 + kerberos? ( virtual/krb5 )
90 + lcms? ( media-libs/lcms:2 )
91 + libxml2? ( >=dev-libs/libxml2-2.2.0 )
92 + mailutils? ( net-mail/mailutils[clients] )
93 + !mailutils? ( acct-group/mail net-libs/liblockfile )
94 + selinux? ( sys-libs/libselinux )
95 + ssl? ( net-libs/gnutls:0= )
96 + systemd? ( sys-apps/systemd )
97 + zlib? ( sys-libs/zlib )
98 + gui? ( !aqua? (
99 + x11-libs/libICE
100 + x11-libs/libSM
101 + x11-libs/libX11
102 + x11-libs/libXext
103 + x11-libs/libXfixes
104 + x11-libs/libXinerama
105 + x11-libs/libXrandr
106 + x11-libs/libxcb
107 + x11-misc/xbitmaps
108 + gconf? ( >=gnome-base/gconf-2.26.2 )
109 + gsettings? ( >=dev-libs/glib-2.28.6 )
110 + gif? ( media-libs/giflib:0= )
111 + jpeg? ( virtual/jpeg:0= )
112 + png? ( >=media-libs/libpng-1.4:0= )
113 + svg? ( >=gnome-base/librsvg-2.0 )
114 + tiff? ( media-libs/tiff:0 )
115 + xpm? ( x11-libs/libXpm )
116 + imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= )
117 + xft? (
118 + media-libs/fontconfig
119 + media-libs/freetype
120 + x11-libs/libXft
121 + x11-libs/libXrender
122 + cairo? ( >=x11-libs/cairo-1.12.18 )
123 + harfbuzz? ( media-libs/harfbuzz:0= )
124 + m17n-lib? (
125 + >=dev-libs/libotf-0.9.4
126 + >=dev-libs/m17n-lib-1.5.1
127 + )
128 + )
129 + gtk? (
130 + gtk2? ( x11-libs/gtk+:2 )
131 + !gtk2? (
132 + x11-libs/gtk+:3
133 + xwidgets? (
134 + net-libs/webkit-gtk:4=
135 + x11-libs/libXcomposite
136 + )
137 + )
138 + )
139 + !gtk? (
140 + motif? (
141 + >=x11-libs/motif-2.3:0
142 + x11-libs/libXpm
143 + x11-libs/libXmu
144 + x11-libs/libXt
145 + )
146 + !motif? (
147 + Xaw3d? (
148 + x11-libs/libXaw3d
149 + x11-libs/libXmu
150 + x11-libs/libXt
151 + )
152 + !Xaw3d? ( athena? (
153 + x11-libs/libXaw
154 + x11-libs/libXmu
155 + x11-libs/libXt
156 + ) )
157 + )
158 + )
159 + ) )"
160 +
161 +DEPEND="${RDEPEND}
162 + gui? ( !aqua? ( x11-base/xorg-proto ) )"
163 +
164 +BDEPEND="app-eselect/eselect-emacs
165 + sys-apps/texinfo
166 + virtual/pkgconfig
167 + gzip-el? ( app-arch/gzip )"
168 +
169 +RDEPEND="${RDEPEND}
170 + !app-editors/emacs-vcs:27
171 + app-eselect/eselect-emacs"
172 +
173 +EMACS_SUFFIX="emacs-${SLOT}"
174 +SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
175 +
176 +src_prepare() {
177 + if [[ ${PV##*.} = 9999 ]]; then
178 + FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
179 + configure.ac)
180 + [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
181 + einfo "Emacs branch: ${EGIT_BRANCH}"
182 + einfo "Commit: ${EGIT_VERSION}"
183 + einfo "Emacs version number: ${FULL_VERSION}"
184 + [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
185 + || die "Upstream version number changed to ${FULL_VERSION}"
186 + fi
187 +
188 + eapply_user
189 +
190 + # Fix filename reference in redirected man page
191 + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die
192 +
193 + #AT_M4DIR=m4 eautoreconf
194 +}
195 +
196 +src_configure() {
197 + strip-flags
198 + filter-flags -pie #526948
199 +
200 + if use ia64; then
201 + replace-flags "-O[2-9]" -O1 #325373
202 + else
203 + replace-flags "-O[3-9]" -O2
204 + fi
205 +
206 + local myconf
207 +
208 + if use alsa; then
209 + use sound || ewarn \
210 + "USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
211 + myconf+=" --with-sound=alsa"
212 + else
213 + myconf+=" --with-sound=$(usex sound oss)"
214 + fi
215 +
216 + if ! use gui; then
217 + einfo "Configuring to build without window system support"
218 + myconf+=" --without-x --without-ns"
219 + elif use aqua; then
220 + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support"
221 + myconf+=" --with-ns --disable-ns-self-contained"
222 + myconf+=" --without-x"
223 + else
224 + myconf+=" --with-x --without-ns"
225 + myconf+=" $(use_with gconf)"
226 + myconf+=" $(use_with gsettings)"
227 + myconf+=" $(use_with toolkit-scroll-bars)"
228 + myconf+=" $(use_with gif)"
229 + myconf+=" $(use_with jpeg)"
230 + myconf+=" $(use_with png)"
231 + myconf+=" $(use_with svg rsvg)"
232 + myconf+=" $(use_with tiff)"
233 + myconf+=" $(use_with xpm)"
234 + myconf+=" $(use_with imagemagick)"
235 +
236 + if use xft; then
237 + myconf+=" --with-xft"
238 + myconf+=" $(use_with cairo)"
239 + myconf+=" $(use_with harfbuzz)"
240 + myconf+=" $(use_with m17n-lib libotf)"
241 + myconf+=" $(use_with m17n-lib m17n-flt)"
242 + else
243 + myconf+=" --without-xft"
244 + myconf+=" --without-cairo"
245 + myconf+=" --without-libotf --without-m17n-flt"
246 + use cairo && ewarn \
247 + "USE flag \"cairo\" has no effect if \"xft\" is not set."
248 + use m17n-lib && ewarn \
249 + "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
250 + fi
251 +
252 + local f line
253 + if use gtk; then
254 + einfo "Configuring to build with GIMP Toolkit (GTK+)"
255 + while read line; do ewarn "${line}"; done <<-EOF
256 + Your version of GTK+ will have problems with closing open
257 + displays. This is no problem if you just use one display, but
258 + if you use more than one and close one of them Emacs may crash.
259 + See <https://bugzilla.gnome.org/show_bug.cgi?id=85715>.
260 + If you intend to use more than one display, then it is strongly
261 + recommended that you compile Emacs with the Athena/Lucid or the
262 + Motif toolkit instead.
263 + EOF
264 + if use gtk2; then
265 + myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
266 + use xwidgets && ewarn \
267 + "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
268 + else
269 + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
270 + fi
271 + for f in motif Xaw3d athena; do
272 + use ${f} && ewarn \
273 + "USE flag \"${f}\" has no effect if \"gtk\" is set."
274 + done
275 + elif use motif; then
276 + einfo "Configuring to build with Motif toolkit"
277 + myconf+=" --with-x-toolkit=motif"
278 + for f in Xaw3d athena; do
279 + use ${f} && ewarn \
280 + "USE flag \"${f}\" has no effect if \"motif\" is set."
281 + done
282 + elif use athena || use Xaw3d; then
283 + einfo "Configuring to build with Athena/Lucid toolkit"
284 + myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
285 + else
286 + einfo "Configuring to build with no toolkit"
287 + myconf+=" --with-x-toolkit=no"
288 + fi
289 + if ! use gtk; then
290 + use gtk2 && ewarn \
291 + "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
292 + use xwidgets && ewarn \
293 + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
294 + fi
295 + fi
296 +
297 + if tc-is-cross-compiler; then
298 + # Configure a CBUILD directory when cross-compiling to make tools
299 + mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
300 + ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit
301 + popd >/dev/null || die
302 + # Don't try to execute the binary for dumping during the build
303 + myconf+=" --with-dumping=none"
304 + else
305 + myconf+=" --with-dumping=pdumper"
306 + fi
307 +
308 + econf \
309 + --program-suffix="-${EMACS_SUFFIX}" \
310 + --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
311 + --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
312 + --localstatedir="${EPREFIX}"/var \
313 + --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
314 + --without-compress-install \
315 + --without-hesiod \
316 + --without-pop \
317 + --with-file-notification=$(usev inotify || usev gfile || echo no) \
318 + --with-pdumper \
319 + $(use_enable acl) \
320 + $(use_with dbus) \
321 + $(use_with dynamic-loading modules) \
322 + $(use_with games gameuser ":gamestat") \
323 + $(use_with gmp libgmp) \
324 + $(use_with gpm) \
325 + $(use_with json) \
326 + $(use_with kerberos) $(use_with kerberos kerberos5) \
327 + $(use_with lcms lcms2) \
328 + $(use_with libxml2 xml2) \
329 + $(use_with mailutils) \
330 + $(use_with selinux) \
331 + $(use_with ssl gnutls) \
332 + $(use_with systemd libsystemd) \
333 + $(use_with threads) \
334 + $(use_with wide-int) \
335 + $(use_with zlib) \
336 + ${myconf}
337 +}
338 +
339 +src_compile() {
340 + if tc-is-cross-compiler; then
341 + # Build native tools for compiling lisp etc.
342 + emake -C "${S}-build" src
343 + emake lib # Cross-compile dependencies first for timestamps
344 + # Save native build tools in the cross-directory
345 + cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die
346 + # Specify the native Emacs to compile lisp
347 + emake -C lisp all EMACS="${S}-build/src/emacs"
348 + fi
349 +
350 + emake
351 +}
352 +
353 +src_install() {
354 + emake DESTDIR="${D}" NO_BIN_LINK=t BLESSMAIL_TARGET= install
355 +
356 + mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die
357 + mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
358 + mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die
359 +
360 + # move info dir to avoid collisions with the dir file generated by portage
361 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
362 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
363 + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
364 +
365 + # movemail must be setgid mail
366 + if ! use mailutils; then
367 + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
368 + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
369 + fi
370 +
371 + # avoid collision between slots, see bug #169033 e.g.
372 + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
373 + rm -rf "${ED}"/usr/share/{appdata,applications,icons}
374 + rm -rf "${ED}/usr/$(get_libdir)"
375 + rm -rf "${ED}"/var
376 +
377 + # remove unused <version>/site-lisp dir
378 + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
379 +
380 + # remove COPYING file (except for etc/COPYING used by describe-copying)
381 + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
382 +
383 + if use systemd; then
384 + insinto /usr/lib/systemd/user
385 + sed -e "/^##/d" \
386 + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
387 + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
388 + etc/emacs.service | newins - ${EMACS_SUFFIX}.service
389 + assert
390 + fi
391 +
392 + if use gzip-el; then
393 + # compress .el files when a corresponding .elc exists
394 + find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
395 + -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
396 + assert "gzip .el failed"
397 + fi
398 +
399 + local cdir
400 + if use source; then
401 + cdir="/usr/share/emacs/${FULL_VERSION}/src"
402 + insinto "${cdir}"
403 + # This is not meant to install all the source -- just the
404 + # C source you might find via find-function
405 + doins src/*.{c,h,m}
406 + elif has installsources ${FEATURES}; then
407 + cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
408 + fi
409 +
410 + sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die
411 + X
412 + ;;; ${EMACS_SUFFIX} site-lisp configuration
413 + X
414 + (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
415 + Y (setq find-function-C-source-directory
416 + Y "${EPREFIX}${cdir}")
417 + X (let ((path (getenv "INFOPATH"))
418 + X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
419 + X (re "\\\\\`${EPREFIX}/usr/share\\\\>"))
420 + X (and path
421 + X ;; move Emacs Info dir before anything else in /usr/share
422 + X (let* ((p (cons nil (split-string path ":" t))) (q p))
423 + X (while (and (cdr q) (not (string-match re (cadr q))))
424 + X (setq q (cdr q)))
425 + X (setcdr q (cons dir (delete dir (cdr q))))
426 + X (setq Info-directory-list (prune-directory-list (cdr p)))))))
427 + EOF
428 + elisp-site-file-install "${T}/${SITEFILE}" || die
429 +
430 + dodoc README BUGS CONTRIBUTE
431 +
432 + if use gui && use aqua; then
433 + dodir /Applications/Gentoo
434 + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app
435 + mv nextstep/Emacs.app \
436 + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die
437 + fi
438 +
439 + local DOC_CONTENTS="You can set the version to be started by
440 + /usr/bin/emacs through the Emacs eselect module, which also
441 + redirects man and info pages. Therefore, several Emacs versions can
442 + be installed at the same time. \"man emacs.eselect\" for details.
443 + \\n\\nIf you upgrade from a previous major version of Emacs, then
444 + it is strongly recommended that you use app-admin/emacs-updater
445 + to rebuild all byte-compiled elisp files of the installed Emacs
446 + packages."
447 + if use gui; then
448 + DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
449 + Installing media-fonts/font-adobe-{75,100}dpi on the X server's
450 + machine would satisfy basic Emacs requirements under X11.
451 + See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
452 + for how to enable anti-aliased fonts."
453 + use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in
454 + \"${EPREFIX}/Applications/Gentoo\". You may want to copy or
455 + symlink it into /Applications by yourself."
456 + fi
457 + tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write
458 + a portable dump file due to being cross-compiled.
459 + To create this file at run time, execute the following command:
460 + \\n${EMACS_SUFFIX} --batch --eval='(dump-emacs-portable
461 + \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'"
462 + readme.gentoo_create_doc
463 +}
464 +
465 +pkg_preinst() {
466 + # move Info dir file to correct name
467 + if [[ -d ${ED}/usr/share/info ]]; then
468 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
469 + fi
470 +}
471 +
472 +pkg_postinst() {
473 + elisp-site-regen
474 + readme.gentoo_print_elog
475 +
476 + if use livecd; then
477 + # force an update of the emacs symlink for the livecd/dvd,
478 + # because some microemacs packages set it with USE=livecd
479 + eselect emacs update
480 + elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
481 + # refresh symlinks in case any installed files have changed
482 + eselect emacs set ${EMACS_SUFFIX}
483 + else
484 + eselect emacs update ifunset
485 + fi
486 +}
487 +
488 +pkg_postrm() {
489 + elisp-site-regen
490 + eselect emacs update ifunset
491 +}