[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#40677] [PATCH 03/18] gnu: jami.scm: Add and use a generalized proce
From: |
Jan Wielkiewicz |
Subject: |
[bug#40677] [PATCH 03/18] gnu: jami.scm: Add and use a generalized procedure for applying patches made by Savoir-faire linux to Jami dependencies. |
Date: |
Tue, 21 Apr 2020 18:10:17 +0200 |
---
gnu/packages/jami.scm | 82 +++++++++++++++++++++++++------------------
1 file changed, 47 insertions(+), 35 deletions(-)
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index 44a57c9bfb..3a50cef18a 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -77,12 +77,31 @@
(base32
"0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
+;; Savoir-Faire Linux modifies many libraries to add features
+;; to Jami. This procedure makes applying patches to a given
+;; package easy.
+(define-public 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))
+ (for-each
+ (lambda (file)
+ (invoke "patch" "--force" "-p1" "-i"
+ (string-append patches-directory "/"
+ file ".patch")))
+ patches))))
+
(define-public pjproject-jami
(package
(inherit pjproject)
(name "pjproject-jami")
(native-inputs
- `(("savoir-faire-linux-patches" ,(jami-source))
+ `(("SFL-patches" ,(jami-source))
,@(package-native-inputs pjproject)))
(arguments
`(#:tests? #f
@@ -116,6 +135,8 @@
;; making a shared object;
"CFLAGS=-fPIC"
"CXXFLAGS=-fPIC")
+ #:modules ((guix build utils)
+ ,@(@@ (guix build-system gnu) %default-modules))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'make-git-checkout-writable
@@ -124,40 +145,31 @@
#t))
(add-after 'unpack 'apply-patches
(lambda* (#:key inputs #:allow-other-keys)
- (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux
patches")
- ;; Comes from
- ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
- ;; WARNING: These amount for huge changes in pjproject.
- (savoir-faire-linux-patches
- '("fix_turn_alloc_failure"
- "rfc2466"
- "ipv6"
- "multiple_listeners"
- "pj_ice_sess"
- "fix_turn_fallback"
- "fix_ioqueue_ipv6_sendto"
- "add_dtls_transport"
- "rfc6544"
- "ice_config"
- "sip_config"
- "fix_first_packet_turn_tcp"
- "fix_ebusy_turn"
- "ignore_ipv6_on_transport_check"
- "fix_turn_connection_failure"
- ;; "uwp_vs" ; for windows
- "disable_local_resolution")))
- (mkdir-p savoir-faire-linux-patches-directory)
- (invoke "tar" "-xvf" (assoc-ref inputs
"savoir-faire-linux-patches")
- "-C" savoir-faire-linux-patches-directory
- "--strip-components=5"
- "ring-project/daemon/contrib/src/pjproject")
- (for-each
- (lambda (file)
- (invoke "patch" "--force" "-p1" "-i"
- (string-append savoir-faire-linux-patches-directory
"/"
- file ".patch")))
- savoir-faire-linux-patches))
- #t))
+ (let ((jami-apply-dependency-patches
,jami-apply-dependency-patches))
+ ;; Comes from
+ ;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
+ ;; WARNING: These amount for huge changes in pjproject.
+ (jami-apply-dependency-patches
+ #:inputs inputs
+ #:dep-name "pjproject"
+ #:patches
+ '("fix_turn_alloc_failure"
+ "rfc2466"
+ "ipv6"
+ "multiple_listeners"
+ "pj_ice_sess"
+ "fix_turn_fallback"
+ "fix_ioqueue_ipv6_sendto"
+ "add_dtls_transport"
+ "rfc6544"
+ "ice_config"
+ "sip_config"
+ "fix_first_packet_turn_tcp"
+ "fix_ebusy_turn"
+ "ignore_ipv6_on_transport_check"
+ "fix_turn_connection_failure"
+ "disable_local_resolution"))
+ #t)))
;; TODO: We could use substitute-keyword-arguments instead of
;; repeating the phases from pjproject, but somehow it does
;; not work.
--
2.26.1
- [bug#40677] [PATCH 04/18] gnu: Add libnatpmp., (continued)
[bug#40677] [PATCH 06/18] gnu: libupnp: Bump to 1.8.6; change the download method to git-fetch; add missing dependencies., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 02/18] gnu: jami: Fix downloading., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 10/18] gnu: pjproject-jami: Add a new SFL patch., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 08/18] gnu: libring: Use ffmpeg-jami instead of ffmpeg., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 11/18] gnu: pjproject: Fix formatting., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 07/18] gnu: Add ffmpeg-jami., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 15/18] gnu: opendht: Bump to 2.0.0., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 03/18] gnu: jami.scm: Add and use a generalized procedure for applying patches made by Savoir-faire linux to Jami dependencies.,
Jan Wielkiewicz <=
[bug#40677] [PATCH 14/18] gnu: pjproject-jami: Bump to 2.10, apply new SFL patches., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 18/18] gnu: pjproject-jami: Add the missing, linux-only "--enable-epoll" flag., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 09/18] gnu: restinio: Bump to 0.6.1.1., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 16/18] gnu: jami: Bump to 20200401.1.6f090de., Jan Wielkiewicz, 2020/04/21
[bug#40677] [PATCH 13/18] gnu: pjproject, pjproject-jami: Remove broken pjproject package. Make pjproject-jami package stand-alone by moving package code from pjproject into it., Jan Wielkiewicz, 2020/04/21