diff options
author | alnsn <alnsn> | 2014-05-03 13:00:44 +0000 |
---|---|---|
committer | alnsn <alnsn> | 2014-05-03 13:00:44 +0000 |
commit | dd233a41a005c53065a118915e70642687b4ec78 (patch) | |
tree | c339de9879e29da7d839e2bc71a8658a92217e0b /lang/lua/module.mk | |
parent | 226b64c3421b1742411700f9fa9c613ed23ea51c (diff) | |
download | pkgsrc-dd233a41a005c53065a118915e70642687b4ec78.tar.gz |
Multiversion support for Lua.
Diffstat (limited to 'lang/lua/module.mk')
-rw-r--r-- | lang/lua/module.mk | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/lang/lua/module.mk b/lang/lua/module.mk index 83128cb68d4..62b05d17c77 100644 --- a/lang/lua/module.mk +++ b/lang/lua/module.mk @@ -1,16 +1,39 @@ -# $NetBSD: module.mk,v 1.5 2013/10/30 06:18:09 dholland Exp $ +# $NetBSD: module.mk,v 1.6 2014/05/03 13:00:44 alnsn Exp $ # # This Makefile fragment is intended to be included by packages that -# install Lua packages. +# install Lua modules. +# +# === Defined variables === +# +# LUA_LDIR +# Path where Lua modules are installed. +# +# LUA_CDIR +# Path where Lua C modules are installed. Not defined if +# NO_BUILD variable is set to "yes". +# +# LUA_DOCDIR +# Path where documentation files are installed. +# +# LUA_EXAMPLESDIR +# Path where example files are installed. +# +# Keywords: lua +# .if !defined(LUA_MODULE_MK) LUA_MODULE_MK= # defined +.if !defined(LUA_LUAVERSION_MK) .include "../../lang/lua/luaversion.mk" +.endif LUA_LDIR= share/lua/${_LUA_DOT_VERSION} PLIST_SUBST+= LUA_LDIR=${LUA_LDIR} +PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \ + { gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}") } + .if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo]) DEPENDS+= ${LUA_BASEDEPENDS} @@ -18,12 +41,16 @@ DEPENDS+= ${LUA_BASEDEPENDS} LUA_CDIR= lib/lua/${_LUA_DOT_VERSION} PLIST_SUBST+= LUA_CDIR=${LUA_CDIR} -PRINT_PLIST_AWK+= /^${LUA_LDIR:S|/|\\/|g}/ \ - { gsub(/${LUA_LDIR:S|/|\\/|g}/, "$${LUA_LDIR}") } PRINT_PLIST_AWK+= /^${LUA_CDIR:S|/|\\/|g}/ \ { gsub(/${LUA_CDIR:S|/|\\/|g}/, "$${LUA_CDIR}") } .include "${LUA_PKGSRCDIR}/buildlink3.mk" .endif +LUA_DOCDIR= share/doc/${PKGBASE} +PLIST_SUBST+= LUA_DOCDIR=${LUA_DOCDIR} + +LUA_EXAMPLESDIR= share/examples/${PKGBASE} +PLIST_SUBST+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR} + .endif # LUA_MODULE_MK |