From 7f0499ef2ca638c5f0529cee6398ce0ee3ea6c58 Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 8 Jan 2020 20:36:19 +0100 Subject: [PATCH] sam: generalize 32/64-bit distinction --- srcpkgs/sam/template | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/srcpkgs/sam/template b/srcpkgs/sam/template index 04ad1094ebf..fadad8d03c8 100644 --- a/srcpkgs/sam/template +++ b/srcpkgs/sam/template @@ -19,15 +19,14 @@ post_extract() { sed -i '/Straddc/s/int/wchar_t/g' sam/sam.h } do_build() { - case "$XBPS_TARGET_MACHINE" in - i686*|armv*) USE64BITS=0;; - x86_64*|aarch64*|ppc64*) USE64BITS=1;; - *) msg_error "Unknown word length for $XBPS_TARGET_MACHINE";; - esac + local use64bits=0 + if [ "$XBPS_TARGET_WORDSIZE" = "64" ]; then + use64bits=1 + fi make ${makejobs} CC="${CC} ${CFLAGS}" DESTDIR=/usr LDFLAGS="$LDFLAGS" \ INCLUDES=-I${XBPS_CROSS_BASE}/usr/include/freetype2 \ - RXSAMNAME=rsam TERMNAME=/usr/bin/samterm USE64BITS=${USE64BITS} + RXSAMNAME=rsam TERMNAME=/usr/bin/samterm USE64BITS=${use64bits} } do_install() {