aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Woodfall <dave@slackbuilds.org>2023-04-07 02:25:42 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-08 09:16:26 +0700
commit930399112ae91cd4a301450b81b20d48da2a8252 (patch)
tree8f21277ceda3c2cb771e1d7c7a8c6329642b8e3a
parent7e1ca77169440e1b8cc1d9bced7ee3938faa6a07 (diff)
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>
-rw-r--r--system/wine/README6
-rw-r--r--system/wine/wine.SlackBuild20
2 files changed, 17 insertions, 9 deletions
diff --git a/system/wine/README b/system/wine/README
index fcddb6cdae37..27aeeee79756 100644
--- a/system/wine/README
+++ b/system/wine/README
@@ -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.
diff --git a/system/wine/wine.SlackBuild b/system/wine/wine.SlackBuild
index be2f2950b713..7444cd108910 100644
--- a/system/wine/wine.SlackBuild
+++ b/system/wine/wine.SlackBuild
@@ -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"