www-client/google-chrome-beta: automated update (84.0.4147.30)
[gentoo.git] / app-vim / vim-latex / vim-latex-1.10.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python3_6 )
6
7 inherit vim-plugin python-single-r1
8
9 DESCRIPTION="A comprehensive set of tools to view, edit and compile LaTeX documents"
10 HOMEPAGE="http://vim-latex.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
12
13 LICENSE="vim"
14 KEYWORDS="~alpha amd64 ~ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
15 IUSE=""
16 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
17
18 RDEPEND="
19         ${PYTHON_DEPS}
20         || (
21                 app-editors/vim[python,${PYTHON_SINGLE_USEDEP}]
22                 app-editors/gvim[python,${PYTHON_SINGLE_USEDEP}]
23         )
24         virtual/latex-base
25         !app-vim/vimtex"
26
27 VIM_PLUGIN_HELPFILES="latex-suite.txt latex-suite-quickstart.txt latexhelp.txt imaps.txt"
28
29 src_compile() { :; }
30
31 src_install() {
32         # remove unused metadata
33         rm vim-latex.metainfo.xml || die
34
35         # don't mess up vim's doc dir with random files
36         mv doc mydoc || die
37         mkdir doc || die
38         mv mydoc/*.txt doc/ || die
39         rm -rf mydoc || die
40
41         # don't install buggy tags scripts, use ctags instead
42         rm latextags ltags || die
43
44         vim-plugin_src_install
45
46         # use executable permissions (bug #352403)
47         fperms a+x /usr/share/vim/vimfiles/ftplugin/latex-suite/outline.py
48
49         python_fix_shebang "${ED}"
50 }
51
52 pkg_postinst() {
53         vim-plugin_pkg_postinst
54
55         if [[ -z ${REPLACING_VERSIONS} ]]; then
56                 echo
57                 elog "To use the vim-latex plugin add:"
58                 elog "   filetype plugin on"
59                 elog '   set grepprg=grep\ -nH\ $*'
60                 elog "   let g:tex_flavor='latex'"
61                 elog "to your ~/.vimrc-file"
62                 echo
63         fi
64 }