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