1 ;;; GNU Guix --- Functional package management for GNU
3 ;;; Copyright © 2020, 2021 Raghav Gururajan <raghavgururajan@disroot.org>
4 ;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
5 ;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages linphone)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages admin)
25 #:use-module (gnu packages audio)
26 #:use-module (gnu packages avahi)
27 #:use-module (gnu packages cpp)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages crypto)
30 #:use-module (gnu packages databases)
31 #:use-module (gnu packages documentation)
32 #:use-module (gnu packages gettext)
33 #:use-module (gnu packages gl)
34 #:use-module (gnu packages glib)
35 #:use-module (gnu packages gnome)
36 #:use-module (gnu packages gnome-xyz)
37 #:use-module (gnu packages graphviz)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages image)
40 #:use-module (gnu packages linux)
41 #:use-module (gnu packages ncurses)
42 #:use-module (gnu packages openldap)
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages pulseaudio)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages python-xyz)
48 #:use-module (gnu packages qt)
49 #:use-module (gnu packages java)
50 #:use-module (gnu packages sqlite)
51 #:use-module (gnu packages telephony)
52 #:use-module (gnu packages tls)
53 #:use-module (gnu packages video)
54 #:use-module (gnu packages xiph)
55 #:use-module (gnu packages xml)
56 #:use-module (gnu packages xorg)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix packages)
59 #:use-module (guix download)
60 #:use-module (guix git-download)
61 #:use-module (guix build-system cmake)
62 #:use-module (guix build-system qt)
63 #:use-module (guix build-system glib-or-gtk)
64 #:use-module (guix build-system gnu))
67 (let ((commit "74021cc7cb20a4e177748dd2948173e1f9c270ae")
71 (version (git-version "3.0.2" revision commit))
76 (url "git://git.linphone.org/bcunit")
78 (file-name (git-file-name name version))
80 (base32 "0npdwvanjkfg9vrqs5yi8vh6wliv50ycdli8pzavir84nb31nq1b"))))
81 (build-system cmake-build-system)
82 (outputs '("out" "doc"))
84 `(#:configure-flags (list "-DENABLE_STATIC=NO"
87 "-DENABLE_EXAMPLES=ON"
89 "-DENABLE_MEMTRACE=ON")
91 (modify-phases %standard-phases
92 (add-after 'unpack 'patch-source
94 ;; Include BCunit headers for examples.
95 (substitute* "Examples/CMakeLists.txt"
96 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}")
97 (string-append "${CMAKE_CURRENT_SOURCE_DIR} "
98 "${PROJECT_SOURCE_DIR}/BCUnit/Headers "
99 "${CMAKE_BINARY_DIR}/BCUnit/Headers")))
100 ;; Link bcunit and bcunit_tests libraries.
101 (substitute* "BCUnit/Sources/CMakeLists.txt"
102 (("target_include_directories\\(bcunit_test PUBLIC Test\\)")
104 "target_include_directories(bcunit_test PUBLIC Test)\n"
105 "target_link_libraries(bcunit_test bcunit)")))))
108 (with-directory-excursion "BCUnit/Sources/Test"
109 (invoke "./test_bcunit"))))
110 (add-after 'install 'move-doc
111 (lambda* (#:key outputs #:allow-other-keys)
112 (let ((out (assoc-ref outputs "out"))
113 (doc (assoc-ref outputs "doc")))
115 `(,(string-append doc "/share/doc")
116 ,(string-append doc "/share/BCUnit")))
118 (string-append out "/share/doc/BCUnit")
119 (string-append doc "/share/doc/BCUnit"))
121 (string-append out "/share/BCUnit/Examples")
122 (string-append doc "/share/BCUnit/Examples"))))))))
125 (synopsis "Belledonne Communications Unit Testing Framework")
126 (description "BCUnit is a fork of the defunct project CUnit, with
127 several fixes and patches applied. It is a unit testing framework for
128 writing, administering, and running unit tests in C.")
129 (home-page "https://gitlab.linphone.org/BC/public/bcunit")
130 (license license:lgpl2.0+))))
132 (define-public bctoolbox
140 (url "https://gitlab.linphone.org/BC/public/bctoolbox.git")
142 (file-name (git-file-name name version))
144 (base32 "0bfswwvvdshaahg4jd2j10f0sci8809s4khajd0m6b059zwc7y25"))))
145 (build-system cmake-build-system)
146 (outputs '("out" "debug"))
148 `(#:configure-flags '("-DENABLE_STATIC=OFF")
150 (modify-phases %standard-phases
151 (add-after 'unpack 'patch-cmake
152 (lambda* (#:key inputs #:allow-other-keys)
153 ;; Fix decaf dependency (see:
154 ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/3).
155 (let* ((decaf (assoc-ref inputs "decaf")))
156 (substitute* (find-files "." "CMakeLists.txt")
157 (("find_package\\(Decaf CONFIG\\)")
158 "set(DECAF_FOUND 1)")
159 (("\\$\\{DECAF_INCLUDE_DIRS\\}")
160 (string-append decaf "/include/decaf"))
161 (("\\$\\{DECAF_TARGETNAME\\}")
163 (add-after 'unpack 'skip-problematic-tests
165 ;; The following test relies on networking; disable it.
166 (substitute* "tester/port.c"
167 (("[ \t]*TEST_NO_TAG.*bctbx_addrinfo_sort_test\\)")
169 (add-after 'unpack 'fix-installed-resource-directory-detection
171 ;; There's some broken logic in tester.c that checks if CWD, or
172 ;; if its parent exist, and if so, sets the prefix where the test
173 ;; resources are looked up to; disable it (see:
174 ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/4).
175 (substitute* "src/tester.c"
176 (("if \\(file_exists\\(\".\"\\)\\)")
178 (("if \\(file_exists\\(\"..\"\\)\\)")
182 (with-directory-excursion "tester"
183 (invoke "./bctoolbox_tester")))))))
187 ("mbedtls" ,mbedtls-apache)))
188 (synopsis "Belledonne Communications Tool Box")
189 (description "BcToolBox is an utilities library used by Belledonne
190 Communications software like belle-sip, mediastreamer2 and linphone.")
191 (home-page "https://gitlab.linphone.org/BC/public/bctoolbox")
192 (license license:gpl3+)))
202 (url "https://gitlab.linphone.org/BC/public/belr.git")
204 (file-name (git-file-name name version))
206 (base32 "0w2canwwm0qb99whnangvaybvjzq8xg6vksqxykgr8fbx7clw03h"))))
207 (build-system cmake-build-system)
208 (outputs '("out" "debug" "tester"))
210 `(#:configure-flags '("-DENABLE_STATIC=OFF")
212 (modify-phases %standard-phases
213 (delete 'check) ;moved after the install phase
214 (add-after 'install 'check
215 (lambda* (#:key outputs #:allow-other-keys)
216 (let* ((tester (assoc-ref outputs "tester"))
217 (belr_tester (string-append tester "/bin/belr_tester"))
218 (tester-share (string-append tester "/share/belr_tester")))
219 (invoke belr_tester))))
220 (add-after 'install 'move-tester
221 (lambda* (#:key outputs #:allow-other-keys)
222 (let* ((out (assoc-ref outputs "out"))
223 (tester (assoc-ref outputs "tester")))
225 (list (string-append tester "/bin")
226 (string-append tester "/share")))
228 (string-append out "/bin/belr_tester")
229 (string-append tester "/bin/belr_tester"))
231 (string-append out "/share/belr-tester")
232 ;; The detect_res_prefix procedure in bctoolbox's tester.c
233 ;; resolves the resource path based on the executable path and
234 ;; name, so have it match.
235 (string-append tester "/share/belr_tester"))))))))
238 (synopsis "Belledonne Communications Language Recognition Library")
239 (description "Belr is Belledonne Communications' language recognition
240 library, written in C++11. It parses text inputs formatted according to a
241 language defined by an ABNF grammar, such as the protocols standardized at
243 (home-page "https://gitlab.linphone.org/BC/public/belr")
244 (license license:gpl3+)))
246 (define-public belcard
254 (url "https://gitlab.linphone.org/BC/public/belcard.git")
256 (file-name (git-file-name name version))
258 (base32 "16x2xp8d0a115132zhy1kpxkyj86ia7vrsnpjdg78fnbvmvysc8m"))))
259 (build-system cmake-build-system)
260 (outputs '("out" "debug" "tester"))
262 `(#:configure-flags '("-DENABLE_STATIC=OFF")
264 (modify-phases %standard-phases
265 (add-after 'unpack 'patch-vcard-grammar-location
266 (lambda* (#:key outputs #:allow-other-keys)
267 (let* ((out (assoc-ref outputs "out"))
269 (string-append out "/share/belr/grammars/vcard_grammar")))
270 (substitute* "include/belcard/vcard_grammar.hpp"
271 (("define VCARD_GRAMMAR \"vcard_grammar\"")
272 (format #f "define VCARD_GRAMMAR ~s" vcard-grammar))))))
273 (add-after 'install 'install-tester
274 (lambda* (#:key inputs outputs #:allow-other-keys)
275 (let ((out (assoc-ref outputs "out"))
276 (tester (assoc-ref outputs "tester"))
277 (test-name (string-append ,name "_tester")))
279 (list (string-append tester "/bin")
280 (string-append tester "/share")))
281 (rename-file (string-append out "/bin/" test-name)
282 (string-append tester "/bin/" test-name))
283 (rename-file (string-append out "/share/" test-name)
284 (string-append tester "/share/" test-name)))))
286 (add-after 'install-tester 'check
287 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
289 (let* ((tester (assoc-ref outputs "tester"))
290 (belcard_tester (string-append tester
291 "/bin/belcard_tester")))
292 (invoke belcard_tester))))))))
294 (list bctoolbox belr))
295 (synopsis "Belledonne Communications VCard Library")
296 (description "Belcard is a C++ library to manipulate VCard standard
298 (home-page "https://gitlab.linphone.org/BC/public/belcard")
299 (license license:gpl3+)))
301 (define-public bcmatroska2
309 (url "https://gitlab.linphone.org/BC/public/bcmatroska2.git")
311 (file-name (git-file-name name version))
313 (base32 "1avl9w18kh4dxm3g8j0bkw39bksd7bz3nfxvyibqqnz63ds8vfi2"))))
314 (build-system cmake-build-system)
316 `(#:tests? #f ; No test target
317 #:configure-flags (list "-DENABLE_STATIC=NO"))) ; Not required
318 (synopsis "Belledonne Communications Media Container")
319 (description "BcMatroska is a free and open standard multi-media container
320 format. It can hold an unlimited number of video, audio, picture, or subtitle
321 tracks in one file. This project provides a convenient distribution of the
322 Matroska multimedia container format.")
323 (home-page "https://gitlab.linphone.org/BC/public/bcmatroska2")
324 (license (list license:gpl2+ ;for this package (build system files)
325 license:bsd-4 ;for Core C and LibEBML2
326 license:lgpl2.1+)))) ;for LibMatroska2
328 (define-public bcg729
336 (url "git://git.linphone.org/bcg729")
338 (file-name (git-file-name name version))
340 (base32 "1hal6b3w6f8y5r1wa0xzj8sj2jjndypaxyw62q50p63garp2h739"))))
341 (build-system cmake-build-system)
343 `(#:configure-flags (list "-DENABLE_STATIC=NO"
344 "-DENABLE_TESTS=YES")
346 (modify-phases %standard-phases
347 (add-before 'check 'copy-inputs
348 (lambda* (#:key inputs #:allow-other-keys)
349 (let ((test-patterns (assoc-ref inputs "test-patterns"))
350 (dest (string-append "test/bcg729-patterns.zip")))
351 (copy-recursively test-patterns dest))))
354 (with-directory-excursion "test"
355 (invoke "unzip" "bcg729-patterns.zip")
358 (invoke "./testCampaign" "-s" test-name))
359 (list "fixedCodebookSearch"
361 "adaptativeCodebookSearch"
363 "computeAdaptativeCodebookGain"
371 "decodeFixedCodeVector"
373 ;; "LP2LSPConversion"
375 "findOpenLoopPitchDelay"
377 "computeWeightedSpeech"
378 "interpolateqLSPAndConvert2LP"
379 "decodeAdaptativeCodeVector"))))))))
385 (uri (string-append "http://www.belledonne-communications.com/"
386 "bc-downloads/bcg729-patterns.zip"))
388 (base32 "1kivarhh3izrl9sg0szs6x6pbq2ap0y6xsraw0gbgspi4gnfihrh"))))
390 (synopsis "Belledonne Communications G729 Codec")
391 (description "BcG729 is an implementation of both encoder and decoder of
392 the ITU G729 speech codec. The library written in C 99 is fully portable and
393 can be executed on many platforms including both ARM and x86 processors. It
394 supports concurrent channels encoding and decoding for multi call application
395 such as conferencing.")
396 (home-page "https://linphone.org/technical-corner/bcg729")
397 (license license:gpl3+)))
407 (url "https://gitlab.linphone.org/BC/public/ortp.git")
409 (file-name (git-file-name name version))
411 (base32 "1r1kvjzyfvkf66in4p51wi87balzg3sw3aq6r4xr609mz86spi5m"))))
412 (build-system cmake-build-system)
413 (outputs '("out""tester"
414 "doc")) ;1.5 MiB of HTML doc
416 `(#:tests? #f ;requires networking
417 #:configure-flags (list "-DENABLE_STATIC=NO"
418 "-DENABLE_TESTS=YES")
420 (modify-phases %standard-phases
421 (add-after 'unpack 'fix-version-strings
422 ;; See: https://gitlab.linphone.org/BC/public/ortp/-/issues/5.
424 (substitute* "CMakeLists.txt"
425 (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
426 (string-append "VERSION " ,version))
427 (("\\$\\{ORTP_DOC_VERSION\\}")
429 (add-after 'install 'separate-outputs
430 (lambda* (#:key outputs #:allow-other-keys)
431 (let* ((out (assoc-ref outputs "out"))
432 (doc (assoc-ref outputs "doc"))
433 (doc-src (string-append out "/share/doc/ortp-" ,version))
434 (doc-dest (string-append doc "/share/doc/ortp-" ,version))
435 (tester (assoc-ref outputs "tester")))
436 (for-each mkdir-p (list (string-append doc "/share/doc")
437 (string-append tester "/bin")))
438 (rename-file doc-src doc-dest)
439 (rename-file (string-append out "/bin")
440 (string-append tester "/bin"))))))))
443 ("doxygen" ,doxygen)))
446 (synopsis "Belledonne Communications RTP Library")
447 (description "oRTP is a C library implementing the RTP protocol. It
448 implements the RFC 3550 standard.")
449 (home-page "https://linphone.org/technical-corner/ortp")
450 (license license:gpl3+)))
460 (url "https://gitlab.linphone.org/BC/public/bzrtp")
462 (file-name (git-file-name name version))
464 (base32 "1yjmsbqmymzl4r7sba6w4a2yld8m6hzafr6jf7sj0syhwpnc3zv6"))))
465 (build-system cmake-build-system)
470 "-DENABLE_TESTS=YES")))
472 `(("bctoolbox" ,bctoolbox)
475 (synopsis "Belledonne Communications ZRTP Library")
476 (description "BZRTP is an implementation of ZRTP keys exchange protocol,
477 written in C. It is fully portable and can be executed on many platforms
478 including both ARM and x86.")
479 (home-page "https://gitlab.linphone.org/BC/public/bzrtp")
480 (license license:gpl3+)))
482 (define-public belle-sip
490 (url "https://gitlab.linphone.org/BC/public/belle-sip.git")
492 (file-name (git-file-name name version))
494 (base32 "1kknnlczq7dpqaj1dwxvy092dzrqjy11ndkv90rqwmdryigkjk6z"))))
495 (build-system cmake-build-system)
496 (outputs '("out" "tester"))
498 `(#:configure-flags (list "-DENABLE_STATIC=NO"
501 (modify-phases %standard-phases
502 (add-after 'unpack 'patch
503 (lambda* (#:key inputs #:allow-other-keys)
504 ;; Fix mDNS dependency.
505 (let* ((avahi (assoc-ref inputs "avahi")))
506 (substitute* (find-files "." "CMakeLists.txt")
507 (("find_package\\(DNSSD REQUIRED\\)")
508 "set(DNSSD_FOUND 1)")
509 (("\\$\\{DNSSD_INCLUDE_DIRS\\}")
510 (string-append avahi "/include/avahi-compat-libdns_sd"))
511 (("\\$\\{DNSSD_LIBRARIES\\}")
513 (substitute* "src/CMakeLists.txt"
514 ;; ANTLR would use multithreaded DFA generation otherwise,
515 ;; which would not be reproducible.
516 (("-Xmultithreaded ") ""))))
517 (delete 'check) ;move after install
518 (add-after 'install 'separate-outputs
519 (lambda* (#:key outputs #:allow-other-keys)
520 (let* ((out (assoc-ref outputs "out"))
521 (tester (assoc-ref outputs "tester"))
522 (tester-name "belle_sip_tester"))
523 (for-each mkdir-p (list (string-append tester "/bin")
524 (string-append tester "/share")))
525 (rename-file (string-append out "/bin")
526 (string-append tester "/bin"))
527 (rename-file (string-append out "/share/" tester-name)
528 (string-append tester "/share/" tester-name)))))
529 (add-after 'separate-outputs 'check
530 (lambda* (#:key outputs #:allow-other-keys)
531 (let ((tester (string-append (assoc-ref outputs "tester")
532 "/bin/belle_sip_tester")))
533 (for-each (lambda (suite-name)
534 (invoke tester "--suite" suite-name))
535 (list "Object inheritance"
545 "Authentication helper"
552 (list avahi bctoolbox zlib))
553 (synopsis "Belledonne Communications SIP Library")
554 (description "Belle-sip is a modern library implementing SIP transport,
555 transaction and dialog layers. It is written in C, with an object-oriented
556 API. It also comprises a simple HTTP/HTTPS client implementation.")
557 (home-page "https://linphone.org/technical-corner/belle-sip")
558 (license license:gpl3+)))
560 (define-public mediastreamer2
562 (name "mediastreamer2")
568 (url "https://gitlab.linphone.org/BC/public/mediastreamer2.git")
570 (file-name (git-file-name name version))
572 (base32 "0989h3d0h7qrx4kjx8gg09j8c5hvvi3h8qi1iq1dqbppwbaxbz8c"))))
573 (outputs '("out" "doc" "tester"))
574 (build-system cmake-build-system)
576 `(#:configure-flags (list "-DENABLE_STATIC=NO"
578 ;; Do not fail on compile warnings.
580 "-DENABLE_PORTAUDIO=YES"
581 "-DENABLE_G729B_CNG=YES")
583 (modify-phases %standard-phases
584 (add-after 'unpack 'fix-version
586 (substitute* "CMakeLists.txt"
587 (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
588 (string-append "VERSION " ,version)))))
589 (add-after 'unpack 'patch-source
591 (substitute* "src/otherfilters/mspcapfileplayer.c"
592 (("O_BINARY") "L_INCR"))))
593 (add-before 'check 'pre-check
595 ;; Tests require a running X server.
596 (system "Xvfb :1 +extension GLX &")
597 (setenv "DISPLAY" ":1")
598 ;; Tests write to $HOME.
599 (setenv "HOME" (getenv "TEMP"))))
600 (delete 'check) ;move after install
601 (add-after 'install 'separate-outputs
602 (lambda* (#:key outputs #:allow-other-keys)
603 (let* ((out (assoc-ref outputs "out"))
604 (tester (assoc-ref outputs "tester"))
605 (tester-name (string-append ,name "_tester"))
606 (doc (assoc-ref outputs "doc"))
607 (doc-name (string-append ,name "-" ,version)))
609 (list (string-append tester "/bin")
610 (string-append tester "/share")
611 (string-append doc "/share/doc")))
612 ;; Move the tester executable.
613 (rename-file (string-append out "/bin/" tester-name)
614 (string-append tester "/bin/" tester-name))
615 ;; Move the tester data files.
616 (rename-file (string-append out "/share/" tester-name)
617 (string-append tester "/share/" tester-name))
618 ;; Move the HTML documentation.
619 (rename-file (string-append out "/share/doc/" doc-name)
620 (string-append doc "/share/doc/" doc-name)))))
621 (add-after 'separate-outputs 'check
622 (lambda* (#:key outputs #:allow-other-keys)
623 (let ((tester (string-append (assoc-ref outputs "tester")
624 "/bin/mediastreamer2_tester")))
625 (for-each (lambda (suite-name)
626 (invoke tester "--suite" suite-name))
627 ;; Some tests fail, due to requiring access to the
628 ;; sound card or the network.
631 ;; "AdaptiveAlgorithm"
641 ("python" ,python-wrapper)
642 ("xorg-server" ,xorg-server-for-tests)))
646 ("bcmatroska2" ,bcmatroska2)
647 ("bctoolbox" ,bctoolbox)
657 ("portaudio" ,portaudio)
658 ("pulseaudio" ,pulseaudio)
661 ("speexdsp" ,speexdsp)
663 ("theora" ,libtheora)
664 ("turbojpeg" ,libjpeg-turbo)
670 (synopsis "Belledonne Communications Streaming Engine")
671 (description "Mediastreamer2 is a powerful and lightweight streaming engine
672 for telephony applications. This media processing and streaming toolkit is
673 responsible for receiving and sending all multimedia streams in Linphone,
674 including media capture, encoding and decoding, and rendering.")
675 (home-page "https://linphone.org/technical-corner/mediastreamer2")
676 (license license:gpl3+)))
686 (url "https://gitlab.linphone.org/BC/public/lime.git")
688 (file-name (git-file-name name version))
690 (base32 "14jg1zisjbzflw3scfqdbwy48wq3cp93l867vigb8l40lkc6n26z"))))
691 (build-system cmake-build-system)
692 (outputs '("out" "doc"))
694 `(#:configure-flags (list "-DENABLE_STATIC=NO"
695 "-DENABLE_C_INTERFACE=YES")
697 (modify-phases %standard-phases
698 (add-after 'unpack 'patch-source
700 ;; Disable tests that require networking.
701 (substitute* "tester/CMakeLists.txt"
702 (("add_test\\(?.*\"Hello World\"\\)") "")
703 (("add_test\\(?.*\"lime\"\\)") "")
704 (("add_test\\(?.*\"FFI\"\\)") ""))))
705 (add-after 'build 'build-doc
707 (invoke "make" "doc")))
708 (add-after 'install 'install-doc
709 (lambda* (#:key outputs #:allow-other-keys)
710 (let* ((doc (assoc-ref outputs "doc"))
711 (dir (string-append doc "/share/doc"))
712 (dest (string-append dir "/" ,name "-" ,version)))
714 (copy-recursively "doc" dest)))))))
717 ("doxygen" ,doxygen)))
719 (list bctoolbox belle-sip soci))
720 (synopsis "Belledonne Communications Encryption Library")
721 (description "LIME is an encryption library for one-to-one and group
722 instant messaging, allowing users to exchange messages privately and
723 asynchronously. It supports multiple devices per user and multiple users per
725 (home-page "https://linphone.org/technical-corner/lime")
726 (license license:gpl3+)))
728 (define-public liblinphone
736 (url "https://gitlab.linphone.org/BC/public/liblinphone.git")
738 (file-name (git-file-name name version))
740 (base32 "1lwabr93jw24y04pdqnw9dgg8jb3lzfplyx19f83jgp9dj8kmfq9"))))
741 (outputs '("out" "tester"))
742 (build-system cmake-build-system)
744 `(#:tests? #f ; Tests require networking
745 #:configure-flags (list "-DENABLE_STATIC=NO"
746 "-DENABLE_DOC=NO" ;requires unpackaged javasphinx
749 (modify-phases %standard-phases
750 (add-after 'install 'separate-outputs
751 (lambda* (#:key outputs #:allow-other-keys)
752 (let* ((out (assoc-ref outputs "out"))
753 (tester (assoc-ref outputs "tester"))
754 (tester-name (string-append ,name "_tester")))
756 (list (string-append tester "/bin")
757 (string-append tester "/share")))
758 (rename-file (string-append out "/bin/" tester-name)
759 (string-append tester "/bin/" tester-name))
760 (rename-file (string-append out "/bin/groupchat_benchmark")
761 (string-append tester "/bin/groupchat_benchmark"))
762 (rename-file (string-append out "/share/" tester-name)
763 (string-append tester "/share/" tester-name))))))))
789 (synopsis "Belledonne Communications Softphone Library")
790 (description "Liblinphone is a high-level SIP library integrating
791 all calling and instant messaging features into an unified
792 easy-to-use API. It is the cross-platform VoIP library on which the
793 Linphone application is based on, and that anyone can use to add audio
794 and video calls or instant messaging capabilities to an application.")
795 (home-page "https://linphone.org/technical-corner/liblinphone")
796 (license license:gpl3+)))
798 (define-public linphone-desktop
800 (name "linphone-desktop")
806 (url "https://gitlab.linphone.org/BC/public/linphone-desktop")
808 (file-name (git-file-name name version))
810 (base32 "1gq4l9p21rbrcksa7fbkzn9fzbbynqmn6ni6lhnvzk359sb1xvbz"))
811 (patches (search-patches "linphone-desktop-without-sdk.patch"))))
812 (build-system qt-build-system)
813 (outputs '("out" "debug"))
815 `(#:tests? #f ; No test target
816 #:configure-flags (list "-DENABLE_UPDATE_CHECK=NO"
817 "-DENABLE_DAEMON=YES"
818 "-DENABLE_CONSOLE_UI=YES")
820 (modify-phases %standard-phases
821 (add-after 'unpack 'pre-configure
823 (make-file-writable "linphone-app/linphoneqt_version.cmake")
824 (substitute* "linphone-app/linphoneqt_version.cmake"
825 (("\\$\\{GUIX-SET-VERSION\\}") ,version))))
826 (add-after 'install 'post-install
827 (lambda* (#:key inputs outputs #:allow-other-keys)
828 (let* ((out (assoc-ref outputs "out"))
829 (liblinphone (assoc-ref inputs "liblinphone"))
830 (grammar-dest (string-append out "/share/belr/grammars")))
831 ;; Remove unnecessary Qt configuration file.
832 (delete-file (string-append out "/bin/qt.conf"))
833 ;; Not using the FHS exposes an issue where the client
834 ;; refers to its own directories, which lacks files
835 ;; installed by the dependencies.
836 (symlink (string-append liblinphone "/lib")
837 (string-append out "/lib"))
838 (symlink (string-append liblinphone "/share/sounds")
839 (string-append out "/share/sounds"))
840 (symlink (string-append liblinphone "/share/linphone/rootca.pem")
841 (string-append out "/share/linphone/rootca.pem"))
842 (mkdir-p (dirname grammar-dest))
843 (symlink (string-append liblinphone "/share/belr/grammars")
846 (list pkg-config qttools-5))
860 (synopsis "Desktop client for the Linphone SIP softphone")
861 (description "Linphone is a SIP softphone for voice and video over IP calling
862 (VoIP) and instant messaging. Amongst its features are:
864 @item High Definition (HD) audio and video calls
865 @item Multiple call management (pause and resume)
867 @item Audio conferencing (merge calls into a conference call)
868 @item Call recording and replay (audio only)
869 @item Instant Messaging with message delivery status (IMDN)
870 @item Picture and file sharing
871 @item Echo cancellation
872 @item Secure user authentication using TLS client certificates
873 @item SRTP, zRTP and SRTP-DTLS voice and video encryption
874 @item Telephone tone (DTMF) support using SIP INFO or RFC 4733
875 @item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc.
876 @item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4
878 (home-page "https://linphone.org/technical-corner/linphone")
879 (license license:gpl3+)))
881 (define-public linphoneqt
882 (deprecated-package "linphoneqt" linphone-desktop))
884 (define-public msopenh264
885 (let ((commit "88697cc95140017760d6da408cb0efdc5e86e40a")
889 (version (git-version "1.2.1" revision commit))
894 (url "https://gitlab.linphone.org/BC/public/msopenh264.git")
896 (file-name (git-file-name name version))
898 (base32 "10y3b6s934f2wbsf60b3p0g6hffizjqrj5in8l4sida2fjdxlwwy"))))
899 (build-system cmake-build-system)
901 `(#:tests? #f ; No test target
903 (list "-DENABLE_STATIC=NO"))) ; Not required
905 (list bctoolbox mediastreamer2 openh264 ortp))
906 (synopsis "Media Streamer H.264 Codec")
907 (description "MsOpenH264 is an H.264 encoder/decoder plugin for
908 mediastreamer2 based on the openh264 library.")
909 (home-page "https://gitlab.linphone.org/BC/public/msopenh264")
910 (license license:gpl2+))))
912 (define-public mssilk
913 (let ((commit "dd0f31ee795faa7ea89e601b072dae4cd1df7e3f")
917 (version (git-version "1.1.1" revision commit))
922 (url "https://gitlab.linphone.org/BC/public/mssilk.git")
924 (file-name (git-file-name name version))
926 (base32 "1dann5fnzqp6wjlwc6bl2k9b6rvn6bznqb3qsi1kgv9dnq44cbr0"))))
927 (build-system cmake-build-system)
929 `(#:tests? #f ; No test target
931 (list "-DENABLE_STATIC=NO"))) ; Not required
933 (list bctoolbox mediastreamer2 ortp))
934 (synopsis "Media Streamer SILK Codec")
935 (description "MSSILK is a plugin of MediaStreamer, adding support for AMR
936 codec. It is based on the Skype's SILK implementation.")
937 (home-page "https://gitlab.linphone.org/BC/public/mssilk")
938 (license license:gpl2+))))
940 (define-public mswebrtc
941 (let ((commit "946ca706733f36a6b4923f04e569531125462d1d")
945 (version (git-version "1.1.1" revision commit))
950 (url "https://gitlab.linphone.org/BC/public/mswebrtc")
952 (file-name (git-file-name name version))
954 (base32 "1pfg9m6bpbv0f53nx72rdxhlyriax9pg4yj0gpwq8ha6lqnpwg1x"))))
955 (build-system cmake-build-system)
957 `(#:tests? #f ; No test target
960 "-DENABLE_STATIC=NO")
962 (modify-phases %standard-phases
963 (add-after 'unpack 'copy-inputs
964 (lambda* (#:key inputs outputs #:allow-other-keys)
965 (let* ((webrtc-from (assoc-ref inputs "webrtc"))
966 (webrtc-to (string-append (getcwd) "/webrtc")))
967 (copy-recursively webrtc-from webrtc-to))
975 (url "https://gitlab.linphone.org/BC/public/external/webrtc")
976 (commit "583acd27665cfadef8ab03eb85a768d308bd29dd")))
978 (git-file-name "webrtc-for-mswebrtc" version))
981 "1maqychrgwy0z4zypa03qp726l2finw64z6cymdzhd58ql3p1lvm"))))
982 ("python" ,python-wrapper)))
984 (list bctoolbox mediastreamer2 ortp))
985 (synopsis "Media Streamer WebRTC Codec")
986 (description "MSWebRTC is a plugin of MediaStreamer, adding support for
987 WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.")
988 (home-page "https://gitlab.linphone.org/BC/public/mswebrtc")
989 (license license:gpl2+))))
992 (let ((commit "5ab5c098299107048dfcbfc741f7392faef167bd")
996 (version (git-version "1.1.3" revision commit))
1001 (url "https://gitlab.linphone.org/BC/public/msamr")
1003 (file-name (git-file-name name version))
1005 (base32 "1g79lw1qi1mlw3v1b0cixmqiwjql81gz9naakb15n8pvaag9aaqm"))))
1006 (build-system cmake-build-system)
1008 `(#:tests? #f ; No test target
1010 (list "-DENABLE_STATIC=NO" ; Not required
1011 "-DENABLE_WIDEBAND=YES")))
1013 `(("bctoolbox" ,bctoolbox)
1014 ("mediastreamer2" ,mediastreamer2)
1015 ("opencoreamr" ,opencore-amr)
1017 ("voamrwbenc" ,vo-amrwbenc)))
1018 (synopsis "Media Streamer AMR Codec")
1019 (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
1020 codec. It is based on the opencore-amr implementation.")
1021 (home-page "https://gitlab.linphone.org/BC/public/msamr")
1022 (license license:gpl3+))))