/[gentoo-x86]/app-editors/vim-core/vim-core-7.4.670.ebuild
Gentoo

Contents of /app-editors/vim-core/vim-core-7.4.670.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Mar 21 06:28:50 2015 UTC (5 years, 3 months ago) by radhermit
Branch: MAIN
CVS Tags: HEAD
Version bump.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 4F064CA3)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 VIM_VERSION="7.4"
7 inherit eutils vim-doc flag-o-matic versionator bash-completion-r1 prefix
8
9 if [[ ${PV} == 9999* ]] ; then
10 inherit mercurial
11 EHG_REPO_URI="https://vim.googlecode.com/hg/"
12 EHG_PROJECT="vim"
13 else
14 VIM_ORG_PATCH="vim-${PV}.patch.xz"
15 SRC_URI="ftp://ftp.vim.org/pub/vim/unix/vim-${VIM_VERSION}.tar.bz2
16 http://dev.gentoo.org/~radhermit/vim/${VIM_ORG_PATCH}
17 http://dev.gentoo.org/~radhermit/vim/vim-7.4.542-gentoo-patches.tar.bz2"
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
19 fi
20
21 DESCRIPTION="vim and gvim shared files"
22 HOMEPAGE="http://www.vim.org/"
23
24 SLOT="0"
25 LICENSE="vim"
26 IUSE="nls acl minimal"
27
28 DEPEND="sys-devel/autoconf"
29 PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
30
31 S=${WORKDIR}/vim${VIM_VERSION/.}
32
33 pkg_setup() {
34 # people with broken alphabets run into trouble. bug 82186.
35 unset LANG LC_ALL
36 export LC_COLLATE="C"
37
38 # Gnome sandbox silliness. bug #114475.
39 mkdir -p "${T}"/home
40 export HOME="${T}"/home
41 }
42
43 src_prepare() {
44 if [[ ${PV} != 9999* ]] ; then
45 if [[ -f "${WORKDIR}"/${VIM_ORG_PATCH%.xz} ]] ; then
46 # Apply any patches available from vim.org for this version
47 epatch "${WORKDIR}"/${VIM_ORG_PATCH%.xz}
48 fi
49
50 if [[ -d "${WORKDIR}"/patches/ ]]; then
51 # Gentoo patches to fix runtime issues, cross-compile errors, etc
52 EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \
53 epatch "${WORKDIR}"/patches/
54 fi
55 fi
56
57 # Fixup a script to use awk instead of nawk
58 sed -i '1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' "${S}"/runtime/tools/mve.awk \
59 || die "mve.awk sed failed"
60
61 # Read vimrc and gvimrc from /etc/vim
62 echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' >> "${S}"/src/feature.h
63 echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' >> "${S}"/src/feature.h
64
65 # Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
66 # Hopefully this pattern won't break for a while at least.
67 # This fixes bug 29398 (27 Sep 2003 agriffis)
68 sed -i 's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
69 "${S}"/runtime/doc/syntax.txt \
70 "${S}"/runtime/doc/tagsrch.txt \
71 "${S}"/runtime/doc/usr_29.txt \
72 "${S}"/runtime/menu.vim \
73 "${S}"/src/configure.in || die 'sed failed'
74
75 # Don't be fooled by /usr/include/libc.h. When found, vim thinks
76 # this is NeXT, but it's actually just a file in dev-libs/9libs
77 # This fixes bug 43885 (20 Mar 2004 agriffis)
78 sed -i 's/ libc\.h / /' "${S}"/src/configure.in || die 'sed failed'
79
80 # gcc on sparc32 has this, uhm, interesting problem with detecting EOF
81 # correctly. To avoid some really entertaining error messages about stuff
82 # which isn't even in the source file being invalid, we'll do some trickery
83 # to make the error never occur. bug 66162 (02 October 2004 ciaranm)
84 find "${S}" -name '*.c' | while read c ; do echo >> "$c" ; done
85
86 # Try to avoid sandbox problems. Bug #114475.
87 if [[ -d "${S}"/src/po ]] ; then
88 sed -i -e \
89 '/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
90 "${S}"/src/po/Makefile
91 fi
92
93 if version_is_at_least 7.3.122 ; then
94 cp "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk
95 fi
96
97 # Bug #378107 - Build properly with >=perl-core/ExtUtils-ParseXS-3.20.0
98 if version_is_at_least 7.3 ; then
99 sed -i "s:\\\$(PERLLIB)/ExtUtils/xsubpp:${EPREFIX}/usr/bin/xsubpp:" \
100 "${S}"/src/Makefile || die 'sed for ExtUtils-ParseXS failed'
101 fi
102
103 epatch_user
104 }
105
106 src_configure() {
107 local myconf
108
109 # Fix bug 37354: Disallow -funroll-all-loops on amd64
110 # Bug 57859 suggests that we want to do this for all archs
111 filter-flags -funroll-all-loops
112
113 # Fix bug 76331: -O3 causes problems, use -O2 instead. We'll do this for
114 # everyone since previous flag filtering bugs have turned out to affect
115 # multiple archs...
116 replace-flags -O3 -O2
117
118 # Fix bug 18245: Prevent "make" from the following chain:
119 # (1) Notice configure.in is newer than auto/configure
120 # (2) Rebuild auto/configure
121 # (3) Notice auto/configure is newer than auto/config.mk
122 # (4) Run ./configure (with wrong args) to remake auto/config.mk
123 sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
124 rm -f src/auto/configure
125 emake -j1 -C src autoconf
126
127 # This should fix a sandbox violation (see bug 24447). The hvc
128 # things are for ppc64, see bug 86433.
129 for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc* ; do
130 [[ -e ${file} ]] && addwrite $file
131 done
132
133 # Let Portage do the stripping. Some people like that.
134 export ac_cv_prog_STRIP="$(type -P true ) faking strip"
135
136 # Keep Gentoo Prefix env contained within the EPREFIX
137 use prefix && myconf+=" --without-local-dir"
138
139 econf \
140 --with-modified-by=Gentoo-${PVR} \
141 --enable-gui=no \
142 --without-x \
143 --disable-darwin \
144 --disable-perlinterp \
145 --disable-pythoninterp \
146 --disable-rubyinterp \
147 --disable-gpm \
148 --disable-selinux \
149 $(use_enable nls) \
150 $(use_enable acl) \
151 ${myconf}
152 }
153
154 src_compile() {
155 # The following allows emake to be used
156 emake -j1 -C src auto/osdef.h objects
157
158 emake tools
159 }
160
161 src_test() { :; }
162
163 src_install() {
164 local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
165
166 dodir /usr/{bin,share/{man/man1,vim}}
167 cd src || die "cd src failed"
168 emake \
169 installruntime \
170 installmanlinks \
171 installmacros \
172 installtutor \
173 installtutorbin \
174 installtools \
175 install-languages \
176 install-icons \
177 DESTDIR="${D}" \
178 BINDIR="${EPREFIX}"/usr/bin \
179 MANDIR="${EPREFIX}"/usr/share/man \
180 DATADIR="${EPREFIX}"/usr/share
181
182 keepdir ${vimfiles}/keymap
183
184 # default vimrc is installed by vim-core since it applies to
185 # both vim and gvim
186 insinto /etc/vim/
187 newins "${FILESDIR}"/vimrc-r4 vimrc
188 eprefixify "${ED}"/etc/vim/vimrc
189
190 if use minimal ; then
191 # To save space, install only a subset of the files.
192 # Helps minimalize the livecd, bug 65144.
193 eshopts_push -s extglob
194
195 rm -fr "${ED}${vimfiles}"/{compiler,doc,ftplugin,indent}
196 rm -fr "${ED}${vimfiles}"/{macros,print,tools,tutor}
197 rm "${ED}"/usr/bin/vimtutor
198
199 local keep_colors="default"
200 ignore=$(rm -fr "${ED}${vimfiles}"/colors/!(${keep_colors}).vim )
201
202 local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig"
203 # tinkering with the next line might make bad things happen ...
204 keep_syntax="${keep_syntax}|syntax|nosyntax|synload"
205 ignore=$(rm -fr "${ED}${vimfiles}"/syntax/!(${keep_syntax}).vim )
206
207 eshopts_pop
208 fi
209
210 # These files might have slight security issues, so we won't
211 # install them. See bug #77841. We don't mind if these don't
212 # exist.
213 rm "${ED}${vimfiles}"/tools/{vimspell.sh,tcltags} 2>/dev/null
214
215 newbashcomp "${FILESDIR}"/xxd-completion xxd
216
217 # We shouldn't be installing the ex or view man page symlinks, as they
218 # are managed by eselect-vi
219 rm -f "${ED}"/usr/share/man/man1/{ex,view}.1
220 }
221
222 pkg_postinst() {
223 # Update documentation tags (from vim-doc.eclass)
224 update_vim_helptags
225 }
226
227 pkg_postrm() {
228 # Update documentation tags (from vim-doc.eclass)
229 update_vim_helptags
230 }

  ViewVC Help
Powered by ViewVC 1.1.20