unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Fix OpenAL backends.
@ 2015-09-20 11:15 Ricardo Wurmus
  2015-09-20 11:30 ` Andreas Enge
  2015-09-20 12:33 ` Thompson, David
  0 siblings, 2 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2015-09-20 11:15 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 358 bytes --]

Hi Guix,

as I tested my new “mars” package I noticed that there was no sound.
Investigating a little showed that the problem is in our “openal”
package, which loads backend libraries by name only, not by path.

The attached patch fixes this by patching in the full paths for
libasound and libpulse, so now I have sound in “mars” :)

~~ Ricardo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-openal-Use-full-path-to-audio-backend-libraries.patch --]
[-- Type: text/x-patch, Size: 1750 bytes --]

From e8d7f225b8781afbf331733e5f25442bd61b218a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Sun, 20 Sep 2015 13:03:38 +0200
Subject: [PATCH] gnu: openal: Use full path to audio backend libraries.

* gnu/packages/audio.scm (openal)[arguments]: Add build phase to patch in the
  full paths to backend audio libraries.
---
 gnu/packages/audio.scm | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index a4e5a55..d829a91 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -1053,7 +1053,25 @@ lv2-c++-tools.")
                 "0mmhdqiyb3c9dzvxspm8h2v8jibhi8pfjxnf6m0wn744y1ia2a8f"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f)) ; no check target
+     `(#:tests? #f  ; no check target
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'use-full-library-paths
+          (lambda* (#:key inputs #:allow-other-keys)
+            (substitute* "Alc/backends/pulseaudio.c"
+              (("#define PALIB \"libpulse\\.so\\.0\"")
+               (string-append "#define PALIB \""
+                              (assoc-ref inputs "pulseaudio")
+                              "/lib/libpulse.so.0"
+                              "\"")))
+            (substitute* "Alc/backends/alsa.c"
+              (("LoadLib\\(\"libasound\\.so\\.2\"\\)")
+               (string-append "LoadLib(\""
+                              (assoc-ref inputs "alsa-lib")
+                              "/lib/libasound.so.2"
+                              "\")")))
+            #t)))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("pulseaudio" ,pulseaudio)))
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix OpenAL backends.
  2015-09-20 11:15 [PATCH] Fix OpenAL backends Ricardo Wurmus
@ 2015-09-20 11:30 ` Andreas Enge
  2015-09-20 11:45   ` Ricardo Wurmus
  2015-09-20 12:33 ` Thompson, David
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Enge @ 2015-09-20 11:30 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

This looks good to me!

Andreas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix OpenAL backends.
  2015-09-20 11:30 ` Andreas Enge
@ 2015-09-20 11:45   ` Ricardo Wurmus
  0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Wurmus @ 2015-09-20 11:45 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel


Andreas Enge <andreas@enge.fr> writes:

> This looks good to me!

Thanks for the review.  Pushed to master.

~~ Ricardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix OpenAL backends.
  2015-09-20 11:15 [PATCH] Fix OpenAL backends Ricardo Wurmus
  2015-09-20 11:30 ` Andreas Enge
@ 2015-09-20 12:33 ` Thompson, David
  1 sibling, 0 replies; 4+ messages in thread
From: Thompson, David @ 2015-09-20 12:33 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Sun, Sep 20, 2015 at 7:15 AM, Ricardo Wurmus <rekado@elephly.net> wrote:
> Hi Guix,
>
> as I tested my new “mars” package I noticed that there was no sound.
> Investigating a little showed that the problem is in our “openal”
> package, which loads backend libraries by name only, not by path.
>
> The attached patch fixes this by patching in the full paths for
> libasound and libpulse, so now I have sound in “mars” :)

Awesome!  This fixed sound in Minetest, too.  Thanks!

- Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-20 12:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-20 11:15 [PATCH] Fix OpenAL backends Ricardo Wurmus
2015-09-20 11:30 ` Andreas Enge
2015-09-20 11:45   ` Ricardo Wurmus
2015-09-20 12:33 ` Thompson, David

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).