pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/lua Auto detect lua version from required package...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a0827d89a210
branches: trunk
changeset: 642906:a0827d89a210
user: obache <obache%pkgsrc.org@localhost>
date: Sun Dec 07 05:10:43 2014 +0000
description:
Auto detect lua version from required package name.
resolve PR pkg/49318
diffstat:
lang/lua/luaversion.mk | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 19d199bc5209 -r a0827d89a210 lang/lua/luaversion.mk
--- a/lang/lua/luaversion.mk Sun Dec 07 05:09:02 2014 +0000
+++ b/lang/lua/luaversion.mk Sun Dec 07 05:10:43 2014 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index