summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-24 07:31:13 +0000
committerSam James <sam@gentoo.org>2024-03-24 07:32:55 +0000
commit6336aa25d764f13a2463d761cee229dbf34ef406 (patch)
treeb810a02f2aec67a42bb4f90cab9c79dd5e864867 /media-libs/libsoundtouch
parentnet-proxy/torsocks: fix bashism in configure & don't clobber _F_S (diff)
downloadgentoo-6336aa25d764f13a2463d761cee229dbf34ef406.tar.gz
gentoo-6336aa25d764f13a2463d761cee229dbf34ef406.tar.bz2
gentoo-6336aa25d764f13a2463d761cee229dbf34ef406.zip
media-libs/libsoundtouch: fix bashism in configure
Cleanup a stale sed while at it. Closes: https://bugs.gentoo.org/925676 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/libsoundtouch')
-rw-r--r--media-libs/libsoundtouch/files/libsoundtouch-2.3.2-configure-bashism.patch33
-rw-r--r--media-libs/libsoundtouch/libsoundtouch-2.3.2.ebuild8
2 files changed, 38 insertions, 3 deletions
diff --git a/media-libs/libsoundtouch/files/libsoundtouch-2.3.2-configure-bashism.patch b/media-libs/libsoundtouch/files/libsoundtouch-2.3.2-configure-bashism.patch
new file mode 100644
index 000000000000..4ddccaa8e3b5
--- /dev/null
+++ b/media-libs/libsoundtouch/files/libsoundtouch-2.3.2-configure-bashism.patch
@@ -0,0 +1,33 @@
+https://gitlab.com/soundtouch/soundtouch/-/merge_requests/30
+
+From 429a4669cfee54ec69f8be61cc4b5ac2d87d1254 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 24 Mar 2024 07:19:34 +0000
+Subject: [PATCH 2/2] configure.ac: fix bashism in CXXFLAGS assignment
+
+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 configure warnings/errors like:
+```
+checking whether make supports nested variables... (cached) yes
+configure: 3698: CXXFLAGS+= -Ofast: not found
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,7 +33,7 @@ AC_LANG(C++)
+
+ # Compiler flags. Apply -Ofast (implies -O3 -ffast-math) to allow gcc autovectorization
+ # generate effective SIMD code.
+-CXXFLAGS+=" -Ofast"
++CXXFLAGS="${CXXFLAGS} -Ofast"
+
+ # Set AR_FLAGS to avoid build warning "ar: `u' modifier ignored since `D' is the default (see `U')"
+ AR_FLAGS='cr'
diff --git a/media-libs/libsoundtouch/libsoundtouch-2.3.2.ebuild b/media-libs/libsoundtouch/libsoundtouch-2.3.2.ebuild
index 36bff7c7e4a5..bf83cf2c1df6 100644
--- a/media-libs/libsoundtouch/libsoundtouch-2.3.2.ebuild
+++ b/media-libs/libsoundtouch/libsoundtouch-2.3.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -10,6 +10,7 @@ MY_P=${MY_PN}-${PV}
DESCRIPTION="Audio processing library for changing tempo, pitch and playback rates"
HOMEPAGE="https://www.surina.net/soundtouch/ https://gitlab.com/soundtouch/soundtouch"
SRC_URI="https://www.surina.net/${MY_PN}/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_PN}"
LICENSE="LGPL-2.1"
# subslot = libSoundTouch.so soname
@@ -19,7 +20,9 @@ IUSE="cpu_flags_x86_sse openmp static-libs"
BDEPEND="virtual/pkgconfig"
-S="${WORKDIR}/${MY_PN}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.2-configure-bashism.patch
+)
pkg_pretend() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
@@ -32,7 +35,6 @@ pkg_setup() {
src_prepare() {
default
sed -i "s:^\(dist_doc_DATA=\)COPYING.TXT :\1:" Makefile.am || die
- sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' configure.ac || die
eautoreconf
}