From cd78793d2fe5c61a356e826c12667ec06204519c Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 29 Jan 2012 23:25:33 -0500 Subject: Handle platforms in oh_is_buildable(). --- diff --git a/lib/architecture b/lib/architecture index 4af24ef..daf8fff 100644 --- a/lib/architecture +++ b/lib/architecture @@ -25,11 +25,15 @@ oh_is_buildable() { _pkgarch=$(oh_get_field "${1}" Architecture) + # "all" or "any". if [ "${_pkgarch}" = all -o "${_pkgarch}" = any ]; then return 0 fi - # XXX: Handle platforms. + # Platform. + if [ -n "$(echo "${_pkgarch}" | grep -E '^[^-]+$')" ]; then + return [ "${_pkgarch}" = "${OH_PLATFORM}" ] + fi # Tokenize the 4-tuple binary architecture. IFS=- read _pkgcpu _pkgvendor _pkgkernel _pkglibs <