diff options
author | tijl <tijl@FreeBSD.org> | 2014-09-29 00:36:31 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2014-09-29 00:36:31 +0800 |
commit | e7dc30958a42e788cc3320e65536192f3476ef87 (patch) | |
tree | aeb03f1aa94222d62e9cdc28c4130adb5b0e5327 /Mk/Uses/tcl.mk | |
parent | ccd08de0500ddc8e427dc1bbf85fc534336cc7f8 (diff) | |
download | freebsd-ports-graphics-e7dc30958a42e788cc3320e65536192f3476ef87.tar.gz freebsd-ports-graphics-e7dc30958a42e788cc3320e65536192f3476ef87.tar.zst freebsd-ports-graphics-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/tcl.mk')
-rw-r--r-- | Mk/Uses/tcl.mk | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Mk/Uses/tcl.mk b/Mk/Uses/tcl.mk index fa3528a37ec..74a831d0fbe 100644 --- a/Mk/Uses/tcl.mk +++ b/Mk/Uses/tcl.mk @@ -86,29 +86,24 @@ IGNORE= Invalid tcltk version ${TCLTK_DEFAULT} _TCLTK_PORT?= tcl # -# Build a make(1)-friendly list of arguments (i.e., space separated). -# -_TCL_ARGS= ${tcl_ARGS:S/,/ /g} - -# # Parse a ver+ argument. # -.if ${_TCL_ARGS:M*+} -_TCLTK_MIN_VERSION:= ${_TCL_ARGS:M*+:S/+//} +.if ${tcl_ARGS:M*+} +_TCLTK_MIN_VERSION:= ${tcl_ARGS:M*+:S/+//} _TCLTK_WANTED_VERSIONS:=${_TCLTK_DEFAULT_VERSION} .endif # # Parse one or more ver arguments. # -.if ${_TCL_ARGS:M8[4-6]} -_TCLTK_WANTED_VERSIONS:=${_TCL_ARGS:M8[4-6]} +.if ${tcl_ARGS:M8[4-6]} +_TCLTK_WANTED_VERSIONS:=${tcl_ARGS:M8[4-6]} .endif # # It makes little sense to specify both the wrapper and a specific version. # -.if ${_TCL_ARGS:Mwrapper} && defined(_TCLTK_WANTED_VERSIONS) +.if ${tcl_ARGS:Mwrapper} && defined(_TCLTK_WANTED_VERSIONS) IGNORE= USES=${_TCLTK_PORT}: it is not possible to specify both a version and the wrapper: ${tcl_ARGS} .endif @@ -175,7 +170,7 @@ _TCLTK_RUN_DEPENDS= _TCLTK_LIB_DEPENDS= # Construct the correct dependency lines (wrapper) -.if ${_TCL_ARGS:Mwrapper} +.if ${tcl_ARGS:Mwrapper} . if ${_TCLTK_PORT} == "tcl" _TCLTK_WRAPPER_PORT= tclsh:${PORTSDIR}/lang/tcl-wrapper . elif ${_TCLTK_PORT} == "tk" @@ -192,10 +187,10 @@ _TCLTK_EXE_LINE= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${_TCLTK_WANTED_VERSIO _TCLTK_LIB_LINE= libtk${TK_SHLIB_VER}.so:${PORTSDIR}/x11-toolkits/tk${_TCLTK_WANTED_VERSION} .endif -.if ${_TCL_ARGS:Mbuild} +.if ${tcl_ARGS:Mbuild} BUILD_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} -.elif ${_TCL_ARGS:Mrun} +.elif ${tcl_ARGS:Mrun} RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} .else |