Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

View File

@@ -1,4 +1,4 @@
# $NetBSD: application.mk,v 1.3 2013/10/30 09:09:59 obache Exp $
# $NetBSD: application.mk,v 1.4 2014/05/03 13:00:44 alnsn Exp $
#
# This makefile fragment is intended to be included by packages that
# install Lua scripts.
@@ -11,11 +11,13 @@
# Keywords: Lua
#
.if !defined(LUA_LUAVERSION_MK)
.include "../../lang/lua/luaversion.mk"
.endif
.if defined(REPLACE_LUA)
REPLACE_INTERPRETER+= lua
REPLACE.lua.old= .*lua
REPLACE.lua.new= ${LOCALBASE}/bin/lua
REPLACE.lua.new= ${LUA_INTERPRETER}
REPLACE_FILES.lua= ${REPLACE_LUA}
.endif

View File

@@ -1,4 +1,4 @@
# $NetBSD: luaversion.mk,v 1.4 2013/11/05 11:26:44 obache Exp $
# $NetBSD: luaversion.mk,v 1.9 2015/02/16 10:52:34 jperkin Exp $
# This file determins which Lua version is used as a dependency for
# a package.
@@ -8,7 +8,7 @@
# LUA_VERSION_DEFAULT
# The preferred lua version to use.
#
# Possible values: 51 52
# Possible values: 51 52 53
# Default: 52
#
# === Infrastructure variables ===
@@ -27,13 +27,13 @@
# is significant; those listed earlier are preferred over those
# listed later.
#
# Possible values: 51 52
# Default: 52 51
# Possible values: 51 52 53
# Default: 52 53 51
#
# LUA_VERSIONS_INCOMPATIBLE
# The Lua versions that the package *cannot* build against.
#
# Possible values: 51 52
# Possible values: 51 52 53
# Default: <empty>
#
# LUA_SELF_CONFLICT
@@ -47,19 +47,40 @@
#
# Example: lua51
#
# LUA_INCDIR
# Relative path to include files.
#
# Example: include/lua-51
#
# LUA_INTERPRETER
# Full path to Lua interpreter.
#
# LUA_COMPILER
# Full path to Lua bytecode compiler (luac).
#
# Keywords: Lua
#
.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
BUILD_DEFS_EFFECTS+= LUA_PACKAGE
LUA_VERSION_DEFAULT?= 52
LUA_VERSIONS_ACCEPTED?= 52 51
LUA_VERSIONS_ACCEPTED?= 52 53 51
LUA_VERSIONS_INCOMPATIBLE?=# empty
#
@@ -111,6 +132,12 @@ LUA_PKGSRCDIR= ../../lang/lua52
LUA_PKGPREFIX= lua52
LUA_BASEDEPENDS= lua52>=5.2<5.3:${LUA_PKGSRCDIR}
.elif ${_LUA_VERSION} == "53"
LUA_PACKAGE= lua53
LUA_PKGSRCDIR= ../../lang/lua53
LUA_PKGPREFIX= lua53
LUA_BASEDEPENDS= lua53>=5.3<5.4:${LUA_PKGSRCDIR}
.elif ${_LUA_VERSION} == "51"
LUA_PACKAGE= lua51
LUA_PKGSRCDIR= ../../lang/lua51
@@ -127,4 +154,8 @@ PKG_FAIL_REASION+= "No valid Lua version found"
.include "${LUA_PKGSRCDIR}/version.mk"
_LUA_DOT_VERSION= ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
LUA_INCDIR= include/lua-${_LUA_DOT_VERSION}
LUA_INTERPRETER= ${LOCALBASE}/bin/lua${_LUA_DOT_VERSION}
LUA_COMPILER= ${LOCALBASE}/bin/luac${_LUA_DOT_VERSION}
.endif # LUA_LUAVERSION_MK

View File

@@ -1,16 +1,39 @@
# $NetBSD: module.mk,v 1.5 2013/10/30 06:18:09 dholland Exp $
# $NetBSD: module.mk,v 1.7 2015/03/05 14:15:45 ryoon 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,18 @@ 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}
LDFLAGS.Cygwin+= -llua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}
.endif # LUA_MODULE_MK

38
lang/lua/tool.mk Normal file
View File

@@ -0,0 +1,38 @@
# $NetBSD: tool.mk,v 1.1 2014/05/03 13:00:44 alnsn Exp $
#
# Create `lua' interpreter wrapper for applicable Lua bin.
#
# This mk fragment can be included in all packages that uses `lua'
# as a tool without version suffix.
#
# Keywords: Lua
#
.if !defined(LUA_TOOL_MK)
LUA_TOOL_MK= defined
.if !defined(LUA_LUAVERSION_MK)
.include "../../lang/lua/luaversion.mk"
.endif
BUILDLINK_TARGETS+= buildlink-bin-lua buildlink-bin-luac
.PHONY: buildlink-bin-lua
buildlink-bin-lua:
${RUN} \
f="${LUA_INTERPRETER}"; \
t="${BUILDLINK_DIR}/bin/lua"; \
if ${TEST} -f $$f -a ! -f $$t ; then \
${LN} -sf $$f $$t; \
fi
.PHONY: buildlink-bin-luac
buildlink-bin-luac:
${RUN} \
f="${LUA_COMPILER}"; \
t="${BUILDLINK_DIR}/bin/luac"; \
if ${TEST} -f $$f -a ! -f $$t ; then \
${LN} -sf $$f $$t; \
fi
.endif # LUA_TOOL_MK