From f63cf832869bee91f3f6e87c076bd1e39d32c285 Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Sat, 4 Apr 2020 19:36:31 +0200 Subject: [PATCH] gnu: libtgvoip: Fix loading of shared libraries. Fixes . * gnu/packages/telephony.scm (libtgvoip)[arguments]<#:phases>[patch-dlopen]: New phase. --- gnu/packages/telephony.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index f64cdd3fb2..f73efb0deb 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -1046,6 +1046,23 @@ This package provides the Jami client for the GNOME desktop.") ("libopusenc" ,libopusenc) ("openssl" ,openssl) ("pulseaudio" ,pulseaudio))) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; libtgvoip wants to dlopen libpulse and libasound, so tell it where + ;; they are. + (add-after 'unpack 'patch-dlopen + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "os/linux/AudioPulse.cpp" + (("libpulse\\.so") + (string-append (assoc-ref inputs "pulseaudio") + "/lib/libpulse.so"))) + (substitute* '("os/linux/AudioInputALSA.cpp" + "os/linux/AudioOutputALSA.cpp") + (("libasound\\.so") + (string-append (assoc-ref inputs "alsa-lib") + "/lib/libasound.so"))) + #t))))) (synopsis "VoIP library for Telegram clients") (description "A collection of libraries and header files for implementing telephony functionality into custom Telegram clients.") -- 2.26.0