From 4d30489d7c550372cfbca54f58c4ff0c14338952 Mon Sep 17 00:00:00 2001 From: Martin Väth Date: Thu, 9 Oct 2014 21:29:45 +0200 Subject: zsh: add fix from gentoo main tree --- app-shells/zsh/ChangeLog | 17 +- app-shells/zsh/Manifest | 4 +- .../zsh/files/zsh-5.0.7-fix-cvs-completion.patch | 19 ++ app-shells/zsh/zsh-5.0.6.ebuild | 1 - app-shells/zsh/zsh-5.0.7-r1.ebuild | 295 +++++++++++++++++++++ app-shells/zsh/zsh-5.0.7.ebuild | 1 + 6 files changed, 332 insertions(+), 5 deletions(-) create mode 100644 app-shells/zsh/files/zsh-5.0.7-fix-cvs-completion.patch delete mode 120000 app-shells/zsh/zsh-5.0.6.ebuild create mode 100644 app-shells/zsh/zsh-5.0.7-r1.ebuild create mode 120000 app-shells/zsh/zsh-5.0.7.ebuild (limited to 'app-shells/zsh') diff --git a/app-shells/zsh/ChangeLog b/app-shells/zsh/ChangeLog index 4376e883..d8d77212 100644 --- a/app-shells/zsh/ChangeLog +++ b/app-shells/zsh/ChangeLog @@ -2,11 +2,24 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ -*zsh-5.0.5 (09 Jan 2014) +*zsh-5.0.7-r1 (09 Oct 2014) + + 09 Oct 2014; Martin Väth : + Add fix-cvs-completion.patch from gentoo main tree + +*zsh-5.0.7 (08 Oct 2014) + + 08 Oct 2014; Martin Väth : + Version bump, remove old ebuild + +*zsh-5.0.6 (29 Aug 2014) - 10 Oct 2014; Martin Väth : + 29 Aug 2014; Martin Väth : + Version bump, remove old ebuild. Update KEYWORDS and some trivial changes from main tree +*zsh-5.0.5 (09 Jan 2014) + 24 Jan 2014; Martin Väth : Avoid duplicate installation diff --git a/app-shells/zsh/Manifest b/app-shells/zsh/Manifest index 27f47ce7..8c11bcf7 100644 --- a/app-shells/zsh/Manifest +++ b/app-shells/zsh/Manifest @@ -1,2 +1,2 @@ -DIST zsh-5.0.6-doc.tar.bz2 2999237 SHA256 b273a568682682cc1f00885aba118c7400cacfdbc0ecdf32fd5f9b820b8acfd6 SHA512 22d0b1ac03426413e8132602efc812343e77ee0fda399da2601dfde8c92aabc38eda33a9b459a7ae44542ac8ad0f6c9b3e36e2134521cc0993a84ae573500fd8 WHIRLPOOL d837cadfae5ea6818c731ddb58252f2ae1f2919dd9a1efe804b7a6d2c32d8dd0d4ade9996e83950c479a3f5a4335d56d71f81bffc4de2410406d9840089de0a0 -DIST zsh-5.0.6.tar.bz2 3174858 SHA256 84ca509b141533a3b695e314fbce1200b86ff337ab7dd9e3414da05d86378845 SHA512 bd28ebf9adb4a85e6cb9c9bc1eb7ab412a0bf467a9769021d6cd93b13b99ae961a57158374b935e615b54be92074c7adfc22434d204646110adedef4ff526c3f WHIRLPOOL a3091bd096382e615777047814b2d7a04b34d03d7111db552f749aa978f236f9fa8a1426dbbe00e1172432cce35b34374d85d5e7e543c6d1f1bf9c53832d9969 +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 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 00000000..5beb7eca --- /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/zsh-5.0.6.ebuild b/app-shells/zsh/zsh-5.0.6.ebuild deleted file mode 120000 index 993de82c..00000000 --- a/app-shells/zsh/zsh-5.0.6.ebuild +++ /dev/null @@ -1 +0,0 @@ -zsh-99999999.ebuild \ No newline at end of file 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 00000000..eed142e1 --- /dev/null +++ b/app-shells/zsh/zsh-5.0.7-r1.ebuild @@ -0,0 +1,295 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +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-} +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 + +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" + PROPERTIES="live" + LIVE=:;; +*) + SRC_URI="${ZSH_URI} + doc? ( ${ZSH_DOC_URI} )" + 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" + #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" + 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 + 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 ) +" + +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/." + +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 + epatch "${FILESDIR}"/${P}-fix-cvs-completion.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 + 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= + + 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 -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_compile() { + default + ! ${LIVE} || ! use doc || emake dvi pdf html +} + +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 + + # 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/"${PVPATH}"/${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/* + dodoc 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 +} diff --git a/app-shells/zsh/zsh-5.0.7.ebuild b/app-shells/zsh/zsh-5.0.7.ebuild new file mode 120000 index 00000000..993de82c --- /dev/null +++ b/app-shells/zsh/zsh-5.0.7.ebuild @@ -0,0 +1 @@ +zsh-99999999.ebuild \ No newline at end of file -- cgit v1.2.3-65-gdbad