Add new lua FLAVOR and switch to generating configure script with

autoconf.

Lua request from frantisek holop on ports@, ok sthen@
This commit is contained in:
jturner 2014-07-10 23:54:15 +00:00
parent a38206fa07
commit 23f7a773be
3 changed files with 46 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.136 2014/06/03 11:33:07 rpointel Exp $
# $OpenBSD: Makefile,v 1.137 2014/07/10 23:54:15 jturner Exp $
COMMENT-main= vi clone, many additional features
COMMENT-lang= vi clone, NLS subpackage
@ -7,7 +7,7 @@ VERSION= 7.4.135
DISTNAME= vim-${VERSION}
PKGNAME-main= vim-${VERSION}
PKGNAME-lang= vim-lang-${VERSION}
REVISION-main= 1
REVISION-main= 2
P= vim${VERSION:R:S/.//}
CATEGORIES= editors
# Upstream's normal distribution (http://ftp.vim.org/pub/vim/unix/) consists
@ -34,7 +34,7 @@ MULTI_PACKAGES= -main -lang
FULLPKGNAME-lang= vim-lang-${VERSION}
FULLPKGPATH-lang= ${PKGPATH},-lang
FLAVORS= huge gtk2 athena motif no_x11 perl python python3 ruby
FLAVORS= huge gtk2 athena motif no_x11 lua perl python python3 ruby
FLAVOR?= gtk2
CONFIGURE_STYLE=gnu
@ -44,10 +44,22 @@ CONFIGURE_ARGS+= --with-tlib="curses" \
--enable-multibyte \
--enable-cscope
AUTOCONF_VERSION= 2.65
BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS}
.if ${FLAVOR:Mhuge}
CONFIGURE_ARGS+= --with-features=huge
.endif
.if ${FLAVOR:Mlua}
MODULES+= lang/lua
MODLUA_VERSION= 5.1
CONFIGURE_ENV+= vi_cv_path_plain_lua=${MODLUA_BIN}
CONFIGURE_ARGS+= --enable-luainterp --with-lua-prefix=${LOCALBASE}
LIB_DEPENDS+= ${MODLUA_LIB_DEPENDS}
WANTLIB+= m ${MODLUA_WANTLIB}
.endif
.if ${FLAVOR:Mperl}
CONFIGURE_ARGS+= --enable-perlinterp
WANTLIB+= m perl util
@ -139,10 +151,8 @@ MODULES+= devel/gettext
WRKSRC= ${WRKDIST}/src
SUBST_VARS= P
# don't try to regenerate the configure script. Works around the fact that
# auto/configure.in is newer than auto/configure.
post-patch:
touch ${WRKBUILD}/auto/configure
cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} autoconf
post-configure:
touch ${WRKBUILD}/auto/config.mk

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-src_configure_in,v 1.1 2014/07/10 23:54:15 jturner Exp $
--- src/configure.in.orig Thu Jul 10 19:00:21 2014
+++ src/configure.in Thu Jul 10 19:01:59 2014
@@ -526,10 +526,10 @@ if test "$enable_luainterp" = "yes" -o "$enable_luaint
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
- AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua)
- if test -f $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h; then
+ AC_MSG_CHECKING(if lua.h can be found in $vi_cv_path_lua_pfx/include/lua-$vi_cv_version_lua)
+ if test -f $vi_cv_path_lua_pfx/include/lua-$vi_cv_version_lua/lua.h; then
AC_MSG_RESULT(yes)
- LUA_INC=/lua$vi_cv_version_lua
+ LUA_INC=/lua-$vi_cv_version_lua
else
AC_MSG_RESULT(no)
vi_cv_path_lua_pfx=
@@ -554,9 +554,9 @@ if test "$enable_luainterp" = "yes" -o "$enable_luaint
else
if test "X$LUA_INC" != "X"; then
dnl Test alternate location using version
- LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
+ LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua -lm"
else
- LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
+ LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua -lm"
fi
fi
if test "$enable_luainterp" = "dynamic"; then

View File

@ -17,6 +17,7 @@ Flavors:
motif - build using the Motif toolkit;
athena - build using the Athena toolkit;
no_x11 - build without X11 support;
lua - build with Lua support;
perl - build with Perl support;
python - build with Python support;
python3 - build with Python3 support;