1 |
commit: ff3eca2e2ab83585c60588c2a6270eab833b8a4f |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 16 01:25:42 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 16 01:26:13 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff3eca2e |
7 |
|
8 |
media-libs/libheif: fix bashism in configure |
9 |
|
10 |
Revbump for the fix given it affects some odd visibility logic, so |
11 |
we'll be careful. |
12 |
|
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
.../libheif/files/libheif-1.12.0-fix-bashism.patch | 37 ++++++++++++++++++++++ |
16 |
...ibheif-9999.ebuild => libheif-1.12.0-r3.ebuild} | 5 +++ |
17 |
media-libs/libheif/libheif-9999.ebuild | 4 +++ |
18 |
3 files changed, 46 insertions(+) |
19 |
|
20 |
diff --git a/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch b/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch |
21 |
new file mode 100644 |
22 |
index 000000000000..3d4d12495051 |
23 |
--- /dev/null |
24 |
+++ b/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch |
25 |
@@ -0,0 +1,37 @@ |
26 |
+https://github.com/strukturag/libheif/pull/660 |
27 |
+ |
28 |
+From a50ef159794ff66fc0a03d5269b1c36a000673ea Mon Sep 17 00:00:00 2001 |
29 |
+From: Sam James <sam@g.o> |
30 |
+Date: Tue, 16 Aug 2022 02:23:13 +0100 |
31 |
+Subject: [PATCH] configure.ac: fix bashism |
32 |
+ |
33 |
+configure scripts need to be runnable with a POSIX-compliant /bin/sh. |
34 |
+ |
35 |
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors |
36 |
+like this aren't spotted. Notably Debian defaults to /bin/sh provided |
37 |
+by dash which doesn't tolerate such bashisms as '=='. |
38 |
+ |
39 |
+This retains compatibility with bash. |
40 |
+ |
41 |
+Fixes errors/warnings like: |
42 |
+``` |
43 |
+checking for pthread_create in -lpthread... yes |
44 |
+checking for simple visibility declarations... yes |
45 |
+/var/tmp/portage/media-libs/libheif-1.12.0-r2/work/libheif-1.12.0/configure: 18821: test: x: unexpected operator |
46 |
+checking pkg-config is at least version 0.9.0... yes |
47 |
+checking for aom... yes |
48 |
+``` |
49 |
+ |
50 |
+Signed-off-by: Sam James <sam@g.o> |
51 |
+--- a/configure.ac |
52 |
++++ b/configure.ac |
53 |
+@@ -85,7 +85,7 @@ AS_IF([test "x$enable_tests" = "xyes"], [ |
54 |
+ HAVE_VISIBILITY=0 |
55 |
+ CFLAG_VISIBILITY= |
56 |
+ ]) |
57 |
+-AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" == "x1"]) |
58 |
++AM_CONDITIONAL([HAVE_TESTS], [test "x$HAVE_TESTS" = "x1"]) |
59 |
+ |
60 |
+ AM_CONDITIONAL([HAVE_VISIBILITY], [test "x$HAVE_VISIBILITY" != "x0"]) |
61 |
+ if eval "test x$enable_visibility = x" ; then enable_visibility=yes ; fi |
62 |
+ |
63 |
|
64 |
diff --git a/media-libs/libheif/libheif-9999.ebuild b/media-libs/libheif/libheif-1.12.0-r3.ebuild |
65 |
similarity index 95% |
66 |
copy from media-libs/libheif/libheif-9999.ebuild |
67 |
copy to media-libs/libheif/libheif-1.12.0-r3.ebuild |
68 |
index a193a851d4da..08b2005689dd 100644 |
69 |
--- a/media-libs/libheif/libheif-9999.ebuild |
70 |
+++ b/media-libs/libheif/libheif-1.12.0-r3.ebuild |
71 |
@@ -36,6 +36,11 @@ DEPEND=" |
72 |
x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )" |
73 |
RDEPEND="${DEPEND}" |
74 |
|
75 |
+PATCHES=( |
76 |
+ "${FILESDIR}"/${P}-dav1d-1.0.0.patch |
77 |
+ "${FILESDIR}"/${PN}-1.12.0-fix-bashism.patch |
78 |
+) |
79 |
+ |
80 |
src_prepare() { |
81 |
default |
82 |
|
83 |
|
84 |
diff --git a/media-libs/libheif/libheif-9999.ebuild b/media-libs/libheif/libheif-9999.ebuild |
85 |
index a193a851d4da..e7ee0500a762 100644 |
86 |
--- a/media-libs/libheif/libheif-9999.ebuild |
87 |
+++ b/media-libs/libheif/libheif-9999.ebuild |
88 |
@@ -36,6 +36,10 @@ DEPEND=" |
89 |
x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )" |
90 |
RDEPEND="${DEPEND}" |
91 |
|
92 |
+PATCHES=( |
93 |
+ "${FILESDIR}"/${PN}-1.12.0-fix-bashism.patch |
94 |
+) |
95 |
+ |
96 |
src_prepare() { |
97 |
default |