ports/184588: [ports] editors/vim: lua is not loaded when invoked from vim command
Kenji Rikitake
kenji at k2r.org
Sun Dec 8 01:20:00 UTC 2013
>Number: 184588
>Category: ports
>Synopsis: [ports] editors/vim: lua is not loaded when invoked from vim command
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 08 01:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Kenji Rikitake
>Release: 10.0-BETA4
>Organization:
>Environment:
FreeBSD wellmax.priv.k2r.org 10.0-BETA4 FreeBSD 10.0-BETA4 #18 r258903: Wed Dec 4 12:31:36 JST 2013 root at wellmax.priv.k2r.org:/usr/obj/usr/src/sys/K2RKERNEL amd64
>Description:
when lua is being invoked from vim, the following error message shows up:
E370: Could not load library liblua-5.1
Lua library cannot be loaded
>How-To-Repeat:
/usr/local/bin/vim
type ":" to enter ex prompt
then type "lua print(100)"
>Fix:
Patch as in the attached file. Patch details:
Summary
* This is a patch for <http://svnweb.freebsd.org/ports/head/editors/vim/Makefile?revision=335790>
(Ports editors/vim r335790)
to fix the following error when lua is being invoked from vim:
E370: Could not load library liblua-5.1
Lua library cannot be loaded.
* Two files are changed: Makefile and files/patch-configure
## on Makefile
* Change CONF_OPT_LUA_PREFIX using ${LOCALBASE} to ${LUA_PREFIX}
since <bsd.lua.mk> is assumed
* /usr/ports/Mk/Uses/iconv.mk handles existence and non-existence of
libiconv.so: always enable "USES+= iconv"
## on files/patch-configure
* Rebuild from 7.4.110 src/auto/configure
* move definition of "vi_cv_version_lua=${LUA_VER}"
* add .so to "-DDYNAMIC_LUA_DLL=\\\"liblua-${vi_cv_version_lua}.so\\\" in LUA_CFLAGS
for properly loading the shared library of lua from /usr/local/lib/liblua-${LUA_VER}.so
Patch attached with submission follows:
# Summary
* This is a patch for <http://svnweb.freebsd.org/ports/head/editors/vim/Makefile?revision=335790>
(Ports editors/vim r335790)
to fix the following error when lua is being invoked from vim:
E370: Could not load library liblua-5.1
Lua library cannot be loaded.
* Two files are changed: Makefile and files/patch-configure
## on Makefile
* Change CONF_OPT_LUA_PREFIX using ${LOCALBASE} to ${LUA_PREFIX}
since <bsd.lua.mk> is assumed
* /usr/ports/Mk/Uses/iconv.mk handles existence and non-existence of
libiconv.so: always enable "USES+= iconv"
## on files/patch-configure
* Rebuild from 7.4.110 src/auto/configure
* move definition of "vi_cv_version_lua=${LUA_VER}"
* add .so to "-DDYNAMIC_LUA_DLL=\\\"liblua-${vi_cv_version_lua}.so\\\" in LUA_CFLAGS
for properly loading the shared library of lua from /usr/local/lib/liblua-${LUA_VER}.so
## environment
* `uname -a` result:
FreeBSD wellmax.priv.k2r.org 10.0-BETA4 FreeBSD 10.0-BETA4 #18 r258903: Wed Dec 4 12:31:36 JST 2013 root at wellmax.priv.k2r.org:/usr/obj/usr/src/sys/K2RKERNEL amd64
## Patch author
* Kenji Rikitake <kenji at k2r.org>
[End of memorandum]
--- Makefile.orig 2013-12-07 08:24:14.000000000 +0900
+++ Makefile 2013-12-08 09:39:53.000000000 +0900
@@ -98,7 +98,7 @@
.if ${PORT_OPTIONS:MLUA}
USE_LUA= yes
MAKE_ARGS+= CONF_OPT_LUA="--enable-luainterp=dynamic"
-MAKE_ARGS+= CONF_OPT_LUA_PREFIX="--with-lua-prefix=${LOCALBASE}"
+MAKE_ARGS+= CONF_OPT_LUA_PREFIX="--with-lua-prefix=${LUA_PREFIX}"
.endif
.if ${PORT_OPTIONS:MPERL}
@@ -162,9 +162,7 @@
.endif
MAKE_ARGS+= CONF_OPT_GUI=${CONF_OPT_GUI} ${I18N}
-.if exists(${LOCALBASE}/lib/libiconv.so)
USES+= iconv
-.endif
post-patch:
@(${FIND} ${WRKSRC}/../runtime/ -name menu\*.vim -print0 | ${XARGS} -0 \
--- files/patch-configure.orig 2013-12-03 04:48:37.000000000 +0900
+++ files/patch-configure 2013-12-08 09:57:40.000000000 +0900
@@ -1,5 +1,5 @@
---- auto/configure.orig 2013-10-17 12:11:54.000000000 +0200
-+++ auto/configure 2013-10-17 12:12:56.000000000 +0200
+--- auto/configure.orig 2013-12-08 09:19:43.000000000 +0900
++++ auto/configure 2013-12-08 09:21:36.000000000 +0900
@@ -858,7 +858,7 @@
psdir='${docdir}'
libdir='${exec_prefix}/lib'
@@ -9,7 +9,7 @@
ac_prev=
ac_dashdash=
-@@ -4739,7 +4739,7 @@
+@@ -4752,7 +4752,7 @@
if test "${vi_cv_version_lua_luajit+set}" = set; then :
$as_echo_n "(cached) " >&6
else
@@ -18,7 +18,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
$as_echo "$vi_cv_version_lua_luajit" >&6; }
-@@ -4793,7 +4793,7 @@
+@@ -4806,7 +4806,7 @@
if test "${vi_cv_version_plain_lua+set}" = set; then :
$as_echo_n "(cached) " >&6
else
@@ -27,7 +27,15 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
$as_echo "$vi_cv_version_plain_lua" >&6; }
-@@ -4884,7 +4884,7 @@
+@@ -4862,6 +4862,7 @@
+ fi
+ else
+ if test "X$LUA_INC" != "X"; then
++ vi_cv_version_lua=${LUA_VER}
+ LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
+ else
+ LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
+@@ -4897,7 +4898,7 @@
LIBS=$libs_save
fi
if test "x$lua_ok" = "xyes"; then
@@ -36,17 +44,16 @@
LUA_SRC="if_lua.c"
LUA_OBJ="objects/if_lua.o"
LUA_PRO="if_lua.pro"
-@@ -4941,7 +4941,8 @@
+@@ -4954,7 +4955,7 @@
$as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
LUA_LIBS=""
- LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
-+ vi_cv_version_lua=${LUA_VER}
-+ LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua-${vi_cv_version_lua}\\\" $LUA_CFLAGS"
++ LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"liblua-${vi_cv_version_lua}.so\\\" $LUA_CFLAGS"
fi
if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
test "x$MACOSX" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
-@@ -6610,7 +6611,7 @@
+@@ -6623,7 +6624,7 @@
$as_echo "$try/tclConfig.sh" >&6; }
. $try/tclConfig.sh
TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list