summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/deps.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/deps.sh b/lib/deps.sh
index b4eda95..a1b0010 100644
--- a/lib/deps.sh
+++ b/lib/deps.sh
@@ -240,3 +240,35 @@ _ob_dep_arch_is_concerned()
_ob_return ${_obdaic_seen_arch}
return ${?}
}
+
+_ob_dep_plat_is_concerned()
+{
+ _ob_local _obdpic_host_plat _obdpic_plats \
+ _obdpic_plat _obdpic_not_plat _obdpic_seen_plat
+
+ _obdpic_host_plat="${1}"
+ _obdpic_plats="${2}"
+ _obdpic_seen_plat=1
+
+ if [ -z "${_obdpic_plats}" ]; then
+ _obdpic_seen_plat=0
+ fi
+
+ for _obdpic_plat in ${_obdpic_plats}; do
+ _obdpic_not_plat="${_obdpic_plat#!}"
+ if [ "${_obdpic_not_plat}" != "${_obdpic_plat}" ]; then
+ if ob_match_plat "${_obdpic_host_plat}" "${_obdpic_not_plat}"; then
+ _obdpic_seen_plat=1
+ break
+ else
+ _obdpic_seen_plat=0
+ fi
+ elif ob_match_plat "${_obdpic_host_plat}" "${_obdpic_plat}"; then
+ _obdpic_seen_plat=0
+ break
+ fi
+ done
+
+ _ob_return ${_obdpic_seen_plat}
+ return ${?}
+}