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