unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Raghav Gururajan <rg@raghavgururajan.name>
Cc: 47274@debbugs.gnu.org
Subject: [bug#47274] Linphone Packages
Date: Wed, 24 Mar 2021 21:55:30 -0400	[thread overview]
Message-ID: <87pmzot2st.fsf_-_@gmail.com> (raw)
In-Reply-To: <66991ebb-4074-efab-4331-1ed195d55d26@raghavgururajan.name> (Raghav Gururajan's message of "Sun, 21 Mar 2021 21:48:59 -0400")

Hi,

Raghav Gururajan <rg@raghavgururajan.name> writes:

> * gnu/packages/linphone.scm (bctoolbox) [arguments]<#:phases>['patch-source]: Modify.
> [inputs]: Add libdecaf.
> ---
>  gnu/packages/linphone.scm | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
> index 9d54b1b874..1a83105334 100644
> --- a/gnu/packages/linphone.scm
> +++ b/gnu/packages/linphone.scm
> @@ -25,6 +25,7 @@
>    #:use-module (gnu packages audio)
>    #:use-module (gnu packages base)
>    #:use-module (gnu packages compression)
> +  #:use-module (gnu packages crypto)
>    #:use-module (gnu packages documentation)
>    #:use-module (gnu packages gettext)
>    #:use-module (gnu packages gl)
> @@ -151,7 +152,16 @@ administering, and running unit tests in C.")
>         #:phases
>         (modify-phases %standard-phases
>           (add-after 'unpack 'patch-source
> -           (lambda _
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             ;; Fix decaf dependency.
> +             (let* ((decaf (assoc-ref inputs "decaf")))
> +               (substitute* (find-files "." "CMakeLists.txt")
> +                 (("find_package\\(Decaf CONFIG\\)")
> +                  "set(DECAF_FOUND 1)")
> +                 (("\\$\\{DECAF_INCLUDE_DIRS\\}")
> +                  (string-append decaf "/include/decaf"))
> +                 (("\\$\\{DECAF_TARGETNAME\\}")
> +                  "decaf")))
>               ;; Disable failing tests.
>               (substitute* "tester/port.c"
>                 (("[ \t]*TEST_NO_TAG\\(\"Addrinfo sort\", bctbx_addrinfo_sort_test\\)")
> @@ -164,6 +174,7 @@ administering, and running unit tests in C.")
>               #t)))))
>      (inputs
>       `(("bcunit" ,bcunit)
> +       ("decaf" ,libdecaf)
>         ("mbedtls" ,mbedtls-apache)))
>      (synopsis "Belledonne Communications Tool Box")
>      (description "BcToolBox is an utilities library used by Belledonne

I've squashed the 3 bctoolbox commits together, adjusted the commit
message as below:

gnu: bctoolbox: Update to 4.4.34 and enable libdecaf, tests.

* gnu/packages/linphone.scm (bctoolbox)[version]: Update to 4.4.34.
[source]: Switch to git repository.
[arguments]: Remove tests? argument, enabling tests.
[phases]{patch-source}: New phase.
{check}: Override phase.
[inputs]: Add libdecaf.
[license]: Update to GPLv3+.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>

1 file changed, 33 insertions(+), 10 deletions(-)
gnu/packages/linphone.scm | 43 +++++++++++++++++++++++++++++++++----------

modified   gnu/packages/linphone.scm
@@ -25,6 +25,7 @@
   #:use-module (gnu packages audio)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
@@ -127,28 +128,50 @@ writing, administering, and running unit tests in C.")
 (define-public bctoolbox
   (package
     (name "bctoolbox")
-    (version "0.6.0")
+    (version "4.4.34")
     (source
      (origin
-       (method url-fetch)
-       (uri
-        (string-append "https://www.linphone.org/releases/sources/" name
-                       "/" name "-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.linphone.org/BC/public/bctoolbox.git")
+             (commit version)))

Used their HTTPS GitLab git here as its browsable;

+       (file-name (git-file-name name version))
        (sha256
-        (base32 "1a1i70pb4hhnykkwyhhc7fv67q556l8kprny8xzgfqpj1nby2ms6"))))
+        (base32 "0bfswwvvdshaahg4jd2j10f0sci8809s4khajd0m6b059zwc7y25"))))
     (build-system cmake-build-system)
     (arguments
-     '(#:tests? #f                      ; No test target
-       #:configure-flags
-       (list "-DENABLE_STATIC=OFF")))   ; Not required
+     `(#:configure-flags '("-DENABLE_STATIC=OFF")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; Fix decaf dependency (see:
+             ;; https://gitlab.linphone.org/BC/public/bctoolbox/-/issues/3).

Added an issue upstream for the problem worked around here.

+             (let* ((decaf (assoc-ref inputs "decaf")))
+               (substitute* (find-files "." "CMakeLists.txt")
+                 (("find_package\\(Decaf CONFIG\\)")
+                  "set(DECAF_FOUND 1)")
+                 (("\\$\\{DECAF_INCLUDE_DIRS\\}")
+                  (string-append decaf "/include/decaf"))
+                 (("\\$\\{DECAF_TARGETNAME\\}")
+                  "decaf")))
+             ;; The following test relies on networking; disable it.

Mentioned this had to do with networking, which is inherent to the
absence of networking in the Guix build container (otherwise it'd had
been good to report the test failure upstream).

+             (substitute* "tester/port.c"
+               (("[ \t]*TEST_NO_TAG.*bctbx_addrinfo_sort_test\\)")

Used .* to shorten the line below 80 chars ;-)

+                ""))))
+         (replace 'check
+           (lambda _
+             (with-directory-excursion "tester"
+               (invoke "./bctoolbox_tester")))))))
     (inputs
      `(("bcunit" ,bcunit)
+       ("decaf" ,libdecaf)
        ("mbedtls" ,mbedtls-apache)))
     (synopsis "Belledonne Communications Tool Box")
     (description "BcToolBox is an utilities library used by Belledonne
 Communications software like belle-sip, mediastreamer2 and linphone.")
     (home-page "https://gitlab.linphone.org/BC/public/bctoolbox")
-    (license license:gpl2+)))
+    (license license:gpl3+)))
 
Can't be pushed yet as it breaks stuff.

Maxim




  parent reply	other threads:[~2021-03-25  1:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-20  4:26 [bug#47274] Linphone Packages Raghav Gururajan via Guix-patches via
2021-03-21  6:13 ` Raghav Gururajan via Guix-patches via
2021-03-22  1:48   ` Raghav Gururajan via Guix-patches via
2021-03-22  4:44     ` Raghav Gururajan via Guix-patches via
2021-03-22  4:59       ` Raghav Gururajan via Guix-patches via
2021-03-29  4:03         ` Maxim Cournoyer
2021-03-29  6:05           ` Raghav Gururajan via Guix-patches via
2021-03-29 18:38             ` Maxim Cournoyer
2021-03-29 18:47               ` Raghav Gururajan via Guix-patches via
2021-03-24  4:12       ` Maxim Cournoyer
2021-03-25 13:07       ` Maxim Cournoyer
2021-03-29  5:16         ` Raghav Gururajan via Guix-patches via
2021-03-27  2:13       ` Maxim Cournoyer
2021-03-29  5:52         ` Raghav Gururajan via Guix-patches via
2021-03-27  5:05       ` Maxim Cournoyer
2021-03-29  5:53         ` Raghav Gururajan via Guix-patches via
2021-03-27  5:11       ` Maxim Cournoyer
2021-03-28  4:05         ` Raghav Gururajan via Guix-patches via
2021-03-28  4:43           ` Maxim Cournoyer
2021-03-29  6:02             ` Raghav Gururajan via Guix-patches via
2021-03-29  5:53         ` Raghav Gururajan via Guix-patches via
2021-03-28  0:52       ` Maxim Cournoyer
2021-03-29  5:55         ` Raghav Gururajan via Guix-patches via
2021-03-29  5:44       ` bug#47274: " Maxim Cournoyer
2021-03-29  6:13         ` [bug#47274] " Raghav Gururajan via Guix-patches via
2021-03-29 18:39           ` Maxim Cournoyer
2021-03-25  1:55     ` Maxim Cournoyer [this message]
2021-03-29  5:13       ` Raghav Gururajan via Guix-patches via
2021-03-28  4:01     ` Maxim Cournoyer
2021-03-29  6:01       ` Raghav Gururajan via Guix-patches via
2021-03-29  5:19     ` Maxim Cournoyer
2021-03-29  6:12       ` Raghav Gururajan via Guix-patches via
2021-03-24  2:25 ` Maxim Cournoyer
2021-03-29  5:07   ` Raghav Gururajan via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmzot2st.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=47274@debbugs.gnu.org \
    --cc=rg@raghavgururajan.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).