summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-12-21 13:10:29 +0000
committerMarek Szuba <marecki@gentoo.org>2020-12-21 13:11:24 +0000
commitbc98ebe7c9439c79cd85885522a48330bca3bda5 (patch)
tree3db1e2d67a244973733f77d734c370048747be0b /app-editors/gvim/gvim-9999.ebuild
parentapp-editors/vim: migrate to lua-single.eclass (diff)
downloadgentoo-bc98ebe7c9439c79cd85885522a48330bca3bda5.tar.gz
gentoo-bc98ebe7c9439c79cd85885522a48330bca3bda5.tar.bz2
gentoo-bc98ebe7c9439c79cd85885522a48330bca3bda5.zip
app-editors/gvim: migrate to lua-single.eclass
Same as with app-editors/vim. Closes: https://bugs.gentoo.org/752528 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'app-editors/gvim/gvim-9999.ebuild')
-rw-r--r--app-editors/gvim/gvim-9999.ebuild25
1 files changed, 18 insertions, 7 deletions
diff --git a/app-editors/gvim/gvim-9999.ebuild b/app-editors/gvim/gvim-9999.ebuild
index 3542682bc039..0c2806893c89 100644
--- a/app-editors/gvim/gvim-9999.ebuild
+++ b/app-editors/gvim/gvim-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 xdg-utils bash-completion-r1 prefix python-single-r1 ruby-single
+inherit vim-doc flag-o-matic xdg-utils bash-completion-r1 prefix lua-single python-single-r1 ruby-single
if [[ ${PV} == 9999* ]]; then
inherit git-r3
@@ -24,8 +25,9 @@ HOMEPAGE="https://vim.sourceforge.io/ https://github.com/vim/vim"
SLOT="0"
LICENSE="vim"
-IUSE="acl aqua cscope debug gtk gtk2 lua luajit motif neXt netbeans nls perl python racket ruby selinux session sound tcl"
+IUSE="acl aqua cscope debug gtk gtk2 lua motif neXt netbeans nls perl python racket ruby selinux session sound tcl"
REQUIRED_USE="
+ lua? ( ${LUA_REQUIRED_USE} )
python? ( ${PYTHON_REQUIRED_USE} )
"
@@ -59,8 +61,8 @@ RDEPEND="
)
cscope? ( dev-util/cscope )
lua? (
- luajit? ( dev-lang/luajit:2= )
- !luajit? ( dev-lang/lua:0[deprecated] )
+ ${LUA_DEPS}
+ $(lua_gen_impl_dep 'deprecated' lua5-1)
)
nls? ( virtual/libintl )
perl? ( dev-lang/perl:= )
@@ -77,6 +79,8 @@ DEPEND="${RDEPEND}
virtual/pkgconfig
nls? ( sys-devel/gettext )
"
+# configure runs the Lua interpreter
+BDEPEND="lua? ( ${LUA_DEPS} )"
# various failures (bugs #630042 and #682320)
RESTRICT="test"
@@ -92,6 +96,7 @@ pkg_setup() {
mkdir -p "${T}"/home || die
export HOME="${T}"/home
+ use lua && lua-single_pkg_setup
use python && python-single-r1_pkg_setup
}
@@ -194,13 +199,11 @@ src_configure() {
$(use_enable sound canberra)
$(use_enable acl)
$(use_enable cscope)
- $(use_enable lua luainterp)
- $(use_with luajit)
$(use_enable netbeans)
$(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)
@@ -215,6 +218,14 @@ src_configure() {
'/# define FEAT_CSCOPE/d' src/feature.h || die "couldn't disable cscope"
fi
+ if use lua; then
+ myconf+=(
+ --enable-luainterp
+ $(use_with lua_single_target_luajit luajit)
+ --with-lua-prefix="${EPREFIX}/usr"
+ )
+ fi
+
# gvim's GUI preference order is as follows:
# aqua CARBON (not tested)
# -aqua gtk GTK3