gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / linphone.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;;
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>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
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.
13 ;;;
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.
18 ;;;
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/>.
21
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 cpp)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages crypto)
31 #:use-module (gnu packages databases)
32 #:use-module (gnu packages documentation)
33 #:use-module (gnu packages gettext)
34 #:use-module (gnu packages gl)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gnome)
37 #:use-module (gnu packages gnome-xyz)
38 #:use-module (gnu packages graphviz)
39 #:use-module (gnu packages gtk)
40 #:use-module (gnu packages image)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages openldap)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages pulseaudio)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages python-xyz)
49 #:use-module (gnu packages qt)
50 #:use-module (gnu packages java)
51 #:use-module (gnu packages sqlite)
52 #:use-module (gnu packages telephony)
53 #:use-module (gnu packages tls)
54 #:use-module (gnu packages video)
55 #:use-module (gnu packages xiph)
56 #:use-module (gnu packages xml)
57 #:use-module (gnu packages xorg)
58 #:use-module ((guix licenses) #:prefix license:)
59 #:use-module (guix packages)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix build-system cmake)
63 #:use-module (guix build-system qt)
64 #:use-module (guix build-system glib-or-gtk)
65 #:use-module (guix build-system gnu))
66
67 (define-public bcunit
68 (let ((commit "74021cc7cb20a4e177748dd2948173e1f9c270ae")
69 (revision "0"))
70 (package
71 (name "bcunit")
72 (version (git-version "3.0.2" revision commit))
73 (source
74 (origin
75 (method git-fetch)
76 (uri (git-reference
77 (url "git://git.linphone.org/bcunit")
78 (commit commit)))
79 (file-name (git-file-name name version))
80 (sha256
81 (base32 "0npdwvanjkfg9vrqs5yi8vh6wliv50ycdli8pzavir84nb31nq1b"))))
82 (build-system cmake-build-system)
83 (outputs '("out" "doc"))
84 (arguments
85 `(#:configure-flags (list "-DENABLE_STATIC=NO"
86 "-DENABLE_CURSES=ON"
87 "-DENABLE_DOC=ON"
88 "-DENABLE_EXAMPLES=ON"
89 "-DENABLE_TEST=ON"
90 "-DENABLE_MEMTRACE=ON")
91 #:phases
92 (modify-phases %standard-phases
93 (add-after 'unpack 'patch-source
94 (lambda _
95 ;; Include BCunit headers for examples.
96 (substitute* "Examples/CMakeLists.txt"
97 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}")
98 (string-append "${CMAKE_CURRENT_SOURCE_DIR} "
99 "${PROJECT_SOURCE_DIR}/BCUnit/Headers "
100 "${CMAKE_BINARY_DIR}/BCUnit/Headers")))
101 ;; Link bcunit and bcunit_tests libraries.
102 (substitute* "BCUnit/Sources/CMakeLists.txt"
103 (("target_include_directories\\(bcunit_test PUBLIC Test\\)")
104 (string-append
105 "target_include_directories(bcunit_test PUBLIC Test)\n"
106 "target_link_libraries(bcunit_test bcunit)")))))
107 (replace 'check
108 (lambda _
109 (with-directory-excursion "BCUnit/Sources/Test"
110 (invoke "./test_bcunit"))))
111 (add-after 'install 'move-doc
112 (lambda* (#:key outputs #:allow-other-keys)
113 (let ((out (assoc-ref outputs "out"))
114 (doc (assoc-ref outputs "doc")))
115 (for-each mkdir-p
116 `(,(string-append doc "/share/doc")
117 ,(string-append doc "/share/BCUnit")))
118 (rename-file
119 (string-append out "/share/doc/BCUnit")
120 (string-append doc "/share/doc/BCUnit"))
121 (rename-file
122 (string-append out "/share/BCUnit/Examples")
123 (string-append doc "/share/BCUnit/Examples"))))))))
124 (inputs
125 `(("ncurses" ,ncurses)))
126 (synopsis "Belledonne Communications Unit Testing Framework")
127 (description "BCUnit is a fork of the defunct project CUnit, with
128 several fixes and patches applied. It is a unit testing framework for
129 writing, administering, and running unit tests in C.")
130 (home-page "https://gitlab.linphone.org/BC/public/bcunit")
131 (license license:lgpl2.0+))))
132
133 (define-public bctoolbox
134 (package
135 (name "bctoolbox")
136 (version "4.4.34")
137 (source
138 (origin
139 (method git-fetch)
140 (uri (git-reference
141 (url "https://gitlab.linphone.org/BC/public/bctoolbox.git")
142 (commit version)))
143 (file-name (git-file-name name version))
144 (sha256
145 (base32 "0bfswwvvdshaahg4jd2j10f0sci8809s4khajd0m6b059zwc7y25"))))
146 (build-system cmake-build-system)
147 (outputs '("out" "debug"))
148 (arguments
149 `(#:configure-flags '("-DENABLE_STATIC=OFF")
150 #:phases
151 (modify-phases %standard-phases
152 (add-after 'unpack 'patch-cmake
153 (lambda* (#:key inputs #:allow-other-keys)
154 ;; Fix decaf dependency (see:
155 ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/3).
156 (let* ((decaf (assoc-ref inputs "decaf")))
157 (substitute* (find-files "." "CMakeLists.txt")
158 (("find_package\\(Decaf CONFIG\\)")
159 "set(DECAF_FOUND 1)")
160 (("\\$\\{DECAF_INCLUDE_DIRS\\}")
161 (string-append decaf "/include/decaf"))
162 (("\\$\\{DECAF_TARGETNAME\\}")
163 "decaf")))))
164 (add-after 'unpack 'skip-problematic-tests
165 (lambda _
166 ;; The following test relies on networking; disable it.
167 (substitute* "tester/port.c"
168 (("[ \t]*TEST_NO_TAG.*bctbx_addrinfo_sort_test\\)")
169 ""))))
170 (add-after 'unpack 'fix-installed-resource-directory-detection
171 (lambda _
172 ;; There's some broken logic in tester.c that checks if CWD, or
173 ;; if its parent exist, and if so, sets the prefix where the test
174 ;; resources are looked up to; disable it (see:
175 ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/4).
176 (substitute* "src/tester.c"
177 (("if \\(file_exists\\(\".\"\\)\\)")
178 "if (NULL)")
179 (("if \\(file_exists\\(\"..\"\\)\\)")
180 "if (NULL)"))))
181 (replace 'check
182 (lambda _
183 (with-directory-excursion "tester"
184 (invoke "./bctoolbox_tester")))))))
185 (inputs
186 `(("bcunit" ,bcunit)
187 ("decaf" ,libdecaf)
188 ("mbedtls" ,mbedtls-apache)))
189 (synopsis "Belledonne Communications Tool Box")
190 (description "BcToolBox is an utilities library used by Belledonne
191 Communications software like belle-sip, mediastreamer2 and linphone.")
192 (home-page "https://gitlab.linphone.org/BC/public/bctoolbox")
193 (license license:gpl3+)))
194
195 (define-public belr
196 (package
197 (name "belr")
198 (version "4.4.34")
199 (source
200 (origin
201 (method git-fetch)
202 (uri (git-reference
203 (url "https://gitlab.linphone.org/BC/public/belr.git")
204 (commit version)))
205 (file-name (git-file-name name version))
206 (sha256
207 (base32 "0w2canwwm0qb99whnangvaybvjzq8xg6vksqxykgr8fbx7clw03h"))))
208 (build-system cmake-build-system)
209 (outputs '("out" "debug" "tester"))
210 (arguments
211 `(#:configure-flags '("-DENABLE_STATIC=OFF")
212 #:phases
213 (modify-phases %standard-phases
214 (delete 'check) ;moved after the install phase
215 (add-after 'install 'check
216 (lambda* (#:key outputs #:allow-other-keys)
217 (let* ((tester (assoc-ref outputs "tester"))
218 (belr_tester (string-append tester "/bin/belr_tester"))
219 (tester-share (string-append tester "/share/belr_tester")))
220 (invoke belr_tester))))
221 (add-after 'install 'move-tester
222 (lambda* (#:key outputs #:allow-other-keys)
223 (let* ((out (assoc-ref outputs "out"))
224 (tester (assoc-ref outputs "tester")))
225 (for-each mkdir-p
226 (list (string-append tester "/bin")
227 (string-append tester "/share")))
228 (rename-file
229 (string-append out "/bin/belr_tester")
230 (string-append tester "/bin/belr_tester"))
231 (rename-file
232 (string-append out "/share/belr-tester")
233 ;; The detect_res_prefix procedure in bctoolbox's tester.c
234 ;; resolves the resource path based on the executable path and
235 ;; name, so have it match.
236 (string-append tester "/share/belr_tester"))))))))
237 (inputs
238 `(("bctoolbox" ,bctoolbox)))
239 (synopsis "Belledonne Communications Language Recognition Library")
240 (description "Belr is Belledonne Communications' language recognition
241 library, written in C++11. It parses text inputs formatted according to a
242 language defined by an ABNF grammar, such as the protocols standardized at
243 IETF.")
244 (home-page "https://gitlab.linphone.org/BC/public/belr")
245 (license license:gpl3+)))
246
247 (define-public belcard
248 (package
249 (name "belcard")
250 (version "4.4.34")
251 (source
252 (origin
253 (method git-fetch)
254 (uri (git-reference
255 (url "https://gitlab.linphone.org/BC/public/belcard.git")
256 (commit version)))
257 (file-name (git-file-name name version))
258 (sha256
259 (base32 "16x2xp8d0a115132zhy1kpxkyj86ia7vrsnpjdg78fnbvmvysc8m"))))
260 (build-system cmake-build-system)
261 (outputs '("out" "debug" "tester"))
262 (arguments
263 `(#:tests? #t
264 #:configure-flags '("-DENABLE_STATIC=OFF")
265 #:phases
266 (modify-phases %standard-phases
267 (add-after 'unpack 'patch-vcard-grammar-location
268 (lambda* (#:key outputs #:allow-other-keys)
269 (let* ((out (assoc-ref outputs "out"))
270 (vcard-grammar
271 (string-append out "/share/belr/grammars/vcard_grammar")))
272 (substitute* "include/belcard/vcard_grammar.hpp"
273 (("define VCARD_GRAMMAR \"vcard_grammar\"")
274 (format #f "define VCARD_GRAMMAR ~s" vcard-grammar))))))
275 (add-after 'install 'install-tester
276 (lambda* (#:key inputs outputs #:allow-other-keys)
277 (let ((out (assoc-ref outputs "out"))
278 (tester (assoc-ref outputs "tester"))
279 (test-name (string-append ,name "_tester")))
280 (for-each mkdir-p
281 (list (string-append tester "/bin")
282 (string-append tester "/share")))
283 (rename-file (string-append out "/bin/" test-name)
284 (string-append tester "/bin/" test-name))
285 (rename-file (string-append out "/share/" test-name)
286 (string-append tester "/share/" test-name)))))
287 (delete 'check)
288 (add-after 'install-tester 'check
289 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
290 (when tests?
291 (let* ((tester (assoc-ref outputs "tester"))
292 (belcard_tester (string-append tester
293 "/bin/belcard_tester")))
294 (invoke belcard_tester))))))))
295 (inputs
296 `(("bctoolbox" ,bctoolbox)
297 ("belr" ,belr)))
298 (synopsis "Belledonne Communications VCard Library")
299 (description "Belcard is a C++ library to manipulate VCard standard
300 format.")
301 (home-page "https://gitlab.linphone.org/BC/public/belcard")
302 (license license:gpl3+)))
303
304 (define-public bcmatroska2
305 (package
306 (name "bcmatroska2")
307 (version "0.23")
308 (source
309 (origin
310 (method git-fetch)
311 (uri (git-reference
312 (url "https://gitlab.linphone.org/BC/public/bcmatroska2.git")
313 (commit version)))
314 (file-name (git-file-name name version))
315 (sha256
316 (base32 "1avl9w18kh4dxm3g8j0bkw39bksd7bz3nfxvyibqqnz63ds8vfi2"))))
317 (build-system cmake-build-system)
318 (arguments
319 `(#:tests? #f ; No test target
320 #:configure-flags (list "-DENABLE_STATIC=NO"))) ; Not required
321 (synopsis "Belledonne Communications Media Container")
322 (description "BcMatroska is a free and open standard multi-media container
323 format. It can hold an unlimited number of video, audio, picture, or subtitle
324 tracks in one file. This project provides a convenient distribution of the
325 Matroska multimedia container format.")
326 (home-page "https://gitlab.linphone.org/BC/public/bcmatroska2")
327 (license (list license:gpl2+ ;for this package (build system files)
328 license:bsd-4 ;for Core C and LibEBML2
329 license:lgpl2.1+)))) ;for LibMatroska2
330
331 (define-public bcg729
332 (package
333 (name "bcg729")
334 (version "1.1.1")
335 (source
336 (origin
337 (method git-fetch)
338 (uri (git-reference
339 (url "git://git.linphone.org/bcg729")
340 (commit version)))
341 (file-name (git-file-name name version))
342 (sha256
343 (base32 "1hal6b3w6f8y5r1wa0xzj8sj2jjndypaxyw62q50p63garp2h739"))))
344 (build-system cmake-build-system)
345 (arguments
346 `(#:configure-flags (list "-DENABLE_STATIC=NO"
347 "-DENABLE_TESTS=YES")
348 #:phases
349 (modify-phases %standard-phases
350 (add-before 'check 'copy-inputs
351 (lambda* (#:key inputs #:allow-other-keys)
352 (let ((test-patterns (assoc-ref inputs "test-patterns"))
353 (dest (string-append "test/bcg729-patterns.zip")))
354 (copy-recursively test-patterns dest))))
355 (replace 'check
356 (lambda _
357 (with-directory-excursion "test"
358 (invoke "unzip" "bcg729-patterns.zip")
359 (for-each
360 (lambda (test-name)
361 (invoke "./testCampaign" "-s" test-name))
362 (list "fixedCodebookSearch"
363 "postProcessing"
364 "adaptativeCodebookSearch"
365 "computeLP"
366 "computeAdaptativeCodebookGain"
367 "postFilter"
368 "decoder"
369 "LPSynthesisFilter"
370 "decodeLSP"
371 ;; "encoder"
372 ;; "LSPQuantization"
373 "preProcessing"
374 "decodeFixedCodeVector"
375 "CNGdecoder"
376 ;; "LP2LSPConversion"
377 "gainQuantization"
378 "findOpenLoopPitchDelay"
379 "decodeGains"
380 "computeWeightedSpeech"
381 "interpolateqLSPAndConvert2LP"
382 "decodeAdaptativeCodeVector"))))))))
383 (native-inputs
384 `(("perl" ,perl)
385 ("test-patterns"
386 ,(origin
387 (method url-fetch)
388 (uri (string-append "http://www.belledonne-communications.com/"
389 "bc-downloads/bcg729-patterns.zip"))
390 (sha256
391 (base32 "1kivarhh3izrl9sg0szs6x6pbq2ap0y6xsraw0gbgspi4gnfihrh"))))
392 ("unzip" ,unzip)))
393 (synopsis "Belledonne Communications G729 Codec")
394 (description "BcG729 is an implementation of both encoder and decoder of
395 the ITU G729 speech codec. The library written in C 99 is fully portable and
396 can be executed on many platforms including both ARM and x86 processors. It
397 supports concurrent channels encoding and decoding for multi call application
398 such as conferencing.")
399 (home-page "https://linphone.org/technical-corner/bcg729")
400 (license license:gpl3+)))
401
402 (define-public ortp
403 (package
404 (name "ortp")
405 (version "4.4.34")
406 (source
407 (origin
408 (method git-fetch)
409 (uri (git-reference
410 (url "https://gitlab.linphone.org/BC/public/ortp.git")
411 (commit version)))
412 (file-name (git-file-name name version))
413 (sha256
414 (base32 "1r1kvjzyfvkf66in4p51wi87balzg3sw3aq6r4xr609mz86spi5m"))))
415 (build-system cmake-build-system)
416 (outputs '("out""tester"
417 "doc")) ;1.5 MiB of HTML doc
418 (arguments
419 `(#:tests? #f ;requires networking
420 #:configure-flags (list "-DENABLE_STATIC=NO"
421 "-DENABLE_TESTS=YES")
422 #:phases
423 (modify-phases %standard-phases
424 (add-after 'unpack 'fix-version-strings
425 ;; See: https://gitlab.linphone.org/BC/public/ortp/-/issues/5.
426 (lambda _
427 (substitute* "CMakeLists.txt"
428 (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
429 (string-append "VERSION " ,version))
430 (("\\$\\{ORTP_DOC_VERSION\\}")
431 ,version))))
432 (add-after 'install 'separate-outputs
433 (lambda* (#:key outputs #:allow-other-keys)
434 (let* ((out (assoc-ref outputs "out"))
435 (doc (assoc-ref outputs "doc"))
436 (doc-src (string-append out "/share/doc/ortp-" ,version))
437 (doc-dest (string-append doc "/share/doc/ortp-" ,version))
438 (tester (assoc-ref outputs "tester")))
439 (for-each mkdir-p (list (string-append doc "/share/doc")
440 (string-append tester "/bin")))
441 (rename-file doc-src doc-dest)
442 (rename-file (string-append out "/bin")
443 (string-append tester "/bin"))))))))
444 (native-inputs
445 `(("dot" ,graphviz)
446 ("doxygen" ,doxygen)))
447 (inputs
448 `(("bctoolbox" ,bctoolbox)))
449 (synopsis "Belledonne Communications RTP Library")
450 (description "oRTP is a C library implementing the RTP protocol. It
451 implements the RFC 3550 standard.")
452 (home-page "https://linphone.org/technical-corner/ortp")
453 (license license:gpl3+)))
454
455 (define-public bzrtp
456 (package
457 (name "bzrtp")
458 (version "4.4.34")
459 (source
460 (origin
461 (method git-fetch)
462 (uri (git-reference
463 (url "https://gitlab.linphone.org/BC/public/bzrtp")
464 (commit version)))
465 (file-name (git-file-name name version))
466 (sha256
467 (base32 "1yjmsbqmymzl4r7sba6w4a2yld8m6hzafr6jf7sj0syhwpnc3zv6"))))
468 (build-system cmake-build-system)
469 (arguments
470 `(#:configure-flags
471 (list
472 "-DENABLE_STATIC=NO"
473 "-DENABLE_TESTS=YES")))
474 (inputs
475 `(("bctoolbox" ,bctoolbox)
476 ("sqlite3" ,sqlite)
477 ("xml2" ,libxml2)))
478 (synopsis "Belledonne Communications ZRTP Library")
479 (description "BZRTP is an implementation of ZRTP keys exchange protocol,
480 written in C. It is fully portable and can be executed on many platforms
481 including both ARM and x86.")
482 (home-page "https://gitlab.linphone.org/BC/public/bzrtp")
483 (license license:gpl3+)))
484
485 (define-public belle-sip
486 (package
487 (name "belle-sip")
488 (version "4.4.34")
489 (source
490 (origin
491 (method git-fetch)
492 (uri (git-reference
493 (url "https://gitlab.linphone.org/BC/public/belle-sip.git")
494 (commit version)))
495 (file-name (git-file-name name version))
496 (sha256
497 (base32 "1kknnlczq7dpqaj1dwxvy092dzrqjy11ndkv90rqwmdryigkjk6z"))))
498 (build-system cmake-build-system)
499 (outputs '("out" "tester"))
500 (arguments
501 `(#:configure-flags (list "-DENABLE_STATIC=NO"
502 "-DENABLE_MDNS=ON")
503 #:phases
504 (modify-phases %standard-phases
505 (add-after 'unpack 'patch
506 (lambda* (#:key inputs #:allow-other-keys)
507 ;; Fix mDNS dependency.
508 (let* ((avahi (assoc-ref inputs "avahi")))
509 (substitute* (find-files "." "CMakeLists.txt")
510 (("find_package\\(DNSSD REQUIRED\\)")
511 "set(DNSSD_FOUND 1)")
512 (("\\$\\{DNSSD_INCLUDE_DIRS\\}")
513 (string-append avahi "/include/avahi-compat-libdns_sd"))
514 (("\\$\\{DNSSD_LIBRARIES\\}")
515 "dns_sd")))
516 (substitute* "src/CMakeLists.txt"
517 ;; ANTLR would use multithreaded DFA generation otherwise,
518 ;; which would not be reproducible.
519 (("-Xmultithreaded ") ""))))
520 (delete 'check) ;move after install
521 (add-after 'install 'separate-outputs
522 (lambda* (#:key outputs #:allow-other-keys)
523 (let* ((out (assoc-ref outputs "out"))
524 (tester (assoc-ref outputs "tester"))
525 (tester-name "belle_sip_tester"))
526 (for-each mkdir-p (list (string-append tester "/bin")
527 (string-append tester "/share")))
528 (rename-file (string-append out "/bin")
529 (string-append tester "/bin"))
530 (rename-file (string-append out "/share/" tester-name)
531 (string-append tester "/share/" tester-name)))))
532 (add-after 'separate-outputs 'check
533 (lambda* (#:key outputs #:allow-other-keys)
534 (let ((tester (string-append (assoc-ref outputs "tester")
535 "/bin/belle_sip_tester")))
536 (for-each (lambda (suite-name)
537 (invoke tester "--suite" suite-name))
538 (list "Object inheritance"
539 "SIP URI"
540 "FAST SIP URI"
541 "FAST SIP URI 2"
542 "Generic uri"
543 "Headers"
544 "Core"
545 "SDP"
546 ;;"Resolver"
547 "Message"
548 "Authentication helper"
549 ;;"Register"
550 ;;"Dialog"
551 "Refresher"
552 ;;"HTTP stack"
553 "Object"))))))))
554 (inputs
555 `(("avahi" ,avahi)
556 ("bctoolbox" ,bctoolbox)
557 ("zlib" ,zlib)))
558 (synopsis "Belledonne Communications SIP Library")
559 (description "Belle-sip is a modern library implementing SIP transport,
560 transaction and dialog layers. It is written in C, with an object-oriented
561 API. It also comprises a simple HTTP/HTTPS client implementation.")
562 (home-page "https://linphone.org/technical-corner/belle-sip")
563 (license license:gpl3+)))
564
565 (define-public mediastreamer2
566 (package
567 (name "mediastreamer2")
568 (version "4.4.34")
569 (source
570 (origin
571 (method git-fetch)
572 (uri (git-reference
573 (url "https://gitlab.linphone.org/BC/public/mediastreamer2.git")
574 (commit version)))
575 (file-name (git-file-name name version))
576 (sha256
577 (base32 "0989h3d0h7qrx4kjx8gg09j8c5hvvi3h8qi1iq1dqbppwbaxbz8c"))))
578 (outputs '("out" "doc" "tester"))
579 (build-system cmake-build-system)
580 (arguments
581 `(#:configure-flags (list "-DENABLE_STATIC=NO"
582 "-DENABLE_PCAP=YES"
583 ;; Do not fail on compile warnings.
584 "-DENABLE_STRICT=NO"
585 "-DENABLE_PORTAUDIO=YES"
586 "-DENABLE_G729B_CNG=YES")
587 #:phases
588 (modify-phases %standard-phases
589 (add-after 'unpack 'fix-version
590 (lambda _
591 (substitute* "CMakeLists.txt"
592 (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
593 (string-append "VERSION " ,version)))))
594 (add-after 'unpack 'patch-source
595 (lambda _
596 (substitute* "src/otherfilters/mspcapfileplayer.c"
597 (("O_BINARY") "L_INCR"))))
598 (add-before 'check 'pre-check
599 (lambda _
600 ;; Tests require a running X server.
601 (system "Xvfb :1 +extension GLX &")
602 (setenv "DISPLAY" ":1")
603 ;; Tests write to $HOME.
604 (setenv "HOME" (getenv "TEMP"))))
605 (delete 'check) ;move after install
606 (add-after 'install 'separate-outputs
607 (lambda* (#:key outputs #:allow-other-keys)
608 (let* ((out (assoc-ref outputs "out"))
609 (tester (assoc-ref outputs "tester"))
610 (tester-name (string-append ,name "_tester"))
611 (doc (assoc-ref outputs "doc"))
612 (doc-name (string-append ,name "-" ,version)))
613 (for-each mkdir-p
614 (list (string-append tester "/bin")
615 (string-append tester "/share")
616 (string-append doc "/share/doc")))
617 ;; Move the tester executable.
618 (rename-file (string-append out "/bin/" tester-name)
619 (string-append tester "/bin/" tester-name))
620 ;; Move the tester data files.
621 (rename-file (string-append out "/share/" tester-name)
622 (string-append tester "/share/" tester-name))
623 ;; Move the HTML documentation.
624 (rename-file (string-append out "/share/doc/" doc-name)
625 (string-append doc "/share/doc/" doc-name)))))
626 (add-after 'separate-outputs 'check
627 (lambda* (#:key outputs #:allow-other-keys)
628 (let ((tester (string-append (assoc-ref outputs "tester")
629 "/bin/mediastreamer2_tester")))
630 (for-each (lambda (suite-name)
631 (invoke tester "--suite" suite-name))
632 ;; Some tests fail, due to requiring access to the
633 ;; sound card or the network.
634 (list "Basic Audio"
635 ;; "Sound Card"
636 ;; "AdaptiveAlgorithm"
637 ;; "AudioStream"
638 ;; "VideoStream"
639 "H26x Tools"
640 "Framework"
641 ;; "Player"
642 "TextStream"))))))))
643 (native-inputs
644 `(("dot" ,graphviz)
645 ("doxygen" ,doxygen)
646 ("python" ,python-wrapper)
647 ("xorg-server" ,xorg-server-for-tests)))
648 (inputs
649 `(("alsa" ,alsa-lib)
650 ("bcg729" ,bcg729)
651 ("bcmatroska2" ,bcmatroska2)
652 ("bctoolbox" ,bctoolbox)
653 ("ffmpeg" ,ffmpeg)
654 ("glew" ,glew)
655 ("glu" ,glu)
656 ("glx" ,mesa-utils)
657 ("gsm" ,gsm)
658 ("opengl" ,mesa)
659 ("opus" ,opus)
660 ("ortp" ,ortp)
661 ("pcap" ,libpcap)
662 ("portaudio" ,portaudio)
663 ("pulseaudio" ,pulseaudio)
664 ("spandsp" ,spandsp)
665 ("speex" ,speex)
666 ("speexdsp" ,speexdsp)
667 ("srtp" ,libsrtp)
668 ("theora" ,libtheora)
669 ("turbojpeg" ,libjpeg-turbo)
670 ("v4l" ,v4l-utils)
671 ("vpx" ,libvpx)
672 ("x11" ,libx11)
673 ("xv" ,libxv)
674 ("zrtp" ,bzrtp)))
675 (synopsis "Belledonne Communications Streaming Engine")
676 (description "Mediastreamer2 is a powerful and lightweight streaming engine
677 for telephony applications. This media processing and streaming toolkit is
678 responsible for receiving and sending all multimedia streams in Linphone,
679 including media capture, encoding and decoding, and rendering.")
680 (home-page "https://linphone.org/technical-corner/mediastreamer2")
681 (license license:gpl3+)))
682
683 (define-public lime
684 (package
685 (name "lime")
686 (version "4.4.34")
687 (source
688 (origin
689 (method git-fetch)
690 (uri (git-reference
691 (url "https://gitlab.linphone.org/BC/public/lime.git")
692 (commit version)))
693 (file-name (git-file-name name version))
694 (sha256
695 (base32 "14jg1zisjbzflw3scfqdbwy48wq3cp93l867vigb8l40lkc6n26z"))))
696 (build-system cmake-build-system)
697 (outputs '("out" "doc"))
698 (arguments
699 `(#:configure-flags (list "-DENABLE_STATIC=NO"
700 "-DENABLE_C_INTERFACE=YES")
701 #:phases
702 (modify-phases %standard-phases
703 (add-after 'unpack 'patch-source
704 (lambda _
705 ;; Disable tests that require networking.
706 (substitute* "tester/CMakeLists.txt"
707 (("add_test\\(?.*\"Hello World\"\\)") "")
708 (("add_test\\(?.*\"lime\"\\)") "")
709 (("add_test\\(?.*\"FFI\"\\)") ""))))
710 (add-after 'build 'build-doc
711 (lambda _
712 (invoke "make" "doc")))
713 (add-after 'install 'install-doc
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let* ((doc (assoc-ref outputs "doc"))
716 (dir (string-append doc "/share/doc"))
717 (dest (string-append dir "/" ,name "-" ,version)))
718 (mkdir-p dest)
719 (copy-recursively "doc" dest)))))))
720 (native-inputs
721 `(("dot" ,graphviz)
722 ("doxygen" ,doxygen)))
723 (inputs
724 `(("bctoolbox" ,bctoolbox)
725 ("belle-sip" ,belle-sip)
726 ("soci" ,soci)))
727 (synopsis "Belledonne Communications Encryption Library")
728 (description "LIME is an encryption library for one-to-one and group
729 instant messaging, allowing users to exchange messages privately and
730 asynchronously. It supports multiple devices per user and multiple users per
731 device.")
732 (home-page "https://linphone.org/technical-corner/lime")
733 (license license:gpl3+)))
734
735 (define-public liblinphone
736 (package
737 (name "liblinphone")
738 (version "4.4.34")
739 (source
740 (origin
741 (method git-fetch)
742 (uri (git-reference
743 (url "https://gitlab.linphone.org/BC/public/liblinphone.git")
744 (commit version)))
745 (file-name (git-file-name name version))
746 (sha256
747 (base32 "1lwabr93jw24y04pdqnw9dgg8jb3lzfplyx19f83jgp9dj8kmfq9"))))
748 (outputs '("out" "tester"))
749 (build-system cmake-build-system)
750 (arguments
751 `(#:tests? #f ; Tests require networking
752 #:configure-flags (list "-DENABLE_STATIC=NO"
753 "-DENABLE_DOC=NO" ;requires unpackaged javasphinx
754 "-DENABLE_LDAP=YES")
755 #:phases
756 (modify-phases %standard-phases
757 (add-after 'install 'separate-outputs
758 (lambda* (#:key outputs #:allow-other-keys)
759 (let* ((out (assoc-ref outputs "out"))
760 (tester (assoc-ref outputs "tester"))
761 (tester-name (string-append ,name "_tester")))
762 (for-each mkdir-p
763 (list (string-append tester "/bin")
764 (string-append tester "/share")))
765 (rename-file (string-append out "/bin/" tester-name)
766 (string-append tester "/bin/" tester-name))
767 (rename-file (string-append out "/bin/groupchat_benchmark")
768 (string-append tester "/bin/groupchat_benchmark"))
769 (rename-file (string-append out "/share/" tester-name)
770 (string-append tester "/share/" tester-name))))))))
771 (native-inputs
772 `(("dot" ,graphviz)
773 ("doxygen" ,doxygen)
774 ("gettext" ,gettext-minimal)
775 ("perl" ,perl)
776 ("python" ,python-wrapper)
777 ("pystache" ,python-pystache)
778 ("six" ,python-six)
779 ("udev" ,eudev)))
780 (inputs
781 `(("bctoolbox" ,bctoolbox)
782 ("belcard" ,belcard)
783 ("bellesip" ,belle-sip)
784 ("belr" ,belr)
785 ("bzrtp" ,bzrtp)
786 ("iconv" ,libiconv)
787 ("ldap" ,openldap)
788 ("libxsd" ,xsd)
789 ("lime" ,lime)
790 ("mediastreamer2" ,mediastreamer2)
791 ("notify" ,libnotify)
792 ("ortp" ,ortp)
793 ("soci" ,soci)
794 ("sqlite" ,sqlite)
795 ("xml2" ,libxml2)
796 ("zlib" ,zlib)))
797 (synopsis "Belledonne Communications Softphone Library")
798 (description "Liblinphone is a high-level SIP library integrating
799 all calling and instant messaging features into an unified
800 easy-to-use API. It is the cross-platform VoIP library on which the
801 Linphone application is based on, and that anyone can use to add audio
802 and video calls or instant messaging capabilities to an application.")
803 (home-page "https://linphone.org/technical-corner/liblinphone")
804 (license license:gpl3+)))
805
806 (define-public linphone-desktop
807 (package
808 (name "linphone-desktop")
809 (version "4.2.5")
810 (source
811 (origin
812 (method git-fetch)
813 (uri (git-reference
814 (url "https://gitlab.linphone.org/BC/public/linphone-desktop")
815 (commit version)))
816 (file-name (git-file-name name version))
817 (sha256
818 (base32 "1gq4l9p21rbrcksa7fbkzn9fzbbynqmn6ni6lhnvzk359sb1xvbz"))
819 (patches (search-patches "linphone-desktop-without-sdk.patch"))))
820 (build-system qt-build-system)
821 (outputs '("out" "debug"))
822 (arguments
823 `(#:tests? #f ; No test target
824 #:configure-flags (list "-DENABLE_UPDATE_CHECK=NO"
825 "-DENABLE_DAEMON=YES"
826 "-DENABLE_CONSOLE_UI=YES")
827 #:phases
828 (modify-phases %standard-phases
829 (add-after 'unpack 'pre-configure
830 (lambda _
831 (make-file-writable "linphone-app/linphoneqt_version.cmake")
832 (substitute* "linphone-app/linphoneqt_version.cmake"
833 (("\\$\\{GUIX-SET-VERSION\\}") ,version))))
834 (add-after 'install 'post-install
835 (lambda* (#:key inputs outputs #:allow-other-keys)
836 (let* ((out (assoc-ref outputs "out"))
837 (liblinphone (assoc-ref inputs "liblinphone"))
838 (grammar-dest (string-append out "/share/belr/grammars")))
839 ;; Remove unnecessary Qt configuration file.
840 (delete-file (string-append out "/bin/qt.conf"))
841 ;; Not using the FHS exposes an issue where the client
842 ;; refers to its own directories, which lacks files
843 ;; installed by the dependencies.
844 (symlink (string-append liblinphone "/lib")
845 (string-append out "/lib"))
846 (symlink (string-append liblinphone "/share/sounds")
847 (string-append out "/share/sounds"))
848 (symlink (string-append liblinphone "/share/linphone/rootca.pem")
849 (string-append out "/share/linphone/rootca.pem"))
850 (mkdir-p (dirname grammar-dest))
851 (symlink (string-append liblinphone "/share/belr/grammars")
852 grammar-dest)))))))
853 (native-inputs
854 `(("pkg-config" ,pkg-config)
855 ("qttools" ,qttools)))
856 (inputs
857 `(("bctoolbox" ,bctoolbox)
858 ("belcard" ,belcard)
859 ("belr" ,belr)
860 ("liblinphone" ,liblinphone)
861 ("mediastreamer2" ,mediastreamer2)
862 ("ortp" ,ortp)
863 ("qtbase" ,qtbase)
864 ("qtdeclarative" ,qtdeclarative)
865 ("qtgraphicaleffects" ,qtgraphicaleffects)
866 ("qtquickcontrols" ,qtquickcontrols)
867 ("qtquickcontrols2" ,qtquickcontrols2)
868 ("qtsvg" ,qtsvg)))
869 (synopsis "Desktop client for the Linphone SIP softphone")
870 (description "Linphone is a SIP softphone for voice and video over IP calling
871 (VoIP) and instant messaging. Amongst its features are:
872 @itemize
873 @item High Definition (HD) audio and video calls
874 @item Multiple call management (pause and resume)
875 @item Call transfer
876 @item Audio conferencing (merge calls into a conference call)
877 @item Call recording and replay (audio only)
878 @item Instant Messaging with message delivery status (IMDN)
879 @item Picture and file sharing
880 @item Echo cancellation
881 @item Secure user authentication using TLS client certificates
882 @item SRTP, zRTP and SRTP-DTLS voice and video encryption
883 @item Telephone tone (DTMF) support using SIP INFO or RFC 4733
884 @item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc.
885 @item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4
886 @end itemize")
887 (home-page "https://linphone.org/technical-corner/linphone")
888 (license license:gpl3+)))
889
890 (define-public linphoneqt
891 (deprecated-package "linphoneqt" linphone-desktop))
892
893 (define-public msopenh264
894 (let ((commit "88697cc95140017760d6da408cb0efdc5e86e40a")
895 (revision "0"))
896 (package
897 (name "msopenh264")
898 (version (git-version "1.2.1" revision commit))
899 (source
900 (origin
901 (method git-fetch)
902 (uri (git-reference
903 (url "https://gitlab.linphone.org/BC/public/msopenh264.git")
904 (commit commit)))
905 (file-name (git-file-name name version))
906 (sha256
907 (base32 "10y3b6s934f2wbsf60b3p0g6hffizjqrj5in8l4sida2fjdxlwwy"))))
908 (build-system cmake-build-system)
909 (arguments
910 `(#:tests? #f ; No test target
911 #:configure-flags
912 (list "-DENABLE_STATIC=NO"))) ; Not required
913 (inputs
914 `(("bctoolbox" ,bctoolbox)
915 ("mediastreamer2" ,mediastreamer2)
916 ("openh264" ,openh264)
917 ("ortp" ,ortp)))
918 (synopsis "Media Streamer H.264 Codec")
919 (description "MsOpenH264 is an H.264 encoder/decoder plugin for
920 mediastreamer2 based on the openh264 library.")
921 (home-page "https://gitlab.linphone.org/BC/public/msopenh264")
922 (license license:gpl2+))))
923
924 (define-public mssilk
925 (let ((commit "dd0f31ee795faa7ea89e601b072dae4cd1df7e3f")
926 (revision "0"))
927 (package
928 (name "mssilk")
929 (version (git-version "1.1.1" revision commit))
930 (source
931 (origin
932 (method git-fetch)
933 (uri (git-reference
934 (url "https://gitlab.linphone.org/BC/public/mssilk.git")
935 (commit commit)))
936 (file-name (git-file-name name version))
937 (sha256
938 (base32 "1dann5fnzqp6wjlwc6bl2k9b6rvn6bznqb3qsi1kgv9dnq44cbr0"))))
939 (build-system cmake-build-system)
940 (arguments
941 `(#:tests? #f ; No test target
942 #:configure-flags
943 (list "-DENABLE_STATIC=NO"))) ; Not required
944 (inputs
945 `(("bctoolbox" ,bctoolbox)
946 ("mediastreamer2" ,mediastreamer2)
947 ("ortp" ,ortp)))
948 (synopsis "Media Streamer SILK Codec")
949 (description "MSSILK is a plugin of MediaStreamer, adding support for AMR
950 codec. It is based on the Skype's SILK implementation.")
951 (home-page "https://gitlab.linphone.org/BC/public/mssilk")
952 (license license:gpl2+))))
953
954 (define-public mswebrtc
955 (let ((commit "946ca706733f36a6b4923f04e569531125462d1d")
956 (revision "0"))
957 (package
958 (name "mswebrtc")
959 (version (git-version "1.1.1" revision commit))
960 (source
961 (origin
962 (method git-fetch)
963 (uri (git-reference
964 (url "https://gitlab.linphone.org/BC/public/mswebrtc")
965 (commit commit)))
966 (file-name (git-file-name name version))
967 (sha256
968 (base32 "1pfg9m6bpbv0f53nx72rdxhlyriax9pg4yj0gpwq8ha6lqnpwg1x"))))
969 (build-system cmake-build-system)
970 (arguments
971 `(#:tests? #f ; No test target
972 #:configure-flags
973 (list
974 "-DENABLE_STATIC=NO")
975 #:phases
976 (modify-phases %standard-phases
977 (add-after 'unpack 'copy-inputs
978 (lambda* (#:key inputs outputs #:allow-other-keys)
979 (let* ((webrtc-from (assoc-ref inputs "webrtc"))
980 (webrtc-to (string-append (getcwd) "/webrtc")))
981 (copy-recursively webrtc-from webrtc-to))
982 #t)))))
983 (native-inputs
984 `(("webrtc"
985 ,(origin
986 (method git-fetch)
987 (uri
988 (git-reference
989 (url "https://gitlab.linphone.org/BC/public/external/webrtc")
990 (commit "583acd27665cfadef8ab03eb85a768d308bd29dd")))
991 (file-name
992 (git-file-name "webrtc-for-mswebrtc" version))
993 (sha256
994 (base32
995 "1maqychrgwy0z4zypa03qp726l2finw64z6cymdzhd58ql3p1lvm"))))
996 ("python" ,python-wrapper)))
997 (inputs
998 `(("bctoolbox" ,bctoolbox)
999 ("mediastreamer2" ,mediastreamer2)
1000 ("ortp" ,ortp)))
1001 (synopsis "Media Streamer WebRTC Codec")
1002 (description "MSWebRTC is a plugin of MediaStreamer, adding support for
1003 WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.")
1004 (home-page "https://gitlab.linphone.org/BC/public/mswebrtc")
1005 (license license:gpl2+))))
1006
1007 (define-public msamr
1008 (let ((commit "5ab5c098299107048dfcbfc741f7392faef167bd")
1009 (revision "0"))
1010 (package
1011 (name "msamr")
1012 (version (git-version "1.1.3" revision commit))
1013 (source
1014 (origin
1015 (method git-fetch)
1016 (uri (git-reference
1017 (url "https://gitlab.linphone.org/BC/public/msamr")
1018 (commit commit)))
1019 (file-name (git-file-name name version))
1020 (sha256
1021 (base32 "1g79lw1qi1mlw3v1b0cixmqiwjql81gz9naakb15n8pvaag9aaqm"))))
1022 (build-system cmake-build-system)
1023 (arguments
1024 `(#:tests? #f ; No test target
1025 #:configure-flags
1026 (list "-DENABLE_STATIC=NO" ; Not required
1027 "-DENABLE_WIDEBAND=YES")))
1028 (inputs
1029 `(("bctoolbox" ,bctoolbox)
1030 ("mediastreamer2" ,mediastreamer2)
1031 ("opencoreamr" ,opencore-amr)
1032 ("ortp" ,ortp)
1033 ("voamrwbenc" ,vo-amrwbenc)))
1034 (synopsis "Media Streamer AMR Codec")
1035 (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
1036 codec. It is based on the opencore-amr implementation.")
1037 (home-page "https://gitlab.linphone.org/BC/public/msamr")
1038 (license license:gpl3+))))