summaryrefslogtreecommitdiff
path: root/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch
blob: 3d4d12495051b5f09ae9103384def4a09cec93f2 (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
30
31
32
33
34
35
36
37
https://github.com/strukturag/libheif/pull/660

From a50ef159794ff66fc0a03d5269b1c36a000673ea Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Tue, 16 Aug 2022 02:23:13 +0100
Subject: [PATCH] configure.ac: fix bashism

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.

Fixes errors/warnings like:
```
checking for pthread_create in -lpthread... yes
checking for simple visibility declarations... yes
/var/tmp/portage/media-libs/libheif-1.12.0-r2/work/libheif-1.12.0/configure: 18821: test: x: unexpected operator
checking pkg-config is at least version 0.9.0... yes
checking for aom... yes
```

Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,7 @@ AS_IF([test "x$enable_tests" = "xyes"], [
     HAVE_VISIBILITY=0
     CFLAG_VISIBILITY=
 ])
-AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" == "x1"])
+AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" = "x1"])
 
 AM_CONDITIONAL([HAVE_VISIBILITY], [test "x$HAVE_VISIBILITY" != "x0"])
 if eval "test x$enable_visibility = x" ; then enable_visibility=yes ; fi