Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/zsh/
Date: Fri, 25 Jan 2019 10:28:04
Message-Id: 1548412071.ce85b6403f8d92867aa5885d63f3c5a5b7b3ec7a.polynomial-c@gentoo
1 commit: ce85b6403f8d92867aa5885d63f3c5a5b7b3ec7a
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 25 09:49:15 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 25 10:27:51 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce85b640
7
8 app-shells/zsh: Bump to version 5.7
9
10 Package-Manager: Portage-2.3.58, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-shells/zsh/Manifest | 2 +
14 app-shells/zsh/zsh-5.7.ebuild | 216 ++++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 218 insertions(+)
16
17 diff --git a/app-shells/zsh/Manifest b/app-shells/zsh/Manifest
18 index 909b7a8e97c..382379183ed 100644
19 --- a/app-shells/zsh/Manifest
20 +++ b/app-shells/zsh/Manifest
21 @@ -1,2 +1,4 @@
22 DIST zsh-5.6.2-doc.tar.xz 3198932 BLAKE2B 7e701bb12e0114b7d9847caad1146fa3d538f8f6d859a765037660fb18341f1c79002811a42ec795e41eb2bbe899e12d4bcd055ea5c66e7b73bd488bdf8bbb55 SHA512 5102314e2857b032c6e6b4b715c261970b2f0c28663aff99fb87f7bb6c3971f88f8e8892ed349793570beae3fb68ff7923c82e99a3c1bb485e4639f01caaad4a
23 DIST zsh-5.6.2.tar.xz 3077368 BLAKE2B 8c6ce22436f9f51eff809c779efad02f4a0730b4431630ab305abc9f1ef722698f7c565d0aa421b0d94c21f2c830f9d529709fd62a4205be1a20acf0f94a845a SHA512 f0a49e41b55eb478692ab5471d7c9828956b7e96bc82944202b0ef1c49a889b21a0e7682aa5f59fd0054ebfd866c2244c8a622e7aa46c13038af5c226c48a3a2
24 +DIST zsh-5.7-doc.tar.xz 3062428 BLAKE2B 1ee818fd3625c3c96add6fb8f0ccb42dd05eeb33b4f4513e4e436974f835465fdb9dd4092c652bcda24762bc39307946e14c4969e03038ae43f77c24871a5449 SHA512 4b5f256ed39c0594daf2fdb2f995c60944c70556438b986fcf6f4e40dbfdc58e70eb65691c841d5dbb973a20b30255abe55ed140482b7afd446e1911c4efd395
25 +DIST zsh-5.7.tar.xz 3124708 BLAKE2B 6b3822d3bb647aaf1072b9d499dbe9a65dc6cec0b83fb7fb09050e26bcc71fc0fb2846a1b754f9f206b602632add39e52465c1092f131f9000a149dbd2b469de SHA512 cfef5604d6ff30aeb081ed2a2660c861027c0a90169231cdb6b19093ffa6d63946be7b1fde527769e60e5b14bb6853b590bf4a207b63d6ec66fffd30d9a94958
26
27 diff --git a/app-shells/zsh/zsh-5.7.ebuild b/app-shells/zsh/zsh-5.7.ebuild
28 new file mode 100644
29 index 00000000000..a0de20264a8
30 --- /dev/null
31 +++ b/app-shells/zsh/zsh-5.7.ebuild
32 @@ -0,0 +1,216 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit flag-o-matic prefix
39 +
40 +if [[ ${PV} == 9999* ]] ; then
41 + inherit git-r3 autotools
42 + EGIT_REPO_URI="https://git.code.sf.net/p/zsh/code"
43 +else
44 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
45 + SRC_URI="https://www.zsh.org/pub/${P}.tar.xz
46 + https://www.zsh.org/pub/old/${P}.tar.xz
47 + mirror://sourceforge/${PN}/${P}.tar.xz
48 + doc? (
49 + https://www.zsh.org/pub/${P}-doc.tar.xz
50 + mirror://sourceforge/${PN}/${P}-doc.tar.xz
51 + )"
52 +fi
53 +
54 +DESCRIPTION="UNIX Shell similar to the Korn shell"
55 +HOMEPAGE="https://www.zsh.org/"
56 +
57 +LICENSE="ZSH gdbm? ( GPL-2 )"
58 +SLOT="0"
59 +IUSE="caps debug doc examples gdbm maildir pcre static unicode"
60 +
61 +RDEPEND="
62 + >=sys-libs/ncurses-5.1:0=
63 + static? ( >=sys-libs/ncurses-5.7-r4:0=[static-libs] )
64 + caps? ( sys-libs/libcap )
65 + pcre? (
66 + >=dev-libs/libpcre-3.9
67 + static? ( >=dev-libs/libpcre-3.9[static-libs] )
68 + )
69 + gdbm? ( sys-libs/gdbm:= )
70 + !<sys-apps/baselayout-2.4.1
71 +"
72 +DEPEND="sys-apps/groff
73 + ${RDEPEND}"
74 +PDEPEND="
75 + examples? ( app-doc/zsh-lovers )
76 +"
77 +if [[ ${PV} == 9999* ]] ; then
78 + DEPEND+=" app-text/yodl
79 + doc? (
80 + sys-apps/texinfo
81 + app-text/texi2html
82 + virtual/latex-base
83 + )"
84 +fi
85 +
86 +src_prepare() {
87 + if [[ ${PV} != 9999* ]]; then
88 + # fix zshall problem with soelim
89 + ln -s Doc man1 || die
90 + mv Doc/zshall.1 Doc/zshall.1.soelim || die
91 + soelim Doc/zshall.1.soelim > Doc/zshall.1 || die
92 +
93 + # add openrc specific options for init.d completion
94 + eapply "${FILESDIR}"/${PN}-5.3-init.d-gentoo.diff
95 + fi
96 +
97 + eapply_user
98 +
99 + if [[ ${PV} == 9999* ]] ; then
100 + sed -i "/^VERSION=/s/=.*/=${PV}/" Config/version.mk || die
101 + eautoreconf
102 + fi
103 +}
104 +
105 +src_configure() {
106 + local myconf=(
107 + --bindir="${EPREFIX}"/bin
108 + --libdir="${EPREFIX}"/usr/$(get_libdir)
109 + --enable-etcdir="${EPREFIX}"/etc/zsh
110 + --enable-runhelpdir="${EPREFIX}"/usr/share/zsh/${PV%_*}/help
111 + --enable-fndir="${EPREFIX}"/usr/share/zsh/${PV%_*}/functions
112 + --enable-site-fndir="${EPREFIX}"/usr/share/zsh/site-functions
113 + --enable-function-subdirs
114 + --with-tcsetpgrp
115 + $(use_enable maildir maildir-support)
116 + $(use_enable pcre)
117 + $(use_enable caps cap)
118 + $(use_enable unicode multibyte)
119 + $(use_enable gdbm)
120 + )
121 +
122 + if use static ; then
123 + myconf+=( --disable-dynamic )
124 + append-ldflags -static
125 + fi
126 + if use debug ; then
127 + myconf+=(
128 + --enable-zsh-debug
129 + --enable-zsh-mem-debug
130 + --enable-zsh-mem-warning
131 + --enable-zsh-secure-free
132 + --enable-zsh-hash-debug
133 + )
134 + fi
135 +
136 + if [[ ${CHOST} == *-darwin* ]]; then
137 + myconf+=( --enable-libs=-liconv )
138 + append-ldflags -Wl,-x
139 + fi
140 +
141 + econf "${myconf[@]}"
142 +
143 + if use static ; then
144 + # compile all modules statically, see Bug #27392
145 + # removed cap and curses because linking failes
146 + sed -e "s,link=no,link=static,g" \
147 + -e "/^name=zsh\/cap/s,link=static,link=no," \
148 + -e "/^name=zsh\/curses/s,link=static,link=no," \
149 + -i "${S}"/config.modules || die
150 + if ! use gdbm ; then
151 + sed -i '/^name=zsh\/db\/gdbm/s,link=static,link=no,' \
152 + "${S}"/config.modules || die
153 + fi
154 + fi
155 +}
156 +
157 +src_compile() {
158 + default
159 +
160 + if [[ ${PV} == 9999* ]] && use doc ; then
161 + emake -C Doc everything
162 + fi
163 +}
164 +
165 +src_test() {
166 + addpredict /dev/ptmx
167 + local i
168 + for i in C02cond.ztst V08zpty.ztst X02zlevi.ztst Y01completion.ztst Y02compmatch.ztst Y03arguments.ztst ; do
169 + rm "${S}"/Test/${i} || die
170 + done
171 + emake check
172 +}
173 +
174 +src_install() {
175 + emake DESTDIR="${D}" install $(usex doc "install.info" "")
176 +
177 + insinto /etc/zsh
178 + export PREFIX_QUOTE_CHAR='"' PREFIX_EXTRA_REGEX="/EUID/s,0,${EUID},"
179 + newins "$(prefixify_ro "${FILESDIR}"/zprofile-4)" zprofile
180 +
181 + keepdir /usr/share/zsh/site-functions
182 + insinto /usr/share/zsh/${PV%_*}/functions/Prompts
183 + newins "${FILESDIR}"/prompt_gentoo_setup-1 prompt_gentoo_setup
184 +
185 + local i
186 +
187 + # install miscellaneous scripts (bug #54520)
188 + sed -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \
189 + -e "s:/usr/local/bin/zsh:${EPREFIX}/bin/zsh:g" \
190 + -i {Util,Misc}/* || die
191 + for i in Util Misc ; do
192 + insinto /usr/share/zsh/${PV%_*}/${i}
193 + doins ${i}/*
194 + done
195 +
196 + # install header files (bug #538684)
197 + insinto /usr/include/zsh
198 + doins config.h Src/*.epro
199 + for i in Src/{zsh.mdh,*.h} ; do
200 + sed -e 's@\.\./config\.h@config.h@' \
201 + -e 's@#\(\s*\)include "\([^"]\+\)"@#\1include <zsh/\2>@' \
202 + -i "${i}"
203 + doins "${i}"
204 + done
205 +
206 + dodoc ChangeLog* META-FAQ NEWS README config.modules
207 +
208 + if use doc ; then
209 + pushd "${WORKDIR}/${PN}-${PV%_*}" >/dev/null
210 + docinto html
211 + dodoc Doc/*.html
212 + insinto /usr/share/doc/${PF}
213 + doins Doc/zsh.{dvi,pdf}
214 + popd >/dev/null
215 + fi
216 +
217 + docinto StartupFiles
218 + dodoc StartupFiles/z*
219 +}
220 +
221 +pkg_postinst() {
222 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
223 + echo
224 + elog "If you want to enable Portage completions and Gentoo prompt,"
225 + elog "emerge app-shells/gentoo-zsh-completions and add"
226 + elog " autoload -U compinit promptinit"
227 + elog " compinit"
228 + elog " promptinit; prompt gentoo"
229 + elog "to your ~/.zshrc"
230 + echo
231 + elog "Also, if you want to enable cache for the completions, add"
232 + elog " zstyle ':completion::complete:*' use-cache 1"
233 + elog "to your ~/.zshrc"
234 + echo
235 + elog "Note that a system zprofile startup file is installed. This will override"
236 + elog "PATH and possibly other variables that a user may set in ~/.zshenv."
237 + elog "Custom PATH settings and similar overridden variables can be moved to ~/.zprofile"
238 + elog "or other user startup files that are sourced after the system zprofile."
239 + echo
240 + elog "If PATH must be set in ~/.zshenv to affect things like non-login ssh shells,"
241 + elog "one method is to use a separate path-setting file that is conditionally sourced"
242 + elog "in ~/.zshenv and also sourced from ~/.zprofile. For more information, see the"
243 + elog "zshenv example in ${EROOT}/usr/share/doc/${PF}/StartupFiles/."
244 + echo
245 + elog "See https://wiki.gentoo.org/wiki/Zsh/HOWTO for more introduction documentation."
246 + echo
247 + fi
248 +}