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