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