diff options
author | Marek Szuba <marecki@gentoo.org> | 2020-12-21 13:06:11 +0000 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2020-12-21 13:11:21 +0000 |
commit | d7b62acd7caa4fe0129e6172347bb0768830c4e6 (patch) | |
tree | e757eaaa642c6dc8028bb5b8cf416252a083c3a7 /app-editors/vim/vim-9999.ebuild | |
parent | dev-libs/rocm-opencl-runtime: Version bump to 4.0.0 (diff) | |
download | gentoo-d7b62acd7caa4fe0129e6172347bb0768830c4e6.tar.gz gentoo-d7b62acd7caa4fe0129e6172347bb0768830c4e6.tar.bz2 gentoo-d7b62acd7caa4fe0129e6172347bb0768830c4e6.zip |
app-editors/vim: migrate to lua-single.eclass
Both the latest release we have got in the tree and the live ebuild.
Compatibility - same as in unmigrated ebuilds, with the USE=deprecated
requirement on PUC Lua I didn't even bother testing newer versions.
Closes: https://bugs.gentoo.org/752537
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'app-editors/vim/vim-9999.ebuild')
-rw-r--r-- | app-editors/vim/vim-9999.ebuild | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/app-editors/vim/vim-9999.ebuild b/app-editors/vim/vim-9999.ebuild index 372853638330..c9e9b3a5b2eb 100644 --- a/app-editors/vim/vim-9999.ebuild +++ b/app-editors/vim/vim-9999.ebuild @@ -3,11 +3,12 @@ EAPI=7 VIM_VERSION="8.2" +LUA_COMPAT=( lua5-1 luajit ) PYTHON_COMPAT=( python3_{6,7,8} ) PYTHON_REQ_USE="threads(+)" USE_RUBY="ruby24 ruby25 ruby26 ruby27" -inherit vim-doc flag-o-matic bash-completion-r1 python-single-r1 ruby-single desktop xdg-utils +inherit vim-doc flag-o-matic bash-completion-r1 lua-single python-single-r1 ruby-single desktop xdg-utils if [[ ${PV} == 9999* ]] ; then inherit git-r3 @@ -23,8 +24,9 @@ HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim" SLOT="0" LICENSE="vim" -IUSE="X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" +IUSE="X acl cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager" REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) python? ( ${PYTHON_REQUIRED_USE} ) vim-pager? ( !minimal ) " @@ -36,9 +38,8 @@ RDEPEND=" acl? ( kernel_linux? ( sys-apps/acl ) ) cscope? ( dev-util/cscope ) gpm? ( >=sys-libs/gpm-1.19.3 ) - lua? ( - luajit? ( dev-lang/luajit:2= ) - !luajit? ( dev-lang/lua:0[deprecated] ) + lua? ( ${LUA_DEPS} + $(lua_gen_impl_dep 'deprecated' lua5-1) ) !minimal? ( ~app-editors/vim-core-${PV} ) vim-pager? ( app-editors/vim-core[-minimal] ) @@ -57,6 +58,8 @@ DEPEND=" sys-devel/autoconf nls? ( sys-devel/gettext ) " +# configure runs the Lua interpreter +BDEPEND="lua? ( ${LUA_DEPS} )" pkg_setup() { # people with broken alphabets run into trouble. bug 82186. @@ -67,6 +70,7 @@ pkg_setup() { mkdir -p "${T}"/home || die "mkdir failed" export HOME="${T}"/home + use lua && lua-single_pkg_setup use python && python-single-r1_pkg_setup } @@ -198,13 +202,10 @@ src_configure() { $(use_enable acl) $(use_enable cscope) $(use_enable gpm) - $(use_enable lua luainterp) - $(usex lua "--with-lua-prefix=${EPREFIX}/usr" "") - $(use_with luajit) $(use_enable nls) $(use_enable perl perlinterp) $(use_enable python python3interp) - $(use_with python python3-command $(type -P $(eselect python show --python3))) + $(use_with python python3-command "${PYTHON}") $(use_enable racket mzschemeinterp) $(use_enable ruby rubyinterp) $(use_enable selinux) @@ -219,6 +220,14 @@ src_configure() { '/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed" fi + if use lua; then + myconf+=( + --enable-luainterp + $(use_with lua_single_target_luajit luajit) + --with-lua-prefix="${EPREFIX}/usr" + ) + fi + # don't test USE=X here ... see bug #19115 # but need to provide a way to link against X ... see bug #20093 myconf+=( |