summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMamoru Komachi <usata@gentoo.org>2005-05-05 15:12:16 +0000
committerMamoru Komachi <usata@gentoo.org>2005-05-05 15:12:16 +0000
commit6ce94d0e6a0fc487ba1fd3c2d8f58ca8ae4c5fcb (patch)
tree63e9da5eed3a3b13c16c2052963200ab979966df /app-shells/zsh
parentnew upstream version (diff)
downloadgentoo-2-6ce94d0e6a0fc487ba1fd3c2d8f58ca8ae4c5fcb.tar.gz
gentoo-2-6ce94d0e6a0fc487ba1fd3c2d8f58ca8ae4c5fcb.tar.bz2
gentoo-2-6ce94d0e6a0fc487ba1fd3c2d8f58ca8ae4c5fcb.zip
Do not use precmd to setup gentoo prompt; bug #90907. Stable on x86.
(Portage version: 2.0.51.19)
Diffstat (limited to 'app-shells/zsh')
-rw-r--r--app-shells/zsh/ChangeLog10
-rw-r--r--app-shells/zsh/files/digest-zsh-4.2.33
-rw-r--r--app-shells/zsh/files/prompt_gentoo_setup21
-rw-r--r--app-shells/zsh/zsh-4.2.3.ebuild148
-rw-r--r--app-shells/zsh/zsh-4.2.5.ebuild4
5 files changed, 16 insertions, 170 deletions
diff --git a/app-shells/zsh/ChangeLog b/app-shells/zsh/ChangeLog
index 1270b12c0d4e..2a695ef879c4 100644
--- a/app-shells/zsh/ChangeLog
+++ b/app-shells/zsh/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-shells/zsh
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/ChangeLog,v 1.81 2005/04/06 15:21:19 usata Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/ChangeLog,v 1.82 2005/05/05 15:12:16 usata Exp $
+
+ 05 May 2005; Mamoru KOMACHI <usata@gentoo.org> files/prompt_gentoo_setup,
+ -zsh-4.2.3.ebuild, zsh-4.2.5.ebuild:
+ Do not use precmd to setup gentoo prompt; bug #90907. Stable on x86.
*zsh-4.2.5 (06 Apr 2005)
@@ -11,7 +15,7 @@
-files/_portage-20040730, -zsh-4.2.0-r1.ebuild, -zsh-4.2.1-r1.ebuild:
Removed old versions.
- 31 Mar 2005; Bryan Østergaard <kloeri@gentoo.org> zsh-4.2.4.ebuild:
+ 31 Mar 2005; Bryan ?stergaard <kloeri@gentoo.org> zsh-4.2.4.ebuild:
Stable on alpha.
31 Mar 2005; <blubb@gentoo.org> zsh-4.2.4.ebuild:
@@ -26,7 +30,7 @@
28 Mar 2005; Mamoru KOMACHI <usata@gentoo.org> zsh-4.2.4.ebuild:
Stable on x86 and ppc.
- 27 Mar 2005; Bryan Østergaard <kloeri@gentoo.org> zsh-4.2.3.ebuild:
+ 27 Mar 2005; Bryan ?stergaard <kloeri@gentoo.org> zsh-4.2.3.ebuild:
Stable on alpha.
22 Feb 2005; Mamoru KOMACHI <usata@gentoo.org>
diff --git a/app-shells/zsh/files/digest-zsh-4.2.3 b/app-shells/zsh/files/digest-zsh-4.2.3
deleted file mode 100644
index 7073ceb7c311..000000000000
--- a/app-shells/zsh/files/digest-zsh-4.2.3
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 ae19a74ae7e84cf4dbd8e35f52c8ec74 zsh-4.2.3.tar.bz2 2075239
-MD5 44f829b59181749691b9725e48a9a5e8 zsh-4.2.1-euc-0.3.patch.gz 2919
-MD5 169c829f481a0367ce6deaf0f4cd5afb zsh-4.2.3-doc.tar.bz2 1646339
diff --git a/app-shells/zsh/files/prompt_gentoo_setup b/app-shells/zsh/files/prompt_gentoo_setup
index ea5d59b7576a..abc3ceb154c5 100644
--- a/app-shells/zsh/files/prompt_gentoo_setup
+++ b/app-shells/zsh/files/prompt_gentoo_setup
@@ -14,7 +14,7 @@ prompt_gentoo_setup () {
prompt_gentoo_user=${2:-'green'}
prompt_gentoo_root=${3:-'red'}
- if [ `/usr/bin/whoami` = 'root' ]
+ if [ "$USER" = 'root' ]
then
base_prompt="%{$fg_bold[$prompt_gentoo_root]%}%m%{$reset_color%} "
else
@@ -22,14 +22,10 @@ prompt_gentoo_setup () {
fi
post_prompt="%{$reset_color%}"
- base_prompt_no_color=$(echo "$base_prompt" | perl -pe "s/%{.*?%}//g")
- post_prompt_no_color=$(echo "$post_prompt" | perl -pe "s/%{.*?%}//g")
+ local color="%{*}"
+ base_prompt_no_color="${(S)base_prompt//${~color}/}"
+ post_prompt_no_color="${(S)post_prompt//${~color}/}"
- precmd () { prompt_gentoo_precmd }
- preexec () { }
-}
-
-prompt_gentoo_precmd () {
setopt noxtrace localoptions
local base_prompt_expanded_no_color base_prompt_etc
local prompt_length space_left
@@ -37,16 +33,13 @@ prompt_gentoo_precmd () {
base_prompt_expanded_no_color=$(print -P "$base_prompt_no_color")
base_prompt_etc=$(print -P "$base_prompt%(4~|...|)%3~")
prompt_length=${#base_prompt_etc}
-# if [[ $prompt_length -lt 40 ]]; then
-# path_prompt="%{$fg_bold[$prompt_adam1_color2]%}%(4~|...|)%3~%{$fg_bold[white]%}"
-# else
-# space_left=$(( $COLUMNS - $#base_prompt_expanded_no_color - 2 ))
-# path_prompt="%{$fg_bold[$prompt_adam1_color3]%}%${space_left}<...<%~$prompt_newline%{$fg_bold_white%}"
-# fi
path_prompt="%{$fg_bold[$prompt_gentoo_prompt]%}%1~"
PS1="$base_prompt$path_prompt %# $post_prompt"
PS2="$base_prompt$path_prompt %_> $post_prompt"
PS3="$base_prompt$path_prompt ?# $post_prompt"
+
+ precmd () { }
+ preexec () { }
}
prompt_gentoo_setup "$@"
diff --git a/app-shells/zsh/zsh-4.2.3.ebuild b/app-shells/zsh/zsh-4.2.3.ebuild
deleted file mode 100644
index 8be04a57aa02..000000000000
--- a/app-shells/zsh/zsh-4.2.3.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/zsh-4.2.3.ebuild,v 1.6 2005/03/27 09:52:17 kloeri Exp $
-
-inherit eutils
-
-DESCRIPTION="UNIX Shell similar to the Korn shell"
-HOMEPAGE="http://www.zsh.org/"
-SRC_URI="ftp://ftp.zsh.org/pub/${P}.tar.bz2
- linguas_ja? ( http://www.ono.org/software/dist/${PN}-4.2.1-euc-0.3.patch.gz )
- doc? ( ftp://ftp.zsh.org/pub/${P}-doc.tar.bz2 )"
-
-LICENSE="ZSH"
-SLOT="0"
-KEYWORDS="alpha ~amd64 arm hppa ia64 ppc sparc x86"
-IUSE="maildir ncurses static doc pcre cap"
-
-RDEPEND="pcre? ( >=dev-libs/libpcre-3.9 )
- cap? ( sys-libs/libcap )
- ncurses? ( >=sys-libs/ncurses-5.1 )"
-DEPEND="sys-apps/groff
- >=sys-apps/sed-4
- ${RDEPEND}"
-
-src_unpack() {
- unpack ${P}.tar.bz2
- use doc && unpack ${P}-doc.tar.bz2
- cd ${S}
- epatch ${FILESDIR}/${PN}-4.2.1-gentoo.diff
- epatch ${FILESDIR}/${PN}-init.d-gentoo.diff
- use linguas_ja && epatch ${DISTDIR}/${PN}-4.2.1-euc-0.3.patch.gz
- cd ${S}/Doc
- ln -sf . man1
- # fix zshall problem with soelim
- soelim zshall.1 > zshall.1.soelim
- mv zshall.1.soelim zshall.1
-}
-
-src_compile() {
- local myconf
-
- use static && myconf="${myconf} --disable-dynamic" \
- && LDFLAGS="${LDFLAGS} -static"
-
- econf \
- --bindir=/bin \
- --libdir=/usr/lib \
- --enable-etcdir=/etc/zsh \
- --enable-zshenv=/etc/zsh/zshenv \
- --enable-zlogin=/etc/zsh/zlogin \
- --enable-zlogout=/etc/zsh/zlogout \
- --enable-zprofile=/etc/zsh/zprofile \
- --enable-zshrc=/etc/zsh/zshrc \
- --enable-fndir=/usr/share/zsh/${PV%_*}/functions \
- --enable-site-fndir=/usr/share/zsh/site-functions \
- --enable-function-subdirs \
- --enable-ldflags="${LDFLAGS}" \
- --with-tcsetpgrp \
- $(use_with ncurses curses-terminfo) \
- $(use_enable maildir maildir-support) \
- $(use_enable pcre) \
- $(use_enable cap) \
- ${myconf} || die "configure failed"
-
- if use static ; then
- # compile all modules statically, see Bug #27392
- sed -i -e "s/link=no/link=static/g" \
- -e "s/load=no/load=yes/g" \
- config.modules || die
- else
- # avoid linking to libs in /usr/lib, see Bug #27064
- sed -i -e "/LIBS/s%-lpcre%/usr/lib/libpcre.a%" \
- Makefile || die
- fi
-
- # emake still b0rks
- emake -j1 || die "make failed"
-}
-
-src_test() {
- addpredict /dev/ptmx
- make check || die "make check failed"
-}
-
-src_install() {
- einstall \
- bindir=${D}/bin \
- libdir=${D}/usr/lib \
- fndir=${D}/usr/share/zsh/${PV%_*}/functions \
- sitefndir=${D}/usr/share/zsh/site-functions \
- install.bin install.man install.modules \
- install.info install.fns || die "make install failed"
-
- insinto /etc/zsh
- doins ${FILESDIR}/zprofile
-
- keepdir /usr/share/zsh/site-functions
- insinto /usr/share/zsh/${PV%_*}/functions/Prompts
- doins ${FILESDIR}/prompt_gentoo_setup || die
-
- # install miscellaneous scripts; bug #54520
- sed -i -e "s:/usr/local:/usr:g" {Util,Misc}/* || "sed failed"
- insinto /usr/share/zsh/${PV%_*}/Util
- doins Util/* || die "doins Util scripts failed"
- insinto /usr/share/zsh/${PV%_*}/Misc
- doins Misc/* || die "doins Misc scripts failed"
-
- dodoc ChangeLog* META-FAQ README INSTALL LICENCE config.modules
-
- if use doc ; then
- dohtml Doc/*
- insinto /usr/share/doc/${PF}
- doins Doc/zsh{.dvi,_us.ps,_a4.ps}
- fi
-
- docinto StartupFiles
- dodoc StartupFiles/z*
-}
-
-pkg_preinst() {
- # Our zprofile file does the job of the old zshenv file
- # Move the old version into a zprofile script so the normal
- # etc-update process will handle any changes.
- if [ -f /etc/zsh/zshenv -a ! -f /etc/zsh/zprofile ]; then
- mv /etc/zsh/zshenv /etc/zsh/zprofile
- fi
-}
-
-pkg_postinst() {
- einfo
- einfo "If you want to enable Portage completions and Gentoo prompt,"
- einfo "emerge app-shells/zsh-completion and add"
- einfo " autoload -U compinit promptinit"
- einfo " compinit"
- einfo " promptinit; prompt gentoo"
- einfo "to your ~/.zshrc"
- einfo
- einfo "Also, if you want to enable cache for the completions, add"
- einfo " zstyle ':completion::complete:*' use-cache 1"
- einfo "to your ~/.zshrc"
- einfo
- # see Bug 26776
- ewarn
- ewarn "If you are upgrading from zsh-4.0.x you may need to"
- ewarn "remove all your old ~/.zcompdump files in order to use"
- ewarn "completion. For more info see zcompsys manpage."
- ewarn
-}
diff --git a/app-shells/zsh/zsh-4.2.5.ebuild b/app-shells/zsh/zsh-4.2.5.ebuild
index d6deab7b8e13..00807c3c54e1 100644
--- a/app-shells/zsh/zsh-4.2.5.ebuild
+++ b/app-shells/zsh/zsh-4.2.5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/zsh-4.2.5.ebuild,v 1.1 2005/04/06 15:21:19 usata Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/zsh-4.2.5.ebuild,v 1.2 2005/05/05 15:12:16 usata Exp $
inherit eutils
@@ -12,7 +12,7 @@ SRC_URI="ftp://ftp.zsh.org/pub/${P}.tar.bz2
LICENSE="ZSH"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc-macos ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc-macos ~sparc x86"
IUSE="maildir ncurses static doc pcre cap"
RDEPEND="pcre? ( >=dev-libs/libpcre-3.9 )