summaryrefslogtreecommitdiff
path: root/media-sound/schismtracker/files/schismtracker-20221201-bashism.patch
blob: 64cad709efe00b679133fbbf7742fda6be0bb609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
https://github.com/schismtracker/schismtracker/pull/340

From 5f2f594b6a4055318fa31d3c0cd6ecc8dc3666f7 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Fri, 2 Dec 2022 01:39:06 +0000
Subject: [PATCH] Fix bashism in configure.ac sdl2-config check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

configure scripts need to be runnable with a POSIX-compliant /bin/sh.

On many (but not all!) systems, /bin/sh is provided by Bash, so errors
like this aren't spotted. Notably Debian defaults to /bin/sh provided
by dash which doesn't tolerate such bashisms as '=='.

This retains compatibility with bash.
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ AC_C_BIGENDIAN
 dnl Check for SDL libs
 AC_CHECK_TOOL([SDL_CONFIG], [sdl2-config])
 AC_SUBST(SDL_CONFIG)
-if test "x$SDL_CONFIG" == "x"; then
+if test "x$SDL_CONFIG" = "x"; then
         AC_MSG_ERROR([*** sdl2-config not found.])
 fi
 AS_VERSION_COMPARE([$($SDL_CONFIG --version)], [2.0.5], [AC_MSG_ERROR([*** SDL version >= 2.0.5 not found.])])