summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2013-04-15 22:49:02 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 10:48:41 +0200
commit4c6dc7cea42e8799ca84a9485faed4e01d7300e7 (patch)
treeae08ba69a35d1b5b54cdccf2341cc7d556c04a2d /app-shells/zsh
parentBump zshrc-mv (diff)
downloadmv-4c6dc7cea42e8799ca84a9485faed4e01d7300e7.tar.gz
mv-4c6dc7cea42e8799ca84a9485faed4e01d7300e7.tar.bz2
mv-4c6dc7cea42e8799ca84a9485faed4e01d7300e7.zip
Reorganize zsh-completion USE. Force correct LC_CTYPE in zsh by default
Diffstat (limited to 'app-shells/zsh')
-rw-r--r--app-shells/zsh/ChangeLog5
-rw-r--r--app-shells/zsh/metadata.xml25
-rw-r--r--app-shells/zsh/zsh-5.0.2-r2.ebuild20
3 files changed, 36 insertions, 14 deletions
diff --git a/app-shells/zsh/ChangeLog b/app-shells/zsh/ChangeLog
index 542e32dc..ff21225f 100644
--- a/app-shells/zsh/ChangeLog
+++ b/app-shells/zsh/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*zsh-5.0.2-r2 (15 Apr 2013)
+
+ 15 Apr 2013; Martin Väth <martin@mvath.de>
+ Override LC_CTYPE, using some heuristics, unless USE=custom-ctype is chosen.
+
*zsh-5.0.2-r2 (03 Apr 2013)
03 Apr 2013; Martin Väth <martin@mvath.de>
diff --git a/app-shells/zsh/metadata.xml b/app-shells/zsh/metadata.xml
index 2f25f5ba..74576112 100644
--- a/app-shells/zsh/metadata.xml
+++ b/app-shells/zsh/metadata.xml
@@ -23,18 +23,19 @@
added.
</longdescription>
<use>
- <flag name='completion_AIX'>install completions for AIX</flag>
- <flag name='completion_BSD'>install completions for BSD</flag>
- <flag name='completion_Cygwin'>install completions for Cygwin</flag>
- <flag name='completion_Darwin'>install completions for Darwin</flag>
- <flag name='completion_Debian'>install completions for Debian</flag>
- <flag name='completion_Linux'>install completions for Linux</flag>
- <flag name='completion_Mandriva'>install completions for Mandriva</flag>
- <flag name='completion_openSUSE'>install completions for openSUSE</flag>
- <flag name='completion_Redhat'>install completions for Redhat</flag>
- <flag name='completion_Solaris'>install completions for Solaris</flag>
- <flag name='completion_Unix'>install completions for Unix</flag>
- <flag name='completion_X'>install completions for X</flag>
+ <flag name='completion_AIX'>Install zsh completions for AIX</flag>
+ <flag name='completion_BSD'>Install zsh completions for BSD</flag>
+ <flag name='completion_Cygwin'>Install zsh completions for Cygwin</flag>
+ <flag name='completion_Darwin'>Install zsh completions for Darwin</flag>
+ <flag name='completion_Debian'>Install zsh completions for Debian</flag>
+ <flag name='completion_Linux'>Install zsh completions for Linux</flag>
+ <flag name='completion_Mandriva'>Install zsh completions for Mandriva</flag>
+ <flag name='completion_openSUSE'>Install zsh completions for openSUSE</flag>
+ <flag name='completion_Redhat'>Install zsh completions for Redhat</flag>
+ <flag name='completion_Solaris'>Install zsh completions for Solaris</flag>
+ <flag name='completion_Unix'>Install zsh completions for Unix</flag>
+ <flag name='completion_X'>Install zsh completions for X</flag>
+ <flag name='custom-ctype'>Set this and an utf8-capable LC_CTYPE (e.g. in make.conf) if run-help does not work for you. If unset, the value of LC_CTYPE for the generation of run-help is calculated by a heuristic based on locale -a.</flag>
<flag name='run-help'>Create and install data for run-help command</flag>
</use>
</pkgmetadata>
diff --git a/app-shells/zsh/zsh-5.0.2-r2.ebuild b/app-shells/zsh/zsh-5.0.2-r2.ebuild
index 549452c7..5111c272 100644
--- a/app-shells/zsh/zsh-5.0.2-r2.ebuild
+++ b/app-shells/zsh/zsh-5.0.2-r2.ebuild
@@ -35,7 +35,7 @@ SRC_URI="${ZSH_URI}
LICENSE="ZSH gdbm? ( GPL-2 )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="caps"
+IUSE="caps custom-ctype"
COMPLETIONS="AIX BSD Cygwin Darwin Debian +Linux Mandriva openSUSE Redhat Solaris +Unix +X"
for curr in ${COMPLETIONS}
do case ${curr} in
@@ -169,7 +169,23 @@ generate_run_help() (
export MANWIDTH=80
export LANG=C
unset MANPL MANROFFSEQ LC_ALL
- [ -z "${LC_CTYPE}" ] && export LC_CTYPE=en_US.utf8
+ if [ -z "${LC_CTYPE++}" ] || ! use custom-ctype
+ then local i j=
+ unset LC_CTYPE
+ for i in `locale -a 2>/dev/null`
+ do case ${i} in
+ en*[uU][tT][fF]8*)
+ LC_CTYPE=${i}
+ break;;
+ *[uU][tT][fF]8*)
+ [ -n "${LC_CTYPE}" ] || LC_CTYPE=${i};;
+ en*|*.*)
+ j=${i};;
+ esac
+ done
+ [ -n "${LC_CTYPE}" ] || LC_CTYPE=${j}
+ [ -z "${LC_CTYPE}" ] || export LC_CTYPE
+ fi
ebegin "Generating files for run-help"
# It is necessary to be paranoid about the success of the following pipe,
# since any change in locale or environment (like unset GROFF_NO_SGR,