aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.wx.mk
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2007-01-01 09:04:07 +0800
committeralepulver <alepulver@FreeBSD.org>2007-01-01 09:04:07 +0800
commit7614ae242ae535916e44b2805cf2ec35726226dd (patch)
treea42accff6cefb54e515d3a296343a881ed1a7401 /Mk/bsd.wx.mk
parenteab7a09fc9e69f8aa31a00cf9a0d428a0d63b1d9 (diff)
downloadfreebsd-ports-gnome-7614ae242ae535916e44b2805cf2ec35726226dd.tar.gz
freebsd-ports-gnome-7614ae242ae535916e44b2805cf2ec35726226dd.tar.zst
freebsd-ports-gnome-7614ae242ae535916e44b2805cf2ec35726226dd.zip
- Remove _WX_ILLEGAL_VERS_* and introduce a new way of handling it.
- Do not add invalid dependencies in addition to setting IGNORE.
Diffstat (limited to 'Mk/bsd.wx.mk')
-rw-r--r--Mk/bsd.wx.mk72
1 files changed, 42 insertions, 30 deletions
diff --git a/Mk/bsd.wx.mk b/Mk/bsd.wx.mk
index 619d32dfddba..0a2b6cefbf6a 100644
--- a/Mk/bsd.wx.mk
+++ b/Mk/bsd.wx.mk
@@ -136,14 +136,6 @@ _WX_VERS_ALL= 2.4 2.6 2.8
_WX_VERS_UC_ALL= 2.6 2.8
_WX_VERS_LISTS= WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED
-# _WX_ILLEGAL_VERS_PYTHON - List of versions where wxPython is not available
-# _WX_ILLEGAL_VERS_MOZILLA - List of versions where wxmozilla is not available
-# _WX_ILLEGAL_VERS_SVG - List of versions where wxsvg is not available
-
-_WX_ILLEGAL_VERS_PYTHON= 2.8
-_WX_ILLEGAL_VERS_MOZILLA= 2.6 2.8
-_WX_ILLEGAL_VERS_SVG= 2.4 2.8
-
#
# Variables used to determine what is needed:
# _WX_PORT_comp_ver - Port directory.
@@ -317,6 +309,31 @@ _WX_VER_INSTALLED:= ${_HAVE_WX:Mwx-*:S/wx-//}
.if defined(_WX_Need_Version)
_WX_Version_Done= yes
+#
+# Basic component parsing (ignores dependency types).
+#
+# The variables used are:
+# _WX_COMP - Component part.
+# _WX_COMPS_FINAL - Final list of components.
+#
+
+# Detect duplicated components.
+
+_WX_COMPS_FINAL= #
+.for comp in ${WX_COMPS}
+_WX_COMP= ${comp:C/:([[:alpha:]]+)$//}
+. for __WX_COMP in ${_WX_COMP}
+. if ${_WX_COMPS_ALL:M${__WX_COMP}} == ""
+IGNORE?= selected an invalid WxWidgets component: ${__WX_COMP}
+. endif
+. endfor
+. for newcomp in ${_WX_COMP}
+. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE)
+_WX_COMPS_FINAL+= ${newcomp}
+. endif
+. endfor
+.endfor
+
# Set defaults (if one isn't present).
USE_WX?= ${_WX_VERS_ALL}
@@ -378,6 +395,22 @@ _WX_VER_MERGED+= ${ver}
IGNORE?= selected a null or invalid WxWidgets version
.endif
+# Avoid versions which have unavailable components.
+
+.for ver in ${_WX_VER_MERGED}
+. for comp in ${_WX_COMPS_FINAL}
+. if !defined(_WX_PORT_${comp}_${ver})
+_WX_WRONG_COMPS+= ${comp}
+_WX_WRONG_VERS+= ${ver}
+_WX_VER_MERGED:= ${_WX_VER_MERGED:N${ver}}
+. endif
+. endfor
+.endfor
+
+.if empty(_WX_VER_MERGED)
+IGNORE?= selected WxWidgets versions (${_WX_WRONG_VERS}) which do not have the selected components (${_WX_WRONG_COMPS})
+.endif
+
#
# Unicode support.
#
@@ -425,27 +458,6 @@ _WX_UCL= #
_WX_PYSUFX= -ansi
.endif
-# Limit range of possible versions for python, svg and mozila
-
-.for comp in ${WX_COMPS}
-_WX_COMP= ${comp}
-. if ${_WX_COMP} == "python"
-. for excl in ${_WX_ILLEGAL_VERS_PYTHON}
-_WX_VER_FINAL:= ${_WX_VER_FINAL:S/${excl}//}
-. endfor
-. endif
-. if ${_WX_COMP} == "mozilla"
-. for excl in ${_WX_ILLEGAL_VERS_MOZILLA}
-_WX_VER_FINAL:= ${_WX_VER_FINAL:S/${excl}//}
-. endfor
-. endif
-. if ${_WX_COMP} == "svg"
-. for excl in ${_WX_ILLEGAL_VERS_SVG}
-_WX_VER_FINAL:= ${_WX_VER_FINAL:S/${excl}//}
-. endfor
-. endif
-.endfor
-
# Remove unusable installed versions.
.for ver in ${_WX_VER_INSTALLED}
@@ -531,7 +543,7 @@ IGNORE?= selected an invalid WxWidgets dependency type: ${__WX_DEP_TYPE}
IGNORE?= selected a WxWidgets component (${_WX_COMP}) which is not available for the selected version (${_WX_VER})
. endif
. for newcomp in ${_WX_COMP_NEW}
-. if ${_WX_COMPS_FINAL:M${newcomp}} == ""
+. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE)
_WX_COMPS_FINAL+= ${newcomp}
. endif
. endfor