gnu: mumble: Update to 1.4.230.

* gnu/packages/telephony.scm (find-python-interpreter-cmake-modules):
New variable.
(mumble): Update to 1.4.230.
[source]: Adjust uri and snippet accordingly.
[arguments]: Change to a list of G-expressions.
<#:configure-flags>: New argument.
<#:phases>: Drop ‘configure’ (moved to configure-flags).
Add ‘unpack-submodules’, ‘fix-settings-crash’ and ‘hardcode-pulseaudio’.
[inputs]: Add glib and poco.
This commit is contained in:
Liliana Marie Prikler 2022-02-19 16:05:34 +01:00
parent 4f82f34309
commit a4cb236492
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -50,6 +50,7 @@ (define-module (gnu packages telephony)
#:use-module (gnu packages boost) #:use-module (gnu packages boost)
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages crypto) #:use-module (gnu packages crypto)
#:use-module (gnu packages databases) #:use-module (gnu packages databases)
#:use-module (gnu packages docbook) #:use-module (gnu packages docbook)
@ -91,6 +92,7 @@ (define-module (gnu packages telephony)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
@ -536,34 +538,48 @@ (define-public seren
(home-page "http://holdenc.altervista.org/seren/") (home-page "http://holdenc.altervista.org/seren/")
(license license:gpl3+))) (license license:gpl3+)))
(define find-python-interpreter-cmake-modules
(let ((commit "bb4d3ea8434eebef40df35434a9b6ef410fce0b2")
(revision "0"))
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/Krzmbrzl/FindPythonInterpreter")
(commit commit)))
(file-name (git-file-name "find-python-interpreter"
(git-version "0" revision commit)))
(sha256
(base32
"1ryhda2yqgrhnwndfg52mscdsclg1ivv746hvalcay5m1wy2h5bm")))))
(define-public mumble (define-public mumble
(package (package
(name "mumble") (name "mumble")
(version "1.3.4") (version "1.4.230")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append (string-append
"https://github.com/mumble-voip/mumble/releases/download/" "https://github.com/mumble-voip/mumble/releases/download/v"
version "/" name "-" version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"14v0rgy1a5alxmz7ly95y38bdj0hx79yysgkcd8r8p9qqfzlwpv1")) "1c1lwj0cpyawr74adpdrsnxk8ra5kqrjbg65cnwk8n6cwss84zdn"))
(modules '((guix build utils) (modules '((guix build utils)
(ice-9 ftw) (ice-9 ftw)
(srfi srfi-1))) (srfi srfi-1)))
(snippet (snippet
`(begin `(begin
(let ((keep (let ((keep
'("arc4random-src" '("arc4random"
"celt-0.7.0-build" "celt-0.7.0-build"
"celt-0.7.0-src" "celt-0.7.0-src"
"celt-0.11.0-build" "celt-0.11.0-build"
"celt-0.11.0-src" "celt-0.11.0-src"
"qqbonjour-src" "qqbonjour"
"rnnoise-build" "rnnoise-build"
"rnnoise-src" "rnnoise-src"
"smallft-src"))) "smallft")))
(with-directory-excursion "3rdparty" (with-directory-excursion "3rdparty"
(for-each delete-file-recursively (for-each delete-file-recursively
(lset-difference string=? (lset-difference string=?
@ -572,105 +588,71 @@ (define-public mumble
#t))))) #t)))))
(build-system qt-build-system) (build-system qt-build-system)
(arguments (arguments
`(#:tests? #f ; no "check" target (list
#:tests? #f ; no "check" target
#:configure-flags
#~(list "-Dbundled-speex=off"
"-Dbundled-opus=off"
;; "-Dbundled-rnnoise=off" ; XXX: not yet in release
"-Dalsa=off" ; use pulse
"-Dcoreaudio=off" ; use pulse
"-Dice=off" ; not packaged
"-Djackaudio=off" ; use pulse
"-Doss=off" ; use pulse
"-Dpulseaudio=on"
"-Dportaudio=off" ; use pulse
"-Dpipewire=off" ; use pulse
"-Doverlay-xcompile=off"
"-Dupdate=off" ; don't phone home
"-Dbundle-qt-translations=off")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(replace 'configure (add-after 'unpack 'unpack-submodules
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease"
(string-append "MUMBLE_PYTHON="
(search-input-file inputs
"/bin/python3"))
(string-append "CONFIG+="
(string-join
;; Options used are listed in the same order
;; as in the "INSTALL" file
;; (plus the final "packaged" and "release").
(list "no-bundled-speex" ; in speex
"no-bundled-opus" ; in opus
"no-g15" ; not packaged
"no-jackaudio" ; use pulse
"no-oss" ; use pulse
"no-alsa" ; use pulse
"no-update"
"no-embed-qt-translations"
"no-ice" ; not packaged
"packaged"
"release")))
(string-append "DEFINES+="
"PLUGIN_PATH="
(assoc-ref outputs "out")
"/lib/mumble"))))
(add-before 'configure 'fix-libspeechd-include
(lambda _ (lambda _
(substitute* "src/mumble/TextToSpeech_unix.cpp" (copy-recursively #$find-python-interpreter-cmake-modules
(("libspeechd.h") "speech-dispatcher/libspeechd.h")) "3rdparty/FindPythonInterpreter")))
#t)) (add-after 'unpack 'disable-murmur-ice
(lambda _
(substitute* "scripts/murmur.ini"
(("^ice=") ";ice="))))
;; disable statistic gathering by default. see <https://bugs.gnu.org/25201> ;; disable statistic gathering by default. see <https://bugs.gnu.org/25201>
(add-before 'configure 'fix-statistic-gathering-default (add-after 'unpack 'fix-statistic-gathering-default
(lambda _ (lambda _
(substitute* "src/mumble/Settings.cpp" (substitute* "src/mumble/Settings.h"
(("bUsage = true;") "bUsage = false;")) (("bUsage *= true;") "bUsage = false;"))))
#t)) (add-after 'unpack 'fix-mumble-overlay
(add-before 'configure 'fix-mumble-overlay (lambda* (#:key inputs outputs #:allow-other-keys)
(lambda* (#:key outputs #:allow-other-keys)
(with-output-to-file "scripts/mumble-overlay" (with-output-to-file "scripts/mumble-overlay"
(lambda () (lambda ()
(format #t "#!~a~%" (which "bash")) (format #t "#!~a~%" (search-input-file inputs "/bin/bash"))
(format #t "export LD_PRELOAD=\"~a $LD_PRELOAD\"~%" (format #t "export LD_PRELOAD=\"~a $LD_PRELOAD\"~%"
(string-append (assoc-ref outputs "out") (string-append (assoc-ref outputs "out")
"/lib/mumble/libmumble.so.1")) "/lib/mumble/libmumble.so.1"))
(format #t "exec \"${@}\""))) (format #t "exec \"${@}\"")))
#t)) #t))
(add-before 'install 'disable-murmur-ice (add-after 'unpack 'hardcode-pulseaudio
(lambda _ (lambda* (#:key inputs #:allow-other-keys)
(substitute* "scripts/murmur.ini.system" (substitute* "src/mumble/PulseAudio.cpp"
(("^ice=") ";ice=")) (("libpulse.so") (search-input-file inputs "/lib/libpulse.so"))))))))
#t))
(replace 'install ; install phase does not exist
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(etc (string-append out "/etc/murmur"))
(dbus (string-append out "/etc/dbus-1/system.d/"))
(bin (string-append out "/bin"))
(services (string-append out "/share/services"))
(applications (string-append out "/share/applications"))
(icons (string-append out "/share/icons/hicolor/scalable/apps"))
(man (string-append out "/share/man/man1"))
(lib (string-append out "/lib/mumble")))
(install-file "release/mumble" bin)
(install-file "scripts/mumble-overlay" bin)
(install-file "scripts/mumble.protocol" services)
(install-file "scripts/mumble.desktop" applications)
(install-file "icons/mumble.svg" icons)
(install-file "man/mumble-overlay.1" man)
(install-file "man/mumble.1" man)
(install-file "release/murmurd" bin)
(install-file "scripts/murmur.ini.system" etc)
(rename-file (string-append etc "/murmur.ini.system")
(string-append etc "/murmur.ini"))
(install-file "scripts/murmur.conf" dbus)
(install-file "man/murmurd.1" man)
(for-each (lambda (file) (install-file file lib))
(find-files "." "\\.so\\."))
(for-each (lambda (file) (install-file file lib))
(find-files "release/plugins" "\\.so$"))
#t))))))
(inputs (inputs
(list avahi (list avahi
boost boost
glib ; for speech-dispatcher
libsndfile libsndfile
libxi libxi
mesa ; avoid bundled mesa ; avoid bundled
openssl openssl
opus ; avoid bundled opus ; avoid bundled
poco
protobuf protobuf
pulseaudio pulseaudio
qtbase-5 qtbase-5
qtsvg qtsvg
speech-dispatcher speech-dispatcher
speex ; avoid bundled speex ; avoid bundled
speexdsp)) ; avoid bundled speexdsp ; avoid bundled
;; xiph-rnnoise ; TODO: unbundle rnnoise
))
(native-inputs (native-inputs
(list pkg-config python qttools)) (list pkg-config python qttools))
(synopsis "Low-latency, high quality voice chat software") (synopsis "Low-latency, high quality voice chat software")