Line
Link Here
|
0 |
-- /usr/portage/app-shells/zsh/zsh-5.0.0.ebuild/usr/portage/app-shells/zsh/zsh-5.0.0.ebuild |
0 |
++ /usr/portage/app-shells/zsh/zsh-5.0.0.ebuild/zsh-5.0.0.ebuild |
Lines 35-41
Link Here
|
35 |
LICENSE="ZSH gdbm? ( GPL-2 )" |
35 |
LICENSE="ZSH gdbm? ( GPL-2 )" |
36 |
SLOT="0" |
36 |
SLOT="0" |
37 |
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" |
37 |
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" |
38 |
IUSE="caps debug doc examples gdbm maildir pcre static unicode" |
38 |
IUSE="caps" |
|
|
39 |
COMPLETIONS="AIX BSD Cygwin Darwin Debian +Linux Mandriva openSUSE Redhat Solaris +Unix +X" |
40 |
for curr in ${COMPLETIONS} |
41 |
do case ${curr} in |
42 |
[+-]*) |
43 |
IUSE="${IUSE} ${curr%%[!+-]*}completion_${curr#?}" |
44 |
continue;; |
45 |
esac |
46 |
IUSE="${IUSE} completion_${curr}" |
47 |
done |
48 |
IUSE="${IUSE} debug doc examples gdbm maildir pcre +run-help static unicode" |
39 |
|
49 |
|
40 |
RDEPEND=" |
50 |
RDEPEND=" |
41 |
>=sys-libs/ncurses-5.1 |
51 |
>=sys-libs/ncurses-5.1 |
Lines 46-57
Link Here
|
46 |
gdbm? ( sys-libs/gdbm ) |
56 |
gdbm? ( sys-libs/gdbm ) |
47 |
" |
57 |
" |
48 |
DEPEND="sys-apps/groff |
58 |
DEPEND="sys-apps/groff |
49 |
${RDEPEND}" |
59 |
${RDEPEND} |
|
|
60 |
run-help? ( |
61 |
dev-lang/perl |
62 |
sys-apps/man |
63 |
sys-apps/util-linux |
64 |
)" |
65 |
# run-help needs util-linux for colcrt. |
66 |
# Please let me know if you have an arch where "colcrt" (or at least "col") |
67 |
# is provided by a different package. |
68 |
|
50 |
PDEPEND=" |
69 |
PDEPEND=" |
51 |
examples? ( app-doc/zsh-lovers ) |
70 |
examples? ( app-doc/zsh-lovers ) |
52 |
" |
71 |
" |
53 |
|
72 |
|
54 |
src_prepare() { |
73 |
src_prepare() { |
|
|
74 |
local i f |
55 |
# fix zshall problem with soelim |
75 |
# fix zshall problem with soelim |
56 |
ln -s Doc man1 |
76 |
ln -s Doc man1 |
57 |
mv Doc/zshall.1 Doc/zshall.1.soelim |
77 |
mv Doc/zshall.1 Doc/zshall.1.soelim |
Lines 66-71
Link Here
|
66 |
else |
86 |
else |
67 |
sed -i -e 's|@ZSH_NOPREFIX@||' -e '/@ZSH_PREFIX@/d' -e 's|""||' "${T}"/zprofile || die |
87 |
sed -i -e 's|@ZSH_NOPREFIX@||' -e '/@ZSH_PREFIX@/d' -e 's|""||' "${T}"/zprofile || die |
68 |
fi |
88 |
fi |
|
|
89 |
set -- |
90 |
file='Src/Zle/complete.mdd' |
91 |
for i in ${COMPLETIONS} |
92 |
do case ${i} in |
93 |
[+-]*) i=${i#?} |
94 |
esac |
95 |
grep -q "Completion\/${i}" -- "${S}/${file}" \ |
96 |
|| die "${file} does not contain Completion/${i}" |
97 |
use completion_${i} || set -- "${@}" -e "s/Completion\/${i}[^ ']*//" |
98 |
done |
99 |
[ ${#} -eq 0 ] || sed -i "${@}" -- "${S}/${file}" \ |
100 |
|| die "patching ${file} failed" |
101 |
epatch_user |
69 |
} |
102 |
} |
70 |
|
103 |
|
71 |
src_configure() { |
104 |
src_configure() { |
Lines 122-127
Link Here
|
122 |
fi |
155 |
fi |
123 |
} |
156 |
} |
124 |
|
157 |
|
|
|
158 |
generate_run_help() ( |
159 |
# We use a subshell (...) for locale overrides and local cd |
160 |
# Hence, we also need not declare any variables as local |
161 |
mkdir run-help && cd run-help || die "cannot create run-help directory" |
162 |
# We need GROFF_NO_SGR to produce "classical" formatting: |
163 |
export GROFF_NO_SGR='' |
164 |
export LANG=C |
165 |
unset MANPL LC_ALL |
166 |
[ -z "${LC_CTYPE}" ] && export LC_CTYPE=en_US.utf8 |
167 |
ebegin "Generating files for run-help" |
168 |
# It is necessary to be paranoid about the success of the following pipe, |
169 |
# since any change in locale or environment (like unset GROFF_NO_SGR, |
170 |
# "bad" LC_CTYPE or tools behaving slightly different) can break it |
171 |
# completely. It needs to be tested carefully in each architecture. |
172 |
man "${S}/Doc/zshbuiltins.1" | colcrt - | perl "${S}/Util/helpfiles" || { |
173 |
eend 1 |
174 |
eerror "perl Util/helpfiles failed" |
175 |
return false |
176 |
} |
177 |
mystatus=("${PIPESTATUS[@]}") |
178 |
[ "${mystatus[0]}" -eq 0 ] || { |
179 |
eend 1 |
180 |
eerror "man Doc/zshbuiltins.1 failed" |
181 |
return false |
182 |
} |
183 |
[ "${mystatus[1]}" -eq 0 ] || { |
184 |
eend 1 |
185 |
eerror "colcrt failed" |
186 |
return false |
187 |
} |
188 |
test -e zmodload || { |
189 |
eend 1 |
190 |
eerror "Could not produce all required files for run-help." |
191 |
eerror "This can be caused by a broken locale setting:" |
192 |
eerror "Try to set LC_CTYPE to a utf8 aware locale like en_US.utf8," |
193 |
eerror "making sure that this locale is supported by your glibc." |
194 |
eerror "For compatibility reasons, this ebuild ignores LC_ALL." |
195 |
return false |
196 |
} |
197 |
eend 0 |
198 |
) |
199 |
|
200 |
src_compile() { |
201 |
default |
202 |
! use run-help || generate_run_help || { |
203 |
error "cannot generate files for run-help." |
204 |
die "If this problem cannot be fixed, disable USE=run-help for zsh" |
205 |
} |
206 |
} |
207 |
|
125 |
src_test() { |
208 |
src_test() { |
126 |
local i |
209 |
local i |
127 |
addpredict /dev/ptmx |
210 |
addpredict /dev/ptmx |
Lines 134-139
Link Here
|
134 |
src_install() { |
217 |
src_install() { |
135 |
emake DESTDIR="${D}" install install.info |
218 |
emake DESTDIR="${D}" install install.info |
136 |
|
219 |
|
|
|
220 |
if use run-help |
221 |
then insinto /usr/share/zsh/site-contrib/help |
222 |
doins run-help/* |
223 |
fi |
224 |
|
137 |
insinto /etc/zsh |
225 |
insinto /etc/zsh |
138 |
doins "${T}"/zprofile |
226 |
doins "${T}"/zprofile |
139 |
|
227 |
|
Lines 165-170
Link Here
|
165 |
} |
253 |
} |
166 |
|
254 |
|
167 |
pkg_postinst() { |
255 |
pkg_postinst() { |
|
|
256 |
if use run-help |
257 |
then elog |
258 |
elog "If you want to use run-help add to your ~/.zshrc" |
259 |
elog " unalias run-help" |
260 |
elog " autoload -Uz run-help" |
261 |
elog " HELPDIR=/usr/share/zsh/site-contrib/help" |
262 |
fi |
168 |
# should link to http://www.gentoo.org/doc/en/zsh.xml |
263 |
# should link to http://www.gentoo.org/doc/en/zsh.xml |
169 |
elog |
264 |
elog |
170 |
elog "If you want to enable Portage completions and Gentoo prompt," |
265 |
elog "If you want to enable Portage completions and Gentoo prompt," |