diff mbox series

[bug#40677,13/18] gnu: pjproject, pjproject-jami: Remove broken pjproject package. Make pjproject-jami package stand-alone by moving package code from pjproject into it.

Message ID 20200421161032.1847-13-tona_kosmicznego_smiecia@interia.pl
State Accepted
Headers show
Series [bug#40677,01/18] gnu: jami: Move Jami and its dependencies to jami.scm. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Jan Wielkiewicz April 21, 2020, 4:10 p.m. UTC
---
 gnu/packages/jami.scm      | 65 ++++++++++++++++++++++++++--
 gnu/packages/telephony.scm | 86 --------------------------------------
 2 files changed, 61 insertions(+), 90 deletions(-)

Comments

Mathieu Othacehe April 22, 2020, 9:39 a.m. UTC | #1
>  
>  (define-public pjproject-jami
>    (package
> -    (inherit pjproject)
>      (name "pjproject-jami")
> +    (version "2.9")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/pjsip/pjproject.git")
> +             (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
> +       (modules '((guix build utils)))

pjproject is used by packages such as asterisk (not yet packaged). So I
would prefer to keep pjproject, even if it's currently broken.

WDYT?

Mathieu
Jan Wielkiewicz April 22, 2020, 11:42 a.m. UTC | #2
On Wed, 22 Apr 2020 11:39:11 +0200
Mathieu Othacehe <m.othacehe@gmail.com> wrote:

> >  
> >  (define-public pjproject-jami
> >    (package
> > -    (inherit pjproject)
> >      (name "pjproject-jami")
> > +    (version "2.9")
> > +    (source
> > +     (origin
> > +       (method git-fetch)
> > +       (uri (git-reference
> > +             (url "https://github.com/pjsip/pjproject.git")
> > +             (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
> > +       (modules '((guix build utils)))  
> 
> pjproject is used by packages such as asterisk (not yet packaged). So
> I would prefer to keep pjproject, even if it's currently broken.
> 
> WDYT?
> 
> Mathieu

Should I revert the change and make pjproject-jami inherit from it
again? Is inheriting from a dead package even worth it for just two
packages?
Moving the code from pjproject to pjproject-jami actually made it easier
to maintain. If someone packages asteriks, they will have to copy the
code, modify it with configure flags, add missing dependencies and use
a different version, because Jami uses a custom version so patching
work.

We can keep the broken package, but I would like to keep my
pjproject-jami without inheritance as it is after my changes.
It is just easier to maintain this way.

But if I'm wrong, then I can just inherit from pjproject as it was
before. I'm not an experienced contributor after all.


Jan Wielkiewicz
diff mbox series

Patch

diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index 534958df5d..95f34afa03 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -98,11 +98,64 @@ 
 
 (define-public pjproject-jami
   (package
-    (inherit pjproject)
     (name "pjproject-jami")
+    (version "2.9")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pjsip/pjproject.git")
+             (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (let ((third-party-directories
+                  ;; Things we don't need:
+                  ;; BaseClasses - contains libraries from Windows SDK
+                  ;; we don't need it, at least not now.
+                  (list "BaseClasses" "g7221" "ilbc" "milenage"
+                        "speex" "threademulation" "yuv" "bdsound"
+                        "gsm" "mp3" "resample" "srtp" "webrtc"
+                        ;; Keep only resample, build and README.txt.
+                        "build/baseclasses" "build/g7221" "build/gsm"
+                        "build/ilbc" "build/milenage" "build/resample"
+                        "build/samplerate" "build/speex" "build/srtp"
+                        "build/webrtc" "build/yuv")))
+             ;; Keep only Makefiles related to resample.
+             (for-each (lambda (directory)
+                         (delete-file-recursively
+                          (string-append "third_party/" directory)))
+                       third-party-directories)
+             #t)
+           (let ((third-party-dirs
+                  (list "gsm" "ilbc" "speex" "g7221" "srtp"
+                        "portaudio" "resample")))
+             (for-each
+              (lambda (dirs)
+                (substitute* "third_party/build/os-linux.mak"
+                  (((string-append "DIRS += " dirs)) "")))
+              third-party-dirs))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("portaudio" ,portaudio)))
+    (propagated-inputs
+     ;; These packages are referenced in the Libs field of the pkg-config
+     ;; file that will be installed by pjproject.
+     `(("speex" ,speex)
+       ("libsrtp" ,libsrtp)
+       ("gnutls" ,gnutls)
+       ("resample", resample)
+       ("util-linux" ,util-linux)))
     (native-inputs
-     `(("SFL-patches" ,(jami-source))
-       ,@(package-native-inputs pjproject)))
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)
+       ("SFL-patches" ,(jami-source))))
     (arguments
      `(#:tests? #f
        ;; See ring-project/daemon/contrib/src/pjproject/rules.mak.
@@ -187,7 +240,11 @@ 
              (substitute* "Makefile"
                (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
                 "selftest: pjlib-test pjlib-util-test pjmedia-test"))
-             #t)))))))
+             #t)))))
+    (home-page "https://www.pjsip.org")
+    (synopsis "SIP (protocol) stack used by Jami")
+    (description "Pjsip is a C library implementing the SIP protocol. This version is highly modified for use in GNU Jami.")
+    (license license:gpl2+)))
 
 (define-public ffmpeg-jami
   (let ((commit "59da9dcd7ef6277e4e04998ced71b05a6083c635")
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 59cd06f6f5..b3d2b8bc70 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -644,92 +644,6 @@  phone to IP phone communication or in a network using a SIP proxy to route your
 calls and messages")
     (license license:gpl2+)))
 
-(define-public pjproject
-  (package
-    (name "pjproject")
-    (version "2.9")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/pjsip/pjproject.git")
-             (commit "5dfa75be7d69047387f9b0436dd9492bbbf03fe4")))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           (let ((third-party-directories
-                  ;; Things we don't need:
-                  ;; BaseClasses - contains libraries from Windows SDK
-                  ;; we don't need it, at least not now.
-                  (list "BaseClasses" "g7221" "ilbc" "milenage"
-                        "speex" "threademulation" "yuv" "bdsound"
-                        "gsm" "mp3" "resample" "srtp" "webrtc"
-                        ;; Keep only resample, build and README.txt.
-                        "build/baseclasses" "build/g7221" "build/gsm"
-                        "build/ilbc" "build/milenage" "build/resample"
-                        "build/samplerate" "build/speex" "build/srtp"
-                        "build/webrtc" "build/yuv")))
-             ;; Keep only Makefiles related to resample.
-             (for-each (lambda (directory)
-                         (delete-file-recursively
-                          (string-append "third_party/" directory)))
-                       third-party-directories)
-             #t)
-           (let ((third-party-dirs
-                  (list "gsm" "ilbc" "speex" "g7221" "srtp"
-                        "portaudio" "resample")))
-             (for-each
-              (lambda (dirs)
-                (substitute* "third_party/build/os-linux.mak"
-                  (((string-append "DIRS += " dirs)) "")))
-              third-party-dirs))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "1ayj6n7zd5wvd1nzj2k9s57fb4ckc2fv92k5sjvhd87yg69k3393"))))
-    (build-system gnu-build-system)
-    (inputs
-     `(("portaudio" ,portaudio)))
-    (propagated-inputs
-     ;; These packages are referenced in the Libs field of the pkg-config
-     ;; file that will be installed by pjproject.
-     `(("speex" ,speex)
-       ("libsrtp" ,libsrtp)
-       ("gnutls" ,gnutls)
-       ("resample", resample)
-       ("util-linux" ,util-linux)))
-    (native-inputs
-     `(("autoconf" ,autoconf)
-       ("automake" ,automake)
-       ("pkg-config" ,pkg-config)
-       ("libtool" ,libtool)))
-    (arguments
-     `( ;; FIXME make: No rule to make target
-       ;; 'pjlib-test-unknown-[something]-gnu'.
-       #:tests? #f
-                ;; #:test-target "selftest"
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'build-dep
-           (lambda _ (invoke "make" "dep")))
-         (add-before 'patch-source-shebangs 'autoconf
-           (lambda _
-             (invoke "autoconf" "-v" "-f" "-i" "-o"
-                     "aconfigure" "aconfigure.ac")))
-         (add-before 'autoconf 'disable-some-tests
-           ;; Three of the six test programs fail due to missing network
-           ;; access.
-           (lambda _
-             (substitute* "Makefile"
-               (("selftest: pjlib-test pjlib-util-test pjnath-test pjmedia-test pjsip-test pjsua-test")
-                "selftest: pjlib-test pjlib-util-test pjmedia-test"))
-             #t)))))
-    (home-page "https://www.pjsip.org")
-    (synopsis "Session Initiation Protocol (SIP) stack")
-    (description "PJProject provides an implementation of the Session
-Initiation Protocol (SIP) and a multimedia framework.")
-    (license license:gpl2+)))
-
 (define-public libtgvoip
   (package
     (name "libtgvoip")