From 096f82d7d70dba16119ce5dc5b887df32356ca5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 18 May 2023 10:28:51 +0700
Subject: [PATCH] wine: needs LFS

---
 srcpkgs/wine/template | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/wine/template b/srcpkgs/wine/template
index 964d9581d8d..7877166ba57 100644
--- a/srcpkgs/wine/template
+++ b/srcpkgs/wine/template
@@ -57,15 +57,14 @@ lib32depends="libXi-32bit>=0 libXinerama-32bit>=0 libXcomposite-32bit>=0
 # This testsuite might hang indefinitely
 make_check=extended
 
-case $XBPS_TARGET_MACHINE in
-	x86_64*) configure_args+=" --enable-win64 --libdir=/usr/lib"
-		_wine_suffix="64"
-		_wineserver_suffix=${_wine_suffix}
-		;;
-	*)
-		_wineserver_suffix="32"
-		;;
-esac
+if [ "$XBPS_TARGET_WORDSIZE" != 32 ]; then
+	configure_args+=" --enable-win64 --libdir=/usr/lib"
+	_wine_suffix="64"
+	_wineserver_suffix=${_wine_suffix}
+else
+	_wineserver_suffix="32"
+	CFLAGS=" -D_LARGE_FILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"
+fi
 
 if [ "$XBPS_LIBC" = "glibc" ]; then
 	hostmakedepends+=" prelink"