diff options
-rw-r--r-- | lib/architecture | 6 | ||||
-rw-r--r-- | src/opkbuild | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/architecture b/lib/architecture index 3e80e82..79f3dbb 100644 --- a/lib/architecture +++ b/lib/architecture @@ -35,16 +35,14 @@ oh_is_buildable() return [ "${_pkgarch}" = "${OH_PLATFORM}" ] fi - # Tokenize the 4-tuple binary architecture. - IFS=- read _pkgcpu _pkgvendor _pkgkernel _pkglibs <<EOF + # Tokenize the 3-tuple binary architecture. + IFS=- read _pkgcpu _pkgkernel _pkglibs <<EOF ${_pkgarch} EOF # Test each element of the tuple. [ "${_pkgcpu}" != any -a "${_pkgcpu}" != "${OH_ARCH_CPU}" ] && return 1 - [ "${_pkgvendor}" != any -a "${_pkgvendor}" != "${OH_ARCH_VENDOR}" ] && - return 1 [ "${_pkgkernel}" != any -a "${_pkgkernel}" != "${OH_ARCH_KERNEL}" ] && return 1 [ "${_pkglibs}" != any -a "${_pkglibs}" != "${OH_ARCH_LIBS}" ] && diff --git a/src/opkbuild b/src/opkbuild index 2c0d3f0..22ea79d 100644 --- a/src/opkbuild +++ b/src/opkbuild @@ -121,7 +121,7 @@ fi # Attempt to detect the target architecture tuple. # NB: Currently cross-compiling is not supported. arch=$(opkg print-architecture | sed -n \ - 's/^arch \([^ -][^ -]*-[^ -][^ -]*-[^ -][^ -]*-[^ -][^ -]*\) [0-9][0-9]*$/\1/p') + 's/^arch \([^ -][^ -]*-[^ -][^ -]*-[^ -][^ -]*\) [0-9][0-9]*$/\1/p') if [ -z "${arch}" ]; then printf 'opkbuild: Error: No installable architecture found\n' >&2 elif [ $(echo "${arch}" | wc -l) -gt 1 ]; then @@ -141,10 +141,10 @@ version=$(oh_get_field Version) # Set environment variables for the build configuration. export OH_PLATFORM="${platform}" export OH_ARCH="${arch}" -IFS=- read OH_ARCH_CPU OH_ARCH_VENDOR OH_ARCH_KERNEL OH_ARCH_LIBS <<EOF +IFS=- read OH_ARCH_CPU OH_ARCH_KERNEL OH_ARCH_LIBS <<EOF ${OH_ARCH} EOF -export OH_ARCH_CPU OH_ARCH_VENDOR OH_ARCH_KERNEL OH_ARCH_LIBS +export OH_ARCH_CPU OH_ARCH_KERNEL OH_ARCH_LIBS export OH_SRCPKG="${srcpkg}" export OH_PKGVER=${version} |