commit: ff3eca2e2ab83585c60588c2a6270eab833b8a4f Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Aug 16 01:25:42 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Aug 16 01:26:13 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff3eca2e
media-libs/libheif: fix bashism in configure Revbump for the fix given it affects some odd visibility logic, so we'll be careful. Signed-off-by: Sam James <sam <AT> gentoo.org> .../libheif/files/libheif-1.12.0-fix-bashism.patch | 37 ++++++++++++++++++++++ ...ibheif-9999.ebuild => libheif-1.12.0-r3.ebuild} | 5 +++ media-libs/libheif/libheif-9999.ebuild | 4 +++ 3 files changed, 46 insertions(+) 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 new file mode 100644 index 000000000000..3d4d12495051 --- /dev/null +++ b/media-libs/libheif/files/libheif-1.12.0-fix-bashism.patch @@ -0,0 +1,37 @@ +https://github.com/strukturag/libheif/pull/660 + +From a50ef159794ff66fc0a03d5269b1c36a000673ea Mon Sep 17 00:00:00 2001 +From: Sam James <s...@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 <s...@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 + diff --git a/media-libs/libheif/libheif-9999.ebuild b/media-libs/libheif/libheif-1.12.0-r3.ebuild similarity index 95% copy from media-libs/libheif/libheif-9999.ebuild copy to media-libs/libheif/libheif-1.12.0-r3.ebuild index a193a851d4da..08b2005689dd 100644 --- a/media-libs/libheif/libheif-9999.ebuild +++ b/media-libs/libheif/libheif-1.12.0-r3.ebuild @@ -36,6 +36,11 @@ DEPEND=" x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-dav1d-1.0.0.patch + "${FILESDIR}"/${PN}-1.12.0-fix-bashism.patch +) + src_prepare() { default diff --git a/media-libs/libheif/libheif-9999.ebuild b/media-libs/libheif/libheif-9999.ebuild index a193a851d4da..e7ee0500a762 100644 --- a/media-libs/libheif/libheif-9999.ebuild +++ b/media-libs/libheif/libheif-9999.ebuild @@ -36,6 +36,10 @@ DEPEND=" x265? ( media-libs/x265:=[${MULTILIB_USEDEP}] )" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-1.12.0-fix-bashism.patch +) + src_prepare() { default