summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-06-30 18:49:56 +0000
committernia <nia@pkgsrc.org>2020-06-30 18:49:56 +0000
commit1126b38e1192837a38ae79742b88f0977af15e24 (patch)
treef7ddf27abecc6687b6f61344f8ba06aa5a5ce873 /editors
parent317f4896dbd9f60d5b6c0864fa417b696b5534f8 (diff)
downloadpkgsrc-1126b38e1192837a38ae79742b88f0977af15e24.tar.gz
vim-share: Fix lua option.
Instead of the first unversioned lua interpreter being detected (on NetBSD usually /usr/bin/lua), make sure the correct version as selected by pkgsrc infrastructure gets used.
Diffstat (limited to 'editors')
-rw-r--r--editors/vim-share/options.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/editors/vim-share/options.mk b/editors/vim-share/options.mk
index 98826390b2f..dcedcc934d2 100644
--- a/editors/vim-share/options.mk
+++ b/editors/vim-share/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.8 2019/11/02 19:57:01 tnn Exp $
+# $NetBSD: options.mk,v 1.9 2020/06/30 18:49:56 nia Exp $
PKG_SUPPORTED_OPTIONS+= ruby python perl lua luajit
PKG_OPTIONS_VAR= PKG_OPTIONS.vim
@@ -29,11 +29,19 @@ CONFIGURE_ENV+= vi_cv_path_perl=${PERL5:Q}
.endif
.if !empty(PKG_OPTIONS:Mlua)
+LUA_VERSIONS_ACCEPTED= 53 52 51
.include "../../lang/lua/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-luainterp
+CONFIGURE_ARGS+= --enable-luainterp
+CONFIGURE_ARGS+= --with-lua-prefix=${BUILDLINK_PREFIX.lua}
+CONFIGURE_ENV+= vi_cv_path_plain_lua=${LUA_INTERPRETER}
+# pkgsrc has include/lua-5.x instead of include/lua5.x
+SUBST_CLASSES+= lua
+SUBST_FILES.lua= auto/configure
+SUBST_STAGE.lua= pre-configure
+SUBST_SED.lua= -e "s,include/lua,include/lua-,g"
.endif
.if !empty(PKG_OPTIONS:Mluajit)
.include "../../lang/LuaJIT2/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-luainterp --with-luajit
+CONFIGURE_ARGS+= --enable-luainterp --with-luajit
.endif