diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-shells/zsh | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-shells/zsh')
-rw-r--r-- | app-shells/zsh/Manifest | 6 | ||||
-rw-r--r-- | app-shells/zsh/files/prompt_gentoo_setup-1 | 33 | ||||
-rw-r--r-- | app-shells/zsh/files/zprofile-1 | 43 | ||||
-rw-r--r-- | app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch | 19 | ||||
-rw-r--r-- | app-shells/zsh/files/zsh-5.0.7-pid-ns.patch | 39 | ||||
-rw-r--r-- | app-shells/zsh/files/zsh-init.d-gentoo-r1.diff | 30 | ||||
-rw-r--r-- | app-shells/zsh/metadata.xml | 14 | ||||
-rw-r--r-- | app-shells/zsh/zsh-5.0.5.ebuild | 170 | ||||
-rw-r--r-- | app-shells/zsh/zsh-5.0.7-r1.ebuild | 173 | ||||
-rw-r--r-- | app-shells/zsh/zsh-5.0.7-r2.ebuild | 174 | ||||
-rw-r--r-- | app-shells/zsh/zsh-5.0.8.ebuild | 210 | ||||
-rw-r--r-- | app-shells/zsh/zsh-9999.ebuild | 210 |
12 files changed, 1121 insertions, 0 deletions
diff --git a/app-shells/zsh/Manifest b/app-shells/zsh/Manifest new file mode 100644 index 000000000000..a7f03ef4e915 --- /dev/null +++ b/app-shells/zsh/Manifest @@ -0,0 +1,6 @@ +DIST zsh-5.0.5-doc.tar.bz2 2940018 SHA256 e4f22bafaa8410bbc2d83f2d748ca4764365752c46f7e1099be54f2a62c492f2 SHA512 341e4a62c7c2367d17c54c5133b7c0a74e6c0becfaddd3c1f5dbe782300bbd74b0fc2066e892776cb52ce11cd0600739bfd5a7dd067eaae8a1d11b1b2aa0c3b0 WHIRLPOOL 48e021bc2caf840d048888faf5cafea5ce698968479e1c8791f33dc36f9b0f60db16ff481e88ce8c903480d905b728eb9ff9dfc8fbcb066d3698cc0cc3a02d8a +DIST zsh-5.0.5.tar.bz2 3104375 SHA256 6624d2fb6c8fa4e044d2b009f86ed1617fe8583c83acfceba7ec82826cfa8eaf SHA512 34d69bed190cbc476bcdaa4b703fee1caaeae7e011fe7ea595b29bbd31df57bbe4d19b5940618e0c89a0a4b6c476f9ef03ce9829b4fb3735c1aedf309b0225a5 WHIRLPOOL bf02ca194261e15e88a9e26212644aa7be1afcc8e73cd6bb18ffb8e1c1d46a8742fee109d92a3b455c418258df9ae74dece21a05ff0e54e8c370af094512af16 +DIST zsh-5.0.7-doc.tar.bz2 3005587 SHA256 43e8665ba9d9eca8370c64e2d4846e84f9111c628e5792f2aa639a7fb209fcf1 SHA512 5a8bdf00bb646bb844a2d953aed85de802fe2e8fa05a76382d3baeba8a0108fa2d0b137b7d9bf88eeeb77ea06843fe1c56ec1fece1389b502e39a16dd31f208c WHIRLPOOL 0364f134997e4df63e7d6e9b6c81030dcf96ce30bb329b353fccf682ab5e20964d028e6667d836ff1a4c70e27331632cc96c7871ba69afc611c7bbdd09c8508b +DIST zsh-5.0.7.tar.bz2 3181030 SHA256 544e27de81740286b916d1d77c9f48ad7c26ad7943ed96d278abee67cf6704b3 SHA512 e309863b41c9f92996fb9301d96d1aa43270ef8a04626c946703675b16a0a2ac9fddc959184cd8c639bd061fc2dd21902b21515550f639faacccdabd59e256e5 WHIRLPOOL f7cfbc41a2c990f702fee4ee158db79ebaad794479a62ff0ccd1d466077556e93b5e563575f9fd25dde1cb5e3c3610a14c997155ea76d86293d0a08168a3a418 +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 diff --git a/app-shells/zsh/files/prompt_gentoo_setup-1 b/app-shells/zsh/files/prompt_gentoo_setup-1 new file mode 100644 index 000000000000..046e2d87f53a --- /dev/null +++ b/app-shells/zsh/files/prompt_gentoo_setup-1 @@ -0,0 +1,33 @@ +# gentoo prompt theme + +prompt_gentoo_help () { + cat <<'EOF' +This prompt is color-scheme-able. You can invoke it thus: + + prompt gentoo [<promptcolor> [<usercolor> [<rootcolor>]]] + +EOF +} + +prompt_gentoo_setup () { + local prompt_gentoo_prompt=${1:-'blue'} + local prompt_gentoo_user=${2:-'green'} + local prompt_gentoo_root=${3:-'red'} + + if [ "$USER" = 'root' ] + then + local base_prompt="%B%F{$prompt_gentoo_root}%m%k " + else + local base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k " + fi + local post_prompt="%b%f%k" + + #setopt noxtrace localoptions + + local path_prompt="%B%F{$prompt_gentoo_prompt}%1~" + typeset -g PS1="$base_prompt$path_prompt %# $post_prompt" + typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt" + typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt" +} + +prompt_gentoo_setup "$@" diff --git a/app-shells/zsh/files/zprofile-1 b/app-shells/zsh/files/zprofile-1 new file mode 100644 index 000000000000..655c525e6900 --- /dev/null +++ b/app-shells/zsh/files/zprofile-1 @@ -0,0 +1,43 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/zsh/zprofile +# $Id$ + +# Load environment settings from profile.env, which is created by +# env-update from the files in /etc/env.d +if [ -e "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env ] ; then + . "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.env +fi + +# You should override these in your ~/.zprofile (or equivalent) for per-user +# settings. For system defaults, you can add a new file in /etc/profile.d/. +export EDITOR=${EDITOR:-/bin/nano} +export PAGER=${PAGER:-/usr/bin/less} + +# 077 would be more secure, but 022 is generally quite realistic +umask 022 + +# Set up PATH depending on whether we're root or a normal user. +# There's no real reason to exclude sbin paths from the normal user, +# but it can make tab-completion easier when they aren't in the +# user's PATH to pollute the executable namespace. +# +# It is intentional in the following line to use || instead of -o. +# This way the evaluation can be short-circuited and calling whoami is +# avoided. +if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then + @ZSH_NOPREFIX@PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}" + @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/sbin:@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/sbin:@GENTOO_PORTAGE_EPREFIX@/bin:${ROOTPATH}:/usr/sbin:/usr/bin:/sbin:/bin" +else + @ZSH_NOPREFIX@PATH="/usr/local/bin:/usr/bin:/bin:${PATH}" + @ZSH_PREFIX@PATH="@GENTOO_PORTAGE_EPREFIX@/usr/bin:@GENTOO_PORTAGE_EPREFIX@/bin:${PATH}:/usr/bin:/bin" +fi +export PATH +unset ROOTPATH + +shopts=$- +setopt nullglob +for sh in "@GENTOO_PORTAGE_EPREFIX@"/etc/profile.d/*.sh ; do + [ -r "$sh" ] && . "$sh" +done +unsetopt nullglob +set -$shopts +unset sh shopts diff --git a/app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch b/app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch new file mode 100644 index 000000000000..5beb7eca64c2 --- /dev/null +++ b/app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch @@ -0,0 +1,19 @@ +http://www.zsh.org/mla/workers/2014/msg01191.html + +diff --git a/Completion/Base/Utility/_call_program b/Completion/Base/Utility/_call_program +index b657648..010e094 100644 +--- a/Completion/Base/Utility/_call_program ++++ b/Completion/Base/Utility/_call_program +@@ -2,8 +2,8 @@ + + local tmp err_fd=-1 + +-if (( ${debug_fd:--1} > 2 )) +-then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is log file ++if (( ${debug_fd:--1} > 2 )) || [[ ! -t 2 ]] ++then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is trace or redirect + else exec {err_fd}>/dev/null + fi + + +-- diff --git a/app-shells/zsh/files/zsh-5.0.7-pid-ns.patch b/app-shells/zsh/files/zsh-5.0.7-pid-ns.patch new file mode 100644 index 000000000000..928ce48b4617 --- /dev/null +++ b/app-shells/zsh/files/zsh-5.0.7-pid-ns.patch @@ -0,0 +1,39 @@ +zsh and pid namespaces don't play very well together. Specifically, when zsh is +launched inside a new pid namespace, it doesn't take ownership of the process +group, causing things like SIGINT to be sent to the parent process. Upstream +bug report here: http://www.zsh.org/mla/workers/2014/msg01769.html. + +The first chunk of this diff fixes this problem and has already been applied +upstream: +http://sourceforge.net/p/zsh/code/ci/0c4cb0cc1b527f4341f1a39a10f4120aa7c7d594/. + +The second chunk is a suggested fix for the warning that zsh prints when +exiting: http://www.zsh.org/mla/workers/2014/msg01779.html. + +diff --git a/Src/jobs.c b/Src/jobs.c +index a668b07..c6e1bce 100644 +--- a/Src/jobs.c ++++ b/Src/jobs.c +@@ -2734,7 +2734,7 @@ acquire_pgrp(void) + long ttpgrp; + sigset_t blockset, oldset; + +- if ((mypgrp = GETPGRP()) > 0) { ++ if ((mypgrp = GETPGRP()) >= 0) { + long lastpgrp = mypgrp; + sigemptyset(&blockset); + sigaddset(&blockset, SIGTTIN); +@@ -2779,8 +2779,11 @@ void + release_pgrp(void) + { + if (origpgrp != mypgrp) { +- attachtty(origpgrp); +- setpgrp(0, origpgrp); ++ /* in linux pid namespaces, origpgrp may never have been set */ ++ if (origpgrp) { ++ attachtty(origpgrp); ++ setpgrp(0, origpgrp); ++ } + mypgrp = origpgrp; + } + } diff --git a/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff b/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff new file mode 100644 index 000000000000..9597a733c903 --- /dev/null +++ b/app-shells/zsh/files/zsh-init.d-gentoo-r1.diff @@ -0,0 +1,30 @@ +--- zsh-4.3.11/Completion/Unix/Command/_init_d ++++ zsh-4.3.11/Completion/Unix/Command/_init_d +@@ -1,6 +1,6 @@ + #compdef -p */(init|rc[0-9S]#).d/* + +-local cmds script ++local cmds script opts + + _compskip=all + +@@ -83,10 +83,17 @@ + + script=$words[1] + [[ $script = */* ]] || script="$(_init_d_fullpath "$script")" ++[[ ! -f $script ]] && ++ { _message "${words[1]:t} is not an init script" && return } + + cmds=( $(_init_d_get_cmds) ) || return + +-(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds || +- cmds=(start stop) ++(( $#cmds )) || zstyle -a ":completion:${curcontext}:commands" commands cmds ++opts=(start stop restart pause zap status ineed iuse needsme usesme broken) ++ ++# If we didn't get $cmds from a zstyle, then read init script for opts. ++# If script doesn't specify opts, then default to the standard opts. ++(( $#cmds )) || cmds=( ${(eQz)${(M)${(f)"$( <$script)"}:#[[:blank:]]#opts=*}#*=} ) ++(( $#cmds )) || cmds=($opts) + + _sub_commands $cmds diff --git a/app-shells/zsh/metadata.xml b/app-shells/zsh/metadata.xml new file mode 100644 index 000000000000..d02793c9ff35 --- /dev/null +++ b/app-shells/zsh/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> +</maintainer> +<longdescription> + Zsh is a shell designed for interactive use, although it is also a + powerful scripting language. Many of the useful features of bash, ksh, + and tcsh were incorporated into zsh; many original features were + added. +</longdescription> +</pkgmetadata> diff --git a/app-shells/zsh/zsh-5.0.5.ebuild b/app-shells/zsh/zsh-5.0.5.ebuild new file mode 100644 index 000000000000..58e851ad6b0e --- /dev/null +++ b/app-shells/zsh/zsh-5.0.5.ebuild @@ -0,0 +1,170 @@ +# 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 + +DESCRIPTION="UNIX Shell similar to the Korn shell" +HOMEPAGE="http://www.zsh.org/" +SRC_URI="http://www.zsh.org/pub/${P}.tar.bz2 + doc? ( http://www.zsh.org/pub/${P}-doc.tar.bz2 )" + +LICENSE="ZSH gdbm? ( GPL-2 )" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k 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 debug doc examples gdbm maildir pcre static unicode" + +RDEPEND=" + >=sys-libs/ncurses-5.1 + static? ( >=sys-libs/ncurses-5.7-r4[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 ) +" + +src_prepare() { + # fix zshall problem with soelim + ln -s Doc man1 + mv Doc/zshall.1 Doc/zshall.1.soelim + soelim Doc/zshall.1.soelim > Doc/zshall.1 + + 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 +} + +src_configure() { + local 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/${PV%_*}/help \ + --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/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 -i \ + -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," \ + "${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_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 +} + +src_install() { + emake DESTDIR="${D}" install install.info + + insinto /etc/zsh + doins "${T}"/zprofile + + keepdir /usr/share/zsh/site-functions + insinto /usr/share/zsh/${PV%_*}/functions/Prompts + newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup + + # install miscellaneous scripts; bug #54520 + local i + sed -i -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \ + -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" "${S}"/{Util,Misc}/* || die + for i in Util Misc ; do + insinto /usr/share/zsh/${PV%_*}/${i} + doins ${i}/* + done + + dodoc ChangeLog* META-FAQ NEWS README config.modules + + 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* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + # should link to http://www.gentoo.org/doc/en/zsh.xml + echo + elog "If you want to enable Portage completions and Gentoo prompt," + elog "emerge app-shells/gentoo-zsh-completions and add" + elog " autoload -U compinit promptinit" + elog " compinit" + elog " promptinit; prompt gentoo" + elog "to your ~/.zshrc" + echo + elog "Also, if you want to enable cache for the completions, add" + elog " zstyle ':completion::complete:*' use-cache 1" + elog "to your ~/.zshrc" + echo + elog "Note that a system zprofile startup file is installed. This will override" + elog "PATH and possibly other variables that a user may set in ~/.zshenv." + elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile" + elog "or other user startup files that are sourced after the system zprofile." + echo + elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells," + elog "one method is to use a separate path-setting file that is conditionally sourced" + elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the" + elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/." + echo + fi +} diff --git a/app-shells/zsh/zsh-5.0.7-r1.ebuild b/app-shells/zsh/zsh-5.0.7-r1.ebuild new file mode 100644 index 000000000000..21fdb7879ee0 --- /dev/null +++ b/app-shells/zsh/zsh-5.0.7-r1.ebuild @@ -0,0 +1,173 @@ +# 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 + +DESCRIPTION="UNIX Shell similar to the Korn shell" +HOMEPAGE="http://www.zsh.org/" +SRC_URI="http://www.zsh.org/pub/${P}.tar.bz2 + doc? ( http://www.zsh.org/pub/${P}-doc.tar.bz2 )" + +LICENSE="ZSH gdbm? ( GPL-2 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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" +IUSE="caps debug doc examples gdbm maildir pcre static unicode" + +RDEPEND=" + >=sys-libs/ncurses-5.1 + static? ( >=sys-libs/ncurses-5.7-r4[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 ) +" + +src_prepare() { + # fix zshall problem with soelim + ln -s Doc man1 + mv Doc/zshall.1 Doc/zshall.1.soelim + soelim Doc/zshall.1.soelim > Doc/zshall.1 + + 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 + + # fix cvs completion + epatch "${FILESDIR}"/${P}-fix-cvs-completion.patch +} + +src_configure() { + local 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/${PV%_*}/help \ + --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/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 -i \ + -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," \ + "${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_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 +} + +src_install() { + emake DESTDIR="${D}" install install.info + + insinto /etc/zsh + doins "${T}"/zprofile + + keepdir /usr/share/zsh/site-functions + insinto /usr/share/zsh/${PV%_*}/functions/Prompts + newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup + + # install miscellaneous scripts; bug #54520 + local i + sed -i -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \ + -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" "${S}"/{Util,Misc}/* || die + for i in Util Misc ; do + insinto /usr/share/zsh/${PV%_*}/${i} + doins ${i}/* + done + + dodoc ChangeLog* META-FAQ NEWS README config.modules + + 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* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + # should link to http://www.gentoo.org/doc/en/zsh.xml + echo + elog "If you want to enable Portage completions and Gentoo prompt," + elog "emerge app-shells/gentoo-zsh-completions and add" + elog " autoload -U compinit promptinit" + elog " compinit" + elog " promptinit; prompt gentoo" + elog "to your ~/.zshrc" + echo + elog "Also, if you want to enable cache for the completions, add" + elog " zstyle ':completion::complete:*' use-cache 1" + elog "to your ~/.zshrc" + echo + elog "Note that a system zprofile startup file is installed. This will override" + elog "PATH and possibly other variables that a user may set in ~/.zshenv." + elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile" + elog "or other user startup files that are sourced after the system zprofile." + echo + elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells," + elog "one method is to use a separate path-setting file that is conditionally sourced" + elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the" + elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/." + echo + fi +} diff --git a/app-shells/zsh/zsh-5.0.7-r2.ebuild b/app-shells/zsh/zsh-5.0.7-r2.ebuild new file mode 100644 index 000000000000..b6e7712d5ef6 --- /dev/null +++ b/app-shells/zsh/zsh-5.0.7-r2.ebuild @@ -0,0 +1,174 @@ +# 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 + +DESCRIPTION="UNIX Shell similar to the Korn shell" +HOMEPAGE="http://www.zsh.org/" +SRC_URI="http://www.zsh.org/pub/${P}.tar.bz2 + doc? ( http://www.zsh.org/pub/${P}-doc.tar.bz2 )" + +LICENSE="ZSH gdbm? ( GPL-2 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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" +IUSE="caps debug doc examples gdbm maildir pcre static unicode" + +RDEPEND=" + >=sys-libs/ncurses-5.1 + static? ( >=sys-libs/ncurses-5.7-r4[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 ) +" + +src_prepare() { + # fix zshall problem with soelim + ln -s Doc man1 + mv Doc/zshall.1 Doc/zshall.1.soelim + soelim Doc/zshall.1.soelim > Doc/zshall.1 + + epatch "${FILESDIR}"/${PN}-init.d-gentoo-r1.diff + epatch "${FILESDIR}"/${P}-pid-ns.patch + + 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 + + # fix cvs completion + epatch "${FILESDIR}"/${P}-fix-cvs-completion.patch +} + +src_configure() { + local 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/${PV%_*}/help \ + --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/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 -i \ + -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," \ + "${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_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 +} + +src_install() { + emake DESTDIR="${D}" install install.info + + insinto /etc/zsh + doins "${T}"/zprofile + + keepdir /usr/share/zsh/site-functions + insinto /usr/share/zsh/${PV%_*}/functions/Prompts + newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup + + # install miscellaneous scripts; bug #54520 + local i + sed -i -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \ + -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" "${S}"/{Util,Misc}/* || die + for i in Util Misc ; do + insinto /usr/share/zsh/${PV%_*}/${i} + doins ${i}/* + done + + dodoc ChangeLog* META-FAQ NEWS README config.modules + + 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* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + # should link to http://www.gentoo.org/doc/en/zsh.xml + echo + elog "If you want to enable Portage completions and Gentoo prompt," + elog "emerge app-shells/gentoo-zsh-completions and add" + elog " autoload -U compinit promptinit" + elog " compinit" + elog " promptinit; prompt gentoo" + elog "to your ~/.zshrc" + echo + elog "Also, if you want to enable cache for the completions, add" + elog " zstyle ':completion::complete:*' use-cache 1" + elog "to your ~/.zshrc" + echo + elog "Note that a system zprofile startup file is installed. This will override" + elog "PATH and possibly other variables that a user may set in ~/.zshenv." + elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile" + elog "or other user startup files that are sourced after the system zprofile." + echo + elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells," + elog "one method is to use a separate path-setting file that is conditionally sourced" + elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the" + elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/." + echo + fi +} diff --git a/app-shells/zsh/zsh-5.0.8.ebuild b/app-shells/zsh/zsh-5.0.8.ebuild new file mode 100644 index 000000000000..d2cb1232d694 --- /dev/null +++ b/app-shells/zsh/zsh-5.0.8.ebuild @@ -0,0 +1,210 @@ +# 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 + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 autotools + EGIT_REPO_URI="git://git.code.sf.net/p/zsh/code" +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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" + SRC_URI="http://www.zsh.org/pub/${P}.tar.bz2 + doc? ( http://www.zsh.org/pub/${P}-doc.tar.bz2 )" +fi + +DESCRIPTION="UNIX Shell similar to the Korn shell" +HOMEPAGE="http://www.zsh.org/" + +LICENSE="ZSH gdbm? ( GPL-2 )" +SLOT="0" +IUSE="caps debug doc examples gdbm maildir pcre static unicode" + +RDEPEND=" + >=sys-libs/ncurses-5.1 + static? ( >=sys-libs/ncurses-5.7-r4[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 ) +" +if [[ ${PV} == 9999* ]] ; then + DEPEND+=" app-text/yodl + doc? ( + sys-apps/texinfo + app-text/texi2html + virtual/latex-base + )" +fi + +src_prepare() { + # fix zshall problem with soelim + ln -s Doc man1 + mv Doc/zshall.1 Doc/zshall.1.soelim + soelim Doc/zshall.1.soelim > Doc/zshall.1 + + 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 + + if [[ ${PV} == 9999* ]] ; then + sed -i "/^VERSION=/s/=.*/=${PV}/" Config/version.mk || die + eautoreconf + fi +} + +src_configure() { + local 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/${PV%_*}/help \ + --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/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 + + if [[ ${PV} == 9999* ]] && use doc ; then + emake -C Doc everything + fi +} + +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 +} + +src_install() { + emake DESTDIR="${D}" install install.info + + insinto /etc/zsh + doins "${T}"/zprofile + + keepdir /usr/share/zsh/site-functions + insinto /usr/share/zsh/${PV%_*}/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 {Util,Misc}/* || die + for i in Util Misc ; do + insinto /usr/share/zsh/${PV%_*}/${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 + + 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* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + echo + elog "If you want to enable Portage completions and Gentoo prompt," + elog "emerge app-shells/gentoo-zsh-completions and add" + elog " autoload -U compinit promptinit" + elog " compinit" + elog " promptinit; prompt gentoo" + elog "to your ~/.zshrc" + echo + elog "Also, if you want to enable cache for the completions, add" + elog " zstyle ':completion::complete:*' use-cache 1" + elog "to your ~/.zshrc" + echo + elog "Note that a system zprofile startup file is installed. This will override" + elog "PATH and possibly other variables that a user may set in ~/.zshenv." + elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile" + elog "or other user startup files that are sourced after the system zprofile." + echo + elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells," + elog "one method is to use a separate path-setting file that is conditionally sourced" + elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the" + elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/." + echo + elog "See https://wiki.gentoo.org/wiki/Zsh/HOWTO for more introduction documentation." + echo + fi +} diff --git a/app-shells/zsh/zsh-9999.ebuild b/app-shells/zsh/zsh-9999.ebuild new file mode 100644 index 000000000000..d2cb1232d694 --- /dev/null +++ b/app-shells/zsh/zsh-9999.ebuild @@ -0,0 +1,210 @@ +# 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 + +if [[ ${PV} == 9999* ]] ; then + inherit git-r3 autotools + EGIT_REPO_URI="git://git.code.sf.net/p/zsh/code" +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~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" + SRC_URI="http://www.zsh.org/pub/${P}.tar.bz2 + doc? ( http://www.zsh.org/pub/${P}-doc.tar.bz2 )" +fi + +DESCRIPTION="UNIX Shell similar to the Korn shell" +HOMEPAGE="http://www.zsh.org/" + +LICENSE="ZSH gdbm? ( GPL-2 )" +SLOT="0" +IUSE="caps debug doc examples gdbm maildir pcre static unicode" + +RDEPEND=" + >=sys-libs/ncurses-5.1 + static? ( >=sys-libs/ncurses-5.7-r4[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 ) +" +if [[ ${PV} == 9999* ]] ; then + DEPEND+=" app-text/yodl + doc? ( + sys-apps/texinfo + app-text/texi2html + virtual/latex-base + )" +fi + +src_prepare() { + # fix zshall problem with soelim + ln -s Doc man1 + mv Doc/zshall.1 Doc/zshall.1.soelim + soelim Doc/zshall.1.soelim > Doc/zshall.1 + + 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 + + if [[ ${PV} == 9999* ]] ; then + sed -i "/^VERSION=/s/=.*/=${PV}/" Config/version.mk || die + eautoreconf + fi +} + +src_configure() { + local 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/${PV%_*}/help \ + --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/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 + + if [[ ${PV} == 9999* ]] && use doc ; then + emake -C Doc everything + fi +} + +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 +} + +src_install() { + emake DESTDIR="${D}" install install.info + + insinto /etc/zsh + doins "${T}"/zprofile + + keepdir /usr/share/zsh/site-functions + insinto /usr/share/zsh/${PV%_*}/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 {Util,Misc}/* || die + for i in Util Misc ; do + insinto /usr/share/zsh/${PV%_*}/${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 + + 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* +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + echo + elog "If you want to enable Portage completions and Gentoo prompt," + elog "emerge app-shells/gentoo-zsh-completions and add" + elog " autoload -U compinit promptinit" + elog " compinit" + elog " promptinit; prompt gentoo" + elog "to your ~/.zshrc" + echo + elog "Also, if you want to enable cache for the completions, add" + elog " zstyle ':completion::complete:*' use-cache 1" + elog "to your ~/.zshrc" + echo + elog "Note that a system zprofile startup file is installed. This will override" + elog "PATH and possibly other variables that a user may set in ~/.zshenv." + elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile" + elog "or other user startup files that are sourced after the system zprofile." + echo + elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells," + elog "one method is to use a separate path-setting file that is conditionally sourced" + elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the" + elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/." + echo + elog "See https://wiki.gentoo.org/wiki/Zsh/HOWTO for more introduction documentation." + echo + fi +} |