summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-05-16 04:55:13 +0100
committerSam James <sam@gentoo.org>2023-05-16 04:55:13 +0100
commitf6baa20f72862687508e23181f49972f8e428a50 (patch)
treead015bfeb6cd20007c1b44fbd5180c5cc32344a3 /media-libs/speex
parentmedia-video/ffdiaporama: add github upstream metadata (diff)
downloadgentoo-f6baa20f72862687508e23181f49972f8e428a50.tar.gz
gentoo-f6baa20f72862687508e23181f49972f8e428a50.tar.bz2
gentoo-f6baa20f72862687508e23181f49972f8e428a50.zip
media-libs/speex: fix valgrind build
Closes: https://bugs.gentoo.org/906455 Thanks-to: Andrei Slavoiu <ansla80@yahoo.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/speex')
-rw-r--r--media-libs/speex/files/speex-1.2.1-valgrind.patch53
-rw-r--r--media-libs/speex/speex-1.2.1-r1.ebuild1
-rw-r--r--media-libs/speex/speex-1.2.1.ebuild5
3 files changed, 58 insertions, 1 deletions
diff --git a/media-libs/speex/files/speex-1.2.1-valgrind.patch b/media-libs/speex/files/speex-1.2.1-valgrind.patch
new file mode 100644
index 000000000000..a9fd9789a127
--- /dev/null
+++ b/media-libs/speex/files/speex-1.2.1-valgrind.patch
@@ -0,0 +1,53 @@
+https://gitlab.xiph.org/xiph/speex/-/merge_requests/13
+
+From b15993fd560c90658ff2e4974e8b3a1afcfcfff2 Mon Sep 17 00:00:00 2001
+From: Andrei Slavoiu <ansla80@yahoo.com>
+Date: Tue, 16 May 2023 04:49:45 +0100
+Subject: [PATCH] Fix --enable-valgrind build
+
+VALGRIND_MAKE_READABLE has been replaced with VALGRIND_MAKE_MEM_DEFINED
+starting with version 3.2 (2006) https://valgrind.org/docs/manual/dist.news.old.html.
+
+Bug: https://bugs.gentoo.org/906455
+--- a/libspeex/nb_celp.c
++++ b/libspeex/nb_celp.c
+@@ -172,7 +172,7 @@ void *nb_encoder_init(const SpeexMode *m)
+ st->highpass_enabled = 1;
+
+ #ifdef ENABLE_VALGRIND
+- VALGRIND_MAKE_READABLE(st, NB_ENC_STACK);
++ VALGRIND_MAKE_MEM_DEFINED(st, NB_ENC_STACK);
+ #endif
+ return st;
+ }
+@@ -1113,7 +1113,7 @@ void *nb_decoder_init(const SpeexMode *m)
+ st->highpass_enabled = 1;
+
+ #ifdef ENABLE_VALGRIND
+- VALGRIND_MAKE_READABLE(st, NB_DEC_STACK);
++ VALGRIND_MAKE_MEM_DEFINED(st, NB_DEC_STACK);
+ #endif
+ return st;
+ }
+--- a/libspeex/sb_celp.c
++++ b/libspeex/sb_celp.c
+@@ -223,7 +223,7 @@ void *sb_encoder_init(const SpeexMode *m)
+ speex_encoder_ctl(st->st_low, SPEEX_GET_SAMPLING_RATE, &st->sampling_rate);
+ st->sampling_rate*=2;
+ #ifdef ENABLE_VALGRIND
+- VALGRIND_MAKE_READABLE(st, (st->stack-(char*)st));
++ VALGRIND_MAKE_MEM_DEFINED(st, (st->stack-(char*)st));
+ #endif
+ return st;
+ }
+@@ -1017,7 +1017,7 @@ void *sb_decoder_init(const SpeexMode *m)
+ st->seed = 1000;
+
+ #ifdef ENABLE_VALGRIND
+- VALGRIND_MAKE_READABLE(st, (st->stack-(char*)st));
++ VALGRIND_MAKE_MEM_DEFINED(st, (st->stack-(char*)st));
+ #endif
+ return st;
+ }
+--
+GitLab
diff --git a/media-libs/speex/speex-1.2.1-r1.ebuild b/media-libs/speex/speex-1.2.1-r1.ebuild
index c966d61c2a6e..f84f46069fda 100644
--- a/media-libs/speex/speex-1.2.1-r1.ebuild
+++ b/media-libs/speex/speex-1.2.1-r1.ebuild
@@ -33,6 +33,7 @@ S="${WORKDIR}/${MY_P}"
PATCHES=(
"${FILESDIR}"/${PN}-1.2.0-configure.patch
"${FILESDIR}"/${P}-vla-detection.patch
+ "${FILESDIR}"/${PN}-1.2.1-valgrind.patch
)
src_prepare() {
diff --git a/media-libs/speex/speex-1.2.1.ebuild b/media-libs/speex/speex-1.2.1.ebuild
index eecc7ebf0031..a79308db25b2 100644
--- a/media-libs/speex/speex-1.2.1.ebuild
+++ b/media-libs/speex/speex-1.2.1.ebuild
@@ -30,7 +30,10 @@ BDEPEND="virtual/pkgconfig"
S="${WORKDIR}/${MY_P}"
-PATCHES=( "${FILESDIR}"/${PN}-1.2.0-configure.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.0-configure.patch
+ "${FILESDIR}"/${PN}-1.2.1-valgrind.patch
+)
src_prepare() {
default