system/wine: Make tests for lowercase options. No BUILD bump.

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Dave Woodfall 2023-04-07 02:25:42 +01:00 committed by Willy Sudiarto Raharjo
parent 7e1ca77169
commit 930399112a
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 17 additions and 9 deletions

View file

@ -10,14 +10,14 @@ This SlackBuild will try to autodetect whether to build for 32 or 64
bits or both. WINE64 and WINE32 can be used to enable/disable each
ARCH:
WINE64=NO ./wine.SlackBuild
WINE32=NO ./wine.SlackBuild
WINE64=no ./wine.SlackBuild
WINE32=no ./wine.SlackBuild
The executable for 64 bit wine is named wine64.
To disable OpenGL support, use:
OPENGL=NO ./wine.SlackBuild
OPENGL=no ./wine.SlackBuild
The above options can be combined.

View file

@ -53,19 +53,27 @@ fi
# If your video card does not support hardware accelerated OpenGL,
# then run the script like: OPENGL=NO ./wine.SlackBuild
if [ "${OPENGL:-YES}" = "YES" ]; then
# Make lowercase
OPENGL=${OPENGL@L}
if [ "${OPENGL:-yes}" = "yes" ]; then
do_opengl="with"
else
do_opengl="without"
fi
# Find which ARCHs to build for
# Make lowercase
WINE32=${WINE32@L}
WINE64=${WINE64@L}
WINETMP="$( mktemp -d $TMP/wine-test-XXXXXX )"
echo "int main(void) {; return(0); }" > "$WINETMP/test.c"
gcc -m32 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE32=${WINE32:-YES}
gcc -m64 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE64=${WINE64:-YES}
gcc -m32 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE32=${WINE32:-yes}
gcc -m64 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE64=${WINE64:-yes}
rm -rf "$WINETMP"
if [ "${WINE32:-NO}${WINE64:-NO}" = "NONO" ]; then
if [ "$WINE32$WINE64" = "nono" ]; then
echo "Both 64 and 32 bit builds disabled. Nothing to do."
exit 1
fi
@ -109,7 +117,7 @@ find -L . \
# Fix for flex
patch -p1 --verbose < $CWD/0001-winhlp32-Workaround-a-bug-in-Flex.patch
if [ "${WINE64:-NO}" = "YES" ]; then
if [ "$WINE64" = "yes" ]; then
wine64="--with-wine64=../wine64"
mkdir wine64
cd wine64
@ -138,7 +146,7 @@ if [ "${WINE64:-NO}" = "YES" ]; then
cd ..
fi
if [ "${WINE32:-NO}" = "YES" ]; then
if [ "$WINE32" = "yes" ]; then
mkdir wine32
cd wine32
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:$PKG_CONFIG_PATH"