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 base)
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 perl)
43 #:use-module (gnu packages pulseaudio)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages python-xyz)
46 #:use-module (gnu packages qt)
47 #:use-module (gnu packages java)
48 #:use-module (gnu packages sqlite)
49 #:use-module (gnu packages telephony)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages video)
52 #:use-module (gnu packages xiph)
53 #:use-module (gnu packages xml)
54 #:use-module (gnu packages xorg)
55 #:use-module ((guix licenses) #:prefix license:)
56 #:use-module (guix packages)
57 #:use-module (guix download)
58 #:use-module (guix git-download)
59 #:use-module (guix build-system cmake)
60 #:use-module (guix build-system qt)
61 #:use-module (guix build-system glib-or-gtk)
62 #:use-module (guix build-system gnu))
65 (let ((commit "74021cc7cb20a4e177748dd2948173e1f9c270ae")
69 (version (git-version "3.0.2" revision commit))
74 (url "git://git.linphone.org/bcunit")
76 (file-name (git-file-name name version))
78 (base32 "0npdwvanjkfg9vrqs5yi8vh6wliv50ycdli8pzavir84nb31nq1b"))))
79 (build-system cmake-build-system)
80 (outputs '("out" "doc"))
82 `(#:configure-flags (list "-DENABLE_STATIC=NO"
85 "-DENABLE_EXAMPLES=ON"
87 "-DENABLE_MEMTRACE=ON")
89 (modify-phases %standard-phases
90 (add-after 'unpack 'patch-source
92 ;; Include BCunit headers for examples.
93 (substitute* "Examples/CMakeLists.txt"
94 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}")
95 (string-append "${CMAKE_CURRENT_SOURCE_DIR} "
96 "${PROJECT_SOURCE_DIR}/BCUnit/Headers "
97 "${CMAKE_BINARY_DIR}/BCUnit/Headers")))
98 ;; Link bcunit and bcunit_tests libraries.
99 (substitute* "BCUnit/Sources/CMakeLists.txt"
100 (("target_include_directories\\(bcunit_test PUBLIC Test\\)")
102 "target_include_directories(bcunit_test PUBLIC Test)\n"
103 "target_link_libraries(bcunit_test bcunit)")))))
106 (with-directory-excursion "BCUnit/Sources/Test"
107 (invoke "./test_bcunit"))))
108 (add-after 'install 'move-doc
109 (lambda* (#:key outputs #:allow-other-keys)
110 (let ((out (assoc-ref outputs "out"))
111 (doc (assoc-ref outputs "doc")))
113 `(,(string-append doc "/share/doc")
114 ,(string-append doc "/share/BCUnit")))
116 (string-append out "/share/doc/BCUnit")
117 (string-append doc "/share/doc/BCUnit"))
119 (string-append out "/share/BCUnit/Examples")
120 (string-append doc "/share/BCUnit/Examples"))))))))
122 `(("ncurses" ,ncurses)))
123 (synopsis "Belledonne Communications Unit Testing Framework")
124 (description "BCUnit is a fork of the defunct project CUnit, with
125 several fixes and patches applied. It is a unit testing framework for
126 writing, administering, and running unit tests in C.")
127 (home-page "https://gitlab.linphone.org/BC/public/bcunit")
128 (license license:lgpl2.0+))))
130 (define-public bctoolbox
138 (url "https://gitlab.linphone.org/BC/public/bctoolbox.git")
140 (file-name (git-file-name name version))
142 (base32 "0bfswwvvdshaahg4jd2j10f0sci8809s4khajd0m6b059zwc7y25"))))
143 (build-system cmake-build-system)
144 (outputs '("out" "debug"))
146 `(#:configure-flags '("-DENABLE_STATIC=OFF")
148 (modify-phases %standard-phases
149 (add-after 'unpack 'patch-cmake
150 (lambda* (#:key inputs #:allow-other-keys)
151 ;; Fix decaf dependency (see:
152 ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/3).
153 (let* ((decaf (assoc-ref inputs "decaf")))
154 (substitute* (find-files "." "CMakeLists.txt")
155 (("find_package\\(Decaf CONFIG\\)")
156 "set(DECAF_FOUND 1)")
157 (("\\$\\{DECAF_INCLUDE_DIRS\\}")
158 (string-append decaf "/include/decaf"))
159 (("\\$\\{DECAF_TARGETNAME\\}")
161 (add-after 'unpack 'skip-problematic-tests
163 ;; The following test relies on networking; disable it.
164 (substitute* "tester/port.c"
165 (("[ \t]*TEST_NO_TAG.*bctbx_addrinfo_sort_test\\)")
167 (add-after 'unpack 'fix-installed-resource-directory-detection
169 ;; There's some broken logic in tester.c that checks if CWD, or
170 ;; if its parent exist, and if so, sets the prefix where the test
171 ;; resources are looked up to; disable it (see:
172 ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/4).
173 (substitute* "src/tester.c"
174 (("if \\(file_exists\\(\".\"\\)\\)")
176 (("if \\(file_exists\\(\"..\"\\)\\)")
180 (with-directory-excursion "tester"
181 (invoke "./bctoolbox_tester")))))))
185 ("mbedtls" ,mbedtls-apache)))
186 (synopsis "Belledonne Communications Tool Box")
187 (description "BcToolBox is an utilities library used by Belledonne
188 Communications software like belle-sip, mediastreamer2 and linphone.")
189 (home-page "https://gitlab.linphone.org/BC/public/bctoolbox")
190 (license license:gpl3+)))
200 (url "https://gitlab.linphone.org/BC/public/belr.git")
202 (file-name (git-file-name name version))
204 (base32 "0w2canwwm0qb99whnangvaybvjzq8xg6vksqxykgr8fbx7clw03h"))))
205 (build-system cmake-build-system)
206 (outputs '("out" "debug" "tester"))
208 `(#:configure-flags '("-DENABLE_STATIC=OFF")
210 (modify-phases %standard-phases
211 (delete 'check) ;moved after the install phase
212 (add-after 'install 'check
213 (lambda* (#:key outputs #:allow-other-keys)
214 (let* ((tester (assoc-ref outputs "tester"))
215 (belr_tester (string-append tester "/bin/belr_tester"))
216 (tester-share (string-append tester "/share/belr_tester")))
217 (invoke belr_tester))))
218 (add-after 'install 'move-tester
219 (lambda* (#:key outputs #:allow-other-keys)
220 (let* ((out (assoc-ref outputs "out"))
221 (tester (assoc-ref outputs "tester")))
223 (list (string-append tester "/bin")
224 (string-append tester "/share")))
226 (string-append out "/bin/belr_tester")
227 (string-append tester "/bin/belr_tester"))
229 (string-append out "/share/belr-tester")
230 ;; The detect_res_prefix procedure in bctoolbox's tester.c
231 ;; resolves the resource path based on the executable path and
232 ;; name, so have it match.
233 (string-append tester "/share/belr_tester"))))))))
235 `(("bctoolbox" ,bctoolbox)))
236 (synopsis "Belledonne Communications Language Recognition Library")
237 (description "Belr is Belledonne Communications' language recognition
238 library, written in C++11. It parses text inputs formatted according to a
239 language defined by an ABNF grammar, such as the protocols standardized at
241 (home-page "https://gitlab.linphone.org/BC/public/belr")
242 (license license:gpl3+)))
244 (define-public belcard
252 (url "https://gitlab.linphone.org/BC/public/belcard.git")
254 (file-name (git-file-name name version))
256 (base32 "16x2xp8d0a115132zhy1kpxkyj86ia7vrsnpjdg78fnbvmvysc8m"))))
257 (build-system cmake-build-system)
258 (outputs '("out" "debug" "tester"))
261 #:configure-flags '("-DENABLE_STATIC=OFF")
263 (modify-phases %standard-phases
264 (add-after 'unpack 'patch-vcard-grammar-location
265 (lambda* (#:key outputs #:allow-other-keys)
266 (let* ((out (assoc-ref outputs "out"))
268 (string-append out "/share/belr/grammars/vcard_grammar")))
269 (substitute* "include/belcard/vcard_grammar.hpp"
270 (("define VCARD_GRAMMAR \"vcard_grammar\"")
271 (format #f "define VCARD_GRAMMAR ~s" vcard-grammar))))))
272 (add-after 'install 'install-tester
273 (lambda* (#:key inputs outputs #:allow-other-keys)
274 (let ((out (assoc-ref outputs "out"))
275 (tester (assoc-ref outputs "tester"))
276 (test-name (string-append ,name "_tester")))
278 (list (string-append tester "/bin")
279 (string-append tester "/share")))
280 (rename-file (string-append out "/bin/" test-name)
281 (string-append tester "/bin/" test-name))
282 (rename-file (string-append out "/share/" test-name)
283 (string-append tester "/share/" test-name)))))
285 (add-after 'install-tester 'check
286 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
288 (let* ((tester (assoc-ref outputs "tester"))
289 (belcard_tester (string-append tester
290 "/bin/belcard_tester")))
291 (invoke belcard_tester))))))))
293 `(("bctoolbox" ,bctoolbox)
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)))
445 `(("bctoolbox" ,bctoolbox)))
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"
553 ("bctoolbox" ,bctoolbox)
555 (synopsis "Belledonne Communications SIP Library")
556 (description "Belle-sip is a modern library implementing SIP transport,
557 transaction and dialog layers. It is written in C, with an object-oriented
558 API. It also comprises a simple HTTP/HTTPS client implementation.")
559 (home-page "https://linphone.org/technical-corner/belle-sip")
560 (license license:gpl3+)))
562 (define-public mediastreamer2
564 (name "mediastreamer2")
570 (url "https://gitlab.linphone.org/BC/public/mediastreamer2.git")
572 (file-name (git-file-name name version))
574 (base32 "0989h3d0h7qrx4kjx8gg09j8c5hvvi3h8qi1iq1dqbppwbaxbz8c"))))
575 (outputs '("out" "doc" "tester"))
576 (build-system cmake-build-system)
578 `(#:configure-flags (list "-DENABLE_STATIC=NO"
580 ;; Do not fail on compile warnings.
582 "-DENABLE_PORTAUDIO=YES"
583 "-DENABLE_G729B_CNG=YES")
585 (modify-phases %standard-phases
586 (add-after 'unpack 'fix-version
588 (substitute* "CMakeLists.txt"
589 (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
590 (string-append "VERSION " ,version)))))
591 (add-after 'unpack 'patch-source
593 (substitute* "src/otherfilters/mspcapfileplayer.c"
594 (("O_BINARY") "L_INCR"))))
595 (add-before 'check 'pre-check
597 ;; Tests require a running X server.
598 (system "Xvfb :1 +extension GLX &")
599 (setenv "DISPLAY" ":1")
600 ;; Tests write to $HOME.
601 (setenv "HOME" (getenv "TEMP"))))
602 (delete 'check) ;move after install
603 (add-after 'install 'separate-outputs
604 (lambda* (#:key outputs #:allow-other-keys)
605 (let* ((out (assoc-ref outputs "out"))
606 (tester (assoc-ref outputs "tester"))
607 (tester-name (string-append ,name "_tester"))
608 (doc (assoc-ref outputs "doc"))
609 (doc-name (string-append ,name "-" ,version)))
611 (list (string-append tester "/bin")
612 (string-append tester "/share")
613 (string-append doc "/share/doc")))
614 ;; Move the tester executable.
615 (rename-file (string-append out "/bin/" tester-name)
616 (string-append tester "/bin/" tester-name))
617 ;; Move the tester data files.
618 (rename-file (string-append out "/share/" tester-name)
619 (string-append tester "/share/" tester-name))
620 ;; Move the HTML documentation.
621 (rename-file (string-append out "/share/doc/" doc-name)
622 (string-append doc "/share/doc/" doc-name)))))
623 (add-after 'separate-outputs 'check
624 (lambda* (#:key outputs #:allow-other-keys)
625 (let ((tester (string-append (assoc-ref outputs "tester")
626 "/bin/mediastreamer2_tester")))
627 (for-each (lambda (suite-name)
628 (invoke tester "--suite" suite-name))
629 ;; Some tests fail, due to requiring access to the
630 ;; sound card or the network.
633 ;; "AdaptiveAlgorithm"
643 ("python" ,python-wrapper)
644 ("xorg-server" ,xorg-server-for-tests)))
648 ("bcmatroska2" ,bcmatroska2)
649 ("bctoolbox" ,bctoolbox)
659 ("portaudio" ,portaudio)
660 ("pulseaudio" ,pulseaudio)
663 ("speexdsp" ,speexdsp)
665 ("theora" ,libtheora)
666 ("turbojpeg" ,libjpeg-turbo)
672 (synopsis "Belledonne Communications Streaming Engine")
673 (description "Mediastreamer2 is a powerful and lightweight streaming engine
674 for telephony applications. This media processing and streaming toolkit is
675 responsible for receiving and sending all multimedia streams in Linphone,
676 including media capture, encoding and decoding, and rendering.")
677 (home-page "https://linphone.org/technical-corner/mediastreamer2")
678 (license license:gpl3+)))
688 (url "https://gitlab.linphone.org/BC/public/lime.git")
690 (file-name (git-file-name name version))
692 (base32 "14jg1zisjbzflw3scfqdbwy48wq3cp93l867vigb8l40lkc6n26z"))))
693 (build-system cmake-build-system)
694 (outputs '("out" "doc"))
696 `(#:configure-flags (list "-DENABLE_STATIC=NO"
697 "-DENABLE_C_INTERFACE=YES")
699 (modify-phases %standard-phases
700 (add-after 'unpack 'patch-source
702 ;; Disable tests that require networking.
703 (substitute* "tester/CMakeLists.txt"
704 (("add_test\\(?.*\"Hello World\"\\)") "")
705 (("add_test\\(?.*\"lime\"\\)") "")
706 (("add_test\\(?.*\"FFI\"\\)") ""))))
707 (add-after 'build 'build-doc
709 (invoke "make" "doc")))
710 (add-after 'install 'install-doc
711 (lambda* (#:key outputs #:allow-other-keys)
712 (let* ((doc (assoc-ref outputs "doc"))
713 (dir (string-append doc "/share/doc"))
714 (dest (string-append dir "/" ,name "-" ,version)))
716 (copy-recursively "doc" dest)))))))
719 ("doxygen" ,doxygen)))
721 `(("bctoolbox" ,bctoolbox)
722 ("belle-sip" ,belle-sip)
724 (synopsis "Belledonne Communications Encryption Library")
725 (description "LIME is an encryption library for one-to-one and group
726 instant messaging, allowing users to exchange messages privately and
727 asynchronously. It supports multiple devices per user and multiple users per
729 (home-page "https://linphone.org/technical-corner/lime")
730 (license license:gpl3+)))
732 (define-public liblinphone
740 (string-append "https://www.linphone.org/releases/sources/linphone"
741 "/linphone-" version ".tar.gz"))
743 (base32 "0phhkx55xdyg28d4wn8l8q4yvsmdgzmjiw584d4s190sq1azm91x"))))
744 (outputs '("out" "doc" "tester"))
745 (build-system cmake-build-system)
747 `(#:tests? #f ; No test target
749 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
750 (string-append (assoc-ref %build-inputs "gtk2")
751 "/lib/gtk-2.0/include"))
752 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
753 (string-append (assoc-ref %build-inputs "glib")
754 "/lib/glib-2.0/include"))
755 "-DENABLE_STATIC=NO" ; Not required
757 "-DENABLE_GTK_UI=YES") ; for legacy UI
758 #:imported-modules (,@%cmake-build-system-modules
759 (guix build glib-or-gtk-build-system))
760 #:modules ((guix build cmake-build-system)
761 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
764 (modify-phases %standard-phases
765 (add-after 'unpack 'patch
767 (substitute* "gtk/main.c"
768 (("#include \"liblinphone_gitversion.h\"")
771 (add-after 'install 'separate-outputs
772 (lambda* (#:key outputs #:allow-other-keys)
773 (let* ((out (assoc-ref outputs "out"))
774 (doc (assoc-ref outputs "doc"))
775 (tester (assoc-ref outputs "tester"))
776 (tester-name (string-append ,name "_tester")))
777 ;; Copy the tester executable.
778 (mkdir-p (string-append tester "/bin"))
779 (rename-file (string-append out "/bin/" tester-name)
780 (string-append tester "/bin/" tester-name))
781 ;; Copy the tester data files.
782 (mkdir-p (string-append tester "/share/"))
783 (rename-file (string-append out "/share/" tester-name)
784 (string-append tester "/share/" tester-name))
785 ;; Copy the HTML and XML documentation.
787 (string-append out "/share/doc/linphone-" ,version)
788 (string-append doc "/share/doc/" ,name "-" ,version))
789 (delete-file-recursively
790 (string-append out "/share/doc/linphone-" ,version))
792 (add-after 'install 'install-man-pages
793 (lambda* (#:key outputs #:allow-other-keys)
794 (let* ((out (assoc-ref outputs "out"))
795 (man (string-append out "/share/man/man1")))
796 (for-each (lambda (file)
797 (install-file file man))
798 (find-files ".." ".*.1$"))
800 (add-after 'separate-outputs 'glib-or-gtk-compile-schemas
801 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas))
802 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
803 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
805 `(("gettext" ,gettext-minimal)
806 ("udev" ,eudev) ;for libudev.h
807 ;; For generating the C++ wrappers.
811 ("pystache" ,python-pystache)
812 ("six" ,python-six)))
814 `(("bctoolbox" ,bctoolbox)
816 ("bellesip" ,belle-sip)
821 ("mediastreamer2" ,mediastreamer2)
822 ("notify" ,libnotify)
827 (synopsis "Belledonne Communications Softphone Library")
828 (description "Liblinphone is a high-level SIP library integrating
829 all calling and instant messaging features into an unified
830 easy-to-use API. It is the cross-platform VoIP library on which the
831 Linphone application is based on, and that anyone can use to add audio
832 and video calls or instant messaging capabilities to an application.")
833 (home-page "https://gitlab.linphone.org/BC/public/liblinphone")
834 (license license:gpl2+)))
836 (define-public linphoneqt
844 (string-append "https://www.linphone.org/releases/sources/" name
845 "/" name "-" version ".tar.gz"))
847 (base32 "1g2zrr9li0g1hgs6vys06vr98h5dx36z22hx7a6ry231536c002a"))
848 (patches (search-patches "linphoneqt-tabbutton.patch"))))
849 (build-system qt-build-system)
851 `(#:tests? #f ; No test target
853 (modify-phases %standard-phases
854 (add-after 'unpack 'fix-cmake-error
856 ;; This is fixed in commit efed2fd8 of the master branch.
857 (substitute* "CMakeLists.txt"
861 (add-after 'unpack 'set-version-string
863 (substitute* "src/app/AppController.cpp"
864 (("LINPHONE_QT_GIT_VERSION")
865 (format #f "~s" ,version)))
867 (add-after 'install 'extend-shared-resources
868 ;; Not using the FHS exposes an issue where the client refers to
869 ;; its own "share" directory, which lacks sound files installed by
871 (lambda* (#:key inputs outputs #:allow-other-keys)
872 (let ((liblinphone (assoc-ref inputs "linphone"))
873 (out (assoc-ref outputs "out")))
874 (symlink (string-append liblinphone "/share/sounds")
875 (string-append out "/share/sounds"))
878 `(("qttools" ,qttools)))
880 `(("bctoolbox" ,bctoolbox)
882 ("bellesip" ,belle-sip)
883 ("linphone" ,liblinphone)
884 ("mediastreamer2" ,mediastreamer2)
886 ("qtdeclarative" ,qtdeclarative)
887 ("qtgraphicaleffects" ,qtgraphicaleffects)
888 ("qtquickcontrols" ,qtquickcontrols)
889 ("qtquickcontrols2" ,qtquickcontrols2)
891 (synopsis "Desktop client for the Linphone SIP softphone")
892 (description "Linphone is a SIP softphone for voice and video over IP calling
893 (VoIP) and instant messaging. Amongst its features are:
895 @item High Definition (HD) audio and video calls
896 @item Multiple call management (pause and resume)
898 @item Audio conferencing (merge calls into a conference call)
899 @item Call recording and replay (audio only)
900 @item Instant Messaging with message delivery status (IMDN)
901 @item Picture and file sharing
902 @item Echo cancellation
903 @item Secure user authentication using TLS client certificates
904 @item SRTP, zRTP and SRTP-DTLS voice and video encryption
905 @item Telephone tone (DTMF) support using SIP INFO or RFC 4733
906 @item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc.
907 @item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4
909 (home-page "https://gitlab.linphone.org/BC/public/linphone-desktop")
910 (license license:gpl2+)))
912 (define-public msopenh264
920 (string-append "https://www.linphone.org/releases/sources/plugins/"
921 name "/" name "-" version ".tar.gz"))
923 (base32 "0rdxgazm52560g52pp6mp3mwx6j1z3h2zyizzfycp8y8zi92fqm8"))
926 ;; For support for OpenH264 version >= 2.
930 (string-append "https://gitlab.linphone.org/BC/public/msopenh264/"
931 "commit/493d147d28c9a0f788ba4e50b47a1ce7b18bf326"
933 (file-name "msopenh264-openh264.patch")
936 "0mmd7nz5n9ian4rcwn200nldmy5j0dpdrna7r32rqnaw82bx3kdb")))))))
937 (build-system cmake-build-system)
939 `(#:tests? #f ; No test target
941 (list "-DENABLE_STATIC=NO"))) ; Not required
943 `(("mediastreamer2" ,mediastreamer2)
944 ("openh264" ,openh264)
946 (synopsis "Media Streamer H.264 Codec")
947 (description "MsOpenH264 is an H.264 encoder/decoder plugin for
948 mediastreamer2 based on the openh264 library.")
949 (home-page "https://gitlab.linphone.org/BC/public/msopenh264")
950 (license license:gpl2+)))
952 (define-public mssilk
960 (string-append "https://www.linphone.org/releases/sources/plugins/"
961 name "/" name "-" version ".tar.gz"))
963 (base32 "07ip0vd29d1n98lnqs5wpimcsmpm65yl7g5vk4hbqghcbsjw94lj"))))
964 (build-system cmake-build-system)
966 `(#:tests? #f ; No test target
968 (list "-DENABLE_STATIC=NO"))) ; Not required
970 `(("mediastreamer2" ,mediastreamer2)
972 (synopsis "Media Streamer SILK Codec")
973 (description "MSSILK is a plugin of MediaStreamer, adding support for AMR
974 codec. It is based on the Skype's SILK implementation.")
975 (home-page "https://gitlab.linphone.org/BC/public/mssilk")
976 (license license:gpl2+)))
978 (define-public mswebrtc
986 (string-append "https://www.linphone.org/releases/sources/plugins/"
987 name "/" name "-" version ".tar.gz"))
989 (base32 "1wj28hl9myhshqmn64xg0jf07aw75gmnilb5rff6rcbdxim87mqr"))))
990 (build-system cmake-build-system)
992 `(#:tests? #f ; No test target
995 "-DENABLE_STATIC=NO"))) ; Not required
997 `(("bctoolbox" ,bctoolbox)
998 ("mediastreamer2" ,mediastreamer2)
1000 (synopsis "Media Streamer WebRTC Codec")
1001 (description "MSWebRTC is a plugin of MediaStreamer, adding support for
1002 WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.")
1003 (home-page "https://gitlab.linphone.org/BC/public/mswebrtc")
1004 (license license:gpl2+)))
1006 (define-public msamr
1014 (string-append "https://www.linphone.org/releases/sources/plugins/"
1015 name "/" name "-" version ".tar.gz"))
1017 (base32 "16c9f3z4wnj73k7y8gb0fgpr4axsm7b5zrbjvy8vsgz9gyg3agm5"))))
1018 (build-system cmake-build-system)
1020 `(#:tests? #f ; No test target
1022 (list "-DENABLE_STATIC=NO" ; Not required
1023 "-DENABLE_WIDEBAND=YES")))
1025 `(("mediastreamer2" ,mediastreamer2)
1026 ("opencoreamr" ,opencore-amr)
1028 ("voamrwbenc" ,vo-amrwbenc)))
1029 (synopsis "Media Streamer AMR Codec")
1030 (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
1031 codec. It is based on the opencore-amr implementation.")
1032 (home-page "https://gitlab.linphone.org/BC/public/msamr")
1033 (license license:gpl3+)))