diff options
author | minskim <minskim@pkgsrc.org> | 2009-01-11 23:15:55 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2009-01-11 23:15:55 +0000 |
commit | e20441ad005d85de4ddcb343498f00c92c0f8e70 (patch) | |
tree | 33848eb22e242dc81e3e4209d3b807cfb0a8a35c /lang | |
parent | 64c64fa8415c4b4f780af968857b0fb640d31175 (diff) | |
download | pkgsrc-e20441ad005d85de4ddcb343498f00c92c0f8e70.tar.gz |
Add module.mk for Lua packages.
Suggested by Aleksey Cheusov on pkgsrc-users@.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/lua/Makefile | 6 | ||||
-rw-r--r-- | lang/lua/module.mk | 28 | ||||
-rw-r--r-- | lang/lua/version.mk | 6 |
3 files changed, 38 insertions, 2 deletions
diff --git a/lang/lua/Makefile b/lang/lua/Makefile index 52aef9614b6..1af6819cc73 100644 --- a/lang/lua/Makefile +++ b/lang/lua/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.38 2008/09/07 14:03:42 wiz Exp $ +# $NetBSD: Makefile,v 1.39 2009/01/11 23:15:55 minskim Exp $ -DISTNAME= lua-5.1.4 +DISTNAME= lua-${LUA_VERSION} CATEGORIES= lang MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \ ftp://ftp.gwdg.de/pub/languages/lua/ \ @@ -16,6 +16,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.lua.org/ COMMENT= Powerful light-weight language for extending applications +.include "../../lang/lua/version.mk" + PKG_INSTALLATION_TYPES= overwrite pkgviews PKG_DESTDIR_SUPPORT= user-destdir diff --git a/lang/lua/module.mk b/lang/lua/module.mk new file mode 100644 index 00000000000..fa330b9c0b5 --- /dev/null +++ b/lang/lua/module.mk @@ -0,0 +1,28 @@ +# $NetBSD: module.mk,v 1.1 2009/01/11 23:15:55 minskim Exp $ +# +# This Makefile fragment is intended to be included by packages that +# install Lua packages. + +.if !defined(LUA_MODULE_MK) +LUA_MODULE_MK= # defined + +.include "../../lang/lua/version.mk" + +_LUA_VERSION= ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} + +LUA_PKGPREFIX= lua +LUA_LDIR= share/lua/${_LUA_VERSION} +PLIST_SUBST+= LUA_LDIR=${LUA_LDIR} + +.if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo]) +DEPENDS+= lua-${_LUA_VERSION}.*:../../lang/lua +.else +LUA_CDIR= lib/lua/${_LUA_VERSION} +PLIST_SUBST+= LUA_CDIR=${LUA_CDIR} + +BUILDLINK_API_DEPENDS.lua+= lua-${_LUA_VERSION}.* + +.include "../../lang/lua/buildlink3.mk" +.endif + +.endif # LUA_MODULE_MK diff --git a/lang/lua/version.mk b/lang/lua/version.mk new file mode 100644 index 00000000000..20bbebe9dc6 --- /dev/null +++ b/lang/lua/version.mk @@ -0,0 +1,6 @@ +# $NetBSD: version.mk,v 1.1 2009/01/11 23:15:55 minskim Exp $ + +LUA_VERSION= 5.1.4 + +LUA_VERSION_MAJOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/} +LUA_VERSION_MINOR= ${LUA_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/} |