summaryrefslogtreecommitdiff
path: root/lang/lua/module.mk
diff options
context:
space:
mode:
authordholland <dholland>2013-10-30 06:18:09 +0000
committerdholland <dholland>2013-10-30 06:18:09 +0000
commit7265b7b81e740370bcc9e7eb3c60fc965b384aec (patch)
treea9c8d91a9a039b3bcdf7db23e51528c61b9b5c79 /lang/lua/module.mk
parentedc2c9f990d2978568f57b06d0eca2b7496ef910 (diff)
downloadpkgsrc-7265b7b81e740370bcc9e7eb3c60fc965b384aec.tar.gz
Reimport lang/lua as lang/lua52, and bring back the previous Lua 5.1
package as lang/lua51. I've adjusted the depends and switched the PKGNAMEs but these packages are otherwise unchanged. This means that you can't install both at once. There are preliminary patches for that (see tech-pkg) but they aren't quite ready yet. This also doesn't include agc's builtin.mk, although it should be possible to drop it into the lua51 package with only very minor modifications. I don't think the builtin packages will allow having one builtin.mk for both lua51 and lua52, but I'd be happy to be shown wrong about that. Add infrastructure support for Lua module packages (including multiversion support), application packages written in Lua, and a redirecting bl3.mk file for packages that just link Lua in. This is based on the Python infrastructure. The new variable LUA_VERSION_DEFAULT picks which Lua package you get by default; it is set to 52 so as to maintain the status quo. Packages can set LUA_VERSIONS_ACCEPTED and/or LUA_VERSIONS_INCOMPATIBLE. I have found (I think) most or all the packages that don't work with lua51 and will be marking those; I have not tracked down most of the ones that don't work with lua52 yet as I was originally intending to roll back to 5.1 as the default.
Diffstat (limited to 'lang/lua/module.mk')
-rw-r--r--lang/lua/module.mk18
1 files changed, 7 insertions, 11 deletions
diff --git a/lang/lua/module.mk b/lang/lua/module.mk
index d29d36fe90f..83128cb68d4 100644
--- a/lang/lua/module.mk
+++ b/lang/lua/module.mk
@@ -1,4 +1,4 @@
-# $NetBSD: module.mk,v 1.4 2013/09/17 12:03:09 joerg Exp $
+# $NetBSD: module.mk,v 1.5 2013/10/30 06:18:09 dholland Exp $
#
# This Makefile fragment is intended to be included by packages that
# install Lua packages.
@@ -6,18 +6,16 @@
.if !defined(LUA_MODULE_MK)
LUA_MODULE_MK= # defined
-.include "../../lang/lua/version.mk"
+.include "../../lang/lua/luaversion.mk"
-_LUA_VERSION= ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
-
-LUA_PKGPREFIX= lua
-LUA_LDIR= share/lua/${_LUA_VERSION}
+LUA_LDIR= share/lua/${_LUA_DOT_VERSION}
PLIST_SUBST+= LUA_LDIR=${LUA_LDIR}
.if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo])
-DEPENDS+= lua-${_LUA_VERSION}.*:../../lang/lua
+DEPENDS+= ${LUA_BASEDEPENDS}
+
.else
-LUA_CDIR= lib/lua/${_LUA_VERSION}
+LUA_CDIR= lib/lua/${_LUA_DOT_VERSION}
PLIST_SUBST+= LUA_CDIR=${LUA_CDIR}
PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \
@@ -25,9 +23,7 @@ PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \
PRINT_PLIST_AWK+= /^${LUA_CDIR:S|/|\\/|g}/ \
{ gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}") }
-BUILDLINK_API_DEPENDS.lua+= lua-${_LUA_VERSION}.*
-
-.include "../../lang/lua/buildlink3.mk"
+.include "${LUA_PKGSRCDIR}/buildlink3.mk"
.endif
.endif # LUA_MODULE_MK