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