Skip to content

Commit

Permalink
wine-tkg: Improve multilib test
Browse files Browse the repository at this point in the history
  • Loading branch information
noisecode3 committed Jan 4, 2025
1 parent 5c87fca commit 5b94489
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions builds/wine-tkg/wine-tkg.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,18 @@ if [ "$ARCH" != "x86_64" ]; then
exit 1
fi


mkdir -p "$TMP"
WINETMP="$( mktemp -d "$TMP/wine-test-XXXXXX" )"
WINETMP="$(mktemp -d "$TMP/wine-test-XXXXXX")" || \
{ echo "Failed to create temp directory"; exit 1; }

echo "int main(void) {; return(0); }" > "$WINETMP/test.c"
gcc -m32 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE32TEST=${WINE32TEST:-yes}
rm -rf "$WINETMP"
if gcc -m32 "$WINETMP/test.c" -o "$WINETMP/test.out" >/dev/null 2>&1; then
WINE32TEST=${WINE32TEST:-yes}
fi
if [[ -n "$WINETMP" && -d "$WINETMP" ]]; then
rm -rf "$WINETMP"
fi
if [[ $WINE32TEST = "yes" ]]; then
echo "The multilib test passed."
else
Expand All @@ -80,7 +87,7 @@ fi
set -e

rm -rf "$PKG"
mkdir -p "$TMP" "$PKG" "$OUTPUT"
mkdir -p "$PKG" "$OUTPUT"
cd "$TMP"
rm -rf wine-tkg-git
rm -rf /tmp/wine-tkg
Expand Down

0 comments on commit 5b94489

Please sign in to comment.