1 |
commit: 878e0db62befbbe40403ba4b6bba204ecccca466 |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 24 21:34:28 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 24 21:37:50 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=878e0db6 |
7 |
|
8 |
app-editors/vim: add missing dies. |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
app-editors/vim/vim-8.0.1188.ebuild | 81 ++++++++++++++++++++----------------- |
13 |
1 file changed, 44 insertions(+), 37 deletions(-) |
14 |
|
15 |
diff --git a/app-editors/vim/vim-8.0.1188.ebuild b/app-editors/vim/vim-8.0.1188.ebuild |
16 |
index 288ed95e5cc..0d1fd7c9a30 100644 |
17 |
--- a/app-editors/vim/vim-8.0.1188.ebuild |
18 |
+++ b/app-editors/vim/vim-8.0.1188.ebuild |
19 |
@@ -61,7 +61,7 @@ pkg_setup() { |
20 |
export LC_COLLATE="C" |
21 |
|
22 |
# Gnome sandbox silliness. bug #114475. |
23 |
- mkdir -p "${T}"/home |
24 |
+ mkdir -p "${T}"/home || die "mkdir failed" |
25 |
export HOME="${T}"/home |
26 |
|
27 |
use python && python-single-r1_pkg_setup |
28 |
@@ -74,17 +74,21 @@ src_prepare() { |
29 |
fi |
30 |
|
31 |
# Fixup a script to use awk instead of nawk |
32 |
- sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \ |
33 |
- || die "mve.awk sed failed" |
34 |
+ sed -i -e \ |
35 |
+ '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ |
36 |
+ "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed" |
37 |
|
38 |
# Read vimrc and gvimrc from /etc/vim |
39 |
- echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h |
40 |
- echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h |
41 |
+ echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \ |
42 |
+ >> "${S}"/src/feature.h || die "echo failed" |
43 |
+ echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ |
44 |
+ >> "${S}"/src/feature.h || die "echo failed" |
45 |
|
46 |
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags. |
47 |
# Hopefully this pattern won't break for a while at least. |
48 |
# This fixes bug 29398 (27 Sep 2003 agriffis) |
49 |
- sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
50 |
+ sed -i -e \ |
51 |
+ 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
52 |
"${S}"/runtime/doc/syntax.txt \ |
53 |
"${S}"/runtime/doc/tagsrch.txt \ |
54 |
"${S}"/runtime/doc/usr_29.txt \ |
55 |
@@ -94,17 +98,21 @@ src_prepare() { |
56 |
# Don't be fooled by /usr/include/libc.h. When found, vim thinks |
57 |
# this is NeXT, but it's actually just a file in dev-libs/9libs |
58 |
# This fixes bug 43885 (20 Mar 2004 agriffis) |
59 |
- sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed' |
60 |
+ sed -i -e \ |
61 |
+ 's/ libc\.h / /' \ |
62 |
+ "${S}"/src/configure.ac || die 'sed failed' |
63 |
|
64 |
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF |
65 |
# correctly. To avoid some really entertaining error messages about stuff |
66 |
# which isn't even in the source file being invalid, we'll do some trickery |
67 |
# to make the error never occur. bug 66162 (02 October 2004 ciaranm) |
68 |
- find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done |
69 |
+ find "${S}" -name '*.c' | while read c; do |
70 |
+ echo >> "$c" || die "echo failed" |
71 |
+ done |
72 |
|
73 |
# conditionally make the manpager.sh script |
74 |
- if use vim-pager ; then |
75 |
- cat <<-END > "${S}"/runtime/macros/manpager.sh |
76 |
+ if use vim-pager; then |
77 |
+ cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed" |
78 |
#!/bin/sh |
79 |
sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\ |
80 |
vim \\ |
81 |
@@ -112,24 +120,21 @@ src_prepare() { |
82 |
-c 'set nolist nomod ft=man ts=8' \\ |
83 |
-c 'let g:showmarks_enable=0' \\ |
84 |
-c 'runtime! macros/less.vim' - |
85 |
- END |
86 |
+ _EOF_ |
87 |
fi |
88 |
|
89 |
# Try to avoid sandbox problems. Bug #114475. |
90 |
- if [[ -d "${S}"/src/po ]] ; then |
91 |
- sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
92 |
- "${S}"/src/po/Makefile |
93 |
+ if [[ -d "${S}"/src/po ]]; then |
94 |
+ sed -i -e \ |
95 |
+ '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
96 |
+ "${S}"/src/po/Makefile || die "sed failed" |
97 |
fi |
98 |
|
99 |
- if version_is_at_least 7.3.122 ; then |
100 |
- cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk |
101 |
- fi |
102 |
+ cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" |
103 |
|
104 |
- # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 |
105 |
- if version_is_at_least 7.3 ; then |
106 |
- sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
107 |
- "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
108 |
- fi |
109 |
+ sed -i -e \ |
110 |
+ "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
111 |
+ "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
112 |
|
113 |
eapply_user |
114 |
} |
115 |
@@ -152,16 +157,18 @@ src_configure() { |
116 |
# (3) Notice auto/configure is newer than auto/config.mk |
117 |
# (4) Run ./configure (with wrong args) to remake auto/config.mk |
118 |
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
119 |
- rm -f src/auto/configure |
120 |
+ rm src/auto/configure || die "rm failed" |
121 |
emake -j1 -C src autoconf |
122 |
|
123 |
# This should fix a sandbox violation (see bug 24447). The hvc |
124 |
# things are for ppc64, see bug 86433. |
125 |
- for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do |
126 |
- [[ -e ${file} ]] && addwrite $file |
127 |
+ for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do |
128 |
+ if [[ -e "${file}" ]]; then |
129 |
+ addwrite $file |
130 |
+ fi |
131 |
done |
132 |
|
133 |
- if use minimal ; then |
134 |
+ if use minimal; then |
135 |
myconf=( |
136 |
--with-features=tiny |
137 |
--disable-nls |
138 |
@@ -204,9 +211,9 @@ src_configure() { |
139 |
|
140 |
# --with-features=huge forces on cscope even if we --disable it. We need |
141 |
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) |
142 |
- if ! use cscope ; then |
143 |
- sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \ |
144 |
- die "couldn't disable cscope" |
145 |
+ if ! use cscope; then |
146 |
+ sed -i -e \ |
147 |
+ '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed" |
148 |
fi |
149 |
|
150 |
# don't test USE=X here ... see bug #19115 |
151 |
@@ -237,14 +244,14 @@ src_compile() { |
152 |
} |
153 |
|
154 |
src_test() { |
155 |
- echo |
156 |
+ einfo |
157 |
einfo "Starting vim tests. Several error messages will be shown" |
158 |
einfo "while the tests run. This is normal behaviour and does not" |
159 |
einfo "indicate a fault." |
160 |
- echo |
161 |
+ einfo |
162 |
ewarn "If the tests fail, your terminal may be left in a strange" |
163 |
ewarn "state. Usually, running 'reset' will fix this." |
164 |
- echo |
165 |
+ einfo |
166 |
|
167 |
# Don't let vim talk to X |
168 |
unset DISPLAY |
169 |
@@ -264,20 +271,20 @@ update_vim_symlinks() { |
170 |
|
171 |
# Make or remove convenience symlink, vim -> gvim |
172 |
if [[ -f "${EROOT}"/usr/bin/gvim ]]; then |
173 |
- ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null |
174 |
+ ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null || die "ln failed" |
175 |
elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then |
176 |
- rm "${EROOT}"/usr/bin/vim |
177 |
+ rm "${EROOT}"/usr/bin/vim || die "rm vim failed" |
178 |
fi |
179 |
|
180 |
# Make or remove convenience symlinks to vim |
181 |
if [[ -f "${EROOT}"/usr/bin/vim ]]; then |
182 |
for f in ${syms}; do |
183 |
- ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null |
184 |
+ ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null || die |
185 |
done |
186 |
else |
187 |
for f in ${syms}; do |
188 |
if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then |
189 |
- rm -f "${EROOT}"/usr/bin/${f} |
190 |
+ rm "${EROOT}"/usr/bin/${f} || die |
191 |
fi |
192 |
done |
193 |
fi |
194 |
@@ -310,7 +317,7 @@ src_install() { |
195 |
|
196 |
# We shouldn't be installing the ex or view man page symlinks, as they |
197 |
# are managed by eselect-vi |
198 |
- rm -f "${ED}"/usr/share/man/man1/{ex,view}.1 |
199 |
+ rm "${ED}"/usr/share/man/man1/{ex,view}.1 || die |
200 |
} |
201 |
|
202 |
pkg_postinst() { |