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, 06 Feb 2021 23:00:15
Message-Id: 1612652405.2d6765e58fc94e13dbc937d0c7dc59e49fe3f49f.ulm@gentoo
1 commit: 2d6765e58fc94e13dbc937d0c7dc59e49fe3f49f
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 6 22:54:47 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 6 23:00:05 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d6765e5
7
8 app-editors/emacs: Drop conditional gtk+:2 dependency
9
10 For slot 23, this means dropping GTK+ support entirely.
11 All later slots can be built with GTK+ 3.
12
13 Closes: https://bugs.gentoo.org/769023
14 Package-Manager: Portage-3.0.14, Repoman-3.0.2
15 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
16
17 app-editors/emacs/emacs-23.4-r21.ebuild | 345 +++++++++++++++++++++
18 ...macs-28.0.9999.ebuild => emacs-24.5-r10.ebuild} | 188 +++--------
19 ...emacs-28.0.9999.ebuild => emacs-25.3-r9.ebuild} | 170 +++-------
20 .../{emacs-27.1.91.ebuild => emacs-26.3-r4.ebuild} | 122 ++------
21 .../{emacs-27.1.91.ebuild => emacs-27.1-r4.ebuild} | 30 +-
22 ...macs-27.1.91.ebuild => emacs-27.1.91-r1.ebuild} | 29 +-
23 app-editors/emacs/emacs-27.1.9999-r1.ebuild | 29 +-
24 app-editors/emacs/emacs-28.0.9999.ebuild | 29 +-
25 8 files changed, 475 insertions(+), 467 deletions(-)
26
27 diff --git a/app-editors/emacs/emacs-23.4-r21.ebuild b/app-editors/emacs/emacs-23.4-r21.ebuild
28 new file mode 100644
29 index 00000000000..d9c732a605e
30 --- /dev/null
31 +++ b/app-editors/emacs/emacs-23.4-r21.ebuild
32 @@ -0,0 +1,345 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +WANT_AUTOMAKE="none"
38 +
39 +inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs
40 +
41 +DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
42 +HOMEPAGE="https://www.gnu.org/software/emacs/"
43 +SRC_URI="mirror://gnu/emacs/${P}.tar.bz2
44 + https://dev.gentoo.org/~ulm/emacs/${P}-patches-23.tar.xz"
45 +
46 +LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
47 +SLOT="23"
48 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
49 +IUSE="alsa aqua athena dbus games gconf gif gpm gui gzip-el jpeg kerberos livecd m17n-lib motif png sound source svg tiff toolkit-scroll-bars Xaw3d xft +xpm"
50 +
51 +RDEPEND="acct-group/mail
52 + app-emacs/emacs-common-gentoo[games?,gui(-)?]
53 + net-libs/liblockfile
54 + sys-libs/ncurses:0=
55 + kerberos? ( virtual/krb5 )
56 + alsa? ( media-libs/alsa-lib )
57 + games? ( acct-group/gamestat )
58 + gpm? ( sys-libs/gpm )
59 + dbus? ( sys-apps/dbus )
60 + gui? ( !aqua? (
61 + x11-libs/libICE
62 + x11-libs/libSM
63 + x11-libs/libX11
64 + x11-misc/xbitmaps
65 + gconf? ( >=gnome-base/gconf-2.26.2 )
66 + gif? ( media-libs/giflib:0= )
67 + jpeg? ( virtual/jpeg:0= )
68 + png? ( >=media-libs/libpng-1.4:0= )
69 + svg? ( >=gnome-base/librsvg-2.0 )
70 + tiff? ( media-libs/tiff:0 )
71 + xpm? ( x11-libs/libXpm )
72 + xft? (
73 + media-libs/fontconfig
74 + media-libs/freetype
75 + x11-libs/libXft
76 + x11-libs/libXrender
77 + m17n-lib? (
78 + >=dev-libs/libotf-0.9.4
79 + >=dev-libs/m17n-lib-1.5.1
80 + )
81 + )
82 + motif? (
83 + >=x11-libs/motif-2.3:0
84 + x11-libs/libXpm
85 + x11-libs/libXext
86 + x11-libs/libXmu
87 + x11-libs/libXt
88 + )
89 + !motif? (
90 + Xaw3d? (
91 + x11-libs/libXaw3d
92 + x11-libs/libXext
93 + x11-libs/libXmu
94 + x11-libs/libXt
95 + )
96 + !Xaw3d? ( athena? (
97 + x11-libs/libXaw
98 + x11-libs/libXext
99 + x11-libs/libXmu
100 + x11-libs/libXt
101 + ) )
102 + )
103 + ) )"
104 +
105 +DEPEND="${RDEPEND}
106 + gui? ( !aqua? ( x11-base/xorg-proto ) )"
107 +
108 +BDEPEND="app-eselect/eselect-emacs
109 + virtual/pkgconfig
110 + gzip-el? ( app-arch/gzip )"
111 +
112 +RDEPEND="${RDEPEND}
113 + app-eselect/eselect-emacs"
114 +
115 +EMACS_SUFFIX="emacs-${SLOT}"
116 +SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
117 +# FULL_VERSION keeps the full version number, which is needed in
118 +# order to determine some path information correctly for copy/move
119 +# operations later on
120 +FULL_VERSION="${PV%%_*}"
121 +S="${WORKDIR}/emacs-${FULL_VERSION}"
122 +
123 +src_prepare() {
124 + eapply ../patch
125 + eapply_user
126 +
127 + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
128 + || die "unable to sed ctags.1"
129 +
130 + if ! use alsa; then
131 + # ALSA is detected even if not requested by its USE flag.
132 + # Suppress it by supplying pkg-config with a wrong library name.
133 + sed -i -e "/ALSA_MODULES=/s/alsa/DiSaBlEaLsA/" configure.in \
134 + || die "unable to sed configure.in"
135 + fi
136 + if ! use gzip-el; then
137 + # Emacs' build system automatically detects the gzip binary and
138 + # compresses el files. We don't want that so confuse it with a
139 + # wrong binary name
140 + sed -i -e "s/ gzip/ PrEvEnTcOmPrEsSiOn/" configure.in \
141 + || die "unable to sed configure.in"
142 + fi
143 +
144 + mv configure.in configure.ac || die
145 + eautoreconf
146 + touch src/stamp-h.in || die
147 +}
148 +
149 +src_configure() {
150 + strip-flags
151 + filter-flags -fstrict-aliasing -pie
152 + append-flags $(test-flags -fno-strict-aliasing)
153 + append-ldflags $(test-flags -no-pie) #639568
154 +
155 + if use ia64; then
156 + replace-flags "-O[2-9]" -O1 #325373
157 + else
158 + replace-flags "-O[3-9]" -O2
159 + fi
160 +
161 + # Don't trigger a floating point exception for NaNs on alpha
162 + use alpha && append-flags -mieee
163 +
164 + local myconf
165 +
166 + if use alsa && ! use sound; then
167 + einfo "Although sound USE flag is disabled you chose to have alsa,"
168 + einfo "so sound is switched on anyway."
169 + myconf+=" --with-sound"
170 + else
171 + myconf+=" $(use_with sound)"
172 + fi
173 +
174 + if ! use gui; then
175 + einfo "Configuring to build without window system support"
176 + myconf+=" --without-x --without-ns"
177 + elif use aqua; then
178 + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support"
179 + myconf+=" --with-ns --disable-ns-self-contained"
180 + myconf+=" --without-x"
181 + else
182 + myconf+=" --with-x --without-ns"
183 + myconf+=" $(use_with gconf)"
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 +
192 + if use xft; then
193 + myconf+=" --with-xft"
194 + myconf+=" $(use_with m17n-lib libotf)"
195 + myconf+=" $(use_with m17n-lib m17n-flt)"
196 + else
197 + myconf+=" --without-xft"
198 + myconf+=" --without-libotf --without-m17n-flt"
199 + use m17n-lib && ewarn \
200 + "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
201 + fi
202 +
203 + local f
204 + if use motif; then
205 + einfo "Configuring to build with Motif toolkit"
206 + myconf+=" --with-x-toolkit=motif"
207 + for f in Xaw3d athena; do
208 + use ${f} && ewarn \
209 + "USE flag \"${f}\" has no effect if \"motif\" is set."
210 + done
211 + elif use athena || use Xaw3d; then
212 + einfo "Configuring to build with Athena/Lucid toolkit"
213 + myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
214 + else
215 + einfo "Configuring to build with no toolkit"
216 + myconf+=" --with-x-toolkit=no"
217 + fi
218 + fi
219 +
220 + # According to configure, this option is only used for GNU/Linux
221 + # (x86_64 and s390). For Gentoo Prefix we have to explicitly spell
222 + # out the location because $(get_libdir) does not necessarily return
223 + # something that matches the host OS's libdir naming (e.g. RHEL).
224 + local crtdir=$($(tc-getCC) -print-file-name=crt1.o)
225 + crtdir=${crtdir%/*}
226 +
227 + econf \
228 + --program-suffix="-${EMACS_SUFFIX}" \
229 + --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
230 + --localstatedir="${EPREFIX}"/var \
231 + --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
232 + --with-crt-dir="${crtdir}" \
233 + --with-gameuser=":gamestat" \
234 + --without-hesiod \
235 + $(use_with kerberos) $(use_with kerberos kerberos5) \
236 + $(use_with gpm) \
237 + $(use_with dbus) \
238 + ${myconf}
239 +}
240 +
241 +src_compile() {
242 + # Disable sandbox when dumping. For the unbelievers, see bug #131505
243 + emake CC="$(tc-getCC)" \
244 + AR="$(tc-getAR) cq" \
245 + RANLIB="$(tc-getRANLIB)" \
246 + RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
247 +}
248 +
249 +src_install() {
250 + emake DESTDIR="${D}" install
251 +
252 + rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
253 + || die "removing duplicate emacs executable failed"
254 + mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \
255 + || die "moving emacs executable failed"
256 +
257 + # move man pages to the correct place
258 + local m
259 + mv "${ED}"/usr/share/man/man1/{emacs,${EMACS_SUFFIX}}.1 \
260 + || die "moving emacs man page failed"
261 + for m in b2m ctags ebrowse emacsclient etags grep-changelog rcs-checkin; do
262 + mv "${ED}"/usr/share/man/man1/${m}{,-${EMACS_SUFFIX}}.1 \
263 + || die "moving ${m} man page failed"
264 + done
265 +
266 + # move info dir to avoid collisions with the dir file generated by portage
267 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
268 + || die "moving info dir failed"
269 + touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
270 + docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
271 +
272 + # movemail must be setgid mail
273 + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
274 + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
275 +
276 + # avoid collision between slots, see bug #169033 e.g.
277 + rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
278 + rm -rf "${ED}"/usr/share/{applications,icons}
279 + rm -rf "${ED}"/var
280 +
281 + # remove unused <version>/site-lisp dir
282 + rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
283 +
284 + # remove COPYING file (except for etc/COPYING used by describe-copying)
285 + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
286 +
287 + local cdir
288 + if use source; then
289 + cdir="/usr/share/emacs/${FULL_VERSION}/src"
290 + insinto "${cdir}"
291 + # This is not meant to install all the source -- just the
292 + # C source you might find via find-function
293 + doins src/*.{c,h,m}
294 + doins -r src/{m,s}
295 + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/Makefile.c
296 + rm "${ED}"/usr/share/emacs/${FULL_VERSION}/src/{m,s}/README
297 + elif has installsources ${FEATURES}; then
298 + cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
299 + fi
300 +
301 + sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die
302 + X
303 + ;;; ${EMACS_SUFFIX} site-lisp configuration
304 + X
305 + (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
306 + Y (setq find-function-C-source-directory
307 + Y "${EPREFIX}${cdir}")
308 + X (let ((path (getenv "INFOPATH"))
309 + X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
310 + X (re "\\\\\`${EPREFIX}/usr/share\\\\>"))
311 + X (and path
312 + X ;; move Emacs Info dir before anything else in /usr/share
313 + X (let* ((p (cons nil (split-string path ":" t))) (q p))
314 + X (while (and (cdr q) (not (string-match re (cadr q))))
315 + X (setq q (cdr q)))
316 + X (setcdr q (cons dir (delete dir (cdr q))))
317 + X (setq Info-directory-list (prune-directory-list (cdr p)))))))
318 + EOF
319 + elisp-site-file-install "${T}/${SITEFILE}" || die
320 +
321 + dodoc README BUGS
322 +
323 + if use gui && use aqua; then
324 + dodir /Applications/Gentoo
325 + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app
326 + mv nextstep/Emacs.app \
327 + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die
328 + fi
329 +
330 + local DOC_CONTENTS="You can set the version to be started by
331 + /usr/bin/emacs through the Emacs eselect module, which also
332 + redirects man and info pages. Therefore, several Emacs versions can
333 + be installed at the same time. \"man emacs.eselect\" for details.
334 + \\n\\nIf you upgrade from a previous major version of Emacs, then
335 + it is strongly recommended that you use app-admin/emacs-updater
336 + to rebuild all byte-compiled elisp files of the installed Emacs
337 + packages."
338 + if use gui; then
339 + DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
340 + Installing media-fonts/font-adobe-{75,100}dpi on the X server's
341 + machine would satisfy basic Emacs requirements under X11.
342 + See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
343 + for how to enable anti-aliased fonts."
344 + use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in
345 + \"${EPREFIX}/Applications/Gentoo\". You may want to copy or
346 + symlink it into /Applications by yourself."
347 + fi
348 + readme.gentoo_create_doc
349 +}
350 +
351 +pkg_preinst() {
352 + # move Info dir file to correct name
353 + if [[ -d ${ED}/usr/share/info ]]; then
354 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
355 + fi
356 +}
357 +
358 +pkg_postinst() {
359 + elisp-site-regen
360 + readme.gentoo_print_elog
361 +
362 + if use livecd; then
363 + # force an update of the emacs symlink for the livecd/dvd,
364 + # because some microemacs packages set it with USE=livecd
365 + eselect emacs update
366 + elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
367 + # refresh symlinks in case any installed files have changed
368 + eselect emacs set ${EMACS_SUFFIX}
369 + else
370 + eselect emacs update ifunset
371 + fi
372 +}
373 +
374 +pkg_postrm() {
375 + elisp-site-regen
376 + eselect emacs update ifunset
377 +}
378
379 diff --git a/app-editors/emacs/emacs-28.0.9999.ebuild b/app-editors/emacs/emacs-24.5-r10.ebuild
380 similarity index 60%
381 copy from app-editors/emacs/emacs-28.0.9999.ebuild
382 copy to app-editors/emacs/emacs-24.5-r10.ebuild
383 index bb7f7b6c96c..e67fbd411cb 100644
384 --- a/app-editors/emacs/emacs-28.0.9999.ebuild
385 +++ b/app-editors/emacs/emacs-24.5-r10.ebuild
386 @@ -3,74 +3,40 @@
387
388 EAPI=7
389
390 -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs
391 -
392 -if [[ ${PV##*.} = 9999 ]]; then
393 - inherit git-r3
394 - EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
395 - EGIT_BRANCH="master"
396 - EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
397 - S="${EGIT_CHECKOUT_DIR}"
398 - SLOT="${PV%%.*}-vcs"
399 -else
400 - # FULL_VERSION keeps the full version number, which is needed in
401 - # order to determine some path information correctly for copy/move
402 - # operations later on
403 - FULL_VERSION="${PV%%_*}"
404 - SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
405 - S="${WORKDIR}/emacs-${FULL_VERSION}"
406 - # PV can be in any of the following formats:
407 - # 27.1 released version (slot 27)
408 - # 27.1_rc1 upstream release candidate (27)
409 - # 27.0.9999 live ebuild (slot 27-vcs)
410 - # 27.0.90 upstream prerelease snapshot (27-vcs)
411 - # 27.0.50_pre20191223 snapshot by Gentoo developer (27-vcs)
412 - if [[ ${PV} == *_pre* ]]; then
413 - SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
414 - S="${WORKDIR}/emacs"
415 - elif [[ ${PV//[0-9]} != "." ]]; then
416 - SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
417 - fi
418 - SLOT="${PV%%.*}"
419 - [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
420 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
421 -fi
422 +inherit autotools elisp-common flag-o-matic readme.gentoo-r1
423
424 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
425 HOMEPAGE="https://www.gnu.org/software/emacs/"
426 +SRC_URI="mirror://gnu/emacs/${P}.tar.xz
427 + https://dev.gentoo.org/~ulm/emacs/${P}-patches-5.tar.xz"
428
429 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
430 -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"
431 -RESTRICT="test"
432 +SLOT="24"
433 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
434 +IUSE="acl alsa aqua athena dbus games gconf gfile gif gpm gsettings gtk gui gzip-el imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm zlib"
435
436 -RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
437 +RDEPEND="acct-group/mail
438 + app-emacs/emacs-common-gentoo[games?,gui(-)?]
439 + net-libs/liblockfile
440 sys-libs/ncurses:0=
441 acl? ( virtual/acl )
442 alsa? ( media-libs/alsa-lib )
443 dbus? ( sys-apps/dbus )
444 games? ( acct-group/gamestat )
445 - gmp? ( dev-libs/gmp:0= )
446 gpm? ( sys-libs/gpm )
447 !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
448 - json? ( dev-libs/jansson )
449 kerberos? ( virtual/krb5 )
450 - lcms? ( media-libs/lcms:2 )
451 libxml2? ( >=dev-libs/libxml2-2.2.0 )
452 - mailutils? ( net-mail/mailutils[clients] )
453 - !mailutils? ( acct-group/mail net-libs/liblockfile )
454 selinux? ( sys-libs/libselinux )
455 ssl? ( net-libs/gnutls:0= )
456 - systemd? ( sys-apps/systemd )
457 zlib? ( sys-libs/zlib )
458 gui? ( !aqua? (
459 x11-libs/libICE
460 x11-libs/libSM
461 x11-libs/libX11
462 x11-libs/libXext
463 - x11-libs/libXfixes
464 x11-libs/libXinerama
465 x11-libs/libXrandr
466 - x11-libs/libxcb
467 x11-misc/xbitmaps
468 gconf? ( >=gnome-base/gconf-2.26.2 )
469 gsettings? ( >=dev-libs/glib-2.28.6 )
470 @@ -86,23 +52,12 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
471 media-libs/freetype
472 x11-libs/libXft
473 x11-libs/libXrender
474 - cairo? ( >=x11-libs/cairo-1.12.18 )
475 - harfbuzz? ( media-libs/harfbuzz:0= )
476 m17n-lib? (
477 >=dev-libs/libotf-0.9.4
478 >=dev-libs/m17n-lib-1.5.1
479 )
480 )
481 - gtk? (
482 - gtk2? ( x11-libs/gtk+:2 )
483 - !gtk2? (
484 - x11-libs/gtk+:3
485 - xwidgets? (
486 - net-libs/webkit-gtk:4=
487 - x11-libs/libXcomposite
488 - )
489 - )
490 - )
491 + gtk? ( x11-libs/gtk+:3 )
492 !gtk? (
493 motif? (
494 >=x11-libs/motif-2.3:0
495 @@ -129,7 +84,6 @@ DEPEND="${RDEPEND}
496 gui? ( !aqua? ( x11-base/xorg-proto ) )"
497
498 BDEPEND="app-eselect/eselect-emacs
499 - sys-apps/texinfo
500 virtual/pkgconfig
501 gzip-el? ( app-arch/gzip )"
502
503 @@ -138,30 +92,28 @@ RDEPEND="${RDEPEND}
504
505 EMACS_SUFFIX="emacs-${SLOT}"
506 SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
507 +# FULL_VERSION keeps the full version number, which is needed in
508 +# order to determine some path information correctly for copy/move
509 +# operations later on
510 +FULL_VERSION="${PV%%_*}"
511 +S="${WORKDIR}/emacs-${FULL_VERSION}"
512
513 src_prepare() {
514 - if [[ ${PV##*.} = 9999 ]]; then
515 - FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
516 - configure.ac)
517 - [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
518 - einfo "Emacs branch: ${EGIT_BRANCH}"
519 - einfo "Commit: ${EGIT_VERSION}"
520 - einfo "Emacs version number: ${FULL_VERSION}"
521 - [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
522 - || die "Upstream version number changed to ${FULL_VERSION}"
523 - fi
524 -
525 + eapply ../patch
526 eapply_user
527
528 # Fix filename reference in redirected man page
529 - sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die
530 + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
531 + || die "unable to sed ctags.1"
532
533 AT_M4DIR=m4 eautoreconf
534 + touch src/stamp-h.in || die
535 }
536
537 src_configure() {
538 strip-flags
539 filter-flags -pie #526948
540 + append-ldflags $(test-flags -no-pie) #639570
541
542 if use ia64; then
543 replace-flags "-O[2-9]" -O1 #325373
544 @@ -169,6 +121,9 @@ src_configure() {
545 replace-flags "-O[3-9]" -O2
546 fi
547
548 + # Don't trigger a floating point exception for NaNs on alpha
549 + use alpha && append-flags -mieee
550 +
551 local myconf
552
553 if use alsa; then
554 @@ -201,16 +156,11 @@ src_configure() {
555
556 if use xft; then
557 myconf+=" --with-xft"
558 - myconf+=" $(use_with cairo)"
559 - myconf+=" $(use_with harfbuzz)"
560 myconf+=" $(use_with m17n-lib libotf)"
561 myconf+=" $(use_with m17n-lib m17n-flt)"
562 else
563 myconf+=" --without-xft"
564 - myconf+=" --without-cairo"
565 myconf+=" --without-libotf --without-m17n-flt"
566 - use cairo && ewarn \
567 - "USE flag \"cairo\" has no effect if \"xft\" is not set."
568 use m17n-lib && ewarn \
569 "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
570 fi
571 @@ -228,13 +178,7 @@ src_configure() {
572 recommended that you compile Emacs with the Athena/Lucid or the
573 Motif toolkit instead.
574 EOF
575 - if use gtk2; then
576 - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
577 - use xwidgets && ewarn \
578 - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
579 - else
580 - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
581 - fi
582 + myconf+=" --with-x-toolkit=gtk3"
583 for f in motif Xaw3d athena; do
584 use ${f} && ewarn \
585 "USE flag \"${f}\" has no effect if \"gtk\" is set."
586 @@ -253,92 +197,55 @@ src_configure() {
587 einfo "Configuring to build with no toolkit"
588 myconf+=" --with-x-toolkit=no"
589 fi
590 - if ! use gtk; then
591 - use gtk2 && ewarn \
592 - "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
593 - use xwidgets && ewarn \
594 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
595 - fi
596 - fi
597 -
598 - if tc-is-cross-compiler; then
599 - # Configure a CBUILD directory when cross-compiling to make tools
600 - mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
601 - ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit
602 - popd >/dev/null || die
603 - # Don't try to execute the binary for dumping during the build
604 - myconf+=" --with-dumping=none"
605 - else
606 - myconf+=" --with-dumping=pdumper"
607 fi
608
609 econf \
610 --program-suffix="-${EMACS_SUFFIX}" \
611 - --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
612 --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
613 --localstatedir="${EPREFIX}"/var \
614 --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
615 + --with-gameuser=":gamestat" \
616 --without-compress-install \
617 --without-hesiod \
618 - --without-pop \
619 --with-file-notification=$(usev inotify || usev gfile || echo no) \
620 - --with-pdumper \
621 $(use_enable acl) \
622 $(use_with dbus) \
623 - $(use_with dynamic-loading modules) \
624 - $(use_with games gameuser ":gamestat") \
625 - $(use_with gmp libgmp) \
626 $(use_with gpm) \
627 - $(use_with json) \
628 $(use_with kerberos) $(use_with kerberos kerberos5) \
629 - $(use_with lcms lcms2) \
630 $(use_with libxml2 xml2) \
631 - $(use_with mailutils) \
632 $(use_with selinux) \
633 $(use_with ssl gnutls) \
634 - $(use_with systemd libsystemd) \
635 - $(use_with threads) \
636 $(use_with wide-int) \
637 $(use_with zlib) \
638 ${myconf}
639 }
640
641 src_compile() {
642 - if tc-is-cross-compiler; then
643 - # Build native tools for compiling lisp etc.
644 - emake -C "${S}-build" src
645 - emake lib # Cross-compile dependencies first for timestamps
646 - # Save native build tools in the cross-directory
647 - cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die
648 - # Specify the native Emacs to compile lisp
649 - emake -C lisp all EMACS="${S}-build/src/emacs"
650 - fi
651 -
652 - emake
653 + # Disable sandbox when dumping. For the unbelievers, see bug #131505
654 + emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
655 }
656
657 src_install() {
658 emake DESTDIR="${D}" NO_BIN_LINK=t BLESSMAIL_TARGET= install
659
660 - mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die
661 - mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
662 - mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die
663 + mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \
664 + || die "moving emacs executable failed"
665 + mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \
666 + || die "moving emacs man page failed"
667
668 # move info dir to avoid collisions with the dir file generated by portage
669 - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
670 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
671 + || die "moving info dir failed"
672 touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
673 docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
674
675 # movemail must be setgid mail
676 - if ! use mailutils; then
677 - fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
678 - fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
679 - fi
680 + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
681 + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
682
683 # avoid collision between slots, see bug #169033 e.g.
684 rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
685 - rm -rf "${ED}"/usr/share/{appdata,applications,icons}
686 - rm -rf "${ED}/usr/$(get_libdir)"
687 + rm -rf "${ED}"/usr/share/{applications,icons}
688 rm -rf "${ED}"/var
689
690 # remove unused <version>/site-lisp dir
691 @@ -347,15 +254,6 @@ src_install() {
692 # remove COPYING file (except for etc/COPYING used by describe-copying)
693 rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
694
695 - if use systemd; then
696 - insinto /usr/lib/systemd/user
697 - sed -e "/^##/d" \
698 - -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
699 - -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
700 - etc/emacs.service | newins - ${EMACS_SUFFIX}.service
701 - assert
702 - fi
703 -
704 if use gzip-el; then
705 # compress .el files when a corresponding .elc exists
706 find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
707 @@ -394,7 +292,7 @@ src_install() {
708 EOF
709 elisp-site-file-install "${T}/${SITEFILE}" || die
710
711 - dodoc README BUGS CONTRIBUTE
712 + dodoc README BUGS
713
714 if use gui && use aqua; then
715 dodir /Applications/Gentoo
716 @@ -407,10 +305,9 @@ src_install() {
717 /usr/bin/emacs through the Emacs eselect module, which also
718 redirects man and info pages. Therefore, several Emacs versions can
719 be installed at the same time. \"man emacs.eselect\" for details.
720 - \\n\\nIf you upgrade from a previous major version of Emacs, then
721 - it is strongly recommended that you use app-admin/emacs-updater
722 - to rebuild all byte-compiled elisp files of the installed Emacs
723 - packages."
724 + \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is
725 + strongly recommended that you use app-admin/emacs-updater to rebuild
726 + all byte-compiled elisp files of the installed Emacs packages."
727 if use gui; then
728 DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
729 Installing media-fonts/font-adobe-{75,100}dpi on the X server's
730 @@ -421,11 +318,6 @@ src_install() {
731 \"${EPREFIX}/Applications/Gentoo\". You may want to copy or
732 symlink it into /Applications by yourself."
733 fi
734 - tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write
735 - a portable dump file due to being cross-compiled.
736 - To create this file at run time, execute the following command:
737 - \\n${EMACS_SUFFIX} --batch --eval='(dump-emacs-portable
738 - \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'"
739 readme.gentoo_create_doc
740 }
741
742
743 diff --git a/app-editors/emacs/emacs-28.0.9999.ebuild b/app-editors/emacs/emacs-25.3-r9.ebuild
744 similarity index 65%
745 copy from app-editors/emacs/emacs-28.0.9999.ebuild
746 copy to app-editors/emacs/emacs-25.3-r9.ebuild
747 index bb7f7b6c96c..95929b38fad 100644
748 --- a/app-editors/emacs/emacs-28.0.9999.ebuild
749 +++ b/app-editors/emacs/emacs-25.3-r9.ebuild
750 @@ -3,64 +3,32 @@
751
752 EAPI=7
753
754 -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs
755 -
756 -if [[ ${PV##*.} = 9999 ]]; then
757 - inherit git-r3
758 - EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
759 - EGIT_BRANCH="master"
760 - EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
761 - S="${EGIT_CHECKOUT_DIR}"
762 - SLOT="${PV%%.*}-vcs"
763 -else
764 - # FULL_VERSION keeps the full version number, which is needed in
765 - # order to determine some path information correctly for copy/move
766 - # operations later on
767 - FULL_VERSION="${PV%%_*}"
768 - SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
769 - S="${WORKDIR}/emacs-${FULL_VERSION}"
770 - # PV can be in any of the following formats:
771 - # 27.1 released version (slot 27)
772 - # 27.1_rc1 upstream release candidate (27)
773 - # 27.0.9999 live ebuild (slot 27-vcs)
774 - # 27.0.90 upstream prerelease snapshot (27-vcs)
775 - # 27.0.50_pre20191223 snapshot by Gentoo developer (27-vcs)
776 - if [[ ${PV} == *_pre* ]]; then
777 - SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
778 - S="${WORKDIR}/emacs"
779 - elif [[ ${PV//[0-9]} != "." ]]; then
780 - SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
781 - fi
782 - SLOT="${PV%%.*}"
783 - [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
784 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
785 -fi
786 +inherit autotools elisp-common flag-o-matic readme.gentoo-r1
787
788 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
789 HOMEPAGE="https://www.gnu.org/software/emacs/"
790 +SRC_URI="mirror://gnu/emacs/${P}.tar.xz
791 + https://dev.gentoo.org/~ulm/emacs/${P}-patches-2.tar.xz"
792
793 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
794 -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"
795 -RESTRICT="test"
796 +SLOT="25"
797 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
798 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk gui gzip-el imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm zlib"
799
800 -RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
801 +RDEPEND="acct-group/mail
802 + app-emacs/emacs-common-gentoo[games?,gui(-)?]
803 + net-libs/liblockfile
804 sys-libs/ncurses:0=
805 acl? ( virtual/acl )
806 alsa? ( media-libs/alsa-lib )
807 dbus? ( sys-apps/dbus )
808 games? ( acct-group/gamestat )
809 - gmp? ( dev-libs/gmp:0= )
810 gpm? ( sys-libs/gpm )
811 !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
812 - json? ( dev-libs/jansson )
813 kerberos? ( virtual/krb5 )
814 - lcms? ( media-libs/lcms:2 )
815 libxml2? ( >=dev-libs/libxml2-2.2.0 )
816 - mailutils? ( net-mail/mailutils[clients] )
817 - !mailutils? ( acct-group/mail net-libs/liblockfile )
818 selinux? ( sys-libs/libselinux )
819 ssl? ( net-libs/gnutls:0= )
820 - systemd? ( sys-apps/systemd )
821 zlib? ( sys-libs/zlib )
822 gui? ( !aqua? (
823 x11-libs/libICE
824 @@ -87,22 +55,12 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
825 x11-libs/libXft
826 x11-libs/libXrender
827 cairo? ( >=x11-libs/cairo-1.12.18 )
828 - harfbuzz? ( media-libs/harfbuzz:0= )
829 m17n-lib? (
830 >=dev-libs/libotf-0.9.4
831 >=dev-libs/m17n-lib-1.5.1
832 )
833 )
834 - gtk? (
835 - gtk2? ( x11-libs/gtk+:2 )
836 - !gtk2? (
837 - x11-libs/gtk+:3
838 - xwidgets? (
839 - net-libs/webkit-gtk:4=
840 - x11-libs/libXcomposite
841 - )
842 - )
843 - )
844 + gtk? ( x11-libs/gtk+:3 )
845 !gtk? (
846 motif? (
847 >=x11-libs/motif-2.3:0
848 @@ -129,34 +87,31 @@ DEPEND="${RDEPEND}
849 gui? ( !aqua? ( x11-base/xorg-proto ) )"
850
851 BDEPEND="app-eselect/eselect-emacs
852 - sys-apps/texinfo
853 virtual/pkgconfig
854 gzip-el? ( app-arch/gzip )"
855
856 RDEPEND="${RDEPEND}
857 + !<app-editors/emacs-vcs-${PV}
858 app-eselect/eselect-emacs"
859
860 EMACS_SUFFIX="emacs-${SLOT}"
861 SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
862 +# FULL_VERSION keeps the full version number, which is needed in
863 +# order to determine some path information correctly for copy/move
864 +# operations later on
865 +FULL_VERSION="${PV%%_*}"
866 +S="${WORKDIR}/emacs-${FULL_VERSION}"
867
868 src_prepare() {
869 - if [[ ${PV##*.} = 9999 ]]; then
870 - FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
871 - configure.ac)
872 - [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
873 - einfo "Emacs branch: ${EGIT_BRANCH}"
874 - einfo "Commit: ${EGIT_VERSION}"
875 - einfo "Emacs version number: ${FULL_VERSION}"
876 - [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
877 - || die "Upstream version number changed to ${FULL_VERSION}"
878 - fi
879 -
880 + eapply ../patch
881 eapply_user
882
883 # Fix filename reference in redirected man page
884 - sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 || die
885 + sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
886 + || die "unable to sed ctags.1"
887
888 AT_M4DIR=m4 eautoreconf
889 + touch src/stamp-h.in || die
890 }
891
892 src_configure() {
893 @@ -169,6 +124,9 @@ src_configure() {
894 replace-flags "-O[3-9]" -O2
895 fi
896
897 + # Don't trigger a floating point exception for NaNs on alpha
898 + use alpha && append-flags -mieee
899 +
900 local myconf
901
902 if use alsa; then
903 @@ -202,7 +160,6 @@ src_configure() {
904 if use xft; then
905 myconf+=" --with-xft"
906 myconf+=" $(use_with cairo)"
907 - myconf+=" $(use_with harfbuzz)"
908 myconf+=" $(use_with m17n-lib libotf)"
909 myconf+=" $(use_with m17n-lib m17n-flt)"
910 else
911 @@ -228,13 +185,8 @@ src_configure() {
912 recommended that you compile Emacs with the Athena/Lucid or the
913 Motif toolkit instead.
914 EOF
915 - if use gtk2; then
916 - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
917 - use xwidgets && ewarn \
918 - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
919 - else
920 - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
921 - fi
922 + myconf+=" --with-x-toolkit=gtk3"
923 + myconf+=" --without-xwidgets"
924 for f in motif Xaw3d athena; do
925 use ${f} && ewarn \
926 "USE flag \"${f}\" has no effect if \"gtk\" is set."
927 @@ -253,92 +205,56 @@ src_configure() {
928 einfo "Configuring to build with no toolkit"
929 myconf+=" --with-x-toolkit=no"
930 fi
931 - if ! use gtk; then
932 - use gtk2 && ewarn \
933 - "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
934 - use xwidgets && ewarn \
935 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
936 - fi
937 - fi
938 -
939 - if tc-is-cross-compiler; then
940 - # Configure a CBUILD directory when cross-compiling to make tools
941 - mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
942 - ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit
943 - popd >/dev/null || die
944 - # Don't try to execute the binary for dumping during the build
945 - myconf+=" --with-dumping=none"
946 - else
947 - myconf+=" --with-dumping=pdumper"
948 fi
949
950 econf \
951 --program-suffix="-${EMACS_SUFFIX}" \
952 - --includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
953 --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
954 --localstatedir="${EPREFIX}"/var \
955 --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
956 + --with-gameuser=":gamestat" \
957 --without-compress-install \
958 --without-hesiod \
959 - --without-pop \
960 --with-file-notification=$(usev inotify || usev gfile || echo no) \
961 - --with-pdumper \
962 $(use_enable acl) \
963 $(use_with dbus) \
964 $(use_with dynamic-loading modules) \
965 - $(use_with games gameuser ":gamestat") \
966 - $(use_with gmp libgmp) \
967 $(use_with gpm) \
968 - $(use_with json) \
969 $(use_with kerberos) $(use_with kerberos kerberos5) \
970 - $(use_with lcms lcms2) \
971 $(use_with libxml2 xml2) \
972 - $(use_with mailutils) \
973 $(use_with selinux) \
974 $(use_with ssl gnutls) \
975 - $(use_with systemd libsystemd) \
976 - $(use_with threads) \
977 $(use_with wide-int) \
978 $(use_with zlib) \
979 ${myconf}
980 }
981
982 src_compile() {
983 - if tc-is-cross-compiler; then
984 - # Build native tools for compiling lisp etc.
985 - emake -C "${S}-build" src
986 - emake lib # Cross-compile dependencies first for timestamps
987 - # Save native build tools in the cross-directory
988 - cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die
989 - # Specify the native Emacs to compile lisp
990 - emake -C lisp all EMACS="${S}-build/src/emacs"
991 - fi
992 -
993 - emake
994 + # Disable sandbox when dumping. For the unbelievers, see bug #131505
995 + emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
996 }
997
998 src_install() {
999 emake DESTDIR="${D}" NO_BIN_LINK=t BLESSMAIL_TARGET= install
1000
1001 - mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} || die
1002 - mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 || die
1003 - mv "${ED}"/usr/share/metainfo/{emacs-,}${EMACS_SUFFIX}.appdata.xml || die
1004 + mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \
1005 + || die "moving emacs executable failed"
1006 + mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \
1007 + || die "moving emacs man page failed"
1008
1009 # move info dir to avoid collisions with the dir file generated by portage
1010 - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} || die
1011 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
1012 + || die "moving info dir failed"
1013 touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
1014 docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
1015
1016 # movemail must be setgid mail
1017 - if ! use mailutils; then
1018 - fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
1019 - fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
1020 - fi
1021 + fowners root:mail /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
1022 + fperms 2751 /usr/libexec/emacs/${FULL_VERSION}/${CHOST}/movemail
1023
1024 # avoid collision between slots, see bug #169033 e.g.
1025 rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
1026 rm -rf "${ED}"/usr/share/{appdata,applications,icons}
1027 - rm -rf "${ED}/usr/$(get_libdir)"
1028 rm -rf "${ED}"/var
1029
1030 # remove unused <version>/site-lisp dir
1031 @@ -347,15 +263,6 @@ src_install() {
1032 # remove COPYING file (except for etc/COPYING used by describe-copying)
1033 rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
1034
1035 - if use systemd; then
1036 - insinto /usr/lib/systemd/user
1037 - sed -e "/^##/d" \
1038 - -e "/^ExecStart/s,emacs,${EPREFIX}/usr/bin/${EMACS_SUFFIX}," \
1039 - -e "/^ExecStop/s,emacsclient,${EPREFIX}/usr/bin/&-${EMACS_SUFFIX}," \
1040 - etc/emacs.service | newins - ${EMACS_SUFFIX}.service
1041 - assert
1042 - fi
1043 -
1044 if use gzip-el; then
1045 # compress .el files when a corresponding .elc exists
1046 find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
1047 @@ -421,11 +328,6 @@ src_install() {
1048 \"${EPREFIX}/Applications/Gentoo\". You may want to copy or
1049 symlink it into /Applications by yourself."
1050 fi
1051 - tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write
1052 - a portable dump file due to being cross-compiled.
1053 - To create this file at run time, execute the following command:
1054 - \\n${EMACS_SUFFIX} --batch --eval='(dump-emacs-portable
1055 - \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'"
1056 readme.gentoo_create_doc
1057 }
1058
1059
1060 diff --git a/app-editors/emacs/emacs-27.1.91.ebuild b/app-editors/emacs/emacs-26.3-r4.ebuild
1061 similarity index 73%
1062 copy from app-editors/emacs/emacs-27.1.91.ebuild
1063 copy to app-editors/emacs/emacs-26.3-r4.ebuild
1064 index d780f886638..41f63edeeb4 100644
1065 --- a/app-editors/emacs/emacs-27.1.91.ebuild
1066 +++ b/app-editors/emacs/emacs-26.3-r4.ebuild
1067 @@ -3,45 +3,16 @@
1068
1069 EAPI=7
1070
1071 -inherit autotools elisp-common flag-o-matic readme.gentoo-r1 toolchain-funcs
1072 -
1073 -if [[ ${PV##*.} = 9999 ]]; then
1074 - inherit git-r3
1075 - EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
1076 - EGIT_BRANCH="emacs-27"
1077 - EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
1078 - S="${EGIT_CHECKOUT_DIR}"
1079 - SLOT="${PV%%.*}-vcs"
1080 -else
1081 - # FULL_VERSION keeps the full version number, which is needed in
1082 - # order to determine some path information correctly for copy/move
1083 - # operations later on
1084 - FULL_VERSION="${PV%%_*}"
1085 - SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
1086 - S="${WORKDIR}/emacs-${FULL_VERSION}"
1087 - # PV can be in any of the following formats:
1088 - # 27.1 released version (slot 27)
1089 - # 27.1_rc1 upstream release candidate (27)
1090 - # 27.0.9999 live ebuild (slot 27-vcs)
1091 - # 27.0.90 upstream prerelease snapshot (27-vcs)
1092 - # 27.0.50_pre20191223 snapshot by Gentoo developer (27-vcs)
1093 - if [[ ${PV} == *_pre* ]]; then
1094 - SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
1095 - S="${WORKDIR}/emacs"
1096 - elif [[ ${PV//[0-9]} != "." ]]; then
1097 - SRC_URI="mirror://gnu-alpha/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
1098 - fi
1099 - SLOT="${PV%%.*}"
1100 - [[ ${PV} == *.*.* ]] && SLOT+="-vcs"
1101 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
1102 -fi
1103 +inherit autotools elisp-common flag-o-matic readme.gentoo-r1
1104
1105 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
1106 HOMEPAGE="https://www.gnu.org/software/emacs/"
1107 +SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
1108
1109 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
1110 -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"
1111 -RESTRICT="test"
1112 +SLOT="26"
1113 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
1114 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk gui 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 Xaw3d xft +xpm xwidgets zlib"
1115
1116 RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1117 sys-libs/ncurses:0=
1118 @@ -49,10 +20,8 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1119 alsa? ( media-libs/alsa-lib )
1120 dbus? ( sys-apps/dbus )
1121 games? ( acct-group/gamestat )
1122 - gmp? ( dev-libs/gmp:0= )
1123 gpm? ( sys-libs/gpm )
1124 !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
1125 - json? ( dev-libs/jansson )
1126 kerberos? ( virtual/krb5 )
1127 lcms? ( media-libs/lcms:2 )
1128 libxml2? ( >=dev-libs/libxml2-2.2.0 )
1129 @@ -87,20 +56,16 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1130 x11-libs/libXft
1131 x11-libs/libXrender
1132 cairo? ( >=x11-libs/cairo-1.12.18 )
1133 - harfbuzz? ( media-libs/harfbuzz:0= )
1134 m17n-lib? (
1135 >=dev-libs/libotf-0.9.4
1136 >=dev-libs/m17n-lib-1.5.1
1137 )
1138 )
1139 gtk? (
1140 - gtk2? ( x11-libs/gtk+:2 )
1141 - !gtk2? (
1142 - x11-libs/gtk+:3
1143 - xwidgets? (
1144 - net-libs/webkit-gtk:4=
1145 - x11-libs/libXcomposite
1146 - )
1147 + x11-libs/gtk+:3
1148 + xwidgets? (
1149 + net-libs/webkit-gtk:4=
1150 + x11-libs/libXcomposite
1151 )
1152 )
1153 !gtk? (
1154 @@ -129,29 +94,23 @@ DEPEND="${RDEPEND}
1155 gui? ( !aqua? ( x11-base/xorg-proto ) )"
1156
1157 BDEPEND="app-eselect/eselect-emacs
1158 - sys-apps/texinfo
1159 virtual/pkgconfig
1160 gzip-el? ( app-arch/gzip )"
1161
1162 RDEPEND="${RDEPEND}
1163 - !app-editors/emacs-vcs:27
1164 + !<app-editors/emacs-vcs-${PV}
1165 app-eselect/eselect-emacs"
1166
1167 EMACS_SUFFIX="emacs-${SLOT}"
1168 SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
1169 +# FULL_VERSION keeps the full version number, which is needed in
1170 +# order to determine some path information correctly for copy/move
1171 +# operations later on
1172 +FULL_VERSION="${PV%%_*}"
1173 +S="${WORKDIR}/emacs-${FULL_VERSION}"
1174
1175 src_prepare() {
1176 - if [[ ${PV##*.} = 9999 ]]; then
1177 - FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
1178 - configure.ac)
1179 - [[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
1180 - einfo "Emacs branch: ${EGIT_BRANCH}"
1181 - einfo "Commit: ${EGIT_VERSION}"
1182 - einfo "Emacs version number: ${FULL_VERSION}"
1183 - [[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
1184 - || die "Upstream version number changed to ${FULL_VERSION}"
1185 - fi
1186 -
1187 + #eapply ../patch
1188 eapply_user
1189
1190 # Fix filename reference in redirected man page
1191 @@ -203,7 +162,6 @@ src_configure() {
1192 if use xft; then
1193 myconf+=" --with-xft"
1194 myconf+=" $(use_with cairo)"
1195 - myconf+=" $(use_with harfbuzz)"
1196 myconf+=" $(use_with m17n-lib libotf)"
1197 myconf+=" $(use_with m17n-lib m17n-flt)"
1198 else
1199 @@ -229,13 +187,7 @@ src_configure() {
1200 recommended that you compile Emacs with the Athena/Lucid or the
1201 Motif toolkit instead.
1202 EOF
1203 - if use gtk2; then
1204 - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
1205 - use xwidgets && ewarn \
1206 - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
1207 - else
1208 - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1209 - fi
1210 + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1211 for f in motif Xaw3d athena; do
1212 use ${f} && ewarn \
1213 "USE flag \"${f}\" has no effect if \"gtk\" is set."
1214 @@ -254,23 +206,8 @@ src_configure() {
1215 einfo "Configuring to build with no toolkit"
1216 myconf+=" --with-x-toolkit=no"
1217 fi
1218 - if ! use gtk; then
1219 - use gtk2 && ewarn \
1220 - "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
1221 - use xwidgets && ewarn \
1222 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1223 - fi
1224 - fi
1225 -
1226 - if tc-is-cross-compiler; then
1227 - # Configure a CBUILD directory when cross-compiling to make tools
1228 - mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
1229 - ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit
1230 - popd >/dev/null || die
1231 - # Don't try to execute the binary for dumping during the build
1232 - myconf+=" --with-dumping=none"
1233 - else
1234 - myconf+=" --with-dumping=pdumper"
1235 + ! use gtk && use xwidgets && ewarn \
1236 + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1237 fi
1238
1239 econf \
1240 @@ -283,14 +220,11 @@ src_configure() {
1241 --without-hesiod \
1242 --without-pop \
1243 --with-file-notification=$(usev inotify || usev gfile || echo no) \
1244 - --with-pdumper \
1245 $(use_enable acl) \
1246 $(use_with dbus) \
1247 $(use_with dynamic-loading modules) \
1248 $(use_with games gameuser ":gamestat") \
1249 - $(use_with gmp libgmp) \
1250 $(use_with gpm) \
1251 - $(use_with json) \
1252 $(use_with kerberos) $(use_with kerberos kerberos5) \
1253 $(use_with lcms lcms2) \
1254 $(use_with libxml2 xml2) \
1255 @@ -305,17 +239,8 @@ src_configure() {
1256 }
1257
1258 src_compile() {
1259 - if tc-is-cross-compiler; then
1260 - # Build native tools for compiling lisp etc.
1261 - emake -C "${S}-build" src
1262 - emake lib # Cross-compile dependencies first for timestamps
1263 - # Save native build tools in the cross-directory
1264 - cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die
1265 - # Specify the native Emacs to compile lisp
1266 - emake -C lisp all EMACS="${S}-build/src/emacs"
1267 - fi
1268 -
1269 - emake
1270 + # Disable sandbox when dumping. For the unbelievers, see bug #131505
1271 + emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
1272 }
1273
1274 src_install() {
1275 @@ -422,11 +347,6 @@ src_install() {
1276 \"${EPREFIX}/Applications/Gentoo\". You may want to copy or
1277 symlink it into /Applications by yourself."
1278 fi
1279 - tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write
1280 - a portable dump file due to being cross-compiled.
1281 - To create this file at run time, execute the following command:
1282 - \\n${EMACS_SUFFIX} --batch --eval='(dump-emacs-portable
1283 - \"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'"
1284 readme.gentoo_create_doc
1285 }
1286
1287
1288 diff --git a/app-editors/emacs/emacs-27.1.91.ebuild b/app-editors/emacs/emacs-27.1-r4.ebuild
1289 similarity index 94%
1290 copy from app-editors/emacs/emacs-27.1.91.ebuild
1291 copy to app-editors/emacs/emacs-27.1-r4.ebuild
1292 index d780f886638..e585ef414e3 100644
1293 --- a/app-editors/emacs/emacs-27.1.91.ebuild
1294 +++ b/app-editors/emacs/emacs-27.1-r4.ebuild
1295 @@ -40,7 +40,7 @@ DESCRIPTION="The extensible, customizable, self-documenting real-time display ed
1296 HOMEPAGE="https://www.gnu.org/software/emacs/"
1297
1298 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
1299 -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"
1300 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk 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"
1301 RESTRICT="test"
1302
1303 RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1304 @@ -94,13 +94,10 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1305 )
1306 )
1307 gtk? (
1308 - gtk2? ( x11-libs/gtk+:2 )
1309 - !gtk2? (
1310 - x11-libs/gtk+:3
1311 - xwidgets? (
1312 - net-libs/webkit-gtk:4=
1313 - x11-libs/libXcomposite
1314 - )
1315 + x11-libs/gtk+:3
1316 + xwidgets? (
1317 + net-libs/webkit-gtk:4=
1318 + x11-libs/libXcomposite
1319 )
1320 )
1321 !gtk? (
1322 @@ -134,6 +131,7 @@ BDEPEND="app-eselect/eselect-emacs
1323 gzip-el? ( app-arch/gzip )"
1324
1325 RDEPEND="${RDEPEND}
1326 + !<=app-editors/emacs-27.1.9999-r0:27-vcs
1327 !app-editors/emacs-vcs:27
1328 app-eselect/eselect-emacs"
1329
1330 @@ -229,13 +227,7 @@ src_configure() {
1331 recommended that you compile Emacs with the Athena/Lucid or the
1332 Motif toolkit instead.
1333 EOF
1334 - if use gtk2; then
1335 - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
1336 - use xwidgets && ewarn \
1337 - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
1338 - else
1339 - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1340 - fi
1341 + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1342 for f in motif Xaw3d athena; do
1343 use ${f} && ewarn \
1344 "USE flag \"${f}\" has no effect if \"gtk\" is set."
1345 @@ -254,12 +246,8 @@ src_configure() {
1346 einfo "Configuring to build with no toolkit"
1347 myconf+=" --with-x-toolkit=no"
1348 fi
1349 - if ! use gtk; then
1350 - use gtk2 && ewarn \
1351 - "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
1352 - use xwidgets && ewarn \
1353 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1354 - fi
1355 + ! use gtk && use xwidgets && ewarn \
1356 + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1357 fi
1358
1359 if tc-is-cross-compiler; then
1360
1361 diff --git a/app-editors/emacs/emacs-27.1.91.ebuild b/app-editors/emacs/emacs-27.1.91-r1.ebuild
1362 similarity index 94%
1363 rename from app-editors/emacs/emacs-27.1.91.ebuild
1364 rename to app-editors/emacs/emacs-27.1.91-r1.ebuild
1365 index d780f886638..f158a3cfe91 100644
1366 --- a/app-editors/emacs/emacs-27.1.91.ebuild
1367 +++ b/app-editors/emacs/emacs-27.1.91-r1.ebuild
1368 @@ -40,7 +40,7 @@ DESCRIPTION="The extensible, customizable, self-documenting real-time display ed
1369 HOMEPAGE="https://www.gnu.org/software/emacs/"
1370
1371 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
1372 -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"
1373 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk 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"
1374 RESTRICT="test"
1375
1376 RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1377 @@ -94,13 +94,10 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1378 )
1379 )
1380 gtk? (
1381 - gtk2? ( x11-libs/gtk+:2 )
1382 - !gtk2? (
1383 - x11-libs/gtk+:3
1384 - xwidgets? (
1385 - net-libs/webkit-gtk:4=
1386 - x11-libs/libXcomposite
1387 - )
1388 + x11-libs/gtk+:3
1389 + xwidgets? (
1390 + net-libs/webkit-gtk:4=
1391 + x11-libs/libXcomposite
1392 )
1393 )
1394 !gtk? (
1395 @@ -229,13 +226,7 @@ src_configure() {
1396 recommended that you compile Emacs with the Athena/Lucid or the
1397 Motif toolkit instead.
1398 EOF
1399 - if use gtk2; then
1400 - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
1401 - use xwidgets && ewarn \
1402 - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
1403 - else
1404 - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1405 - fi
1406 + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1407 for f in motif Xaw3d athena; do
1408 use ${f} && ewarn \
1409 "USE flag \"${f}\" has no effect if \"gtk\" is set."
1410 @@ -254,12 +245,8 @@ src_configure() {
1411 einfo "Configuring to build with no toolkit"
1412 myconf+=" --with-x-toolkit=no"
1413 fi
1414 - if ! use gtk; then
1415 - use gtk2 && ewarn \
1416 - "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
1417 - use xwidgets && ewarn \
1418 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1419 - fi
1420 + ! use gtk && use xwidgets && ewarn \
1421 + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1422 fi
1423
1424 if tc-is-cross-compiler; then
1425
1426 diff --git a/app-editors/emacs/emacs-27.1.9999-r1.ebuild b/app-editors/emacs/emacs-27.1.9999-r1.ebuild
1427 index 204c8f40dae..6ffdda65f73 100644
1428 --- a/app-editors/emacs/emacs-27.1.9999-r1.ebuild
1429 +++ b/app-editors/emacs/emacs-27.1.9999-r1.ebuild
1430 @@ -40,7 +40,7 @@ DESCRIPTION="The extensible, customizable, self-documenting real-time display ed
1431 HOMEPAGE="https://www.gnu.org/software/emacs/"
1432
1433 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
1434 -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"
1435 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk 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"
1436 RESTRICT="test"
1437
1438 RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1439 @@ -94,13 +94,10 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1440 )
1441 )
1442 gtk? (
1443 - gtk2? ( x11-libs/gtk+:2 )
1444 - !gtk2? (
1445 - x11-libs/gtk+:3
1446 - xwidgets? (
1447 - net-libs/webkit-gtk:4=
1448 - x11-libs/libXcomposite
1449 - )
1450 + x11-libs/gtk+:3
1451 + xwidgets? (
1452 + net-libs/webkit-gtk:4=
1453 + x11-libs/libXcomposite
1454 )
1455 )
1456 !gtk? (
1457 @@ -229,13 +226,7 @@ src_configure() {
1458 recommended that you compile Emacs with the Athena/Lucid or the
1459 Motif toolkit instead.
1460 EOF
1461 - if use gtk2; then
1462 - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
1463 - use xwidgets && ewarn \
1464 - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
1465 - else
1466 - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1467 - fi
1468 + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1469 for f in motif Xaw3d athena; do
1470 use ${f} && ewarn \
1471 "USE flag \"${f}\" has no effect if \"gtk\" is set."
1472 @@ -254,12 +245,8 @@ src_configure() {
1473 einfo "Configuring to build with no toolkit"
1474 myconf+=" --with-x-toolkit=no"
1475 fi
1476 - if ! use gtk; then
1477 - use gtk2 && ewarn \
1478 - "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
1479 - use xwidgets && ewarn \
1480 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1481 - fi
1482 + ! use gtk && use xwidgets && ewarn \
1483 + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1484 fi
1485
1486 if tc-is-cross-compiler; then
1487
1488 diff --git a/app-editors/emacs/emacs-28.0.9999.ebuild b/app-editors/emacs/emacs-28.0.9999.ebuild
1489 index bb7f7b6c96c..c82a42541a8 100644
1490 --- a/app-editors/emacs/emacs-28.0.9999.ebuild
1491 +++ b/app-editors/emacs/emacs-28.0.9999.ebuild
1492 @@ -40,7 +40,7 @@ DESCRIPTION="The extensible, customizable, self-documenting real-time display ed
1493 HOMEPAGE="https://www.gnu.org/software/emacs/"
1494
1495 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
1496 -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"
1497 +IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif +gmp gpm gsettings gtk 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"
1498 RESTRICT="test"
1499
1500 RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1501 @@ -94,13 +94,10 @@ RDEPEND="app-emacs/emacs-common-gentoo[games?,gui(-)?]
1502 )
1503 )
1504 gtk? (
1505 - gtk2? ( x11-libs/gtk+:2 )
1506 - !gtk2? (
1507 - x11-libs/gtk+:3
1508 - xwidgets? (
1509 - net-libs/webkit-gtk:4=
1510 - x11-libs/libXcomposite
1511 - )
1512 + x11-libs/gtk+:3
1513 + xwidgets? (
1514 + net-libs/webkit-gtk:4=
1515 + x11-libs/libXcomposite
1516 )
1517 )
1518 !gtk? (
1519 @@ -228,13 +225,7 @@ src_configure() {
1520 recommended that you compile Emacs with the Athena/Lucid or the
1521 Motif toolkit instead.
1522 EOF
1523 - if use gtk2; then
1524 - myconf+=" --with-x-toolkit=gtk2 --without-xwidgets"
1525 - use xwidgets && ewarn \
1526 - "USE flag \"xwidgets\" has no effect if \"gtk2\" is set."
1527 - else
1528 - myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1529 - fi
1530 + myconf+=" --with-x-toolkit=gtk3 $(use_with xwidgets)"
1531 for f in motif Xaw3d athena; do
1532 use ${f} && ewarn \
1533 "USE flag \"${f}\" has no effect if \"gtk\" is set."
1534 @@ -253,12 +244,8 @@ src_configure() {
1535 einfo "Configuring to build with no toolkit"
1536 myconf+=" --with-x-toolkit=no"
1537 fi
1538 - if ! use gtk; then
1539 - use gtk2 && ewarn \
1540 - "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
1541 - use xwidgets && ewarn \
1542 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1543 - fi
1544 + ! use gtk && use xwidgets && ewarn \
1545 + "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
1546 fi
1547
1548 if tc-is-cross-compiler; then