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