diff mbox series

[bug#42229,3/9] gnu: jami-apply-dependency-patches, ffmpeg-jami, pjproject-jami: Apply patches from the new libring source.

Message ID 20200706155030.1938-3-tona_kosmicznego_smiecia@interia.pl
State Accepted
Headers show
Series [bug#42229,1/9] gnu: libring: Fetch from git, update to 20200702-guix. | expand

Checks

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

Commit Message

Jan Wielkiewicz July 6, 2020, 3:50 p.m. UTC
* gnu/packages/jami.scm:
(libring-source): [without-contrib] is now true by default.
(jami-apply-dependency-patches): Do not invoke tar,
patches are now fetched from git.
Apply "--ignore-whitespace" to patch to prevent failing.
(pjproject-jami)[native-inputs]: Use (libring-source) procedure instead of
(jami-source).
[arguments]: Add new patches.
(ffmpeg-jami)[native-inputs]: Use (libring-source) procedure instead of
(jami-source).
---
 gnu/packages/jami.scm | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index ef2a74abb3..4531c68f5c 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -67,7 +67,7 @@ 
 (define %libring-commit "0e36d0b352d543437f0f744230c2eb8c0bc77f36")
 (define %libring-revision "0")
 
-(define* (libring-source #:key without-contrib)
+(define* (libring-source #:key (without-contrib #t))
   (origin
     (method git-fetch)
     (uri (git-reference
@@ -92,16 +92,13 @@ 
 ;; package easy.
 (define jami-apply-dependency-patches
   '(lambda* (#:key inputs dep-name patches)
-     (let ((patches-directory "sfl-patches"))
-       (mkdir-p patches-directory)
-       (invoke "tar" "-xvf" (assoc-ref inputs "sfl-patches")
-               "-C" patches-directory
-               "--strip-components=5"
-               (string-append "ring-project/daemon/contrib/src/"
-                              dep-name))
+     (let ((patches-directory (string-append
+                               (assoc-ref inputs "sfl-patches")
+                               "/contrib/src/" dep-name)))
        (for-each
         (lambda (file)
-          (invoke "patch" "--force" "-p1" "-i"
+          (invoke "patch" "--force"
+                  "--ignore-whitespace" "-p1" "-i"
                   (string-append patches-directory "/"
                                  file ".patch")))
         patches))))
@@ -111,7 +108,7 @@ 
     (inherit pjproject)
     (name "pjproject-jami")
     (native-inputs
-     `(("sfl-patches" ,(jami-source))
+     `(("sfl-patches" ,(libring-source #:without-contrib #f))
        ,@(package-native-inputs pjproject)))
     (arguments
      `(#:tests? #f
@@ -174,7 +171,9 @@ 
                   "0006-ignore_ipv6_on_transport_check"
                   "0007-pj_ice_sess"
                   "0008-fix_ioqueue_ipv6_sendto"
-                  "0009-add-config-site"))
+                  "0009-add-config-site"
+                  "0010-fix-pkgconfig"
+                  "0011-fix-tcp-death-detection"))
                #t)))
          ;; TODO: We could use substitute-keyword-arguments instead of
          ;; repeating the phases from pjproject, but somehow it does
@@ -414,7 +413,7 @@ 
     (inherit ffmpeg)
     (name "ffmpeg-jami")
     (native-inputs
-     `(("sfl-patches" ,(jami-source))
+     `(("sfl-patches" ,(libring-source #:without-contrib #f))
        ("libiconv" ,libiconv)
        ,@(package-native-inputs ffmpeg)))
     (supported-systems '("x86_64-linux" "i686-linux"