diff options
Diffstat (limited to 'lang/lua')
-rw-r--r-- | lang/lua/luaversion.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lang/lua/luaversion.mk b/lang/lua/luaversion.mk index bb96f485529..8267fe0bc61 100644 --- a/lang/lua/luaversion.mk +++ b/lang/lua/luaversion.mk @@ -1,4 +1,4 @@ -# $NetBSD: luaversion.mk,v 1.5 2014/05/03 13:00:44 alnsn Exp $ +# $NetBSD: luaversion.mk,v 1.6 2014/12/07 05:10:43 obache Exp $ # This file determins which Lua version is used as a dependency for # a package. @@ -64,6 +64,16 @@ .if !defined (LUA_LUAVERSION_MK) LUA_LUAVERSION_MK= # defined +# derive a Lua version from the package name if possible +# optionally handled quoted package names +.if defined(PKGNAME_REQD) && !empty(PKGNAME_REQD:Mlua[0-9][0-9]-*) || \ + defined(PKGNAME_REQD) && !empty(PKGNAME_REQD:M*-lua[0-9][0-9]-*) +LUA_VERSION_REQD?= ${PKGNAME_REQD:C/(^.*-|^)lua([0-9][0-9])-.*/\2/} +.elif defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:Mlua[0-9][0-9]-*) || \ + defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:M*-lua[0-9][0-9]-*) +LUA_VERSION_REQD?= ${PKGNAME_OLD:C/(^.*-|^)lua([0-9][0-9])-.*/\2/} +.endif + .include "../../mk/bsd.prefs.mk" BUILD_DEFS+= LUA_VERSION_DEFAULT |