aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/lua.mk
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2014-09-29 00:36:31 +0800
committertijl <tijl@FreeBSD.org>2014-09-29 00:36:31 +0800
commite7dc30958a42e788cc3320e65536192f3476ef87 (patch)
treeaeb03f1aa94222d62e9cdc28c4130adb5b0e5327 /Mk/Uses/lua.mk
parentccd08de0500ddc8e427dc1bbf85fc534336cc7f8 (diff)
downloadfreebsd-ports-gnome-e7dc30958a42e788cc3320e65536192f3476ef87.tar.gz
freebsd-ports-gnome-e7dc30958a42e788cc3320e65536192f3476ef87.tar.zst
freebsd-ports-gnome-e7dc30958a42e788cc3320e65536192f3476ef87.zip
Change the way USES is handled:
- Loop over USES twice, once to define all *_ARGS variables and once to include Uses/*.mk. This allows all Uses/*.mk to examine arguments given to other USES entries. - Always define *_ARGS (possibly empty) and replace commas with spaces. Similar for _USES_POST. Adjust all Uses/*.mk: - defined(u_ARGS) becomes !empty(u_ARGS) - Eliminate helper variables like _*_ARGS=${*_ARGS:C/,/ /g} - Some Uses/*.mk used ":" as argument separator instead of ",", but no port used this form - Uses/cran.mk: remove unused variable VALID_ARGS and USES+=fortran which has no effect - Uses/twisted.mk: simplify handling of the case where neither "build" nor "run" arguments have been specified PR: 193931 Exp-run by: antoine Approved by: portmgr (antoine)
Diffstat (limited to 'Mk/Uses/lua.mk')
-rw-r--r--Mk/Uses/lua.mk14
1 files changed, 6 insertions, 8 deletions
diff --git a/Mk/Uses/lua.mk b/Mk/Uses/lua.mk
index 2c89c99fd209..b87d90128415 100644
--- a/Mk/Uses/lua.mk
+++ b/Mk/Uses/lua.mk
@@ -15,21 +15,19 @@ _LUA_DEFAULT_VERSION= ${LUA_DEFAULT:S/.//}
IGNORE= Invalid lua version ${LUA_DEFAULT}
.endif
-_LUA_ARGS= ${lua_ARGS:S/,/ /g}
-
#
# Parse a ver+ argument
#
-.if ${_LUA_ARGS:M*+}
-_LUA_MIN_VERSION:= ${_LUA_ARGS:M*+:S/+//}
+.if ${lua_ARGS:M*+}
+_LUA_MIN_VERSION:= ${lua_ARGS:M*+:S/+//}
_LUA_WANTED_VERSION:= ${_LUA_DEFAULT_VERSION}
.endif
#
# Parse one or more ver arguments
#
-.if ${_LUA_ARGS:M5[1-2]}
-_LUA_WANTED_VERSIONS:= ${_LUA_ARGS:M5[1-2]}
+.if ${lua_ARGS:M5[1-2]}
+_LUA_WANTED_VERSIONS:= ${lua_ARGS:M5[1-2]}
.endif
#
@@ -95,9 +93,9 @@ MAKE_ENV+= LUA_MODLIBDIR=${LUA_MODLIBDIR} \
LUA_INCDIR=${LUA_INCDIR} \
LUA_LIBDIR=${LUA_LIBDIR}
-.if ${_LUA_ARGS:Mbuild}
+.if ${lua_ARGS:Mbuild}
BUILD_DEPENDS+= ${LUA_CMD}:${PORTSDIR}/lang/lua${LUA_VER_STR}
-.elfif ${_LUA_ARGS:Mrun}
+.elfif ${lua_ARGS:Mrun}
RUN_DEPENDS+= ${LUA_CMD}:${PORTSDIR}/lang/lua${LUA_VER_STR}
.else
LIB_DEPENDS+= liblua-${LUA_VER}.so:${PORTSDIR}/lang/lua${LUA_VER_STR}