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: Sat, 01 Aug 2020 18:09:33
Message-Id: 1596305287.96184a962cc5c5f8a460cedc55693c876ef0bc75.ulm@gentoo
1 commit: 96184a962cc5c5f8a460cedc55693c876ef0bc75
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 1 18:00:16 2020 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 1 18:08:07 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96184a96
7
8 app-editors/emacs: First release candidate for Emacs 27.1.
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
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_rc1.ebuild | 411 ++++++++++++++++++++++++++++++++
15 2 files changed, 412 insertions(+)
16
17 diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest
18 index f9b02df2557..945e9409b33 100644
19 --- a/app-editors/emacs/Manifest
20 +++ b/app-editors/emacs/Manifest
21 @@ -11,3 +11,4 @@ DIST emacs-26.3.tar.xz 44415140 BLAKE2B aa8434e6431992ee40402f03a890dd2c49784ee7
22 DIST emacs-27.0.50_pre20191223.tar.xz 29160968 BLAKE2B b2fbed7bbd8c5e841231a027bbc04ad7d9b22c5e44ea302656bea63519ec2480e040c67d7ad3b785fd7566bb2c4772d9d0717dede2e740cb0988bfc20e8fa504 SHA512 e582ae29d62371f9afb6ef908976cf6cea6bd6ff7fde66f319f8e96698badcb99aa76df65cfaefb18009e3cf6586f19f64f1611a0d5e2f682bd0a6e4f46cf1d6
23 DIST emacs-27.0.90.tar.xz 43706980 BLAKE2B 87f9b621305711d7083307fbf921a32e7a878c6eef7939100511f669fdf052d88d8aea3c46a2c9fb9e9383c47c4066ec580443b2b24e510a6894d59caf9825ec SHA512 1a6f319e964f20ad35574eb2d2e18ae8c86d9d2ab9ae038334f0f468c40602d1f9b20880cfa704ea2067bdd7a3952ea3e6b565d5bb3d6d304922ad1d98c1c76b
24 DIST emacs-27.0.91.tar.xz 43730296 BLAKE2B 9ed0f425539cd22b84e3c1e2973d6a66d983e6b6de5fff30c1db2ca3fb1d761cf2c4de566b28dcffff858d032ff996a528e14daaecc45eb71aa07c3f3a6e4a74 SHA512 fcae087c7d153ce45640dc5785e0829e85b14400eec70f833e1f7ee7d3903f1e4adb469d812596fc6e7ff792ccaeda3fde5fa1c37b609ab83e8432d9f63be36a
25 +DIST emacs-27.1-rc1.tar.xz 43758028 BLAKE2B e1cc285a954aa1de00c4925909f9d027c5edb71aab740cf856e47001a0b0343cbab547819b367e8391814df4f833e39f1624d914ee52381b612e41b9b02c7fb2 SHA512 fba75ee01e3f82e8fedb09f94d2a6edf76fa2e4cf1e135294a86ffa8d8444292c75cccfeb30037c25f76cd5f0c6376145c09550614e7e42ddc934a8656424134
26
27 diff --git a/app-editors/emacs/emacs-27.1_rc1.ebuild b/app-editors/emacs/emacs-27.1_rc1.ebuild
28 new file mode 100644
29 index 00000000000..ec027984741
30 --- /dev/null
31 +++ b/app-editors/emacs/emacs-27.1_rc1.ebuild
32 @@ -0,0 +1,411 @@
33 +# Copyright 1999-2020 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 readme.gentoo-r1
39 +
40 +if [[ ${PV##*.} = 9999 ]]; then
41 + inherit git-r3
42 + EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
43 + EGIT_BRANCH="emacs-27"
44 + EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
45 + S="${EGIT_CHECKOUT_DIR}"
46 +else
47 + SRC_URI="mirror://gnu-alpha/emacs/pretest/emacs-${PV/_/-}.tar.xz"
48 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
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 + S="${WORKDIR}/emacs-${FULL_VERSION}"
54 + [[ ${PV} == *_pre* ]] && S="${WORKDIR}/emacs"
55 +fi
56 +
57 +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
58 +HOMEPAGE="https://www.gnu.org/software/emacs/"
59 +
60 +LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
61 +SLOT="27-vcs"
62 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk gtk2 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 X Xaw3d xft +xpm xwidgets zlib"
63 +REQUIRED_USE="?? ( aqua X )"
64 +RESTRICT="test"
65 +
66 +RDEPEND=">=app-emacs/emacs-common-gentoo-1.5[games?,X?]
67 + sys-libs/ncurses:0=
68 + acl? ( virtual/acl )
69 + alsa? ( media-libs/alsa-lib )
70 + dbus? ( sys-apps/dbus )
71 + games? ( acct-group/gamestat )
72 + gmp? ( dev-libs/gmp:0= )
73 + gpm? ( sys-libs/gpm )
74 + !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
75 + json? ( dev-libs/jansson )
76 + kerberos? ( virtual/krb5 )
77 + lcms? ( media-libs/lcms:2 )
78 + libxml2? ( >=dev-libs/libxml2-2.2.0 )
79 + mailutils? ( net-mail/mailutils[clients] )
80 + !mailutils? ( net-libs/liblockfile )
81 + selinux? ( sys-libs/libselinux )
82 + ssl? ( net-libs/gnutls:0= )
83 + systemd? ( sys-apps/systemd )
84 + zlib? ( sys-libs/zlib )
85 + X? (
86 + x11-libs/libICE
87 + x11-libs/libSM
88 + x11-libs/libX11
89 + x11-libs/libXext
90 + x11-libs/libXfixes
91 + x11-libs/libXinerama
92 + x11-libs/libXrandr
93 + x11-libs/libxcb
94 + x11-misc/xbitmaps
95 + gconf? ( >=gnome-base/gconf-2.26.2 )
96 + gsettings? ( >=dev-libs/glib-2.28.6 )
97 + gif? ( media-libs/giflib:0= )
98 + jpeg? ( virtual/jpeg:0= )
99 + png? ( >=media-libs/libpng-1.4:0= )
100 + svg? ( >=gnome-base/librsvg-2.0 )
101 + tiff? ( media-libs/tiff:0 )
102 + xpm? ( x11-libs/libXpm )
103 + imagemagick? ( >=media-gfx/imagemagick-6.6.2:0= )
104 + xft? (
105 + media-libs/fontconfig
106 + media-libs/freetype
107 + x11-libs/libXft
108 + x11-libs/libXrender
109 + cairo? ( >=x11-libs/cairo-1.12.18 )
110 + harfbuzz? ( media-libs/harfbuzz:0= )
111 + m17n-lib? (
112 + >=dev-libs/libotf-0.9.4
113 + >=dev-libs/m17n-lib-1.5.1
114 + )
115 + )
116 + gtk? (
117 + gtk2? ( x11-libs/gtk+:2 )
118 + !gtk2? (
119 + x11-libs/gtk+:3
120 + xwidgets? (
121 + net-libs/webkit-gtk:4=
122 + x11-libs/libXcomposite
123 + )
124 + )
125 + )
126 + !gtk? (
127 + motif? (
128 + >=x11-libs/motif-2.3:0
129 + x11-libs/libXpm
130 + x11-libs/libXmu
131 + x11-libs/libXt
132 + )
133 + !motif? (
134 + Xaw3d? (
135 + x11-libs/libXaw3d
136 + x11-libs/libXmu
137 + x11-libs/libXt
138 + )
139 + !Xaw3d? ( athena? (
140 + x11-libs/libXaw
141 + x11-libs/libXmu
142 + x11-libs/libXt
143 + ) )
144 + )
145 + )
146 + )"
147 +
148 +DEPEND="${RDEPEND}
149 + X? ( x11-base/xorg-proto )"
150 +
151 +BDEPEND="app-eselect/eselect-emacs
152 + sys-apps/texinfo
153 + virtual/pkgconfig
154 + gzip-el? ( app-arch/gzip )"
155 +
156 +RDEPEND="${RDEPEND}
157 + !app-editors/emacs-vcs:27
158 + app-eselect/eselect-emacs"
159 +
160 +EMACS_SUFFIX="emacs-${SLOT}"
161 +SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
162 +
163 +src_prepare() {
164 + if [[ ${PV##*.} = 9999 ]]; then
165 + FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
166 + configure.ac)
167 + [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
168 + einfo "Emacs branch: ${EGIT_BRANCH}"
169 + einfo "Commit: ${EGIT_VERSION}"
170 + einfo "Emacs version number: ${FULL_VERSION}"
171 + [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
172 + || die "Upstream version number changed to ${FULL_VERSION}"
173 + fi
174 +
175 + eapply_user
176 +
177 + # Fix filename reference in redirected man page
178 + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die
179 +
180 + #AT_M4DIR=m4 eautoreconf
181 +}
182 +
183 +src_configure() {
184 + strip-flags
185 + filter-flags -pie #526948
186 +
187 + if 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 gsettings)"
207 + myconf+=" $(use_with toolkit-scroll-bars)"
208 + myconf+=" $(use_with gif)"
209 + myconf+=" $(use_with jpeg)"
210 + myconf+=" $(use_with png)"
211 + myconf+=" $(use_with svg rsvg)"
212 + myconf+=" $(use_with tiff)"
213 + myconf+=" $(use_with xpm)"
214 + myconf+=" $(use_with imagemagick)"
215 +
216 + if use xft; then
217 + myconf+=" --with-xft"
218 + myconf+=" $(use_with cairo)"
219 + myconf+=" $(use_with harfbuzz)"
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 + --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
286 + --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
287 + --localstatedir="${EPREFIX}"/var \
288 + --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
289 + --without-compress-install \
290 + --without-hesiod \
291 + --without-pop \
292 + --with-dumping=pdumper \
293 + --with-file-notification=$(usev inotify || usev gfile || echo no) \
294 + $(use_enable acl) \
295 + $(use_with dbus) \
296 + $(use_with dynamic-loading modules) \
297 + $(use_with games gameuser ":gamestat") \
298 + $(use_with gmp libgmp) \
299 + $(use_with gpm) \
300 + $(use_with json) \
301 + $(use_with kerberos) $(use_with kerberos kerberos5) \
302 + $(use_with lcms lcms2) \
303 + $(use_with libxml2 xml2) \
304 + $(use_with mailutils) \
305 + $(use_with selinux) \
306 + $(use_with ssl gnutls) \
307 + $(use_with systemd libsystemd) \
308 + $(use_with threads) \
309 + $(use_with wide-int) \
310 + $(use_with zlib) \
311 + ${myconf}
312 +}
313 +
314 +#src_compile() {
315 +# # Disable sandbox when dumping. For the unbelievers, see bug #131505
316 +# emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
317 +#}
318 +
319 +src_install() {
320 + emake DESTDIR="${D}" NO_BIN_LINK=t install
321 +
322 + mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die
323 + mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
324 + mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die
325 +
326 + # move info dir to avoid collisions with the dir file generated by portage
327 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
328 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
329 + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
330 +
331 + # avoid collision between slots, see bug #169033 e.g.
332 + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
333 + rm -rf "${ED}"/usr/share/{appdata,applications,icons}
334 + rm -rf "${ED}/usr/$(get_libdir)"
335 + rm -rf "${ED}"/var
336 +
337 + # remove unused <version>/site-lisp dir
338 + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
339 +
340 + # remove COPYING file (except for etc/COPYING used by describe-copying)
341 + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
342 +
343 + if use systemd; then
344 + insinto /usr/lib/systemd/user
345 + sed -e "/^##/d" \
346 + -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
347 + -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
348 + etc/emacs.service | newins - ${EMACS_SUFFIX}.service
349 + assert
350 + fi
351 +
352 + if use gzip-el; then
353 + # compress .el files when a corresponding .elc exists
354 + find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
355 + -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
356 + assert "gzip .el failed"
357 + fi
358 +
359 + local cdir
360 + if use source; then
361 + cdir="/usr/share/emacs/${FULL_VERSION}/src"
362 + insinto "${cdir}"
363 + # This is not meant to install all the source -- just the
364 + # C source you might find via find-function
365 + doins src/*.{c,h,m}
366 + elif has installsources ${FEATURES}; then
367 + cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
368 + fi
369 +
370 + sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die
371 + X
372 + ;;; ${EMACS_SUFFIX} site-lisp configuration
373 + X
374 + (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
375 + Y (setq find-function-C-source-directory
376 + Y "${EPREFIX}${cdir}")
377 + X (let ((path (getenv "INFOPATH"))
378 + X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
379 + X (re "\\\\\`${EPREFIX}/usr/share\\\\>"))
380 + X (and path
381 + X ;; move Emacs Info dir before anything else in /usr/share
382 + X (let* ((p (cons nil (split-string path ":" t))) (q p))
383 + X (while (and (cdr q) (not (string-match re (cadr q))))
384 + X (setq q (cdr q)))
385 + X (setcdr q (cons dir (delete dir (cdr q))))
386 + X (setq Info-directory-list (prune-directory-list (cdr p)))))))
387 + EOF
388 + elisp-site-file-install "${T}/${SITEFILE}" || die
389 +
390 + dodoc README BUGS CONTRIBUTE
391 +
392 + if use aqua; then
393 + dodir /Applications/Gentoo
394 + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app
395 + mv nextstep/Emacs.app \
396 + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die
397 + fi
398 +
399 + local DOC_CONTENTS="You can set the version to be started by
400 + /usr/bin/emacs through the Emacs eselect module, which also
401 + redirects man and info pages. Therefore, several Emacs versions can
402 + be installed at the same time. \"man emacs.eselect\" for details.
403 + \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is
404 + strongly recommended that you use app-admin/emacs-updater to rebuild
405 + all byte-compiled elisp files of the installed Emacs packages."
406 + use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
407 + Installing media-fonts/font-adobe-{75,100}dpi on the X server's
408 + machine would satisfy basic Emacs requirements under X11.
409 + See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
410 + for how to enable anti-aliased fonts."
411 + use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in
412 + \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
413 + it into /Applications by yourself."
414 + readme.gentoo_create_doc
415 +}
416 +
417 +pkg_preinst() {
418 + # move Info dir file to correct name
419 + if [[ -d ${ED}/usr/share/info ]]; then
420 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
421 + fi
422 +}
423 +
424 +pkg_postinst() {
425 + elisp-site-regen
426 + readme.gentoo_print_elog
427 +
428 + if use livecd; then
429 + # force an update of the emacs symlink for the livecd/dvd,
430 + # because some microemacs packages set it with USE=livecd
431 + eselect emacs update
432 + elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
433 + # refresh symlinks in case any installed files have changed
434 + eselect emacs set ${EMACS_SUFFIX}
435 + else
436 + eselect emacs update ifunset
437 + fi
438 +}
439 +
440 +pkg_postrm() {
441 + elisp-site-regen
442 + eselect emacs update ifunset
443 +}