From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Fix OpenAL backends. Date: Sun, 20 Sep 2015 13:15:25 +0200 Message-ID: <87k2rl5oky.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdcat-0004K1-PM for guix-devel@gnu.org; Sun, 20 Sep 2015 07:15:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zdcaq-0003SI-JC for guix-devel@gnu.org; Sun, 20 Sep 2015 07:15:43 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:25550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdcaq-0003SC-57 for guix-devel@gnu.org; Sun, 20 Sep 2015 07:15:40 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-openal-Use-full-path-to-audio-backend-libraries.patch >From e8d7f225b8781afbf331733e5f25442bd61b218a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus 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 --=-=-=--