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, "Léo Le Bouter" <lle-bout@zaclys.net>,
	"Danny Milosavljevic" <dannym@scratchpost.org>
Subject: [bug#47274] Linphone Packages
Date: Wed, 24 Mar 2021 00:12:19 -0400	[thread overview]
Message-ID: <87tup1tckc.fsf@gmail.com> (raw)
In-Reply-To: <cf75f6a8-fd76-cb05-0a46-903de3e882f6@raghavgururajan.name> (Raghav Gururajan's message of "Mon, 22 Mar 2021 00:44:06 -0400")

Hi again,

Raghav Gururajan <rg@raghavgururajan.name> writes:

> From 4b03df1e5abf22da27c65e1f22ffe4be65377d29 Mon Sep 17 00:00:00 2001
> From: Raghav Gururajan <rg@raghavgururajan.name>
> Date: Sat, 13 Mar 2021 12:04:37 -0500
> Subject: [PATCH 02/53] gnu: bcunit: Update to 3.0.2-13.
>
> * gnu/packages/linphone.scm (bcunit) [source]: Switch to git repository.

Nitpick: there should be no space between (bcunit) and [source].

> [version]: Update to 3.0.2-13.
> [native-inputs]: Add perl.
> ---
>  gnu/packages/linphone.scm | 30 ++++++++++++++++++------------
>  1 file changed, 18 insertions(+), 12 deletions(-)
>
> diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
> index afa542412f..6d243d2073 100644
> --- a/gnu/packages/linphone.scm
> +++ b/gnu/packages/linphone.scm
> @@ -35,6 +35,7 @@
>    #:use-module (gnu packages gtk)
>    #:use-module (gnu packages image)
>    #:use-module (gnu packages linux)
> +  #:use-module (gnu packages perl)
>    #:use-module (gnu packages pulseaudio)
>    #:use-module (gnu packages python)
>    #:use-module (gnu packages python-xyz)
> @@ -57,28 +58,33 @@
>    #:use-module (guix build-system gnu))
>
>  (define-public bcunit
> -  (package
> -    (name "bcunit")
> -    (version "3.0.2")
> -    (source
> -     (origin
> -       (method url-fetch)
> -       (uri
> -        (string-append "https://www.linphone.org/releases/sources/" name
> -                       "/" name "-" version ".tar.gz"))
> -       (sha256
> -        (base32 "0ylchj8w98ic2fkqpxc6yk4s6s0h0ql2zsz5n49jd7126m4h8dqk"))))
> +  (let ((commit "74021cc7cb20a4e177748dd2948173e1f9c270ae")
> +        (revision "13"))

When not using an official release, a comment is in order to mention the
reason; in this case something like: "Use the latest commit as there
hasn't been a release in nearly 4 years." :-).

Also, why start the revision number at 13?  Perhaps the number of
commits since the last tagged release?  It's a detail, but since there
was no revision used before for this package, I'd expect it to start at
0.

> +    (package
> +      (name "bcunit")
> +      (version (git-version "3.0.2" revision commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "git://git.linphone.org/bcunit")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32 "0npdwvanjkfg9vrqs5yi8vh6wliv50ycdli8pzavir84nb31nq1b"))))
>      (build-system cmake-build-system)
>      (arguments
>       '(#:tests? #f                      ; No test target
>         #:configure-flags
>         (list "-DENABLE_STATIC=NO")))    ; Not required
> +    (native-inputs
> +     `(("perl" ,perl)))

Seems Perl is not actually needed.

>      (synopsis "Belledonne Communications Unit Testing Framework")
>      (description "BCUnit is a fork of the defunct project CUnit, with several
>  fixes and patches applied.  It is an unit testing framework for writing,
                                     ^ a

>  administering, and running unit tests in C.")
>      (home-page "https://gitlab.linphone.org/BC/public/bcunit")
> -    (license license:lgpl2.0+)))
> +    (license license:lgpl2.0+))))
>
>  (define-public bctoolbox
>    (package

I ended up squashing all the bcunit changes in one, as I found it a bit
too micro to manage.

I've edited the result slightly, mostly taking out #t, the examples
output (examples are doc after all):

--8<---------------cut here---------------start------------->8---
1 file changed, 18 insertions(+), 26 deletions(-)
gnu/packages/linphone.scm | 44 ++++++++++++++++++--------------------------

modified   gnu/packages/linphone.scm
@@ -60,7 +60,7 @@
 
 (define-public bcunit
   (let ((commit "74021cc7cb20a4e177748dd2948173e1f9c270ae")
-        (revision "13"))
+        (revision "0"))
     (package
       (name "bcunit")
       (version (git-version "3.0.2" revision commit))
@@ -74,16 +74,14 @@
          (sha256
           (base32 "0npdwvanjkfg9vrqs5yi8vh6wliv50ycdli8pzavir84nb31nq1b"))))
       (build-system cmake-build-system)
-      (outputs '("out" "doc" "example"))
+      (outputs '("out" "doc"))
       (arguments
-       `(#:configure-flags
-         (list
-          "-DENABLE_STATIC=NO"
-          "-DENABLE_CURSES=ON"
-          "-DENABLE_DOC=ON"
-          "-DENABLE_EXAMPLES=ON"
-          "-DENABLE_TEST=ON"
-          "-DENABLE_MEMTRACE=ON")
+       `(#:configure-flags (list "-DENABLE_STATIC=NO"
+                                 "-DENABLE_CURSES=ON"
+                                 "-DENABLE_DOC=ON"
+                                 "-DENABLE_EXAMPLES=ON"
+                                 "-DENABLE_TEST=ON"
+                                 "-DENABLE_MEMTRACE=ON")
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'patch-source
@@ -99,36 +97,30 @@
                  (("target_include_directories\\(bcunit_test PUBLIC Test\\)")
                   (string-append
                    "target_include_directories(bcunit_test PUBLIC Test)\n"
-                   "target_link_libraries(bcunit_test bcunit)")))
-               #t))
+                   "target_link_libraries(bcunit_test bcunit)")))))
            (replace 'check
              (lambda _
                (with-directory-excursion "BCUnit/Sources/Test"
-                 (invoke "./test_bcunit"))
-               #t))
-           (add-after 'install 'seperate-outputs
+                 (invoke "./test_bcunit"))))
+           (add-after 'install 'move-doc
              (lambda* (#:key outputs #:allow-other-keys)
-               (let* ((out (assoc-ref outputs "out"))
-                      (doc (assoc-ref outputs "doc"))
-                      (example (assoc-ref outputs "example")))
+               (let ((out (assoc-ref outputs "out"))
+                     (doc (assoc-ref outputs "doc")))
                  (for-each mkdir-p
                            `(,(string-append doc "/share/doc")
-                             ,(string-append example "/share/BCUnit")))
+                             ,(string-append doc "/share/BCUnit")))
                  (rename-file
                   (string-append out "/share/doc/BCUnit")
                   (string-append doc "/share/doc/BCUnit"))
                  (rename-file
                   (string-append out "/share/BCUnit/Examples")
-                  (string-append example "/share/BCUnit/Examples")))
-               #t)))))
-      (native-inputs
-       `(("perl" ,perl)))
+                  (string-append doc "/share/BCUnit/Examples"))))))))
       (inputs
        `(("ncurses" ,ncurses)))
       (synopsis "Belledonne Communications Unit Testing Framework")
-      (description "BCUnit is a fork of the defunct project CUnit, with several
-fixes and patches applied.  It is an unit testing framework for writing,
-administering, and running unit tests in C.")
+      (description "BCUnit is a fork of the defunct project CUnit, with
+several fixes and patches applied.  It is a unit testing framework for
+writing, administering, and running unit tests in C.")
       (home-page "https://gitlab.linphone.org/BC/public/bcunit")
       (license license:lgpl2.0+))))
--8<---------------cut here---------------end--------------->8---

I've also "normalized" the commit message in a way that I think is more
typical.  Arguments such as phases, configure-flags, and such are
typically enclosed in a conditional marker (square brakets); e.g.:

--8<---------------cut here---------------start------------->8---
gnu: bcunit: Update to 3.0.2-0.74021cc and enable more features.

* gnu/packages/linphone.scm (bcunit)[source]: Switch to git repository.
[version]: Update to 3.0.2-0.74021cc.
[outputs]: Add a "doc" output.
[arguments]: Remove the tests? argument, enabling tests.
[configure-flags]: Enable curses, doc, examples, tests and memtrace.
[phases]{patch-source, move-doc}: New phases.
{check}: Override phase.
[inputs]: Add ncurses.
[description]: Fix typo.
--8<---------------cut here---------------end--------------->8---

That's all very subjective, but hoping you get a feel :-).

After having verified that bcunit's dependent packages could still be
built fine and testing the resulting linphoneqt, I've pushed the
squashed bcunit series as commit c2a9b05f02.

Thank you!

Maxim




  parent reply	other threads:[~2021-03-24  4:13 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 [this message]
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
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=87tup1tckc.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=47274@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    --cc=lle-bout@zaclys.net \
    --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).