When a package is included, that will not be built based on the
PKG_ARCH, e.g. package is for x86_64 only, but target is aarch64, the
dependencies of this (omitted) package will be pulled into the build,
which can waste time/resources.
This change checks if the PKG_ARCH excludes the package from building
(same as e.g. scripts/build does) and clears the dependencies of such
package.