commit: 1c7e7618c5a592049e94bdfd525c608ba59c9c3e
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat May 28 06:52:10 2016 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat May 28 06:52:10 2016 +0000
URL: https://gitweb.gentoo.org/proj/emacs.git/commit/?id=1c7e7618
app-editors/emacs-vcs: Add pkg_pretend to warn early about USE flag problems.
Package-Manager: portage-2.3.0_rc1
.../emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
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
index 5457c54..4d274bf 100644
--- a/app-editors/emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild
+++ b/app-editors/emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild
@@ -104,6 +104,48 @@ fi
EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
SITEFILE="20${PN}-${SLOT}-gentoo.el"
+pkg_pretend() {
+ local f
+
+ if use alsa && ! use sound; then
+ ewarn "USE flag \"alsa\" overrides \"-sound\"; enabling sound
support."
+ fi
+
+ if use X; then
+ if ! use xft; then
+ for f in cairo m17n-lib; do
+ use ${f} && ewarn \
+ "USE flag \"${f}\" has no effect if
\"xft\" is not set."
+ done
+ fi
+
+ if use gtk; then
+ while read line; do ewarn "${line}"; done <<-EOF
+ Your version of GTK+ will have problems with
closing open
+ displays. This is no problem if you just use
one display, but
+ if you use more than one and close one of them
Emacs may crash.
+ See
<https://bugzilla.gnome.org/show_bug.cgi?id=85715>.
+ If you intend to use more than one display,
then it is strongly
+ recommended that you compile Emacs with the
Athena/Lucid or the
+ Motif toolkit instead.
+ EOF
+ for f in motif Xaw3d athena; do
+ use ${f} && ewarn \
+ "USE flag \"${f}\" has no effect if
\"gtk\" is set."
+ done
+ elif use motif; then
+ for f in Xaw3d athena; do
+ use ${f} && ewarn \
+ "USE flag \"${f}\" has no effect if
\"motif\" is set."
+ done
+ fi
+
+ if ! use gtk && use xwidgets; then
+ ewarn "USE flag \"xwidgets\" has no effect if \"gtk\" is not
set."
+ fi
+ fi
+}
+
src_prepare() {
if [[ ${PV##*.} = 9999 ]]; then
FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^
\t,)]*\).*/\1/p' \