Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/emacs:master commit in: app-editors/emacs-vcs/
Date: Sat, 28 May 2016 06:53:22
Message-Id: 1464418330.1c7e7618c5a592049e94bdfd525c608ba59c9c3e.ulm@gentoo
1 commit: 1c7e7618c5a592049e94bdfd525c608ba59c9c3e
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 28 06:52:10 2016 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat May 28 06:52:10 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/emacs.git/commit/?id=1c7e7618
7
8 app-editors/emacs-vcs: Add pkg_pretend to warn early about USE flag problems.
9
10 Package-Manager: portage-2.3.0_rc1
11
12 .../emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild | 42 ++++++++++++++++++++++
13 1 file changed, 42 insertions(+)
14
15 diff --git a/app-editors/emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild b/app-editors/emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild
16 index 5457c54..4d274bf 100644
17 --- a/app-editors/emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild
18 +++ b/app-editors/emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild
19 @@ -104,6 +104,48 @@ fi
20 EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
21 SITEFILE="20${PN}-${SLOT}-gentoo.el"
22
23 +pkg_pretend() {
24 + local f
25 +
26 + if use alsa && ! use sound; then
27 + ewarn "USE flag \"alsa\" overrides \"-sound\"; enabling sound support."
28 + fi
29 +
30 + if use X; then
31 + if ! use xft; then
32 + for f in cairo m17n-lib; do
33 + use ${f} && ewarn \
34 + "USE flag \"${f}\" has no effect if \"xft\" is not set."
35 + done
36 + fi
37 +
38 + if use gtk; then
39 + while read line; do ewarn "${line}"; done <<-EOF
40 + Your version of GTK+ will have problems with closing open
41 + displays. This is no problem if you just use one display, but
42 + if you use more than one and close one of them Emacs may crash.
43 + See <https://bugzilla.gnome.org/show_bug.cgi?id=85715>.
44 + If you intend to use more than one display, then it is strongly
45 + recommended that you compile Emacs with the Athena/Lucid or the
46 + Motif toolkit instead.
47 + EOF
48 + for f in motif Xaw3d athena; do
49 + use ${f} && ewarn \
50 + "USE flag \"${f}\" has no effect if \"gtk\" is set."
51 + done
52 + elif use motif; then
53 + for f in Xaw3d athena; do
54 + use ${f} && ewarn \
55 + "USE flag \"${f}\" has no effect if \"motif\" is set."
56 + done
57 + fi
58 +
59 + if ! use gtk && use xwidgets; then
60 + ewarn "USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
61 + fi
62 + fi
63 +}
64 +
65 src_prepare() {
66 if [[ ${PV##*.} = 9999 ]]; then
67 FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \