Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/emacs/
Date: Thu, 06 Jun 2019 21:24:06
Message-Id: 1559856232.d98106d224332bf3908048f2d12b9c2188eaafd0.ulm@gentoo
1 commit: d98106d224332bf3908048f2d12b9c2188eaafd0
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 6 21:23:26 2019 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 6 21:23:52 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d98106d2
7
8 app-editors/emacs: Remove old.
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.14
11 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
12
13 app-editors/emacs/Manifest | 2 -
14 app-editors/emacs/emacs-25.3-r4.ebuild | 372 -------------------------------
15 app-editors/emacs/emacs-26.1-r1.ebuild | 388 ---------------------------------
16 3 files changed, 762 deletions(-)
17
18 diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest
19 index 9ef0e615d3e..8072dfeedee 100644
20 --- a/app-editors/emacs/Manifest
21 +++ b/app-editors/emacs/Manifest
22 @@ -6,10 +6,8 @@ DIST emacs-23.4.tar.bz2 38646508 BLAKE2B 33dac5d27a63b7aab6b4053964a0ecf7f7939c7
23 DIST emacs-24.5-patches-4.tar.xz 13632 BLAKE2B 99e70f4ee32c1ba3a66b934de692437aaf0b83eb6fa841ce4569bc58e2bd12802890c2a8496375280c0ce8fa56515918dfdcbc958f349bc2472104e37ad1fcd1 SHA512 569c3a55aaf1102c0bae4ab25ee06372763cd2de8a54e26b3eefd54e585cf90b53c8ffe1ca48eb4fd312a340380fd3f2fcdb584697814bf429129b48fa56ffb5
24 DIST emacs-24.5-patches-5.tar.xz 14796 BLAKE2B 3e097f9cdf96a8b0255ce69770f79259ac9bdddbf5aa77c381973e4348d0900ee6dc6ed4af26021811afbb14eff84bc2a370bc8e803d112476554d03b074ce66 SHA512 fe9f9c19ff760e61dcbf1828d4e9e2806c141b47372bdd736be8237183660a28e2ef86a97034d060e244ff81540a2503a1b47655ef84222fddacb3a87f0f34ae
25 DIST emacs-24.5.tar.xz 39759804 BLAKE2B aec253528038686822d1f8ed9a52dff276789ef7744053fc9b6176fceba4d4d8684fe979cf97e756b3feaf734d2377baef81f5efaa5450930a4e94d9f3bca355 SHA512 89dee4c3aadb6e505c523f84c65b5e40e5bf28a586cc8a4518a59581c22972f942bb6f3c772df0d5b2685c3e78247c545c6bb2576e981d1ef0f9298c18ad1677
26 -DIST emacs-25.3-patches-1.tar.xz 1252 BLAKE2B 33c3c8e32b85f548201d4988d3aaf94e6440ab4727fced17aa26f00fd5665b755d3add254a764f579736bbfbc90716ff800e3ad5b8e7bd5d5c2370d31451e4b1 SHA512 09371a789a7c742b4e18f45a4c4e063a5392d0684899eb8be8c7415af9fe3c306083c62f18abc6a15c4fe76dd6ae3ac5c9b002c962971e59379cc187926a0c15
27 DIST emacs-25.3-patches-2.tar.xz 2488 BLAKE2B 93c6a18e7f729a5b4d299974581c99835e5f197215888253f75827645e440f6579da16d4cd8340f2732f8bf8a6a15713e29848953033dc62b573a1c1fab455bf SHA512 f171cc5699f06523a007aba5aa1a4274c9a875358a60405aa77cdc96ebb229082cb73453940e8c9e76dd7b86979cefc261883db0c130142543befb7a097475f4
28 DIST emacs-25.3.tar.xz 42854740 BLAKE2B 4f4e2572bbef48b75c561497fc22046081e56099b6174725d79b15a5b16d5c886eaf8ff3f75cf561e989ebb092ab9e98ba7503e720a9db7560758b30d5116f23 SHA512 1cce656451b6ca8502ebb229e88bd3ef48b7f9444a10eeac4ea43bd5491b2efacd641dfa35227a33362c3866493d3449cf1df81606563eef44bba0ed668e457f
29 -DIST emacs-26.1-patches-1.tar.xz 1296 BLAKE2B 5e3cef3130b35a362d67f853686625d207e9af29ffb27753b6aa00327e30cc06b3cd7ed339b214b12fb00137654521c21e2252ecd83a79258bb9636406ab032c SHA512 6e4b0bdbf98d5130a6cd41fb0a8c3d641bf0b8d46f150d1f10f2d659e0418c14198d8990df13f3266437bb128f5fc7db8456458f5f547f2c12cc59da4fea3c8e
30 DIST emacs-26.1-patches-2.tar.xz 2740 BLAKE2B 43a58137d6096fd6b49688192b65e97446cd31691b18c2e69c8980ff1d93caa66ff670f06456df91411fd74396deaa1899c7afb6c0a4bbc98d4c2d9bd7ed7d40 SHA512 31c1714d130a02692c65dd1371662100f9fbf33a8df30b8bad8fa688ab993e0a596101a4765a7859801d1f66e729c9fca748e70b9919e5b2a777d39fcbe92c21
31 DIST emacs-26.1.tar.xz 44258932 BLAKE2B 5b5ea6a506228507af18417c3f94c2d6ea482c25d13ec5e0bee9ec6a65e80c52c870162b4671e80a82f8310784c802924609f2f87d504b1a97617c44d859566f SHA512 537c2cfdd281151b360002419dde6280c313e07a937ed96405c67f754b3401ec5541091a3c0aa6690929bc33dd79e8e0d8844e7a6b014b7798c63cb15de210c2
32 DIST emacs-26.2.tar.xz 44406808 BLAKE2B 23c23958b177f032082fc5e71ebccc4a88c10b19258ec22608d7bade37dc58d5f8aa4a74e86114c72ea8be8fc299b6c9af5af283f28bd7e965830e587f1bdc93 SHA512 c223ff5c51ca8bdf887bacb2dc37b08a637d39ed6f887cc24f67397e46fe5fdb68f33f21b97300b985c749f32aa09080d33103271637ed4ce5d9f2ea34ce9fe1
33
34 diff --git a/app-editors/emacs/emacs-25.3-r4.ebuild b/app-editors/emacs/emacs-25.3-r4.ebuild
35 deleted file mode 100644
36 index b5d95d7629e..00000000000
37 --- a/app-editors/emacs/emacs-25.3-r4.ebuild
38 +++ /dev/null
39 @@ -1,372 +0,0 @@
40 -# Copyright 1999-2018 Gentoo Foundation
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI=6
44 -
45 -inherit elisp-common flag-o-matic multilib readme.gentoo-r1
46 -
47 -DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
48 -HOMEPAGE="https://www.gnu.org/software/emacs/"
49 -SRC_URI="mirror://gnu/emacs/${P}.tar.xz
50 - https://dev.gentoo.org/~ulm/emacs/${P}-patches-1.tar.xz"
51 -
52 -LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
53 -SLOT="25"
54 -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 m68k ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
55 -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk +gtk3 gzip-el imagemagick +inotify jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm zlib"
56 -REQUIRED_USE="?? ( aqua X )"
57 -
58 -RDEPEND="sys-libs/ncurses:0=
59 - >=app-eselect/eselect-emacs-1.16
60 - >=app-emacs/emacs-common-gentoo-1.5[games?,X?]
61 - net-libs/liblockfile
62 - acl? ( virtual/acl )
63 - alsa? ( media-libs/alsa-lib )
64 - dbus? ( sys-apps/dbus )
65 - gpm? ( sys-libs/gpm )
66 - !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
67 - kerberos? ( virtual/krb5 )
68 - libxml2? ( >=dev-libs/libxml2-2.2.0 )
69 - selinux? ( sys-libs/libselinux )
70 - ssl? ( net-libs/gnutls:0= )
71 - zlib? ( sys-libs/zlib )
72 - X? (
73 - x11-libs/libICE
74 - x11-libs/libSM
75 - x11-libs/libX11
76 - x11-libs/libXext
77 - x11-libs/libXfixes
78 - x11-libs/libXinerama
79 - x11-libs/libXrandr
80 - x11-libs/libxcb
81 - x11-misc/xbitmaps
82 - gconf? ( >=gnome-base/gconf-2.26.2 )
83 - gsettings? ( >=dev-libs/glib-2.28.6 )
84 - gif? ( media-libs/giflib:0= )
85 - jpeg? ( virtual/jpeg:0= )
86 - png? ( >=media-libs/libpng-1.4:0= )
87 - svg? ( >=gnome-base/librsvg-2.0 )
88 - tiff? ( media-libs/tiff:0 )
89 - xpm? ( x11-libs/libXpm )
90 - imagemagick? ( >=media-gfx/imagemagick-6.6.2:0=
91 - <media-gfx/imagemagick-7:0= )
92 - xft? (
93 - media-libs/fontconfig
94 - media-libs/freetype
95 - x11-libs/libXft
96 - x11-libs/libXrender
97 - cairo? ( >=x11-libs/cairo-1.12.18 )
98 - m17n-lib? (
99 - >=dev-libs/libotf-0.9.4
100 - >=dev-libs/m17n-lib-1.5.1
101 - )
102 - )
103 - gtk? (
104 - gtk3? ( x11-libs/gtk+:3 )
105 - !gtk3? ( x11-libs/gtk+:2 )
106 - )
107 - !gtk? (
108 - motif? (
109 - >=x11-libs/motif-2.3:0
110 - x11-libs/libXpm
111 - x11-libs/libXmu
112 - x11-libs/libXt
113 - )
114 - !motif? (
115 - Xaw3d? (
116 - x11-libs/libXaw3d
117 - x11-libs/libXmu
118 - x11-libs/libXt
119 - )
120 - !Xaw3d? ( athena? (
121 - x11-libs/libXaw
122 - x11-libs/libXmu
123 - x11-libs/libXt
124 - ) )
125 - )
126 - )
127 - )"
128 -
129 -DEPEND="${RDEPEND}
130 - virtual/pkgconfig
131 - gzip-el? ( app-arch/gzip )
132 - X? ( x11-base/xorg-proto )"
133 -# pax_kernel? ( sys-apps/attr )
134 -
135 -RDEPEND="${RDEPEND}
136 - !<app-editors/emacs-vcs-${PV}"
137 -
138 -EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
139 -SITEFILE="20${PN}-${SLOT}-gentoo.el"
140 -# FULL_VERSION keeps the full version number, which is needed in
141 -# order to determine some path information correctly for copy/move
142 -# operations later on
143 -FULL_VERSION="${PV%%_*}"
144 -S="${WORKDIR}/emacs-${FULL_VERSION}"
145 -
146 -src_prepare() {
147 - eapply ../patch
148 - eapply_user
149 -
150 - # Fix filename reference in redirected man page
151 - sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
152 - || die "unable to sed ctags.1"
153 -
154 - #AT_M4DIR=m4 eautoreconf
155 - #touch src/stamp-h.in || die
156 -}
157 -
158 -src_configure() {
159 - strip-flags
160 - filter-flags -pie #526948
161 -
162 - if use sh; then
163 - replace-flags "-O[1-9]" -O0 #262359
164 - elif use ia64; then
165 - replace-flags "-O[2-9]" -O1 #325373
166 - else
167 - replace-flags "-O[3-9]" -O2
168 - fi
169 -
170 - # Don't trigger a floating point exception for NaNs on alpha
171 - use alpha && append-flags -mieee
172 -
173 - local myconf
174 -
175 - if use alsa; then
176 - use sound || ewarn \
177 - "USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
178 - myconf+=" --with-sound=alsa"
179 - else
180 - myconf+=" --with-sound=$(usex sound oss)"
181 - fi
182 -
183 - if use X; then
184 - myconf+=" --with-x --without-ns"
185 - myconf+=" $(use_with gconf)"
186 - myconf+=" $(use_with gsettings)"
187 - myconf+=" $(use_with toolkit-scroll-bars)"
188 - myconf+=" $(use_with gif)"
189 - myconf+=" $(use_with jpeg)"
190 - myconf+=" $(use_with png)"
191 - myconf+=" $(use_with svg rsvg)"
192 - myconf+=" $(use_with tiff)"
193 - myconf+=" $(use_with xpm)"
194 - myconf+=" $(use_with imagemagick)"
195 -
196 - if use xft; then
197 - myconf+=" --with-xft"
198 - myconf+=" $(use_with cairo)"
199 - myconf+=" $(use_with m17n-lib libotf)"
200 - myconf+=" $(use_with m17n-lib m17n-flt)"
201 - else
202 - myconf+=" --without-xft"
203 - myconf+=" --without-cairo"
204 - myconf+=" --without-libotf --without-m17n-flt"
205 - use cairo && ewarn \
206 - "USE flag \"cairo\" has no effect if \"xft\" is not set."
207 - use m17n-lib && ewarn \
208 - "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
209 - fi
210 -
211 - local f line
212 - if use gtk; then
213 - einfo "Configuring to build with GIMP Toolkit (GTK+)"
214 - while read line; do ewarn "${line}"; done <<-EOF
215 - Your version of GTK+ will have problems with closing open
216 - displays. This is no problem if you just use one display, but
217 - if you use more than one and close one of them Emacs may crash.
218 - See <https://bugzilla.gnome.org/show_bug.cgi?id=85715>.
219 - If you intend to use more than one display, then it is strongly
220 - recommended that you compile Emacs with the Athena/Lucid or the
221 - Motif toolkit instead.
222 - EOF
223 - #if use xwidgets; then
224 - # myconf+=" --with-x-toolkit=gtk3 --with-xwidgets"
225 - #else
226 - myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)"
227 - myconf+=" --without-xwidgets"
228 - #fi
229 - for f in motif Xaw3d athena; do
230 - use ${f} && ewarn \
231 - "USE flag \"${f}\" has no effect if \"gtk\" is set."
232 - done
233 - elif use motif; then
234 - einfo "Configuring to build with Motif toolkit"
235 - myconf+=" --with-x-toolkit=motif"
236 - for f in Xaw3d athena; do
237 - use ${f} && ewarn \
238 - "USE flag \"${f}\" has no effect if \"motif\" is set."
239 - done
240 - elif use athena || use Xaw3d; then
241 - einfo "Configuring to build with Athena/Lucid toolkit"
242 - myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
243 - else
244 - einfo "Configuring to build with no toolkit"
245 - myconf+=" --with-x-toolkit=no"
246 - fi
247 - #! use gtk && use xwidgets && ewarn \
248 - # "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
249 - elif use aqua; then
250 - einfo "Configuring to build with Nextstep (Cocoa) support"
251 - myconf+=" --with-ns --disable-ns-self-contained"
252 - myconf+=" --without-x"
253 - else
254 - myconf+=" --without-x --without-ns"
255 - fi
256 -
257 - econf \
258 - --program-suffix="-${EMACS_SUFFIX}" \
259 - --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
260 - --localstatedir="${EPREFIX}"/var \
261 - --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
262 - --with-gameuser=":gamestat" \
263 - --without-compress-install \
264 - --without-hesiod \
265 - --with-file-notification=$(usev inotify || usev gfile || echo no) \
266 - $(use_enable acl) \
267 - $(use_with dbus) \
268 - $(use_with dynamic-loading modules) \
269 - $(use_with gpm) \
270 - $(use_with kerberos) $(use_with kerberos kerberos5) \
271 - $(use_with libxml2 xml2) \
272 - $(use_with selinux) \
273 - $(use_with ssl gnutls) \
274 - $(use_with wide-int) \
275 - $(use_with zlib) \
276 - ${myconf}
277 -}
278 -
279 -src_compile() {
280 - # Disable sandbox when dumping. For the unbelievers, see bug #131505
281 - emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
282 -}
283 -
284 -src_install () {
285 - emake DESTDIR="${D}" NO_BIN_LINK=t install
286 -
287 - mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \
288 - || die "moving emacs executable failed"
289 - mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \
290 - || die "moving emacs man page failed"
291 -
292 - # move info dir to avoid collisions with the dir file generated by portage
293 - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
294 - || die "moving info dir failed"
295 - touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
296 - docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
297 -
298 - # avoid collision between slots, see bug #169033 e.g.
299 - rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
300 - rm -rf "${ED}"/usr/share/{appdata,applications,icons}
301 - rm -rf "${ED}"/var
302 -
303 - # remove unused <version>/site-lisp dir
304 - rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
305 -
306 - # remove COPYING file (except for etc/COPYING used by describe-copying)
307 - rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
308 -
309 - if use gzip-el; then
310 - # compress .el files when a corresponding .elc exists
311 - find "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp -type f \
312 - -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
313 - assert "gzip .el failed"
314 - fi
315 -
316 - local cdir
317 - if use source; then
318 - cdir="/usr/share/emacs/${FULL_VERSION}/src"
319 - insinto "${cdir}"
320 - # This is not meant to install all the source -- just the
321 - # C source you might find via find-function
322 - doins src/*.{c,h,m}
323 - elif has installsources ${FEATURES}; then
324 - cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
325 - fi
326 -
327 - sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die
328 - X
329 - ;;; ${PN}-${SLOT} site-lisp configuration
330 - X
331 - (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
332 - Y (setq find-function-C-source-directory
333 - Y "${EPREFIX}${cdir}")
334 - X (let ((path (getenv "INFOPATH"))
335 - X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
336 - X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
337 - X (and path
338 - X ;; move Emacs Info dir before anything else in /usr/share/info
339 - X (let* ((p (cons nil (split-string path ":" t))) (q p))
340 - X (while (and (cdr q) (not (string-match re (cadr q))))
341 - X (setq q (cdr q)))
342 - X (setcdr q (cons dir (delete dir (cdr q))))
343 - X (setq Info-directory-list (prune-directory-list (cdr p)))))))
344 - EOF
345 - elisp-site-file-install "${T}/${SITEFILE}" || die
346 -
347 - dodoc README BUGS CONTRIBUTE
348 -
349 - if use aqua; then
350 - dodir /Applications/Gentoo
351 - rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app
352 - mv nextstep/Emacs.app \
353 - "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die
354 - fi
355 -
356 - DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs
357 - through the Emacs eselect module, which also redirects man and info
358 - pages. Therefore, several Emacs versions can be installed at the
359 - same time. \"man emacs.eselect\" for details.
360 - \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is
361 - strongly recommended that you use app-admin/emacs-updater to rebuild
362 - all byte-compiled elisp files of the installed Emacs packages."
363 - use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
364 - Installing media-fonts/font-adobe-{75,100}dpi on the X server's
365 - machine would satisfy basic Emacs requirements under X11.
366 - See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
367 - for how to enable anti-aliased fonts."
368 - use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in
369 - \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
370 - it into /Applications by yourself."
371 - readme.gentoo_create_doc
372 -}
373 -
374 -pkg_preinst() {
375 - # move Info dir file to correct name
376 - local infodir=/usr/share/info/${EMACS_SUFFIX} f
377 - if [[ -f ${ED}${infodir}/dir.orig ]]; then
378 - mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
379 - elif [[ -d "${ED}"${infodir} ]]; then
380 - # this should not happen in EAPI 4
381 - ewarn "Regenerating Info directory index in ${infodir} ..."
382 - rm -f "${ED}"${infodir}/dir{,.*}
383 - for f in "${ED}"${infodir}/*; do
384 - if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
385 - install-info --info-dir="${ED}"${infodir} "${f}" \
386 - || die "install-info failed"
387 - fi
388 - done
389 - fi
390 -}
391 -
392 -pkg_postinst() {
393 - elisp-site-regen
394 - readme.gentoo_print_elog
395 -
396 - if use livecd; then
397 - # force an update of the emacs symlink for the livecd/dvd,
398 - # because some microemacs packages set it with USE=livecd
399 - eselect emacs update
400 - elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
401 - # refresh symlinks in case any installed files have changed
402 - eselect emacs set ${EMACS_SUFFIX}
403 - else
404 - eselect emacs update ifunset
405 - fi
406 -}
407 -
408 -pkg_postrm() {
409 - elisp-site-regen
410 - eselect emacs update ifunset
411 -}
412
413 diff --git a/app-editors/emacs/emacs-26.1-r1.ebuild b/app-editors/emacs/emacs-26.1-r1.ebuild
414 deleted file mode 100644
415 index 739d4cf25e1..00000000000
416 --- a/app-editors/emacs/emacs-26.1-r1.ebuild
417 +++ /dev/null
418 @@ -1,388 +0,0 @@
419 -# Copyright 1999-2018 Gentoo Foundation
420 -# Distributed under the terms of the GNU General Public License v2
421 -
422 -EAPI=7
423 -
424 -inherit elisp-common flag-o-matic multilib readme.gentoo-r1
425 -
426 -DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
427 -HOMEPAGE="https://www.gnu.org/software/emacs/"
428 -SRC_URI="mirror://gnu/emacs/${P}.tar.xz
429 - https://dev.gentoo.org/~ulm/emacs/${P}-patches-1.tar.xz"
430 -
431 -LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
432 -SLOT="26"
433 -KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
434 -IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gconf gfile gif gpm gsettings gtk +gtk3 gzip-el imagemagick +inotify jpeg kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm xwidgets zlib"
435 -REQUIRED_USE="?? ( aqua X )"
436 -
437 -RDEPEND="sys-libs/ncurses:0=
438 - >=app-eselect/eselect-emacs-1.16
439 - >=app-emacs/emacs-common-gentoo-1.5[games?,X?]
440 - acl? ( virtual/acl )
441 - alsa? ( media-libs/alsa-lib )
442 - dbus? ( sys-apps/dbus )
443 - gpm? ( sys-libs/gpm )
444 - !inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
445 - kerberos? ( virtual/krb5 )
446 - lcms? ( media-libs/lcms:2 )
447 - libxml2? ( >=dev-libs/libxml2-2.2.0 )
448 - mailutils? ( net-mail/mailutils[clients] )
449 - !mailutils? ( net-libs/liblockfile )
450 - selinux? ( sys-libs/libselinux )
451 - ssl? ( net-libs/gnutls:0= )
452 - systemd? ( sys-apps/systemd )
453 - zlib? ( sys-libs/zlib )
454 - X? (
455 - x11-libs/libICE
456 - x11-libs/libSM
457 - x11-libs/libX11
458 - x11-libs/libXext
459 - x11-libs/libXfixes
460 - x11-libs/libXinerama
461 - x11-libs/libXrandr
462 - x11-libs/libxcb
463 - x11-misc/xbitmaps
464 - gconf? ( >=gnome-base/gconf-2.26.2 )
465 - gsettings? ( >=dev-libs/glib-2.28.6 )
466 - gif? ( media-libs/giflib:0= )
467 - jpeg? ( virtual/jpeg:0= )
468 - png? ( >=media-libs/libpng-1.4:0= )
469 - svg? ( >=gnome-base/librsvg-2.0 )
470 - tiff? ( media-libs/tiff:0 )
471 - xpm? ( x11-libs/libXpm )
472 - imagemagick? ( >=media-gfx/imagemagick-6.6.2:0=
473 - <media-gfx/imagemagick-7:0= )
474 - xft? (
475 - media-libs/fontconfig
476 - media-libs/freetype
477 - x11-libs/libXft
478 - x11-libs/libXrender
479 - cairo? ( >=x11-libs/cairo-1.12.18 )
480 - m17n-lib? (
481 - >=dev-libs/libotf-0.9.4
482 - >=dev-libs/m17n-lib-1.5.1
483 - )
484 - )
485 - gtk? (
486 - xwidgets? (
487 - net-libs/webkit-gtk:4=
488 - x11-libs/gtk+:3
489 - x11-libs/libXcomposite
490 - )
491 - !xwidgets? (
492 - gtk3? ( x11-libs/gtk+:3 )
493 - !gtk3? ( x11-libs/gtk+:2 )
494 - )
495 - )
496 - !gtk? (
497 - motif? (
498 - >=x11-libs/motif-2.3:0
499 - x11-libs/libXpm
500 - x11-libs/libXmu
501 - x11-libs/libXt
502 - )
503 - !motif? (
504 - Xaw3d? (
505 - x11-libs/libXaw3d
506 - x11-libs/libXmu
507 - x11-libs/libXt
508 - )
509 - !Xaw3d? ( athena? (
510 - x11-libs/libXaw
511 - x11-libs/libXmu
512 - x11-libs/libXt
513 - ) )
514 - )
515 - )
516 - )"
517 -
518 -DEPEND="${RDEPEND}
519 - X? ( x11-base/xorg-proto )"
520 -
521 -BDEPEND="virtual/pkgconfig
522 - gzip-el? ( app-arch/gzip )"
523 -# pax_kernel? ( sys-apps/attr )
524 -
525 -RDEPEND="${RDEPEND}
526 - !<app-editors/emacs-vcs-${PV}"
527 -
528 -EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
529 -SITEFILE="20${PN}-${SLOT}-gentoo.el"
530 -# FULL_VERSION keeps the full version number, which is needed in
531 -# order to determine some path information correctly for copy/move
532 -# operations later on
533 -FULL_VERSION="${PV%%_*}"
534 -S="${WORKDIR}/emacs-${FULL_VERSION}"
535 -
536 -src_prepare() {
537 - eapply ../patch
538 - eapply_user
539 -
540 - # Fix filename reference in redirected man page
541 - sed -i -e "/^\\.so/s/etags/&-${EMACS_SUFFIX}/" doc/man/ctags.1 \
542 - || die "unable to sed ctags.1"
543 -
544 - #AT_M4DIR=m4 eautoreconf
545 -}
546 -
547 -src_configure() {
548 - strip-flags
549 - filter-flags -pie #526948
550 -
551 - if use sh; then
552 - replace-flags "-O[1-9]" -O0 #262359
553 - elif use ia64; then
554 - replace-flags "-O[2-9]" -O1 #325373
555 - else
556 - replace-flags "-O[3-9]" -O2
557 - fi
558 -
559 - # Don't trigger a floating point exception for NaNs on alpha
560 - use alpha && append-flags -mieee
561 -
562 - local myconf
563 -
564 - if use alsa; then
565 - use sound || ewarn \
566 - "USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
567 - myconf+=" --with-sound=alsa"
568 - else
569 - myconf+=" --with-sound=$(usex sound oss)"
570 - fi
571 -
572 - if use X; then
573 - myconf+=" --with-x --without-ns"
574 - myconf+=" $(use_with gconf)"
575 - myconf+=" $(use_with gsettings)"
576 - myconf+=" $(use_with toolkit-scroll-bars)"
577 - myconf+=" $(use_with gif)"
578 - myconf+=" $(use_with jpeg)"
579 - myconf+=" $(use_with png)"
580 - myconf+=" $(use_with svg rsvg)"
581 - myconf+=" $(use_with tiff)"
582 - myconf+=" $(use_with xpm)"
583 - myconf+=" $(use_with imagemagick)"
584 -
585 - if use xft; then
586 - myconf+=" --with-xft"
587 - myconf+=" $(use_with cairo)"
588 - myconf+=" $(use_with m17n-lib libotf)"
589 - myconf+=" $(use_with m17n-lib m17n-flt)"
590 - else
591 - myconf+=" --without-xft"
592 - myconf+=" --without-cairo"
593 - myconf+=" --without-libotf --without-m17n-flt"
594 - use cairo && ewarn \
595 - "USE flag \"cairo\" has no effect if \"xft\" is not set."
596 - use m17n-lib && ewarn \
597 - "USE flag \"m17n-lib\" has no effect if \"xft\" is not set."
598 - fi
599 -
600 - local f line
601 - if use gtk; then
602 - einfo "Configuring to build with GIMP Toolkit (GTK+)"
603 - while read line; do ewarn "${line}"; done <<-EOF
604 - Your version of GTK+ will have problems with closing open
605 - displays. This is no problem if you just use one display, but
606 - if you use more than one and close one of them Emacs may crash.
607 - See <https://bugzilla.gnome.org/show_bug.cgi?id=85715>.
608 - If you intend to use more than one display, then it is strongly
609 - recommended that you compile Emacs with the Athena/Lucid or the
610 - Motif toolkit instead.
611 - EOF
612 - if use xwidgets; then
613 - myconf+=" --with-x-toolkit=gtk3 --with-xwidgets"
614 - else
615 - myconf+=" --with-x-toolkit=$(usex gtk3 gtk3 gtk2)"
616 - myconf+=" --without-xwidgets"
617 - fi
618 - for f in motif Xaw3d athena; do
619 - use ${f} && ewarn \
620 - "USE flag \"${f}\" has no effect if \"gtk\" is set."
621 - done
622 - elif use motif; then
623 - einfo "Configuring to build with Motif toolkit"
624 - myconf+=" --with-x-toolkit=motif"
625 - for f in Xaw3d athena; do
626 - use ${f} && ewarn \
627 - "USE flag \"${f}\" has no effect if \"motif\" is set."
628 - done
629 - elif use athena || use Xaw3d; then
630 - einfo "Configuring to build with Athena/Lucid toolkit"
631 - myconf+=" --with-x-toolkit=lucid $(use_with Xaw3d xaw3d)"
632 - else
633 - einfo "Configuring to build with no toolkit"
634 - myconf+=" --with-x-toolkit=no"
635 - fi
636 - ! use gtk && use xwidgets && ewarn \
637 - "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
638 - elif use aqua; then
639 - einfo "Configuring to build with Nextstep (Cocoa) support"
640 - myconf+=" --with-ns --disable-ns-self-contained"
641 - myconf+=" --without-x"
642 - else
643 - myconf+=" --without-x --without-ns"
644 - fi
645 -
646 - econf \
647 - --program-suffix="-${EMACS_SUFFIX}" \
648 - --infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
649 - --localstatedir="${EPREFIX}"/var \
650 - --enable-locallisppath="${EPREFIX}/etc/emacs:${EPREFIX}${SITELISP}" \
651 - --without-compress-install \
652 - --without-hesiod \
653 - --without-pop \
654 - --with-file-notification=$(usev inotify || usev gfile || echo no) \
655 - $(use_enable acl) \
656 - $(use_with dbus) \
657 - $(use_with dynamic-loading modules) \
658 - $(use_with games gameuser ":gamestat") \
659 - $(use_with gpm) \
660 - $(use_with kerberos) $(use_with kerberos kerberos5) \
661 - $(use_with lcms lcms2) \
662 - $(use_with libxml2 xml2) \
663 - $(use_with mailutils) \
664 - $(use_with selinux) \
665 - $(use_with ssl gnutls) \
666 - $(use_with systemd libsystemd) \
667 - $(use_with threads) \
668 - $(use_with wide-int) \
669 - $(use_with zlib) \
670 - ${myconf}
671 -}
672 -
673 -src_compile() {
674 - # Disable sandbox when dumping. For the unbelievers, see bug #131505
675 - emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
676 -}
677 -
678 -src_install () {
679 - emake DESTDIR="${D}" NO_BIN_LINK=t install
680 -
681 - mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \
682 - || die "moving emacs executable failed"
683 - mv "${ED}"/usr/share/man/man1/{emacs-,}${EMACS_SUFFIX}.1 \
684 - || die "moving emacs man page failed"
685 -
686 - # move info dir to avoid collisions with the dir file generated by portage
687 - mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{,.orig} \
688 - || die "moving info dir failed"
689 - touch "${ED}"/usr/share/info/${EMACS_SUFFIX}/.keepinfodir
690 - docompress -x /usr/share/info/${EMACS_SUFFIX}/dir.orig
691 -
692 - # avoid collision between slots, see bug #169033 e.g.
693 - rm "${ED}"/usr/share/emacs/site-lisp/subdirs.el
694 - rm -rf "${ED}"/usr/share/{appdata,applications,icons}
695 - rm -rf "${ED}/usr/$(get_libdir)"
696 - rm -rf "${ED}"/var
697 -
698 - # remove unused <version>/site-lisp dir
699 - rm -rf "${ED}"/usr/share/emacs/${FULL_VERSION}/site-lisp
700 -
701 - # remove COPYING file (except for etc/COPYING used by describe-copying)
702 - rm "${ED}"/usr/share/emacs/${FULL_VERSION}/lisp/COPYING
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 - -name "*.elc" -print | sed 's/\.elc$/.el/' | xargs gzip -9n
708 - assert "gzip .el failed"
709 - fi
710 -
711 - local cdir
712 - if use source; then
713 - cdir="/usr/share/emacs/${FULL_VERSION}/src"
714 - insinto "${cdir}"
715 - # This is not meant to install all the source -- just the
716 - # C source you might find via find-function
717 - doins src/*.{c,h,m}
718 - elif has installsources ${FEATURES}; then
719 - cdir="/usr/src/debug/${CATEGORY}/${PF}/${S#"${WORKDIR}/"}/src"
720 - fi
721 -
722 - sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die
723 - X
724 - ;;; ${PN}-${SLOT} site-lisp configuration
725 - X
726 - (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
727 - Y (setq find-function-C-source-directory
728 - Y "${EPREFIX}${cdir}")
729 - X (let ((path (getenv "INFOPATH"))
730 - X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
731 - X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
732 - X (and path
733 - X ;; move Emacs Info dir before anything else in /usr/share/info
734 - X (let* ((p (cons nil (split-string path ":" t))) (q p))
735 - X (while (and (cdr q) (not (string-match re (cadr q))))
736 - X (setq q (cdr q)))
737 - X (setcdr q (cons dir (delete dir (cdr q))))
738 - X (setq Info-directory-list (prune-directory-list (cdr p)))))))
739 - EOF
740 - elisp-site-file-install "${T}/${SITEFILE}" || die
741 -
742 - dodoc README BUGS CONTRIBUTE
743 -
744 - if use aqua; then
745 - dodir /Applications/Gentoo
746 - rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app
747 - mv nextstep/Emacs.app \
748 - "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die
749 - fi
750 -
751 - DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs
752 - through the Emacs eselect module, which also redirects man and info
753 - pages. Therefore, several Emacs versions can be installed at the
754 - same time. \"man emacs.eselect\" for details.
755 - \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is
756 - strongly recommended that you use app-admin/emacs-updater to rebuild
757 - all byte-compiled elisp files of the installed Emacs packages."
758 - use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
759 - Installing media-fonts/font-adobe-{75,100}dpi on the X server's
760 - machine would satisfy basic Emacs requirements under X11.
761 - See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
762 - for how to enable anti-aliased fonts."
763 - use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in
764 - \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
765 - it into /Applications by yourself."
766 - readme.gentoo_create_doc
767 -}
768 -
769 -pkg_preinst() {
770 - # move Info dir file to correct name
771 - local infodir=/usr/share/info/${EMACS_SUFFIX} f
772 - if [[ -f ${ED}${infodir}/dir.orig ]]; then
773 - mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
774 - elif [[ -d "${ED}"${infodir} ]]; then
775 - # this should not happen in EAPI 4
776 - ewarn "Regenerating Info directory index in ${infodir} ..."
777 - rm -f "${ED}"${infodir}/dir{,.*}
778 - for f in "${ED}"${infodir}/*; do
779 - if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
780 - install-info --info-dir="${ED}"${infodir} "${f}" \
781 - || die "install-info failed"
782 - fi
783 - done
784 - fi
785 -}
786 -
787 -pkg_postinst() {
788 - elisp-site-regen
789 - readme.gentoo_print_elog
790 -
791 - if use livecd; then
792 - # force an update of the emacs symlink for the livecd/dvd,
793 - # because some microemacs packages set it with USE=livecd
794 - eselect emacs update
795 - elif [[ $(readlink "${EROOT}"/usr/bin/emacs) = ${EMACS_SUFFIX} ]]; then
796 - # refresh symlinks in case any installed files have changed
797 - eselect emacs set ${EMACS_SUFFIX}
798 - else
799 - eselect emacs update ifunset
800 - fi
801 -}
802 -
803 -pkg_postrm() {
804 - elisp-site-regen
805 - eselect emacs update ifunset
806 -}