summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2016-05-28 08:52:10 +0200
committerUlrich Müller <ulm@gentoo.org>2016-05-28 08:52:10 +0200
commit1c7e7618c5a592049e94bdfd525c608ba59c9c3e (patch)
tree6febb605817af6dd0b2797c01152370e48a488e7 /app-editors
parentapp-emacs/emacs-common-gentoo: Update to EAPI 6. (diff)
downloademacs-1c7e7618c5a592049e94bdfd525c608ba59c9c3e.tar.gz
emacs-1c7e7618c5a592049e94bdfd525c608ba59c9c3e.tar.bz2
emacs-1c7e7618c5a592049e94bdfd525c608ba59c9c3e.zip
app-editors/emacs-vcs: Add pkg_pretend to warn early about USE flag problems.
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/emacs-vcs/emacs-vcs-25.1.9999-r1.ebuild42
1 files changed, 42 insertions, 0 deletions
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' \