diff options
author | alepulver <alepulver@FreeBSD.org> | 2007-01-01 09:10:42 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2007-01-01 09:10:42 +0800 |
commit | 635392539f8ae3f3e873bdd3233869c6684db7f7 (patch) | |
tree | 755e484e28c9eb7afc26c59ad225fb6af1690cf9 /Mk/bsd.lua.mk | |
parent | 17d0430a0a3f349484f0f17c6e32018d8bc50a43 (diff) | |
download | freebsd-ports-gnome-635392539f8ae3f3e873bdd3233869c6684db7f7.tar.gz freebsd-ports-gnome-635392539f8ae3f3e873bdd3233869c6684db7f7.tar.zst freebsd-ports-gnome-635392539f8ae3f3e873bdd3233869c6684db7f7.zip |
- If multiple versions are allowed and some do not have the required
components, remove them instead of producing an error.
- Do not add invalid dependencies in addition to setting IGNORE.
Diffstat (limited to 'Mk/bsd.lua.mk')
-rw-r--r-- | Mk/bsd.lua.mk | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/Mk/bsd.lua.mk b/Mk/bsd.lua.mk index ae851b6dfe91..9df47e1d5ec3 100644 --- a/Mk/bsd.lua.mk +++ b/Mk/bsd.lua.mk @@ -267,6 +267,31 @@ _LUA_VER_INSTALLED:= ${_HAVE_LUA:Mlua-*:S/lua-//} .if defined(_LUA_Need_Version) _LUA_Version_Done= yes +# +# Basic component parsing (ignores dependency types). +# +# The variables used are: +# _LUA_COMP - Component part. +# _LUA_COMPS_FINAL - Final list of components. +# + +# Detect duplicated components. + +_LUA_COMPS_FINAL= # +.for comp in ${LUA_COMPS} +_LUA_COMP= ${comp:C/:([[:alpha:]]+)$//} +. for __LUA_COMP in ${_LUA_COMP} +. if ${_LUA_COMPS_ALL:M${__LUA_COMP}} == "" +IGNORE?= selected an invalid Lua component: ${__LUA_COMP} +. endif +. endfor +. for newcomp in ${_LUA_COMP} +. if ${_LUA_COMPS_FINAL:M${newcomp}} == "" +_LUA_COMPS_FINAL+= ${newcomp} +. endif +. endfor +.endfor + # Set defaults (if one isn't present). USE_LUA?= ${_LUA_VERS_ALL} @@ -336,6 +361,22 @@ _LUA_VER_INSTALLED:= ${_LUA_VER_INSTALLED:N${ver}} IGNORE?= selected a null or invalid Lua version .endif +# Avoid versions which have unavailable components. + +.for ver in ${_LUA_VER_FINAL} +. for comp in ${_LUA_COMPS_FINAL} +. if !defined(_LUA_PORT_${comp}_${ver}) +_LUA_WRONG_COMPS+= ${comp} +_LUA_WRONG_VERS+= ${ver} +_LUA_VER_FINAL:= ${_LUA_VER_FINAL:N${ver}} +. endif +. endfor +.endfor + +.if empty(_LUA_VER_FINAL) +IGNORE?= selected Lua versions (${_LUA_WRONG_VERS}) which do not have the selected components (${_LUA_WRONG_COMPS}) +.endif + # # Choose final version. # @@ -431,7 +472,7 @@ IGNORE?= selected an invalid Lua dependency type: ${__LUA_DEP_TYPE} IGNORE?= selected a Lua component (${_LUA_COMP}) which is not available for the selected version (${_LUA_VER}) . endif . for newcomp in ${_LUA_COMP_NEW} -. if ${_LUA_COMPS_FINAL:M${newcomp}} == "" +. if ${_LUA_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) _LUA_COMPS_FINAL+= ${newcomp} . endif . endfor |