1 |
commit: 28d9dc318dd732b31200f2f05a1010925fd04df4 |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 25 20:39:43 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 25 20:51:01 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28d9dc31 |
7 |
|
8 |
app-editors/gvim: add missing dies. |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
app-editors/gvim/gvim-8.0.1188.ebuild | 94 +++++++++++++++++++---------------- |
13 |
1 file changed, 52 insertions(+), 42 deletions(-) |
14 |
|
15 |
diff --git a/app-editors/gvim/gvim-8.0.1188.ebuild b/app-editors/gvim/gvim-8.0.1188.ebuild |
16 |
index a43f58ae6ed..779093320ac 100644 |
17 |
--- a/app-editors/gvim/gvim-8.0.1188.ebuild |
18 |
+++ b/app-editors/gvim/gvim-8.0.1188.ebuild |
19 |
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) |
20 |
PYTHON_REQ_USE=threads |
21 |
inherit vim-doc flag-o-matic xdg-utils gnome2-utils versionator bash-completion-r1 prefix python-single-r1 |
22 |
|
23 |
-if [[ ${PV} == 9999* ]] ; then |
24 |
+if [[ ${PV} == 9999* ]]; then |
25 |
inherit git-r3 |
26 |
EGIT_REPO_URI="https://github.com/vim/vim.git" |
27 |
EGIT_CHECKOUT_DIR=${WORKDIR}/vim-${PV} |
28 |
@@ -86,30 +86,34 @@ pkg_setup() { |
29 |
export LC_COLLATE="C" |
30 |
|
31 |
# Gnome sandbox silliness. bug #114475. |
32 |
- mkdir -p "${T}"/home |
33 |
+ mkdir -p "${T}"/home || die |
34 |
export HOME="${T}"/home |
35 |
|
36 |
use python && python-single-r1_pkg_setup |
37 |
} |
38 |
|
39 |
src_prepare() { |
40 |
- if [[ ${PV} != 9999* ]] ; then |
41 |
+ if [[ ${PV} != 9999* ]]; then |
42 |
# Gentoo patches to fix runtime issues, cross-compile errors, etc |
43 |
eapply "${WORKDIR}"/patches/ |
44 |
fi |
45 |
|
46 |
# Fixup a script to use awk instead of nawk |
47 |
- sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \ |
48 |
- || die "mve.awk sed failed" |
49 |
+ sed -i -e \ |
50 |
+ '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \ |
51 |
+ "${S}"/runtime/tools/mve.awk || die "mve.awk sed failed" |
52 |
|
53 |
# Read vimrc and gvimrc from /etc/vim |
54 |
- echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h |
55 |
- echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h |
56 |
+ echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \ |
57 |
+ >> "${S}"/src/feature.h || die "echo failed" |
58 |
+ echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \ |
59 |
+ >> "${S}"/src/feature.h || die "echo failed" |
60 |
|
61 |
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags. |
62 |
# Hopefully this pattern won't break for a while at least. |
63 |
# This fixes bug 29398 (27 Sep 2003 agriffis) |
64 |
- sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
65 |
+ sed -i -e \ |
66 |
+ 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \ |
67 |
"${S}"/runtime/doc/syntax.txt \ |
68 |
"${S}"/runtime/doc/tagsrch.txt \ |
69 |
"${S}"/runtime/doc/usr_29.txt \ |
70 |
@@ -119,29 +123,30 @@ src_prepare() { |
71 |
# Don't be fooled by /usr/include/libc.h. When found, vim thinks |
72 |
# this is NeXT, but it's actually just a file in dev-libs/9libs |
73 |
# This fixes bug 43885 (20 Mar 2004 agriffis) |
74 |
- sed -i 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed' |
75 |
+ sed -i -e \ |
76 |
+ 's/ libc\.h / /' "${S}"/src/configure.ac || die 'sed failed' |
77 |
|
78 |
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF |
79 |
# correctly. To avoid some really entertaining error messages about stuff |
80 |
# which isn't even in the source file being invalid, we'll do some trickery |
81 |
# to make the error never occur. bug 66162 (02 October 2004 ciaranm) |
82 |
- find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done |
83 |
+ find "${S}" -name '*.c' | while read c; do |
84 |
+ echo >> "$c" || die "echo failed" |
85 |
+ done |
86 |
|
87 |
# Try to avoid sandbox problems. Bug #114475. |
88 |
- if [[ -d "${S}"/src/po ]] ; then |
89 |
- sed -i '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
90 |
- "${S}"/src/po/Makefile |
91 |
+ if [[ -d "${S}"/src/po ]]; then |
92 |
+ sed -i -e \ |
93 |
+ '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \ |
94 |
+ "${S}"/src/po/Makefile || die |
95 |
fi |
96 |
|
97 |
- if version_is_at_least 7.3.122 ; then |
98 |
- cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk |
99 |
- fi |
100 |
+ cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed" |
101 |
|
102 |
# Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0 |
103 |
- if version_is_at_least 7.3 ; then |
104 |
- sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
105 |
- "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
106 |
- fi |
107 |
+ sed -i -e \ |
108 |
+ "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \ |
109 |
+ "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed' |
110 |
|
111 |
eapply_user |
112 |
} |
113 |
@@ -163,14 +168,18 @@ src_configure() { |
114 |
# (2) Rebuild auto/configure |
115 |
# (3) Notice auto/configure is newer than auto/config.mk |
116 |
# (4) Run ./configure (with wrong args) to remake auto/config.mk |
117 |
- sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
118 |
- rm -f src/auto/configure |
119 |
+ sed -i -e \ |
120 |
+ 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed" |
121 |
+ rm -v src/auto/configure || die "rm failed" |
122 |
emake -j1 -C src autoconf |
123 |
|
124 |
# This should fix a sandbox violation (see bug 24447). The hvc |
125 |
# things are for ppc64, see bug 86433. |
126 |
- for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do |
127 |
- [[ -e ${file} ]] && addwrite $file |
128 |
+ local file |
129 |
+ for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do |
130 |
+ if [[ -e ${file} ]]; then |
131 |
+ addwrite $file |
132 |
+ fi |
133 |
done |
134 |
|
135 |
use debug && append-flags "-DDEBUG" |
136 |
@@ -197,9 +206,9 @@ src_configure() { |
137 |
|
138 |
# --with-features=huge forces on cscope even if we --disable it. We need |
139 |
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm) |
140 |
- if ! use cscope ; then |
141 |
- sed -i '/# define FEAT_CSCOPE/d' src/feature.h || \ |
142 |
- die "couldn't disable cscope" |
143 |
+ if ! use cscope; then |
144 |
+ sed -i -e \ |
145 |
+ '/# define FEAT_CSCOPE/d' src/feature.h || die "couldn't disable cscope" |
146 |
fi |
147 |
|
148 |
# gvim's GUI preference order is as follows: |
149 |
@@ -211,29 +220,29 @@ src_configure() { |
150 |
# -aqua -gtk -gtk3 -motif neXt NEXTAW |
151 |
# -aqua -gtk -gtk3 -motif -neXt ATHENA |
152 |
echo ; echo |
153 |
- if use aqua ; then |
154 |
+ if use aqua; then |
155 |
einfo "Building gvim with the Carbon GUI" |
156 |
myconf+=( |
157 |
--enable-darwin |
158 |
--enable-gui=carbon |
159 |
) |
160 |
- elif use gtk3 ; then |
161 |
+ elif use gtk3; then |
162 |
myconf+=( --enable-gtk3-check ) |
163 |
einfo "Building gvim with the gtk+-3 GUI" |
164 |
myconf+=( --enable-gui=gtk3 ) |
165 |
- elif use gtk ; then |
166 |
+ elif use gtk; then |
167 |
myconf+=( --enable-gtk2-check ) |
168 |
- if use gnome ; then |
169 |
+ if use gnome; then |
170 |
einfo "Building gvim with the Gnome 2 GUI" |
171 |
myconf+=( --enable-gui=gnome2 ) |
172 |
else |
173 |
einfo "Building gvim with the gtk+-2 GUI" |
174 |
myconf+=( --enable-gui=gtk2 ) |
175 |
fi |
176 |
- elif use motif ; then |
177 |
+ elif use motif; then |
178 |
einfo "Building gvim with the MOTIF GUI" |
179 |
myconf+=( --enable-gui=motif ) |
180 |
- elif use neXt ; then |
181 |
+ elif use neXt; then |
182 |
einfo "Building gvim with the neXtaw GUI" |
183 |
myconf+=( --enable-gui=nextaw ) |
184 |
else |
185 |
@@ -287,7 +296,7 @@ src_test() { |
186 |
ln -s "${S}"/src/gvim "${S}"/src/testvim || die |
187 |
|
188 |
# Make sure our VIMPROG is used. |
189 |
- sed -i 's:\.\./vim:../testvim:' src/testdir/test49.vim || die |
190 |
+ sed -i -e 's:\.\./vim:../testvim:' src/testdir/test49.vim || die |
191 |
|
192 |
# Don't do additional GUI tests. |
193 |
emake -j1 VIMPROG=../testvim -C src/testdir nongui |
194 |
@@ -305,20 +314,20 @@ update_vim_symlinks() { |
195 |
|
196 |
# Make or remove convenience symlink, vim -> gvim |
197 |
if [[ -f "${EROOT}"/usr/bin/gvim ]]; then |
198 |
- ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null |
199 |
+ ln -s gvim "${EROOT}"/usr/bin/vim 2>/dev/null || die |
200 |
elif [[ -L "${EROOT}"/usr/bin/vim && ! -f "${EROOT}"/usr/bin/vim ]]; then |
201 |
- rm "${EROOT}"/usr/bin/vim |
202 |
+ rm "${EROOT}"/usr/bin/vim || die |
203 |
fi |
204 |
|
205 |
# Make or remove convenience symlinks to vim |
206 |
if [[ -f "${EROOT}"/usr/bin/vim ]]; then |
207 |
for f in ${syms}; do |
208 |
- ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null |
209 |
+ ln -s vim "${EROOT}"/usr/bin/${f} 2>/dev/null || die |
210 |
done |
211 |
else |
212 |
for f in ${syms}; do |
213 |
if [[ -L "${EROOT}"/usr/bin/${f} && ! -f "${EROOT}"/usr/bin/${f} ]]; then |
214 |
- rm -f "${EROOT}"/usr/bin/${f} |
215 |
+ rm -v "${EROOT}"/usr/bin/${f} || die |
216 |
fi |
217 |
done |
218 |
fi |
219 |
@@ -342,9 +351,10 @@ src_install() { |
220 |
emake -C src DESTDIR="${D}" DATADIR="${EPREFIX}"/usr/share install-icons |
221 |
|
222 |
dodir /usr/share/man/man1 |
223 |
- echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1 |
224 |
- echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1 |
225 |
- echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1 |
226 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gvim.1 || die "echo failed" |
227 |
+ echo ".so vim.1" > "${ED}"/usr/share/man/man1/gview.1 || die "echo failed" |
228 |
+ echo ".so vimdiff.1" > "${ED}"/usr/share/man/man1/gvimdiff.1 || \ |
229 |
+ die "echo failed" |
230 |
|
231 |
insinto /etc/vim |
232 |
newins "${FILESDIR}"/gvimrc-r1 gvimrc |
233 |
@@ -356,7 +366,7 @@ src_install() { |
234 |
newbashcomp "${FILESDIR}"/${PN}-completion ${PN} |
235 |
|
236 |
# don't install vim desktop file |
237 |
- rm "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop" |
238 |
+ rm -v "${ED}"/usr/share/applications/vim.desktop || die "failed to remove vim.desktop" |
239 |
} |
240 |
|
241 |
pkg_postinst() { |