From c63867eb51f1464207de950de4d8394971c7ec5f Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Fri, 22 Jun 2018 13:52:18 +0200 Subject: [PATCH] gnu: alsa-lib: Fix ALSA_PLUGIN_DIR usage. * gnu/packages/linux.scm (native-search-paths): Use search-paths instead. * gnu/packages/patches/alsa-lib-add-environment-variable.patch: Use computed plugdir instead of default ALSA_PLUGIN_DIR. --- gnu/packages/linux.scm | 2 +- .../patches/alsa-lib-add-environment-variable.patch | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 7e81f6387..b86dfdf80 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -983,7 +983,7 @@ intercept and print the system calls executed by the program.") "096pwrnhj36yndldvs2pj4r871zhcgisks0is78f1jkjn9sd4b2z")) (patches (search-patches "alsa-lib-add-environment-variable.patch")))) (build-system gnu-build-system) - (native-search-paths + (search-paths (list (search-path-specification (variable "ALSA_PLUGIN_DIR") (file-type 'regular) diff --git a/gnu/packages/patches/alsa-lib-add-environment-variable.patch b/gnu/packages/patches/alsa-lib-add-environment-variable.patch index a468a7fc4..9d122079e 100644 --- a/gnu/packages/patches/alsa-lib-add-environment-variable.patch +++ b/gnu/packages/patches/alsa-lib-add-environment-variable.patch @@ -1,21 +1,21 @@ -From 1822fb453128a1b5de93b4c590cd272d6488a077 Mon Sep 17 00:00:00 2001 +From 51523b7d546ade002b0bc999b2e01f9593e8576d Mon Sep 17 00:00:00 2001 From: Julien Lepiller -Date: Fri, 25 May 2018 19:26:58 +0200 +Date: Fri, 22 Jun 2018 13:50:45 +0200 Subject: [PATCH] Add support for a ALSA_PLUGIN_DIR environment variable. If it is not set, default to previous behavior. --- - src/control/control.c | 6 +++++- + src/control/control.c | 8 ++++++-- src/dlmisc.c | 9 +++++++-- src/pcm/pcm.c | 9 +++++++-- src/pcm/pcm_rate.c | 13 +++++++++---- - 4 files changed, 28 insertions(+), 9 deletions(-) + 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/control/control.c b/src/control/control.c -index 11f7815..9dba7dd 100644 +index 11f7815..920b1af 100644 --- a/src/control/control.c +++ b/src/control/control.c -@@ -1331,7 +1331,11 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name, +@@ -1331,13 +1331,17 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name, build_in++; } if (*build_in == NULL) { @@ -28,6 +28,13 @@ index 11f7815..9dba7dd 100644 if (buf1 == NULL) { err = -ENOMEM; goto _err; + } + lib = buf1; +- sprintf(buf1, "%s/libasound_module_ctl_%s.so", ALSA_PLUGIN_DIR, str); ++ sprintf(buf1, "%s/libasound_module_ctl_%s.so", plugdir, str); + } + } + #ifndef PIC diff --git a/src/dlmisc.c b/src/dlmisc.c index 3757d33..92aa864 100644 --- a/src/dlmisc.c @@ -106,5 +113,5 @@ index 4e0c7ca..8694a38 100644 rate->rate_min = SND_PCM_PLUGIN_RATE_MIN; -- -2.17.0 +2.14.4 -- 2.14.4