aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCeleste <20312-Celeste@users.gitlab.alpinelinux.org>2023-09-02 02:38:48 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2023-10-05 08:24:06 +0000
commit026e4a924876d040200220af9a534a2a341e9fa7 (patch)
tree17cea1c884ffb076dd840a87798d6805ecc7a6ae
parentef5637a1b19b8f4dd665b2f11d473a49b7e30a0f (diff)
main/alsa-lib: upgrade to 1.2.10
-rw-r--r--main/alsa-lib/APKBUILD14
-rw-r--r--main/alsa-lib/fix-segfault-32bit.patch112
-rw-r--r--main/alsa-lib/move-string-macro.patch48
-rw-r--r--main/alsa-lib/ump-header-detection.patch39
4 files changed, 208 insertions, 5 deletions
diff --git a/main/alsa-lib/APKBUILD b/main/alsa-lib/APKBUILD
index 3a2f3778e19..b0e3b56faa7 100644
--- a/main/alsa-lib/APKBUILD
+++ b/main/alsa-lib/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alsa-lib
-pkgver=1.2.9
-pkgrel=4
+pkgver=1.2.10
+pkgrel=0
pkgdesc="Advanced Linux Sound Architecture (ALSA) library"
url="https://alsa-project.org/"
arch="all"
@@ -9,9 +9,11 @@ license="LGPL-2.1-or-later"
subpackages="$pkgname-dbg $pkgname-dev"
makedepends="linux-headers"
source="https://alsa-project.org/files/pub/lib/alsa-lib-$pkgver.tar.bz2
- $pkgname-divzero-fix.patch::https://github.com/alsa-project/alsa-lib/commit/3661bdae35961e4a4dd67a60682550e30b878207.diff
remove-test.patch
fix-PATH_MAX-on-ppc64le.patch
+ move-string-macro.patch
+ ump-header-detection.patch
+ fix-segfault-32bit.patch
"
build() {
@@ -40,8 +42,10 @@ package() {
}
sha512sums="
-8f39c8166c3648d46695a9287d9b9a35e5bfffed11d79e868ff7aba92d0fee792e82784186ebeb2a3e44d6b617c916025c7fce9a802565bb8e0dc8fdcce2311a alsa-lib-1.2.9.tar.bz2
-93fc528a40c95aad390a2e29f0db29f0f57f8cc7e77add506fb00ebf7d3ee412d6fedac997c84f632c4147859c1623d5bbd149811981b2704e08b5fc4d79900d alsa-lib-divzero-fix.patch
+4ccbd1dc5a612044571c26290923009e4c3f7959b30a5d0bed47daa68bbefaff9059c4f0fa3bc16f22c1eed2d36f079139369f40243da5921ae4de02a4541939 alsa-lib-1.2.10.tar.bz2
e15318431fe2d5bd1e42ef793f223e3e5995890d7befe6daa3d7456ccf5cb2f51eb79171539cecae13032a9b8a798ea35e04c89b27c7ef9567e2c03fb8db4512 remove-test.patch
f980d153c2f179e2f8fd90180d19250e5a5e12388f31d86a233d89be72ae7e96b944a8f435f0a11c6140378ac38eaa937175e1c100395ec4f635a9a6a4b1ae25 fix-PATH_MAX-on-ppc64le.patch
+6fd09454122fab34cb3d9ad37a13257ea4dd9a94ee15e057e276dba767708bba89b612c44033d3d1f854f348e3648e366b4c0e6421b04ca7f4891e34237928d1 move-string-macro.patch
+a48a9b1192a2122e3ff91d79ed2a6b42bd49ae9b38721784165df4cc8477fbb53c591f0a20c3ab58512e681c453547317ad142729d2db7578ec9089a33a6900a ump-header-detection.patch
+fbc9d9ee28ec2f34419a34c48fa5736e096daae56de35e91beea249758a4bd22af0bdbb0f1a5f9205b08aa1ea8d3abc9bf6e72df0031e08539b528f554633e28 fix-segfault-32bit.patch
"
diff --git a/main/alsa-lib/fix-segfault-32bit.patch b/main/alsa-lib/fix-segfault-32bit.patch
new file mode 100644
index 00000000000..1968a64acc3
--- /dev/null
+++ b/main/alsa-lib/fix-segfault-32bit.patch
@@ -0,0 +1,112 @@
+Patch-Source: https://github.com/alsa-project/alsa-lib/commit/0e3dfb9f705ca78be34cd70fd59d67c431e29cc7.patch
+--
+From 0e3dfb9f705ca78be34cd70fd59d67c431e29cc7 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sat, 9 Sep 2023 17:42:03 +0200
+Subject: [PATCH] pcm: Fix segfault with 32bit libs
+
+The recent rearrangement of header inclusion order caused a regression
+showing segfaults on 32bit Arm. The primary reason is the
+inconsistent compile condition depending on the inclusion of config.h;
+while most of other code include pcm_local.h (that implicitly includes
+config.h) at first, pcm_direct.c doesn't do it, hence the access with
+direct plugins crashes.
+
+For fixing it, we need to include config.h at the beginning. But,
+it's better to include pcm_local.h for all relevant code for
+consistency. The patch does it, and also it adds the guard in
+pcm_local.h for double inclusions.
+
+Fixes: ad3a8b8b314e ("reshuffle included files to include config.h as first")
+Link: https://github.com/alsa-project/alsa-lib/issues/352
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ src/pcm/pcm_direct.c | 1 +
+ src/pcm/pcm_dmix.c | 2 +-
+ src/pcm/pcm_dshare.c | 1 +
+ src/pcm/pcm_dsnoop.c | 1 +
+ src/pcm/pcm_local.h | 5 +++++
+ src/pcm/pcm_shm.c | 1 +
+ 6 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
+index 040fc160..e53e5923 100644
+--- a/src/pcm/pcm_direct.c
++++ b/src/pcm/pcm_direct.c
+@@ -19,6 +19,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
+index 7cd3c508..55cae3e7 100644
+--- a/src/pcm/pcm_dmix.c
++++ b/src/pcm/pcm_dmix.c
+@@ -26,7 +26,7 @@
+ *
+ */
+
+-#include "config.h"
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
+index 454b39a9..c0329098 100644
+--- a/src/pcm/pcm_dshare.c
++++ b/src/pcm/pcm_dshare.c
+@@ -26,6 +26,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
+index d3ce300c..bf67c68a 100644
+--- a/src/pcm/pcm_dsnoop.c
++++ b/src/pcm/pcm_dsnoop.c
+@@ -26,6 +26,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
+diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
+index 6a0e71e7..152c92c3 100644
+--- a/src/pcm/pcm_local.h
++++ b/src/pcm/pcm_local.h
+@@ -20,6 +20,9 @@
+ *
+ */
+
++#ifndef __PCM_LOCAL_H
++#define __PCM_LOCAL_H
++
+ #include "config.h"
+
+ #include <stdio.h>
+@@ -1223,3 +1226,5 @@ static inline void snd_pcm_unlock(snd_pcm_t *pcm)
+ #define snd_pcm_lock(pcm) do {} while (0)
+ #define snd_pcm_unlock(pcm) do {} while (0)
+ #endif /* THREAD_SAFE_API */
++
++#endif /* __PCM_LOCAL_H */
+diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
+index f0bfd934..d9596547 100644
+--- a/src/pcm/pcm_shm.c
++++ b/src/pcm/pcm_shm.c
+@@ -26,6 +26,7 @@
+ *
+ */
+
++#include "pcm_local.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <stddef.h>
diff --git a/main/alsa-lib/move-string-macro.patch b/main/alsa-lib/move-string-macro.patch
new file mode 100644
index 00000000000..53cb9704e54
--- /dev/null
+++ b/main/alsa-lib/move-string-macro.patch
@@ -0,0 +1,48 @@
+Patch-Source: https://github.com/alsa-project/alsa-lib/commit/10bd599970acc71c92f85eb08943eb8d3d702a9c.patch
+--
+From 10bd599970acc71c92f85eb08943eb8d3d702a9c Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Wed, 6 Sep 2023 15:16:44 +0200
+Subject: [PATCH] global.h: move __STRING() macro outside !PIC ifdef block
+
+It solves the musl libc compilation issue.
+
+control.c: In function 'snd_ctl_open_conf':
+../../include/global.h:98:36: warning: implicit declaration of function '__STRING' [-Wimplicit-function-declaratio]
+ 98 | #define SND_DLSYM_VERSION(version) __STRING(version)
+ | ^~~~~~~~
+
+Fixes: https://github.com/alsa-project/alsa-lib/issues/350
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ include/global.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/include/global.h b/include/global.h
+index dfe9bc2b..3ecaeee8 100644
+--- a/include/global.h
++++ b/include/global.h
+@@ -51,6 +51,11 @@ const char *snd_asoundlib_version(void);
+ #define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+ #endif
+
++#ifndef __STRING
++/** \brief Return 'x' argument as string */
++#define __STRING(x) #x
++#endif
++
+ #ifdef PIC /* dynamic build */
+
+ /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
+@@ -71,11 +76,6 @@ struct snd_dlsym_link {
+
+ extern struct snd_dlsym_link *snd_dlsym_start;
+
+-#ifndef __STRING
+-/** \brief Return 'x' argument as string */
+-#define __STRING(x) #x
+-#endif
+-
+ /** \hideinitializer \brief Helper macro for #SND_DLSYM_BUILD_VERSION. */
+ #define __SND_DLSYM_VERSION(prefix, name, version) _ ## prefix ## name ## version
+ /**
diff --git a/main/alsa-lib/ump-header-detection.patch b/main/alsa-lib/ump-header-detection.patch
new file mode 100644
index 00000000000..2ae5e5b3a20
--- /dev/null
+++ b/main/alsa-lib/ump-header-detection.patch
@@ -0,0 +1,39 @@
+Patch-Source: https://github.com/alsa-project/alsa-lib/commit/fcce13a6726c52882bd8b7131c61c4eba308792c.patch
+--
+From fcce13a6726c52882bd8b7131c61c4eba308792c Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Mon, 4 Sep 2023 09:38:26 +0200
+Subject: [PATCH] control.h: Fix ump header file detection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Apparently, the control.h is used from apps separately (outside
+asoundlib.h). Avoid errors like:
+
+/usr/include/alsa/control.h:417:47: error: ‘snd_ump_endpoint_info_t’ has not been declared
+ 417 | int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info);
+ | ^~~~~~~~~~~~~~~~~~~~~~~
+/usr/include/alsa/control.h:418:44: error: ‘snd_ump_block_info_t’ has not been declared
+ 418 | int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info);
+ | ^~~~~~~~~~~~~~~~~~~~
+
+Fixes: https://github.com/alsa-project/alsa-lib/issues/348
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ include/control.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/control.h b/include/control.h
+index ab482ba4..e7541d56 100644
+--- a/include/control.h
++++ b/include/control.h
+@@ -413,6 +413,8 @@ int snd_ctl_pcm_prefer_subdevice(snd_ctl_t *ctl, int subdev);
+ int snd_ctl_rawmidi_next_device(snd_ctl_t *ctl, int * device);
+ int snd_ctl_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info);
+ int snd_ctl_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev);
++#endif
++#ifdef __ALSA_UMP_H
+ int snd_ctl_ump_next_device(snd_ctl_t *ctl, int *device);
+ int snd_ctl_ump_endpoint_info(snd_ctl_t *ctl, snd_ump_endpoint_info_t *info);
+ int snd_ctl_ump_block_info(snd_ctl_t *ctl, snd_ump_block_info_t *info);