Skip to content

Commit

Permalink
media-libs/libtgvoip: fix non-posix configure test
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/729034
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Georgy Yakovlev <[email protected]>
  • Loading branch information
gyakovlev committed Jul 5, 2020
1 parent 51a9877 commit 4ee0311
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
83 changes: 83 additions & 0 deletions media-libs/libtgvoip/files/configure-bashisms.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From 601c2b7e4336357f49ad2dcf93bc59e5944975a4 Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <[email protected]>
Date: Sat, 4 Jul 2020 17:11:24 -0700
Subject: [PATCH] configure.ac: use POSIX test syntax

with == syntax configure fails on some shells (dash fish)

./configure: 17913: test: xyes: unexpected operator
./configure: 17921: test: x: unexpected operator
./configure: 17929: test: x: unexpected operator
Detected OS: linux-gnu
./configure: 17946: test: x: unexpected operator
./configure: 17962: test: xno: unexpected operator
checking for dlopen in -ldl... yes
./configure: 18036: test: xyes: unexpected operator
checking for libpulse... yes
checking for alsa... yes
./configure: 18251: test: xyes: unexpected operator
./configure: 18259: test: xyes: unexpected operator
./configure: 18275: test: xyes: unexpected operator
checking for size_t... yes

Downstream-bug: https://bugs.gentoo.org/729034
Signed-off-by: Georgy Yakovlev <[email protected]>
---
configure.ac | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 37ee7a1..17789c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,18 +46,18 @@ AS_CASE([$host_cpu],
[armv7*], [cpu_armv7=yes]
)
AS_ECHO("Detected CPU: $host_cpu")
-AM_CONDITIONAL(TARGET_CPU_X86, test "x$cpu_x86" == xyes)
-AM_CONDITIONAL(TARGET_CPU_ARM, test "x$cpu_arm" == xyes)
-AM_CONDITIONAL(TARGET_CPU_ARMV7, test "x$cpu_armv7" == xyes)
+AM_CONDITIONAL(TARGET_CPU_X86, test "x$cpu_x86" = xyes)
+AM_CONDITIONAL(TARGET_CPU_ARM, test "x$cpu_arm" = xyes)
+AM_CONDITIONAL(TARGET_CPU_ARMV7, test "x$cpu_armv7" = xyes)
AS_ECHO("Detected OS: $host_os")

AS_CASE([$host_os],
[darwin*], [os_osx=yes]
)
-AM_CONDITIONAL(TARGET_OS_OSX, test "x$os_osx" == xyes)
+AM_CONDITIONAL(TARGET_OS_OSX, test "x$os_osx" = xyes)

AC_ARG_ENABLE([audio-callback], [AS_HELP_STRING([--enable-audio-callback], [enable callback-based audio I/O])], [], [enable_audio_callback=no])
-AM_CONDITIONAL(ENABLE_AUDIO_CALLBACK, test "x$enable_audio_callback" == xyes)
+AM_CONDITIONAL(ENABLE_AUDIO_CALLBACK, test "x$enable_audio_callback" = xyes)

AS_IF([test "x$os_osx" != xyes && test "x$enable_audio_callback" != xyes], [ # Linux
AC_CHECK_LIB([dl], [dlopen])
@@ -65,7 +65,7 @@ AS_IF([test "x$os_osx" != xyes && test "x$enable_audio_callback" != xyes], [ # L
AC_ARG_WITH([pulse], [AS_HELP_STRING([--without-pulse], [disable PulseAudio support])], [], [with_pulse=yes])
AC_ARG_WITH([alsa], [AS_HELP_STRING([--without-alsa], [disable ALSA support])], [], [with_alsa=yes])

- AS_IF([test "x$with_pulse" == xno && test "x$with_alsa" == xno], [
+ AS_IF([test "x$with_pulse" = xno && test "x$with_alsa" = xno], [
AC_MSG_FAILURE([You can only disable either ALSA or PulseAudio, not both]);
])

@@ -82,11 +82,11 @@ AS_IF([test "x$os_osx" != xyes && test "x$enable_audio_callback" != xyes], [ # L
])
]);

-AM_CONDITIONAL(WITH_PULSE, test "x$with_pulse" == xyes)
-AM_CONDITIONAL(WITH_ALSA, test "x$with_alsa" == xyes)
+AM_CONDITIONAL(WITH_PULSE, test "x$with_pulse" = xyes)
+AM_CONDITIONAL(WITH_ALSA, test "x$with_alsa" = xyes)

AC_ARG_ENABLE([dsp], [AS_HELP_STRING([--disable-dsp], [disable signal processing (echo cancellation, noise suppression, and automatic gain control)])], [], [enable_dsp=yes])
-AM_CONDITIONAL(ENABLE_DSP, test "x$enable_dsp" == xyes)
+AM_CONDITIONAL(ENABLE_DSP, test "x$enable_dsp" = xyes)

# Checks for header files.
AC_FUNC_ALLOCA
--
2.27.0

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ REQUIRED_USE="|| ( alsa pulseaudio )"

S="${WORKDIR}/${PN}-${EGIT_COMMIT}"

PATCHES=( "${FILESDIR}/configure-bashisms.patch" )

src_prepare() {
default
sed -i 's/-std=gnu++0x/-std=gnu++17/' Makefile.am || die
Expand Down

0 comments on commit 4ee0311

Please sign in to comment.