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