commit:     bc98ebe7c9439c79cd85885522a48330bca3bda5
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 21 13:10:29 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Dec 21 13:11:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc98ebe7

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 <AT> gentoo.org>

 ...{gvim-9999.ebuild => gvim-8.2.0814-r100.ebuild} | 25 ++++++++++++++++------
 app-editors/gvim/gvim-9999.ebuild                  | 25 ++++++++++++++++------
 profiles/package.mask                              |  1 +
 3 files changed, 37 insertions(+), 14 deletions(-)

diff --git a/app-editors/gvim/gvim-9999.ebuild 
b/app-editors/gvim/gvim-8.2.0814-r100.ebuild
similarity index 94%
copy from app-editors/gvim/gvim-9999.ebuild
copy to app-editors/gvim/gvim-8.2.0814-r100.ebuild
index 3542682bc03..0c2806893c8 100644
--- a/app-editors/gvim/gvim-9999.ebuild
+++ b/app-editors/gvim/gvim-8.2.0814-r100.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

diff --git a/app-editors/gvim/gvim-9999.ebuild 
b/app-editors/gvim/gvim-9999.ebuild
index 3542682bc03..0c2806893c8 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

diff --git a/profiles/package.mask b/profiles/package.mask
index 954d79f7fb8..37df93931b2 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -442,6 +442,7 @@ kde-apps/kdebase-meta:5
 >=app-benchmarks/wrk-4.1.0-r100
 >=app-crypt/cardpeek-0.8.4
 >=app-crypt/ekeyd-1.1.5-r100
+>=app-editors/gvim-8.2.0814-r100
 >=app-editors/neovim-0.4.4-r100
 =app-editors/scite-4.4.4-r10
 >=app-editors/vim-8.2.0814-r100

Reply via email to