summaryrefslogtreecommitdiff
path: root/media-libs/speex
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/speex')
-rw-r--r--media-libs/speex/Manifest4
-rw-r--r--media-libs/speex/files/speex-1.2.1-vla-detection.patch27
-rw-r--r--media-libs/speex/speex-1.2.1-r1.ebuild81
-rw-r--r--media-libs/speex/speex-1.2.1.ebuild10
4 files changed, 118 insertions, 4 deletions
diff --git a/media-libs/speex/Manifest b/media-libs/speex/Manifest
index 70c87c3a926b..8cbaa62fc12c 100644
--- a/media-libs/speex/Manifest
+++ b/media-libs/speex/Manifest
@@ -1,4 +1,6 @@
AUX speex-1.2.0-configure.patch 920 BLAKE2B 57b43aee0c57d6f0bf29202573d8f5caa65d41823ca073fb6b8edc1d35dee7b90ec79d52ef08affb0a1cb88b577e0fa3bc62844ded3c4e3235c268e31a0121a6 SHA512 71e6934f104d12bfb7bfb19812ff868dc22a323e2fbd7a480c270650a14842dd03e53e11853e7ddaa9469239a538d0bf09469770fd30f23601406011fe626ffd
+AUX speex-1.2.1-vla-detection.patch 725 BLAKE2B ca4ba1fa56bf6bcd49c6b65d30e8d15331eeb4fbd8811b07a90659ff060e379e5446d0f8fe40769a4e19d7b4950ca510a865b7e26f9a2a2c3dc8d7d327c2219a SHA512 c759fcb9c18b498c69147c6e22aaec85bc508abf6c6a988536325f3dbfc9a15783b1e3d49f25d915f7b8d935c6a4aab28b0cef021c78b5fd0d7e053974eb544c
DIST speex-1.2.1.tar.gz 1043278 BLAKE2B 60afa7eb9ff87ebb1b69e2716b7fa6727b49f6c06ed6eb6fe81236c65dc4128769618dd1f4df31af56a00e9b766c4050c1b3e415c8f972d64d1fb9e7a537a650 SHA512 52e00300df82e1c7fb527b245af02b99a1f37faef74d004b7cd981052f1aa22a412cb18f5c7a5618df4c958f727c97eb7385beec99d68548d5b02e76192d4e0a
-EBUILD speex-1.2.1.ebuild 1664 BLAKE2B 7fd6ef7778cb2b96f9da0ce34d3fbab570e57f03e606aed1779884b724de01ccaf799c39a1a9017525a2a856764f25f9c2b6965581ebbf996f31e32b1417b561 SHA512 b9c35a29156f67212da7ccf4079086535c94f38aae9294ce967c1451def1ed129b2a74fb3d8863d1ddad3baab351d8ec065f71fc60d1e3c48a65b904d6c67494
+EBUILD speex-1.2.1-r1.ebuild 1861 BLAKE2B 4d0b6e2ad461361aa60c808c77d73a680260453155dc7703f9efee038303109271b077bd2e5c3b609b8ddb932a16e5fe6ec17c14a1249cf67a23c40a5c2d8b6e SHA512 8c822e46c11f8a1e507bd8f04b742c4c6ea53cbe2b0fd08f296982227d29b923507ea372561934fc9b5be5bc587293aa6b3b09e5b5fc7c2708021cebd391cbab
+EBUILD speex-1.2.1.ebuild 1752 BLAKE2B fd5c4e779950f00de25c1f980accd615ee84850dba4cf1895068bf3ff954bf9ddd118640512bc53e5e9035f51216a487819879ca7ee4392f470115163bf12e36 SHA512 fee6b9f8371e1e3247d2aa3eb2d0e391fc3c3f47a3fd83c582f060e3390d244854216bb77a2fffaae747bef90b8cc141cef8f53ba830bb5fa200cd9e0df3bb86
MISC metadata.xml 548 BLAKE2B 20ca971e89b8e1b610855fd5c4b05bafbc4b4cfd8e36e7a28f77b5555f01ee6e3f0b971b57accd8faa00c2ff60c9af12648a55b29878917354e5e9fbc6de9b5f SHA512 ef4cb05574ab0bb73081c67a50c866b6cc6b8f20a6de5cb6511eb3881804980dd57eb71a6e0fe5607c4898e593c762e63e91304afde8b3118bfd8bb69943b2a1
diff --git a/media-libs/speex/files/speex-1.2.1-vla-detection.patch b/media-libs/speex/files/speex-1.2.1-vla-detection.patch
new file mode 100644
index 000000000000..1b3826f8b25e
--- /dev/null
+++ b/media-libs/speex/files/speex-1.2.1-vla-detection.patch
@@ -0,0 +1,27 @@
+https://gitlab.xiph.org/xiph/speex/-/commit/5b036b2ca5e27004502e67ee20490a16f5e68aa1
+
+From 5b036b2ca5e27004502e67ee20490a16f5e68aa1 Mon Sep 17 00:00:00 2001
+From: Kai Pastor <dg0yt@darc.de>
+Date: Wed, 24 Aug 2022 20:14:31 +0200
+Subject: [PATCH] Fix vla detection
+
+Signed-off-by: Tristan Matthews <tmatth@videolan.org>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d94c2feb..b8131482 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,7 +37,7 @@ AC_C_RESTRICT
+
+
+ AC_MSG_CHECKING(for C99 variable-size arrays)
+-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ int foo;
+ foo = 10;
+ int array[foo];
+--
+GitLab
diff --git a/media-libs/speex/speex-1.2.1-r1.ebuild b/media-libs/speex/speex-1.2.1-r1.ebuild
new file mode 100644
index 000000000000..c966d61c2a6e
--- /dev/null
+++ b/media-libs/speex/speex-1.2.1-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic multilib-minimal
+
+MY_P=${P/_}
+MY_P=${MY_P/_p/.}
+
+DESCRIPTION="Audio compression format designed for speech"
+HOMEPAGE="https://www.speex.org/"
+SRC_URI="https://downloads.xiph.org/releases/speex/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
+IUSE="cpu_flags_arm_v4 cpu_flags_arm_v5 cpu_flags_arm_v6 cpu_flags_x86_sse utils valgrind +vbr"
+
+RDEPEND="
+ utils? (
+ media-libs/libogg:=
+ media-libs/speexdsp[${MULTILIB_USEDEP}]
+ )"
+DEPEND="
+ ${RDEPEND}
+ valgrind? ( dev-util/valgrind )
+"
+BDEPEND="virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.0-configure.patch
+ "${FILESDIR}"/${P}-vla-detection.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's:noinst_PROGRAMS:check_PROGRAMS:' \
+ libspeex/Makefile.am || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ append-lfs-flags
+
+ local myeconfargs=(
+ $(multilib_native_use_enable valgrind)
+ $(use_enable cpu_flags_x86_sse sse)
+ $(use_enable vbr)
+ $(multilib_native_use_with utils speexdsp)
+ $(multilib_native_use_enable utils binaries)
+ )
+
+ local FIXED_ARG="--disable-fixed-point"
+ local ARM4_ARG="--disable-arm4-asm"
+ local ARM5_ARG="--disable-arm5e-asm"
+
+ if use arm && ! use cpu_flags_arm_v6; then
+ FIXED_ARG="--enable-fixed-point"
+
+ if use cpu_flags_arm_v5; then
+ ARM5_ARG="--enable-arm5e-asm"
+ elif use cpu_flags_arm_v4; then
+ ARM4_ARG="--enable-arm4-asm"
+ fi
+ fi
+
+ myeconfargs+=( ${FIXED_ARG} ${ARM4_ARG} ${ARM5_ARG} )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -name '*.la' -type f -delete || die
+}
diff --git a/media-libs/speex/speex-1.2.1.ebuild b/media-libs/speex/speex-1.2.1.ebuild
index 6bd0527aef26..eecc7ebf0031 100644
--- a/media-libs/speex/speex-1.2.1.ebuild
+++ b/media-libs/speex/speex-1.2.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -15,14 +15,17 @@ SRC_URI="https://downloads.xiph.org/releases/speex/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x86-solaris"
-IUSE="cpu_flags_arm_v4 cpu_flags_arm_v5 cpu_flags_arm_v6 cpu_flags_x86_sse utils +vbr"
+IUSE="cpu_flags_arm_v4 cpu_flags_arm_v5 cpu_flags_arm_v6 cpu_flags_x86_sse utils valgrind +vbr"
RDEPEND="
utils? (
media-libs/libogg:=
media-libs/speexdsp[${MULTILIB_USEDEP}]
)"
-DEPEND="${RDEPEND}"
+DEPEND="
+ ${RDEPEND}
+ valgrind? ( dev-util/valgrind )
+"
BDEPEND="virtual/pkgconfig"
S="${WORKDIR}/${MY_P}"
@@ -58,6 +61,7 @@ multilib_src_configure() {
ECONF_SOURCE="${S}" econf \
--disable-static \
+ $(multilib_native_use_enable valgrind) \
$(use_enable cpu_flags_x86_sse sse) \
$(use_enable vbr) \
$(use_with utils speexdsp) \