guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#47274] Linphone Packages


From: Maxim Cournoyer
Subject: [bug#47274] Linphone Packages
Date: Mon, 29 Mar 2021 01:19:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hello Raghav!  This addresses the review up to linphone-desktop (mostly
done with this ticket!).

I'm afraid commenting on all the small changes I've done to the original
submission would take us through the night; if you don't mind I invite
you to consult the changes now merged into master.

I'll try to summarize the higher value bits here:

1. bctoolbox

@@ -133,19 +138,21 @@ writing, administering, and running unit tests in C.")
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "git://git.linphone.org/bctoolbox")
+             (url "https://gitlab.linphone.org/BC/public/bctoolbox.git";)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "0bfswwvvdshaahg4jd2j10f0sci8809s4khajd0m6b059zwc7y25"))))
     (build-system cmake-build-system)
+    (outputs '("out" "debug"))
     (arguments
      `(#:configure-flags '("-DENABLE_STATIC=OFF")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'patch-source
+         (add-after 'unpack 'patch-cmake
            (lambda* (#:key inputs #:allow-other-keys)
-             ;; Fix decaf dependency.
+             ;; Fix decaf dependency (see:
+             ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/3).

I've reported the issue upstream.

              (let* ((decaf (assoc-ref inputs "decaf")))
                (substitute* (find-files "." "CMakeLists.txt")
                  (("find_package\\(Decaf CONFIG\\)")
@@ -153,17 +160,28 @@ writing, administering, and running unit tests in C.")
                  (("\\$\\{DECAF_INCLUDE_DIRS\\}")
                   (string-append decaf "/include/decaf"))
                  (("\\$\\{DECAF_TARGETNAME\\}")
-                  "decaf")))
-             ;; Disable failing tests.
+                  "decaf")))))
+         (add-after 'unpack 'skip-problematic-tests
+           (lambda _
+             ;; The following test relies on networking; disable it.
              (substitute* "tester/port.c"
-               (("[ \t]*TEST_NO_TAG\\(\"Addrinfo sort\", 
bctbx_addrinfo_sort_test\\)")
-                ""))
-             #t))
+               (("[ \t]*TEST_NO_TAG.*bctbx_addrinfo_sort_test\\)")
+                ""))))
+         (add-after 'unpack 'fix-installed-resource-directory-detection
+           (lambda _
+             ;; There's some broken logic in tester.c that checks if CWD, or
+             ;; if its parent exist, and if so, sets the prefix where the test
+             ;; resources are looked up to; disable it (see:
+             ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/4).
+             (substitute* "src/tester.c"
+               (("if \\(file_exists\\(\".\"\\)\\)")
+                "if (NULL)")
+               (("if \\(file_exists\\(\"..\"\\)\\)")
+                "if (NULL)"))))

I figured a way to have the bctoolbox library refer to its resource
directory more correctly, at least for our uses of it.

2. belr

@@ -181,41 +200,42 @@ Communications software like belle-sip, mediastreamer2 
and linphone.")
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "git://git.linphone.org/belr")
+             (url "https://gitlab.linphone.org/BC/public/belr.git";)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "0w2canwwm0qb99whnangvaybvjzq8xg6vksqxykgr8fbx7clw03h"))))
     (build-system cmake-build-system)
-    (outputs '("out" "test"))
+    (outputs '("out" "debug" "tester"))

I've settled to keep 'tester', which was already used in the module and
which better maps to what this output is (a tester binary to run self tests).

     (arguments
      `(#:configure-flags '("-DENABLE_STATIC=OFF")
        #:phases
        (modify-phases %standard-phases
-         (replace 'check
-           (lambda _
-             (copy-file "tester/belr_tester" "../source/tester/belr_tester")
-             (with-directory-excursion "../source/tester"
-               (invoke "./belr_tester"))
-             #t))
-         (add-after 'install 'seperate-outputs
+         (delete 'check)                ;moved after the install phase
+         (add-after 'install 'check
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((tester (assoc-ref outputs "tester"))
+                    (belr_tester (string-append tester "/bin/belr_tester"))
+                    (tester-share (string-append tester "/share/belr_tester")))
+               (invoke belr_tester))))
+         (add-after 'install 'move-tester
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (test (assoc-ref outputs "test"))
-                    (test-name (string-append ,name "_tester")))
+                    (tester (assoc-ref outputs "tester")))
                (for-each mkdir-p
-                         `(,(string-append test "/bin")
-                           ,(string-append test "/share")))
+                         (list (string-append tester "/bin")
+                               (string-append tester "/share")))
                (rename-file
-                (string-append out "/bin/" test-name)
-                (string-append test "/bin/" test-name))
+                (string-append out "/bin/belr_tester")
+                (string-append tester "/bin/belr_tester"))
                (rename-file
                 (string-append out "/share/belr-tester")
-                (string-append test "/share/" test-name)))
-             #t)))))
+                ;; The detect_res_prefix procedure in bctoolbox's tester.c
+                ;; resolves the resource path based on the executable path and
+                ;; name, so have it match.
+                (string-append tester "/share/belr_tester"))))))))

Here I noticed the code relies on the tester file name to resolve its
resources, so adapted the resource install directory to match.

     (inputs
-     `(("bctoolbox" ,bctoolbox)
-       ("libudev" ,eudev)))

Dropped eudev, apparently unnecessary.

+     `(("bctoolbox" ,bctoolbox)))
     (synopsis "Belledonne Communications Language Recognition Library")
     (description "Belr is Belledonne Communications' language recognition
 library, written in C++11.  It parses text inputs formatted according to a

3. belcard

      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "git://git.linphone.org/belcard")
+             (url "https://gitlab.linphone.org/BC/public/belcard.git";)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "16x2xp8d0a115132zhy1kpxkyj86ia7vrsnpjdg78fnbvmvysc8m"))))
     (build-system cmake-build-system)
-    (outputs '("out" "test"))
+    (outputs '("out" "debug" "tester"))
     (arguments
-     `(#:tests? #f ; FIX-ME
+     `(#:tests? #t
        #:configure-flags '("-DENABLE_STATIC=OFF")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'seperate-outputs
+         (add-after 'unpack 'patch-vcard-grammar-location
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (test (assoc-ref outputs "test"))
-                    (test-name (string-append ,name "_tester")))
+                    (vcard-grammar
+                     (string-append out "/share/belr/grammars/vcard_grammar")))
+               (substitute* "include/belcard/vcard_grammar.hpp"
+                 (("define VCARD_GRAMMAR \"vcard_grammar\"")
+                  (format #f "define VCARD_GRAMMAR ~s" vcard-grammar))))))
+         (add-after 'install 'install-tester
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (tester (assoc-ref outputs "tester"))
+                   (test-name (string-append ,name "_tester")))
                (for-each mkdir-p
-                         `(,(string-append test "/bin")
-                           ,(string-append test "/share")))
-               (rename-file
-                (string-append out "/bin/" test-name)
-                (string-append test "/bin/" test-name))
-               (rename-file
-                (string-append out "/share/" test-name)
-                (string-append test "/share/" test-name)))
-             #t)))))
-    (native-inputs
-     `(("python" ,python-wrapper)))
+                         (list (string-append tester "/bin")
+                               (string-append tester "/share")))
+               (rename-file (string-append out "/bin/" test-name)
+                            (string-append tester "/bin/" test-name))
+               (rename-file (string-append out "/share/" test-name)
+                            (string-append tester "/share/" test-name)))))
+         (delete 'check)
+         (add-after 'install-tester 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (let* ((tester (assoc-ref outputs "tester"))
+                      (belcard_tester (string-append tester
+                                                     "/bin/belcard_tester")))
+                 (invoke belcard_tester))))))))

I've found that moving the check phase after installing, along with the
resource fix made for belr allowed the test suite to run, so I enabled it.

     (inputs
      `(("bctoolbox" ,bctoolbox)
-       ("belr" ,belr)
-       ("libudev" ,eudev)))

eudev was here also unnecessary, as well as python.

+       ("belr" ,belr)))
     (synopsis "Belledonne Communications VCard Library")
     (description "Belcard is a C++ library to manipulate VCard standard
 format.")

4. ortp

 (define-public ortp
   (package
@@ -363,37 +407,40 @@ such as conferencing.")
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "git://git.linphone.org/ortp")
+             (url "https://gitlab.linphone.org/BC/public/ortp.git";)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "1r1kvjzyfvkf66in4p51wi87balzg3sw3aq6r4xr609mz86spi5m"))))
     (build-system cmake-build-system)
-    (outputs '("out" "doc" "test"))
+    (outputs '("out""tester"
+               "doc"))                  ;1.5 MiB of HTML doc

Added a comment about why we are adding a 'doc' output.

     (arguments
-     `(#:tests? #f                      ; Require networking
-       #:configure-flags
-       (list
-        "-DENABLE_STATIC=NO"
-        "-DENABLE_TESTS=YES")
+     `(#:tests? #f                      ;requires networking
+       #:configure-flags (list "-DENABLE_STATIC=NO"
+                               "-DENABLE_TESTS=YES")
        #:phases
        (modify-phases %standard-phases
-         (add-after 'install 'seperate-outputs
+         (add-after 'unpack 'fix-version-strings
+           ;; See: https://gitlab.linphone.org/BC/public/ortp/-/issues/5.
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
+                (string-append "VERSION " ,version))
+               (("\\$\\{ORTP_DOC_VERSION\\}")
+                ,version))))

Here I've found an issue where some CMake variables were not set,
causing the doc to be installed in a 'ortp-' named directory.

+         (add-after 'install 'separate-outputs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (doc (assoc-ref outputs "doc"))
-                    (doc-name (string-append ,name "-4.4.0"))
-                    (test (assoc-ref outputs "test")))
-               (for-each mkdir-p
-                         `(,(string-append doc "/share/doc")
-                           ,(string-append test "/bin")))
-               (rename-file
-                (string-append out "/share/doc/" doc-name)
-                (string-append doc "/share/doc/" doc-name))
-               (rename-file
-                (string-append out "/bin")
-                (string-append test "/bin")))
-             #t)))))
+                    (doc-src (string-append out "/share/doc/ortp-" ,version))
+                    (doc-dest (string-append doc "/share/doc/ortp-" ,version))
+                    (tester (assoc-ref outputs "tester")))
+               (for-each mkdir-p (list (string-append doc "/share/doc")
+                                       (string-append tester "/bin")))
+               (rename-file doc-src doc-dest)
+               (rename-file (string-append out "/bin")
+                            (string-append tester "/bin"))))))))

Which simplified moving the doc directory.

     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)))

5: mediastreamer2

      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "git://git.linphone.org/mediastreamer2")
+             (url "https://gitlab.linphone.org/BC/public/mediastreamer2.git";)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "0989h3d0h7qrx4kjx8gg09j8c5hvvi3h8qi1iq1dqbppwbaxbz8c"))))
-    (outputs '("out" "doc" "test"))
+    (outputs '("out" "doc" "tester"))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags
-       (list
-        "-DENABLE_STATIC=NO"
-        "-DENABLE_PCAP=YES"
-        "-DENABLE_STRICT=NO"       ; To disable strict compile options
-        "-DENABLE_PORTAUDIO=YES"
-        "-DENABLE_G729B_CNG=YES")
+     `(#:configure-flags (list "-DENABLE_STATIC=NO"
+                               "-DENABLE_PCAP=YES"
+                               ;; Do not fail on compile warnings.
+                               "-DENABLE_STRICT=NO"
+                               "-DENABLE_PORTAUDIO=YES"
+                               "-DENABLE_G729B_CNG=YES")
        #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-version
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
+                (string-append "VERSION " ,version)))))
          (add-after 'unpack 'patch-source
            (lambda _
              (substitute* "src/otherfilters/mspcapfileplayer.c"
-               (("O_BINARY") "L_INCR"))
-             #t))
+               (("O_BINARY") "L_INCR"))))
          (add-before 'check 'pre-check
            (lambda _
              ;; Tests require a running X server.
              (system "Xvfb :1 +extension GLX &")
              (setenv "DISPLAY" ":1")
              ;; Tests write to $HOME.
-             (setenv "HOME" (getenv "TEMP"))
-             #t))
-         (replace 'check
-           (lambda _
-             (copy-file
-              "tester/mediastreamer2_tester"
-              "../source/tester/mediastreamer2_tester")
-             (with-directory-excursion "../source/tester"
-               (for-each
-                (lambda (suite-name)
-                  (invoke "./mediastreamer2_tester" "--suite" suite-name))
-                (list
-                 "Basic Audio"
-                 ;; "Sound Card"
-                 ;; "AdaptiveAlgorithm"
-                 ;; "AudioStream"
-                 ;; "VideoStream"
-                 "H26x Tools"
-                 "Framework"
-                 ;; "Player"
-                 "TextStream")))
-             #t))
+             (setenv "HOME" (getenv "TEMP"))))
+         (delete 'check)                ;move after install
          (add-after 'install 'separate-outputs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (test (assoc-ref outputs "test"))
-                    (test-name (string-append ,name "_tester"))
+                    (tester (assoc-ref outputs "tester"))
+                    (tester-name (string-append ,name "_tester"))
                     (doc (assoc-ref outputs "doc"))
-                    (doc-name (string-append ,name "-4.4.0")))
+                    (doc-name (string-append ,name "-" ,version)))
                (for-each mkdir-p
-                         `(,(string-append test "/bin")
-                           ,(string-append test "/share")
-                           ,(string-append doc "/share/doc")))
-               (rename-file
-                (string-append out "/bin/" test-name)
-                (string-append test "/bin/" test-name))
-               (rename-file
-                (string-append out "/share/" test-name)
-                (string-append test "/share/" test-name))
-               (rename-file
-                (string-append out "/share/doc/" doc-name)
-                (string-append doc "/share/doc/" doc-name)))
-             #t)))))
+                         (list (string-append tester "/bin")
+                               (string-append tester "/share")
+                               (string-append doc "/share/doc")))
+               ;; Move the tester executable.
+               (rename-file (string-append out "/bin/" tester-name)
+                            (string-append tester "/bin/" tester-name))
+               ;; Move the tester data files.
+               (rename-file (string-append out "/share/" tester-name)
+                            (string-append tester "/share/" tester-name))
+               ;; Move the HTML documentation.
+               (rename-file (string-append out "/share/doc/" doc-name)
+                            (string-append doc "/share/doc/" doc-name)))))

I moved the check phase after the installation, which allowed not having
to copy the binary or resource files, and reinstated some comments.

+         (add-after 'separate-outputs 'check
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((tester (string-append  (assoc-ref outputs "tester")
+                                           "/bin/mediastreamer2_tester")))
+               (for-each (lambda (suite-name)
+                           (invoke tester "--suite" suite-name))
+                         ;; Some tests fail, due to requiring access to the
+                         ;; sound card or the network.

Added a comment of why some tests are not enabled.

+                           (list "Basic Audio"
+                                 ;; "Sound Card"
+                                 ;; "AdaptiveAlgorithm"
+                                 ;; "AudioStream"
+                                 ;; "VideoStream"
+                                 "H26x Tools"
+                                 "Framework"
+                                 ;; "Player"
+                                 "TextStream"))))))))
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)

6. belle-sip

      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "git://git.linphone.org/belle-sip")
+             (url "https://gitlab.linphone.org/BC/public/belle-sip.git";)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "1kknnlczq7dpqaj1dwxvy092dzrqjy11ndkv90rqwmdryigkjk6z"))))
     (build-system cmake-build-system)
-    (outputs '("out" "test"))
+    (outputs '("out" "tester"))
     (arguments
-     `(#:configure-flags
-       (list
-        "-DENABLE_STATIC=NO"
-        "-DENABLE_MDNS=ON")
+     `(#:configure-flags (list "-DENABLE_STATIC=NO"
+                               "-DENABLE_MDNS=ON")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch
@@ -514,58 +512,44 @@ including both ARM and x86.")
              (substitute* "src/CMakeLists.txt"
                ;; ANTLR would use multithreaded DFA generation otherwise,
                ;; which would not be reproducible.
-               (("-Xmultithreaded ") ""))
-             #t))
-         (replace 'check
-           (lambda _
-             (copy-file
-              "tester/belle_sip_tester"
-              "../source/tester/belle_sip_tester")
-             (with-directory-excursion "../source/tester"
-               (for-each
-                (lambda (suite-name)
-                  (invoke "./belle_sip_tester" "--suite" suite-name))
-                (list
-                 "Object inheritance"
-                 "SIP URI"
-                 "FAST SIP URI"
-                 "FAST SIP URI 2"
-                 "Generic uri"
-                 "Headers"
-                 "Core"
-                 "SDP"
-                 ;; "Resolver"
-                 "Message"
-                 "Authentication helper"
-                 ;; "Register"
-                 ;; "Dialog"
-                 "Refresher"
-                 ;; "HTTP stack"
-                 "Object")))
-             #t))
-         (add-after 'install 'seperate-outputs
+               (("-Xmultithreaded ") ""))))
+         (delete 'check)                ;move after install
+         (add-after 'install 'separate-outputs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (test (assoc-ref outputs "test"))
-                    (test-name (string-append "belle_sip" "_tester")))
-               (for-each mkdir-p
-                         `(,(string-append test "/bin")
-                           ,(string-append test "/share")))
-               (rename-file
-                (string-append out "/bin/" test-name)
-                (string-append test "/bin/" test-name))
-               (rename-file
-                (string-append out "/share/" test-name)
-                (string-append test "/share/" test-name)))
-             #t)))))
-    (native-inputs
-     `(("python" ,python-wrapper)))

Python was not needed.

+                    (tester (assoc-ref outputs "tester"))
+                    (tester-name "belle_sip_tester"))
+               (for-each mkdir-p (list (string-append tester "/bin")
+                                       (string-append tester "/share")))
+               (rename-file (string-append out "/bin")
+                            (string-append tester "/bin"))
+               (rename-file (string-append out "/share/" tester-name)
+                            (string-append tester "/share/" tester-name)))))
+         (add-after 'separate-outputs 'check
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((tester (string-append (assoc-ref outputs "tester")
+                                          "/bin/belle_sip_tester")))
+               (for-each (lambda (suite-name)
+                           (invoke tester "--suite" suite-name))
+                         (list "Object inheritance"
+                               "SIP URI"
+                               "FAST SIP URI"
+                               "FAST SIP URI 2"
+                               "Generic uri"
+                               "Headers"
+                               "Core"
+                               "SDP"
+                               ;;"Resolver"
+                               "Message"
+                               "Authentication helper"
+                               ;;"Register"
+                               ;;"Dialog"
+                               "Refresher"
+                               ;;"HTTP stack"
+                               "Object"))))))))

This is the same trick as done earlier, moving the check phase after the
install phase.
     
     (inputs
-     `(("antlr3" ,antlr3-3.3)
-       ("antlr3c" ,libantlr3c)
-       ("avahi" ,avahi)
+     `(("avahi" ,avahi)
        ("bctoolbox" ,bctoolbox)
-       ("java" ,icedtea)
        ("zlib" ,zlib)))

Java was not needed, nor was antlr3 or libantlr3c.

     (synopsis "Belledonne Communications SIP Library")
     (description "Belle-sip is a modern library implementing SIP transport,

7. liblinphone

--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -25,7 +25,7 @@
   #:use-module (gnu packages audio)
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages base)
-  #:use-module (gnu packages codesynthesis)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
@@ -739,36 +739,34 @@ device.")
      (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://gitlab.linphone.org/BC/public/liblinphone";)
+             (url "https://gitlab.linphone.org/BC/public/liblinphone.git";)
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
         (base32 "1lwabr93jw24y04pdqnw9dgg8jb3lzfplyx19f83jgp9dj8kmfq9"))))
-    (outputs '("out" "test"))
+    (outputs '("out" "tester"))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ; Tests require networking
-       #:configure-flags
-       (list
-        "-DENABLE_STATIC=NO"
-        "-DENABLE_LDAP=YES")
+       #:configure-flags (list "-DENABLE_STATIC=NO"
+                               "-DENABLE_DOC=NO" ;requires unpackaged 
javasphinx
+                               "-DENABLE_LDAP=YES")
        #:phases
        (modify-phases %standard-phases
          (add-after 'install 'separate-outputs
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
-                    (test (assoc-ref outputs "test"))
-                    (test-name (string-append ,name "_tester")))
+                    (tester (assoc-ref outputs "tester"))
+                    (tester-name (string-append ,name "_tester")))
                (for-each mkdir-p
-                         `(,(string-append test "/bin")
-                           ,(string-append test "/share")))
-               (rename-file
-                (string-append out "/bin/" test-name)
-                (string-append test "/bin/" test-name))
-               (rename-file
-                (string-append out "/share/" test-name)
-                (string-append test "/share/" test-name)))
-             #t)))))
+                         (list (string-append tester "/bin")
+                               (string-append tester "/share")))
+               (rename-file (string-append out "/bin/" tester-name)
+                            (string-append tester "/bin/" tester-name))
+               (rename-file (string-append out "/bin/groupchat_benchmark")
+                            (string-append tester "/bin/groupchat_benchmark"))
+               (rename-file (string-append out "/share/" tester-name)
+                            (string-append tester "/share/" tester-name))))))))
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)

Not much else than copying the groupchat_benchmark 500 KiB command with
the tester, where it belonged according to the build system.

8. linphone-desktop

Finally :-)

         (base32 "1gq4l9p21rbrcksa7fbkzn9fzbbynqmn6ni6lhnvzk359sb1xvbz"))
        (patches (search-patches "linphone-desktop-without-sdk.patch"))))
     (build-system qt-build-system)
+    (outputs '("out" "debug"))
     (arguments
      `(#:tests? #f                      ; No test target
-       #:configure-flags
-       (list
-        "-DENABLE_UPDATE_CHECK=NO")
+       #:configure-flags (list "-DENABLE_UPDATE_CHECK=NO"
+                               "-DENABLE_DAEMON=YES"
+                               "-DENABLE_CONSOLE_UI=YES")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'pre-configure
            (lambda _
-             (for-each make-file-writable (find-files "."))
+             (make-file-writable "linphone-app/linphoneqt_version.cmake")
              (substitute* "linphone-app/linphoneqt_version.cmake"
-               (("\\$\\{GUIX-SET-VERSION\\}") ,version))
-             #t))
+               (("\\$\\{GUIX-SET-VERSION\\}") ,version))))
          (add-after 'install 'post-install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (liblinphone (assoc-ref inputs "liblinphone"))
-                    (belcard (assoc-ref inputs "belcard")))
+                    (grammar-dest (string-append out "/share/belr/grammars")))
                ;; Remove unnecessary Qt configuration file.
                (delete-file (string-append out "/bin/qt.conf"))
                ;; Not using the FHS exposes an issue where the client
                ;; refers to its own "share" directory, which lacks files
                ;; installed by the dependencies.
-               (symlink
-                (string-append liblinphone "/share/sounds")
-                (string-append out "/share/sounds"))
-               (symlink
-                (string-append belcard "/share/belr")
-                (string-append out "/share/belr"))
-               #t))))))
+               (symlink (string-append liblinphone "/share/sounds")
+                        (string-append out "/share/sounds"))
+               (mkdir-p (dirname grammar-dest))
+               (symlink (string-append liblinphone "/share/belr/grammars")
+                        grammar-dest)))))))

I've found that only liblinphone resources were necessary to have the
application not crash.

     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("qttools" ,qttools)))
     (inputs
      `(("bctoolbox" ,bctoolbox)
        ("belcard" ,belcard)
-       ("bellesip" ,belle-sip)

Removed this unnecessary input.

        ("belr" ,belr)
        ("liblinphone" ,liblinphone)
        ("mediastreamer2" ,mediastreamer2)
@@ -883,8 +880,11 @@ and video calls or instant messaging capabilities to an 
application.")
 @item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc.
 @item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4
 @end itemize")
-    (home-page "https://gitlab.linphone.org/BC/public/linphone-desktop";)
-    (license license:gpl2+)))
+    (home-page "https://linphone.org/technical-corner/linphone";)
+    (license license:gpl3+)))
+
+(define-public linphoneqt
+  (deprecated-package "linphoneqt" linphone-desktop))

Added this for easing the migration for people having linphoneqt in
their profile.

Phew!  There's just 4 patches left to review, about codec updates.  I'll
look at them soon.  Many thanks for this
big effort and fine work! :-)

Maxim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]