diff mbox series

[bug#47274] Linphone Packages

Message ID 2f3561d8-dfbd-992a-53c0-0856680a8552@raghavgururajan.name
State Accepted
Headers show
Series [bug#47274] Linphone Packages | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Raghav Gururajan March 20, 2021, 4:26 a.m. UTC
Hello Guix!

The packages in linphone.scm has been severely outdated and posses risk, 
as upstream even removed the tarballs. So I have re-worked all the 
packages in linphone.scm, as fast as I could.

@Maxim: Thanks so much for offering to review.

Please find the attached patch-set.

I am still working on one component, linphone-desktop. The upgrade from 
v4.1.1 to v4.2.5, turns to be more complicated than I expected.

Regards,
RG.

Comments

Maxim Cournoyer March 24, 2021, 2:25 a.m. UTC | #1
Hi!

Raghav Gururajan <rg@raghavgururajan.name> writes:

> * gnu/packages/crypto.scm (libdecaf): New variable.
> ---
>  gnu/packages/crypto.scm | 63 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 63 insertions(+)
>
> diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
> index 0000e7fbf2..3959464d56 100644
> --- a/gnu/packages/crypto.scm
> +++ b/gnu/packages/crypto.scm
> @@ -47,9 +47,11 @@
>    #:use-module (gnu packages compression)
>    #:use-module (gnu packages crates-io)
>    #:use-module (gnu packages cryptsetup)
> +  #:use-module (gnu packages documentation)
>    #:use-module (gnu packages gettext)
>    #:use-module (gnu packages gnupg)
>    #:use-module (gnu packages golang)
> +  #:use-module (gnu packages graphviz)
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages kerberos)
>    #:use-module (gnu packages libbsd)
> @@ -88,6 +90,67 @@
>    #:use-module (srfi srfi-1)
>    #:use-module (srfi srfi-26))
>  
> +(define-public libdecaf
> +  (package
> +    (name "libdecaf")
> +    (version "1.0.1")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "git://git.code.sf.net/p/ed448goldilocks/code")
> +                    (commit
> +                     (string-append "v" version))))
> +              (file-name
> +               (git-file-name name version))
> +              (sha256
> +               (base32 "1ajgmyvc6a4m1h2hg1g4wz7ibx10x1xys9m6ancnmmf1f2srlfly"))))
> +    (build-system cmake-build-system)
> +    (outputs '("out" "python" "doc"))
> +    (arguments
> +     `(#:configure-flags '("-DENABLE_STATIC=OFF")
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch-python-binding
> +           (lambda _
> +             (substitute* "python/setup.py"
> +               (("gmake")
> +                "make")
> +               (("'\\.\\.', 'build', 'lib', 'libdecaf\\.so'")
> +                "'..', '..', 'build', 'src', 'libdecaf.so'"))
> +             #t))

Ending phases with #t is no longer required on core-updates, and we can
stop doing it on master and staging already too, to save us the hassle
of editing them out at some later point in time :-)

> +         (add-after 'install 'install-python-binding
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (with-directory-excursion "../source/python"
> +               (invoke "python" "setup.py" "install"
> +                       (string-append "--prefix=" (assoc-ref outputs "python"))
> +                       "--root=/"))
> +             #t))
> +         (add-after 'install-python-binding 'install-documentation
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (invoke "make" "doc")
> +             (let* ((doc (assoc-ref outputs "doc"))
> +                    (dest (string-append doc "/share/doc")))
> +               (copy-recursively "doc" dest))
> +             #t)))))
> +    (native-inputs
> +     `(("dot" ,graphviz)
> +       ("doxygen" ,doxygen)
> +       ("python" ,python-wrapper)))
> +    (inputs
> +     `(("python2" ,python-2.7)
> +       ("python3" ,python)))

This inputs field seems unnecessary, especially we don't want to add a
dependency to Python 2, which is slowly being carved out of Guix.

> +    (synopsis "Decaf Elliptic Curve Library")
> +    (description "The libdecaf library is an implementation of elliptic curve
> +cryptography using the Montgomery and Edwards curves Curve25519, Ed25519,
> +Ed448-Goldilocks and Curve448, using the Decaf encoding.")
> +    (home-page "http://ed448goldilocks.sourceforge.net/")
> +    (license
> +     (list
> +      ;; Library.
> +      license:expat
> +      ;; Binding.
> +      license:bsd-2))))

I personally prefer the more compact (and common?) indentation of the
licenses list as:

    (license (list license:expat        ;library
                   license:bsd-2))))    ;python bindings

It's down to personal preferences, but I tend to value compactness in
thousand lines long modules :-).

I've made the following changes:

--8<---------------cut here---------------start------------->8---
1 file changed, 5 insertions(+), 15 deletions(-)
gnu/packages/crypto.scm | 20 +++++---------------

modified   gnu/packages/crypto.scm
@@ -116,40 +116,30 @@
                (("gmake")
                 "make")
                (("'\\.\\.', 'build', 'lib', 'libdecaf\\.so'")
-                "'..', '..', 'build', 'src', 'libdecaf.so'"))
-             #t))
+                "'..', '..', 'build', 'src', 'libdecaf.so'"))))
          (add-after 'install 'install-python-binding
            (lambda* (#:key outputs #:allow-other-keys)
              (with-directory-excursion "../source/python"
                (invoke "python" "setup.py" "install"
                        (string-append "--prefix=" (assoc-ref outputs "python"))
-                       "--root=/"))
-             #t))
+                       "--root=/"))))
          (add-after 'install-python-binding 'install-documentation
            (lambda* (#:key outputs #:allow-other-keys)
              (invoke "make" "doc")
              (let* ((doc (assoc-ref outputs "doc"))
                     (dest (string-append doc "/share/doc")))
-               (copy-recursively "doc" dest))
-             #t)))))
+               (copy-recursively "doc" dest)))))))
     (native-inputs
      `(("dot" ,graphviz)
        ("doxygen" ,doxygen)
        ("python" ,python-wrapper)))
-    (inputs
-     `(("python2" ,python-2.7)
-       ("python3" ,python)))
     (synopsis "Decaf Elliptic Curve Library")
     (description "The libdecaf library is an implementation of elliptic curve
 cryptography using the Montgomery and Edwards curves Curve25519, Ed25519,
 Ed448-Goldilocks and Curve448, using the Decaf encoding.")
     (home-page "http://ed448goldilocks.sourceforge.net/")
-    (license
-     (list
-      ;; Library.
-      license:expat
-      ;; Binding.
-      license:bsd-2))))
+    (license (list license:expat        ;library
+                   license:bsd-2))))    ;python bindings
 
 (define-public libsodium
   (package
--8<---------------cut here---------------end--------------->8---

And pushed as commit c221d49510.

Thank you!

Maxim
Raghav Gururajan March 29, 2021, 5:07 a.m. UTC | #2
Hi Maxim!

> Ending phases with #t is no longer required on core-updates, and we can
> stop doing it on master and staging already too, to save us the hassle
> of editing them out at some later point in time :-)

Agreed.

> This inputs field seems unnecessary, especially we don't want to add a
> dependency to Python 2, which is slowly being carved out of Guix.

Makes sense.

> I've made the following changes:
> 
> --8<---------------cut here---------------start------------->8---
> 1 file changed, 5 insertions(+), 15 deletions(-)
> gnu/packages/crypto.scm | 20 +++++---------------
> 
> modified   gnu/packages/crypto.scm
> @@ -116,40 +116,30 @@
>                  (("gmake")
>                   "make")
>                  (("'\\.\\.', 'build', 'lib', 'libdecaf\\.so'")
> -                "'..', '..', 'build', 'src', 'libdecaf.so'"))
> -             #t))
> +                "'..', '..', 'build', 'src', 'libdecaf.so'"))))
>            (add-after 'install 'install-python-binding
>              (lambda* (#:key outputs #:allow-other-keys)
>                (with-directory-excursion "../source/python"
>                  (invoke "python" "setup.py" "install"
>                          (string-append "--prefix=" (assoc-ref outputs "python"))
> -                       "--root=/"))
> -             #t))
> +                       "--root=/"))))
>            (add-after 'install-python-binding 'install-documentation
>              (lambda* (#:key outputs #:allow-other-keys)
>                (invoke "make" "doc")
>                (let* ((doc (assoc-ref outputs "doc"))
>                       (dest (string-append doc "/share/doc")))
> -               (copy-recursively "doc" dest))
> -             #t)))))
> +               (copy-recursively "doc" dest)))))))
>       (native-inputs
>        `(("dot" ,graphviz)
>          ("doxygen" ,doxygen)
>          ("python" ,python-wrapper)))
> -    (inputs
> -     `(("python2" ,python-2.7)
> -       ("python3" ,python)))
>       (synopsis "Decaf Elliptic Curve Library")
>       (description "The libdecaf library is an implementation of elliptic curve
>   cryptography using the Montgomery and Edwards curves Curve25519, Ed25519,
>   Ed448-Goldilocks and Curve448, using the Decaf encoding.")
>       (home-page "http://ed448goldilocks.sourceforge.net/")
> -    (license
> -     (list
> -      ;; Library.
> -      license:expat
> -      ;; Binding.
> -      license:bsd-2))))
> +    (license (list license:expat        ;library
> +                   license:bsd-2))))    ;python bindings
>   
>   (define-public libsodium
>     (package
> --8<---------------cut here---------------end--------------->8---
> 
> And pushed as commit c221d49510.

Thank you!

Regards,
RG.
diff mbox series

Patch

From aa2ec33ae2b0f554a366da55908b97e6df8a1830 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sat, 20 Mar 2021 00:01:26 -0400
Subject: [PATCH 50/50] gnu: msamr: Update to 1.1.3-11.

* gnu/packages/linphone.scm (msamr) [source]: Switch to git repository.
[version]: Update to 1.1.3-11.
[inputs]: Add bctoolbox.
---
 gnu/packages/linphone.scm | 56 +++++++++++++++++++++------------------
 1 file changed, 30 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
index c24069a948..2b19fb9e56 100644
--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -1006,30 +1006,34 @@  WebRTC codec.  It includes features from WebRTC, such as, iSAC and AECM.")
       (license license:gpl2+))))
 
 (define-public msamr
-  (package
-    (name "msamr")
-    (version "1.1.3")
-    (source
-     (origin
-       (method url-fetch)
-       (uri
-        (string-append "https://www.linphone.org/releases/sources/plugins/"
-                       name "/" name "-" version ".tar.gz"))
-       (sha256
-        (base32 "16c9f3z4wnj73k7y8gb0fgpr4axsm7b5zrbjvy8vsgz9gyg3agm5"))))
-    (build-system cmake-build-system)
-    (arguments
-     `(#:tests? #f                      ; No test target
-       #:configure-flags
-       (list "-DENABLE_STATIC=NO"       ; Not required
-             "-DENABLE_WIDEBAND=YES")))
-    (inputs
-     `(("mediastreamer2" ,mediastreamer2)
-       ("opencoreamr" ,opencore-amr)
-       ("ortp" ,ortp)
-       ("voamrwbenc" ,vo-amrwbenc)))
-    (synopsis "Media Streamer AMR Codec")
-    (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
+  (let ((commit "5ab5c098299107048dfcbfc741f7392faef167bd")
+        (revision "11"))
+    (package
+      (name "msamr")
+      (version (git-version "1.1.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "git://git.linphone.org/msamr")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1g79lw1qi1mlw3v1b0cixmqiwjql81gz9naakb15n8pvaag9aaqm"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f                    ; No test target
+         #:configure-flags
+         (list "-DENABLE_STATIC=NO"     ; Not required
+               "-DENABLE_WIDEBAND=YES")))
+      (inputs
+       `(("bctoolbox" ,bctoolbox)
+         ("mediastreamer2" ,mediastreamer2)
+         ("opencoreamr" ,opencore-amr)
+         ("ortp" ,ortp)
+         ("voamrwbenc" ,vo-amrwbenc)))
+      (synopsis "Media Streamer AMR Codec")
+      (description "MSAMR is a plugin of MediaStreamer, adding support for AMR
 codec.  It is based on the opencore-amr implementation.")
-    (home-page "https://gitlab.linphone.org/BC/public/msamr")
-    (license license:gpl3+)))
+      (home-page "https://gitlab.linphone.org/BC/public/msamr")
+      (license license:gpl3+))))
-- 
2.31.0