summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2015-09-20 15:54:53 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 10:49:24 +0200
commitbc8fb8f502be0c5ce2c6b3a7761d7b793df4ee40 (patch)
tree9744f855e24f3c59eeb94933cb5b76303f3e2811 /app-shells
parentBump video-mv (diff)
downloadmv-bc8fb8f502be0c5ce2c6b3a7761d7b793df4ee40.tar.gz
mv-bc8fb8f502be0c5ce2c6b3a7761d7b793df4ee40.tar.bz2
mv-bc8fb8f502be0c5ce2c6b3a7761d7b793df4ee40.zip
Bump squashmount, video-mv, classic-theme-restorer, zsh. Kill symlinks
Diffstat (limited to 'app-shells')
-rw-r--r--[l---------]app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild130
-rw-r--r--[l---------]app-shells/zsh-completions/zsh-completions-0.12.0.ebuild124
-rw-r--r--[l---------]app-shells/zsh-syntax-highlighting/zsh-syntax-highlighting-0.2.1.ebuild53
-rw-r--r--app-shells/zsh/ChangeLog5
-rw-r--r--app-shells/zsh/Manifest4
-rw-r--r--app-shells/zsh/zsh-5.1.1.ebuild (renamed from app-shells/zsh/zsh-5.0.8.ebuild)39
-rw-r--r--[l---------]app-shells/zsh/zsh-99999999.ebuild301
7 files changed, 625 insertions, 31 deletions
diff --git a/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild b/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild
index fe5fb670..feb8d9bb 120000..100644
--- a/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild
+++ b/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild
@@ -1 +1,129 @@
-auto-fu-zsh-99999999.ebuild \ No newline at end of file
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+pPN=${PN%-zsh}
+mPN="${pPN}.zsh"
+case ${PV} in
+99999999*)
+ LIVE=:
+ EGIT_REPO_URI="git://github.com/hchbaw/${mPN}.git"
+ EGIT_BRANCH="pu"
+ inherit git-r3
+ PROPERTIES="live"
+ SRC_URI=""
+ KEYWORDS="";;
+*)
+ LIVE=false
+ RESTRICT="mirror"
+ SRC_URI="https://github.com/hchbaw/${mPN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${mPN}-${PV}"
+ KEYWORDS="~amd64 ~x86";;
+esac
+
+DESCRIPTION="zsh automatic complete-word and list-choices: incremental completion"
+HOMEPAGE="https://github.com/hchbaw/auto-fu.zsh/"
+
+LICENSE="HPND"
+SLOT="0"
+IUSE="+compile"
+
+DEPEND="compile? ( app-shells/zsh )"
+
+DESTPATH="/usr/share/zsh/site-contrib/${mPN}"
+
+generate_example() {
+ echo "# Put something like the following into your ~/.zshrc
+
+# First, we set sane options for the standard completion system:
+
+autoload -Uz compinit is-at-least
+compinit -D -u
+zstyle ':completion:*' completer _complete
+zstyle ':completion:*' list-colors \${(s.:.)LS_COLORS}
+zstyle ':completion:*' menu select=1 # interactive
+zstyle ':completion:*' accept-exact-dirs true
+zstyle ':completion:*' path-completion false
+if is-at-least 4.3.10
+then zstyle ':completion:*' format \"%B%F{yellow}%K{blue}%d%k%f%b\"
+else zstyle ':completion:*' format \"%B%d%b\"
+fi
+
+# Now we source ${PN}"
+ if use compile
+ then echo ". ${DESTPATH}/${pPN}
+auto-fu-install"
+ else echo ". ${DESTPATH}/${pPN}.zsh"
+ fi
+ echo "
+# Finally, we configure ${PN}
+
+zstyle ':auto-fu:highlight' input
+zstyle ':auto-fu:highlight' completion bold,fg=blue
+zstyle ':auto-fu:highlight' completion/one fg=blue
+zstyle ':auto-fu:var' postdisplay # \$'\\n-azfu-'
+#zstyle ':auto-fu:var' enable all
+#zstyle ':auto-fu:var' track-keymap-skip opp
+#zstyle ':auto-fu:var' disable magic-space
+zle-line-init() auto-fu-init
+zle -N zle-line-init
+zle -N zle-keymap-select auto-fu-zle-keymap-select
+
+# Starting a line with a space or tab or quoting the first word
+# or escaping a word should deactivate auto-fu for that line/word.
+# This is useful e.g. if auto-fu is too slow for you in some cases.
+zstyle ':auto-fu:var' autoable-function/skiplines '[[:blank:]\\\\\"'\'']*'
+zstyle ':auto-fu:var' autoable-function/skipwords '[\\\\]*'
+
+# Let Ctrl-d successively remove tail of line, whole line, and exit
+kill-line-maybe() {
+ if ((\$#BUFFER > CURSOR))
+ then zle kill-line
+ else zle kill-whole-line
+ fi
+}
+zle -N kill-line-maybe
+bindkey '\C-d' kill-line-maybe
+
+# Keep Ctrl-d behavior also when auto-fu is active
+afu+orf-ignoreeof-deletechar-list() {
+ afu-eof-maybe afu-ignore-eof zle kill-line-maybe
+}
+afu+orf-exit-deletechar-list() {
+ afu-eof-maybe exit zle kill-line-maybe
+}"
+}
+
+src_prepare() {
+ (
+ umask 022
+ generate_example >"${S}"/zshrc-example
+ )
+ if ! ${LIVE}
+ then
+ # Make Ctrl-D return correctly.
+ epatch "${FILESDIR}"/exit.patch
+ # Reset color with "return":
+ epatch "${FILESDIR}"/reset-color.patch
+ # Make it work with older zsh versions:
+ epatch "${FILESDIR}"/zsh-compatibility.patch
+ fi
+ epatch_user
+}
+
+src_compile() {
+ ! use compile || mPN="${mPN}" \
+ zsh -c 'setopt extendedglob no_shwordsplit
+source ${mPN}
+auto-fu-zcompile ${PWD}/${mPN} ${PWD}' || die
+}
+
+src_install() {
+ insinto "${DESTPATH}"
+ doins "${mPN}"
+ ! use compile || doins "${pPN}" "${pPN}.zwc"
+ dodoc zshrc-example README*
+}
diff --git a/app-shells/zsh-completions/zsh-completions-0.12.0.ebuild b/app-shells/zsh-completions/zsh-completions-0.12.0.ebuild
index eb9dcfb0..51991693 120000..100644
--- a/app-shells/zsh-completions/zsh-completions-0.12.0.ebuild
+++ b/app-shells/zsh-completions/zsh-completions-0.12.0.ebuild
@@ -1 +1,123 @@
-zsh-completions-99999999.ebuild \ No newline at end of file
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+case ${PV} in
+99999999*)
+ LIVE=:
+ EGIT_REPO_URI="git://github.com/zsh-users/${PN}.git"
+ inherit git-r3
+ PROPERTIES="live"
+ KEYWORDS=""
+ SRC_URI="";;
+*)
+ LIVE=false
+ RESTRICT="mirror"
+ TARBALL_VERSION='0.12.0'
+ SRC_URI="https://github.com/zsh-users/${PN}/archive/${TARBALL_VERSION}.tar.gz -> ${PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${PN}-${TARBALL_VERSION}"
+esac
+
+DESCRIPTION="Additional completion definitions for Zsh"
+HOMEPAGE="https://gentoo.org/zsh-users/zsh-completions/"
+LICENSE="ZSH"
+SLOT="0"
+if ${LIVE}
+then DEPEND=""
+else DEPEND="completion_pip? ( !dev-python/pip[zsh-completion] )"
+fi
+
+IUSE=""
+declare -a FILES
+FILES=()
+declare -A USEFILE FILEINDEX
+USEFILE=()
+FILEINDEX=()
+used_value() {
+ case ${!1} in
+ '*'*)
+ eval ${1}=\${${1}#?}
+ ${LIVE};;
+ '/'*)
+ eval ${1}=\${${1}#?}
+ ! ${LIVE};;
+ esac
+}
+calculate_data() {
+ local comp curr currfile used
+ for comp
+ do curr="${comp%% *}"
+ used_value curr || continue
+ case ${curr} in
+ '+'*)
+ curr="completion_${curr#?}"
+ IUSE="${IUSE}${IUSE:+ }+${curr}";;
+ *)
+ curr="completion_${curr}"
+ IUSE="${IUSE}${IUSE:+ }${curr}";;
+ esac
+ for currfile in ${comp#* }
+ do used_value currfile
+ used=${?}
+ USEFILE["${currfile}"]="${curr}"
+ [[ -z ${FILEINDEX["${currfile}"]} ]] || die "${currfile} listed twice"
+ [ ${used} -ne 0 ] && continue
+ FILEINDEX["${currfile}"]="${#FILES[@]}"
+ FILES+=("${currfile}")
+ done
+ done
+}
+calculate_data \
+ '+Android _adb _android _emulator' \
+ '+Google _google' \
+ '+Unix _cmake _dzen2 _logger _nl _ps _shutdown _watch _xinput' \
+ '+database _redis-cli _pgsql_utils' \
+ '+dev _artisan _choc _console _gradle _geany _phing _manage.py _mvn _pear _play _symfony _thor _vagrant _veewee' \
+ '+disk _sdd _smartmontools _srm' \
+ '+distribute _celery /_envoy _fab _glances _kitchen _knife _mina _mussh' \
+ '+filesystem _zfs' \
+ '+git _git-flow _git-pulls' \
+ '+hardware _optirun _perf _primus' \
+ '+haskell _cabal _ghc' \
+ '+managers _bower _brew *_cask _debuild _lein _pactree _pkcon _port _yaourt' \
+ '+multimedia _id3 _id3v2 _showoff' \
+ '+net _dget _dhcpcd _httpie _iw _mosh _rfkill _socat _ssh-copy-id _vpnc _vnstat' \
+ '+nfs _exportfs' \
+ '+perl _cpanm' \
+ '/+pip _pip' \
+ '+python _bpython _pygmentize _setup.py' \
+ '+ruby _bundle _cap _ditz _gas _gem _gist _github _git-wtf _jekyll _lunchy _rails _rspec _rubocop _rvm' \
+ '+search _ack _ag _jq' \
+ '+session _atach _teamocil _tmuxinator _wemux' \
+ '+subtitles _language_codes _periscope _subliminal' \
+ '+virtualization _boot2docker *_docker-machine /_docker _virtualbox _virsh' \
+ '+web _coffee _composer _docpad _drush _heroku *_hledger _jonas _jmeter _jmeter-plugins _lunar _middleman _node _nvm _ralio _salt _sbt _scala _svm'
+
+src_prepare() {
+ epatch_user
+}
+
+src_install() {
+ insinto /usr/share/zsh/site-functions
+ local i j u
+ for i in src/*
+ do j=${i#src/}
+ u=${USEFILE["${j}"]}
+ if [ -z "${u}" ]
+ then elog "installing unknown completion ${i#*/}"
+ doins "${i}"
+ continue
+ fi
+ ! use "${u}" || doins "${i}"
+ u=${FILEINDEX["${j}"]}
+ FILES[${u}]=
+ done
+ for i in ${FILES[*]}
+ do elog "listed file ${i} not found"
+ done
+ dodoc README.md zsh-completions-howto.org
+}
diff --git a/app-shells/zsh-syntax-highlighting/zsh-syntax-highlighting-0.2.1.ebuild b/app-shells/zsh-syntax-highlighting/zsh-syntax-highlighting-0.2.1.ebuild
index 54239a6c..be2a231c 120000..100644
--- a/app-shells/zsh-syntax-highlighting/zsh-syntax-highlighting-0.2.1.ebuild
+++ b/app-shells/zsh-syntax-highlighting/zsh-syntax-highlighting-0.2.1.ebuild
@@ -1 +1,52 @@
-zsh-syntax-highlighting-99999999.ebuild \ No newline at end of file
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils readme.gentoo
+
+case ${PV} in
+99999999*)
+ EGIT_REPO_URI="git://github.com/zsh-users/${PN}.git"
+ inherit git-r3
+ PROPERTIES="live"
+ SRC_URI=""
+ KEYWORDS="";;
+*)
+ RESTRICT="mirror"
+ SRC_URI="https://github.com/zsh-users/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86";;
+esac
+
+DESCRIPTION="Fish shell like syntax highlighting for zsh"
+HOMEPAGE="https://github.com/zsh-users/zsh-syntax-highlighting"
+
+LICENSE="HPND"
+SLOT="0"
+IUSE=""
+
+RDEPEND="app-shells/zsh"
+DEPEND=""
+
+DISABLE_AUTOFORMATTING="true"
+DOC_CONTENTS="In order to use ${CATEGORY}/${PN} add
+. /usr/share/zsh/site-contrib/${PN}/zsh-syntax-highlighting.zsh
+at the end of your ~/.zshrc
+For testing, you can also execute the above command in your zsh."
+
+src_prepare() {
+ grep -q 'local .*cdpath_dir' \
+ "${S}/highlighters/main/main-highlighter.zsh" >/dev/null 2>&1 || \
+ sed -i -e '/for cdpath_dir/ilocal cdpath_dir' \
+ -- "${S}/highlighters/main/main-highlighter.zsh" || die
+ epatch_user
+}
+
+src_install() {
+ dodoc *.md
+ insinto /usr/share/zsh/site-contrib/${PN}
+ doins *.zsh
+ doins -r highlighters
+ readme.gentoo_create_doc
+}
diff --git a/app-shells/zsh/ChangeLog b/app-shells/zsh/ChangeLog
index cba46c31..6f53ba40 100644
--- a/app-shells/zsh/ChangeLog
+++ b/app-shells/zsh/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*zsh-5.1.1 (20 Sep 2015)
+
+ 20 Sep 2015; Martin Väth <martin@mvath.de>:
+ Version bump, remove old ebuild
+
*zsh-5.0.8 (26 Jun 2015)
26 Jun 2015; Martin Väth <martin@mvath.de>:
diff --git a/app-shells/zsh/Manifest b/app-shells/zsh/Manifest
index 118cb0c8..74a49796 100644
--- a/app-shells/zsh/Manifest
+++ b/app-shells/zsh/Manifest
@@ -1,2 +1,2 @@
-DIST zsh-5.0.8-doc.tar.bz2 3204865 SHA256 0ee5088c47fa5ceac6e087c7e00f2ede3f5920a03d32220772342ce980339e40 SHA512 86f75cfa16a2d0acbd75dc11d16a9bd4813ea2f0c6e323ed6fd73e66250420333fe0be2dbd62171a36aa479b5b5b423777f7ca369afb29d0f456fb7ed68926f6 WHIRLPOOL 1b25a455e7617cf624f8656eef2064e35a3c7798aec3d2822522bb89cad11441e1658966c467ecd758fa9e02ffcc235ee036830fd00757a04c3ff8e1b21fc434
-DIST zsh-5.0.8.tar.bz2 3250542 SHA256 8079cf08cb8beff22f84b56bd72bb6e6962ff4718d816f3d83a633b4c9e17d23 SHA512 79e438e32802c030749fd1bfff07fb3e5e7f7864e5106233c6f51ea477aa5a8471449e22f262f03bf69f42e66bf39e3b8a93295a247436ce97c66409b582ceae WHIRLPOOL 3ed95b2763bd3e486104a9f935efc89fd9ff1b3d745c1c3a93181a511c2986246e4f14c6d15fd88dd735c006127523ce423150813147250343871c9e2f40f413
+DIST zsh-5.1.1-doc.tar.xz 3061616 SHA256 f5944f29ec77100afdc3634f0bb8ffc4328a2d03147f23d1aa6280b6aa7d622f SHA512 868444662ca9b1cc91f2ecff56ce0944e5e75fc5f5a349eb538ca23a8eb8fb4ebaa8efc2ba1d8581424f25b0009305ed7a6f08ca06db1ecde467eeb5d6b71621 WHIRLPOOL c72760d754e19e7fe1f501bd395becc13877d4b0ba20fbf1f08855be5affb78aac07e2c14e779c1b554e21e29d8bfd5203dd41da5d3f21020dac7033510a4662
+DIST zsh-5.1.1.tar.xz 2788676 SHA256 74e9453b5470b3c0970f9f93cfd603d241c3d7b1968adc0e4b3951073e8d3dec SHA512 732f183a03125e83da11a38c638ca54a667326a23ca19418b0df27b1d5b3b1f360383d84f66bde064911effaa2ce9cbb9b6ab86deddb92f80e8f601af8a82b3e WHIRLPOOL 55199e45557c2667e8f9b7564af44b32b610fe09db451493bd64642c2987e12a638b2b96d6530a16427ba17a6ca8c20e73f88013cf47996eea24e5e1595691e7
diff --git a/app-shells/zsh/zsh-5.0.8.ebuild b/app-shells/zsh/zsh-5.1.1.ebuild
index c9494141..400200f2 100644
--- a/app-shells/zsh/zsh-5.0.8.ebuild
+++ b/app-shells/zsh/zsh-5.1.1.ebuild
@@ -4,12 +4,6 @@
EAPI=5
-# doc package for -dev version exists?
-doc_available=true
-
-# sourceforge mirror for non-git version exists?
-sourceforge_mirror=false
-
inherit eutils flag-o-matic multilib prefix readme.gentoo
MY_PV=${PV/_p/-dev-}
@@ -17,20 +11,8 @@ S=${WORKDIR}/${PN}-${MY_PV}
zsh_ftp="http://www.zsh.org/pub"
-if [[ ${PV} != "${MY_PV}" ]] ; then
- ZSH_URI="${zsh_ftp}/development/${PN}-${MY_PV}.tar.bz2"
- if ${doc_available} ; then
- ZSH_DOC_URI="${zsh_ftp}/development/${PN}-${MY_PV}-doc.tar.bz2"
- else
- ZSH_DOC_URI="${zsh_ftp}/${PN}-${PV%_*}-doc.tar.bz2"
- fi
-else
- ZSH_URI=""
- ${sourceforge_mirror} && ZSH_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
- ZSH_URI+="
- ${zsh_ftp}/${P}.tar.bz2"
- ZSH_DOC_URI="${zsh_ftp}/${PN}-${PV%_*}-doc.tar.bz2"
-fi
+ZSH_URI="${zsh_ftp}/${PN}-${MY_PV}.tar.xz"
+ZSH_DOC_URI="${zsh_ftp}/${PN}-${PV%_*}-doc.tar.xz"
DESCRIPTION="UNIX Shell similar to the Korn shell"
HOMEPAGE="http://www.zsh.org/"
@@ -48,7 +30,12 @@ case ${PV} in
DEPEND="app-text/yodl
dev-lang/perl
sys-apps/man
- sys-apps/util-linux"
+ sys-apps/util-linux
+ doc? (
+ sys-apps/texinfo
+ app-text/texi2html
+ virtual/latex-base
+ )"
PROPERTIES="live"
LIVE=:;;
*)
@@ -75,11 +62,13 @@ done
IUSE+=" debug doc examples gdbm maildir pcre static unicode"
RDEPEND="
- >=sys-libs/ncurses-5.1
- static? ( >=sys-libs/ncurses-5.7-r4[static-libs] )
+ >=sys-libs/ncurses-5.1:0
+ static? ( >=sys-libs/ncurses-5.7-r4:0=[static-libs] )
caps? ( sys-libs/libcap )
- pcre? ( >=dev-libs/libpcre-3.9
- static? ( >=dev-libs/libpcre-3.9[static-libs] ) )
+ pcre? (
+ >=dev-libs/libpcre-3.9
+ static? ( >=dev-libs/libpcre-3.9[static-libs] )
+ )
gdbm? ( sys-libs/gdbm )
"
DEPEND+="
diff --git a/app-shells/zsh/zsh-99999999.ebuild b/app-shells/zsh/zsh-99999999.ebuild
index 4e9fbb70..400200f2 120000..100644
--- a/app-shells/zsh/zsh-99999999.ebuild
+++ b/app-shells/zsh/zsh-99999999.ebuild
@@ -1 +1,300 @@
-zsh-5.0.8.ebuild \ No newline at end of file
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib prefix readme.gentoo
+
+MY_PV=${PV/_p/-dev-}
+S=${WORKDIR}/${PN}-${MY_PV}
+
+zsh_ftp="http://www.zsh.org/pub"
+
+ZSH_URI="${zsh_ftp}/${PN}-${MY_PV}.tar.xz"
+ZSH_DOC_URI="${zsh_ftp}/${PN}-${PV%_*}-doc.tar.xz"
+
+DESCRIPTION="UNIX Shell similar to the Korn shell"
+HOMEPAGE="http://www.zsh.org/"
+case ${PV} in
+9999*)
+ SRC_URI=""
+ EGIT_REPO_URI="git://git.code.sf.net/p/zsh/code"
+ inherit git-r3
+ WANT_LIBTOOL="none"
+ inherit autotools
+ KEYWORDS=""
+# Creating help files needs util-linux for colcrt.
+# Please let me know if you have an arch where "colcrt" (or at least "col")
+# is provided by a different package.
+ DEPEND="app-text/yodl
+ dev-lang/perl
+ sys-apps/man
+ sys-apps/util-linux
+ doc? (
+ sys-apps/texinfo
+ app-text/texi2html
+ virtual/latex-base
+ )"
+ PROPERTIES="live"
+ LIVE=:;;
+*)
+ SRC_URI="${ZSH_URI}
+ doc? ( ${ZSH_DOC_URI} )"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~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"
+ #KEYWORDS="alpha amd64 arm hppa ia64 mips 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"
+ DEPEND=""
+ LIVE=false;;
+esac
+
+LICENSE="ZSH gdbm? ( GPL-2 )"
+SLOT="0"
+IUSE="caps compile"
+COMPLETIONS="AIX BSD Cygwin Darwin Debian +Linux Mandriva openSUSE Redhat Solaris +Unix +X"
+for curr in ${COMPLETIONS}
+do case ${curr} in
+ [+-]*)
+ IUSE+=" ${curr%%[!+-]*}completion_${curr#?}"
+ continue;;
+ esac
+ IUSE+=" completion_${curr}"
+done
+IUSE+=" debug doc examples gdbm maildir pcre static unicode"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.1:0
+ static? ( >=sys-libs/ncurses-5.7-r4:0=[static-libs] )
+ caps? ( sys-libs/libcap )
+ pcre? (
+ >=dev-libs/libpcre-3.9
+ static? ( >=dev-libs/libpcre-3.9[static-libs] )
+ )
+ gdbm? ( sys-libs/gdbm )
+"
+DEPEND+="
+ sys-apps/groff
+ ${RDEPEND}"
+PDEPEND="
+ examples? ( app-doc/zsh-lovers )
+"
+
+DISABLE_AUTOFORMATTING="true"
+DOC_CONTENTS="
+If you want to enable Portage completions and Gentoo prompt,
+emerge app-shells/zsh-completion and add
+ autoload -U compinit promptinit
+ compinit
+ promptinit; prompt gentoo
+to your ~/.zshrc
+
+Also, if you want to enable cache for the completions, add
+ zstyle ':completion::complete:*' use-cache 1
+to your ~/.zshrc
+
+If you want to use run-help add to your ~/.zshrc
+ unalias run-help
+ autoload -Uz run-help
+
+Note that a system zprofile startup file is installed. This will override
+PATH and possibly other variables that a user may set in ~/.zshenv.
+Custom PATH settings and similar overridden variables can be moved
+to ~/.zprofile or other user startup files that are sourced after the
+system zprofile.
+
+If PATH must be set in ~/.zshenv to affect things like non-login ssh shells,
+one method is to use a separate path-setting file that is conditionally sourced
+in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the
+zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/.
+
+See https://wiki.gentoo.org/wiki/Zsh/HOWTO for more introduction documentation.
+"
+
+src_prepare() {
+ # fix zshall problem with soelim
+ ln -s Doc man1 || die
+ mv Doc/zshall.1 Doc/zshall.1.soelim || die
+ soelim Doc/zshall.1.soelim > Doc/zshall.1 || die
+
+ epatch "${FILESDIR}"/${PN}-init.d-gentoo-r1.diff
+
+ cp "${FILESDIR}"/zprofile-1 "${T}"/zprofile || die
+ eprefixify "${T}"/zprofile || die
+ if use prefix ; then
+ sed -i -e 's|@ZSH_PREFIX@||' -e '/@ZSH_NOPREFIX@/d' "${T}"/zprofile || die
+ else
+ sed -i -e 's|@ZSH_NOPREFIX@||' -e '/@ZSH_PREFIX@/d' -e 's|""||' "${T}"/zprofile || die
+ fi
+ set --
+ file='Src/Zle/complete.mdd'
+ for i in ${COMPLETIONS}
+ do case ${i} in
+ [+-]*)
+ i=${i#?};;
+ esac
+ grep -q "Completion\/${i}" -- "${S}/${file}" \
+ || die "${file} does not contain Completion/${i}"
+ use completion_${i} || set -- "${@}" -e "s/Completion\/${i}[^ ']*//"
+ done
+ [ ${#} -eq 0 ] || sed -i "${@}" -- "${S}/${file}" \
+ || die "patching ${file} failed"
+ epatch_user
+ ! ${LIVE} || eautoreconf
+ PVPATH=$(. "${S}"/Config/version.mk && printf '%s' "${VERSION}") && \
+ [ -n "${PVPATH}" ] || PVPATH=${PV}
+}
+
+src_configure() {
+ local myconf
+ myconf=()
+
+ if use static ; then
+ myconf+=( --disable-dynamic )
+ append-ldflags -static
+ fi
+ if use debug ; then
+ myconf+=(
+ --enable-zsh-debug
+ --enable-zsh-mem-debug
+ --enable-zsh-mem-warning
+ --enable-zsh-secure-free
+ --enable-zsh-hash-debug
+ )
+ fi
+
+ if [[ ${CHOST} == *-darwin* ]]; then
+ myconf+=( --enable-libs=-liconv )
+ append-ldflags -Wl,-x
+ fi
+
+ econf \
+ --bindir="${EPREFIX}"/bin \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --enable-etcdir="${EPREFIX}"/etc/zsh \
+ --enable-runhelpdir="${EPREFIX}"/usr/share/zsh/${PVPATH}/help \
+ --enable-fndir="${EPREFIX}"/usr/share/zsh/${PVPATH}/functions \
+ --enable-site-fndir="${EPREFIX}"/usr/share/zsh/site-functions \
+ --enable-function-subdirs \
+ --with-tcsetpgrp \
+ $(use_enable maildir maildir-support) \
+ $(use_enable pcre) \
+ $(use_enable caps cap) \
+ $(use_enable unicode multibyte) \
+ $(use_enable gdbm ) \
+ "${myconf[@]}"
+
+ if use static ; then
+ # compile all modules statically, see Bug #27392
+ # removed cap and curses because linking failes
+ sed -e "s,link=no,link=static,g" \
+ -e "/^name=zsh\/cap/s,link=static,link=no," \
+ -e "/^name=zsh\/curses/s,link=static,link=no," \
+ -i "${S}"/config.modules || die
+ if ! use gdbm ; then
+ sed -i '/^name=zsh\/db\/gdbm/s,link=static,link=no,' \
+ "${S}"/config.modules || die
+ fi
+ fi
+}
+
+src_compile() {
+ default
+ ! ${LIVE} || ! use doc || emake -C Doc everything
+}
+
+src_test() {
+ addpredict /dev/ptmx
+ local i
+ for i in C02cond.ztst V08zpty.ztst X02zlevi.ztst Y01completion.ztst Y02compmatch.ztst Y03arguments.ztst ; do
+ rm "${S}"/Test/${i} || die
+ done
+ emake check
+}
+
+zcompile_dirs() {
+ use compile || return 0
+ einfo "compiling modules"
+ local i
+ i="${S}/Src/zshpaths.h"
+ test -f "${i}" || die "cannot find ${i}"
+ # We need this directory also in pkg_postinst
+ FPATH_DIR="$(sed -n -e \
+ 's/^#define FPATH_DIR .*\"\(.*\)\".*$/\1/p' -- "${i}" 2>/dev/null)" \
+ || FPATH_DIR=
+ [ -n "${FPATH_DIR}" ] || die "cannot parse ${i}"
+ pushd -- "${ED}" >/dev/null || die
+ test -d ".${FPATH_DIR}" || die "parsing ${i} gave strange result ${FPATH_DIR}"
+ find ".${FPATH_DIR}" -type d -exec "${ED}bin/zsh" -fc 'setopt nullglob
+for i
+do a=(${i}/*(.))
+ [[ ${#a} -eq 0 ]] && continue
+ echo "Compiling ${i#.}.zwc"
+ zcompile -U -M ${i}.zwc ${a} || exit
+done' zsh '{}' '+' || die 'compiling failed. If you are cross-compiling set USE=-compile'
+ popd >/dev/null
+}
+
+touch_zwc() {
+ use compile || return 0
+ einfo "touching *.zwc files"
+ # Make a sanity check that variables are preserved after zcompile_dirs:
+ # If the package mangler is not faulty, this *must* succeeed.
+ [ -n "${FPATH_DIR}" ] && test -d "${FPATH_DIR}" || die "strange FPATH_DIR"
+ # Now the actual action
+ find "${EPREFIX}${FPATH_DIR}" -type f -name '*.zwc' \
+ -exec "$(command -v touch)" -- '{}' '+'
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install install.info
+
+ insinto /etc/zsh
+ doins "${T}"/zprofile
+
+ keepdir /usr/share/zsh/site-functions
+ insinto /usr/share/zsh/"${PVPATH}"/functions/Prompts
+ newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup
+
+ local i
+
+ # install miscellaneous scripts (bug #54520)
+ sed -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \
+ -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" \
+ -i "${S}"/{Util,Misc}/* || die
+ for i in Util Misc ; do
+ insinto /usr/share/zsh/"${PVPATH}"/${i}
+ doins ${i}/*
+ done
+
+ # install header files (bug #538684)
+ insinto /usr/include/zsh
+ doins config.h Src/*.epro
+ for i in Src/{zsh.mdh,*.h} ; do
+ sed -e 's@\.\./config\.h@config.h@' \
+ -e 's@#\(\s*\)include "\([^"]\+\)"@#\1include <zsh/\2>@' \
+ -i "${i}"
+ doins "${i}"
+ done
+
+ dodoc ChangeLog* META-FAQ NEWS README config.modules
+ readme.gentoo_create_doc
+
+ if use doc ; then
+ pushd "${WORKDIR}/${PN}-${PV%_*}" >/dev/null
+ dohtml -r Doc/*
+ insinto /usr/share/doc/${PF}
+ doins Doc/zsh.{dvi,pdf}
+ popd >/dev/null
+ fi
+
+ docinto StartupFiles
+ dodoc StartupFiles/z*
+
+ zcompile_dirs
+
+ rm -vf -- "${ED}"/bin/zsh?*
+}
+
+pkg_postinst() {
+ readme.gentoo_pkg_postinst
+ touch_zwc
+}