gnu: jami: Create a jami-apply-dependency-patches procedure.
* gnu/packages/jami.scm (pjproject-jami) [native-inputs]: Rename "savoir-faire-linux-patches" to "sfl-patches". [arguments]: Move Jami patching procedure to ... (jami-apply-dependency-patches): ... this new procedure. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
This commit is contained in:
parent
aaa199ca52
commit
f60699af61
1 changed files with 45 additions and 35 deletions
|
@ -78,12 +78,31 @@
|
||||||
(base32
|
(base32
|
||||||
"0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
|
"0kw172w2ccyz438kf5xqw14nhfm4xk6a2libnzib9j2wvhlpf4q0"))))
|
||||||
|
|
||||||
|
;; Savoir-Faire Linux modifies many libraries to add features
|
||||||
|
;; to Jami. This procedure makes applying patches to a given
|
||||||
|
;; 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))
|
||||||
|
(for-each
|
||||||
|
(lambda (file)
|
||||||
|
(invoke "patch" "--force" "-p1" "-i"
|
||||||
|
(string-append patches-directory "/"
|
||||||
|
file ".patch")))
|
||||||
|
patches))))
|
||||||
|
|
||||||
(define-public pjproject-jami
|
(define-public pjproject-jami
|
||||||
(package
|
(package
|
||||||
(inherit pjproject)
|
(inherit pjproject)
|
||||||
(name "pjproject-jami")
|
(name "pjproject-jami")
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("savoir-faire-linux-patches" ,(jami-source))
|
`(("sfl-patches" ,(jami-source))
|
||||||
,@(package-native-inputs pjproject)))
|
,@(package-native-inputs pjproject)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f
|
`(#:tests? #f
|
||||||
|
@ -125,40 +144,31 @@
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'apply-patches
|
(add-after 'unpack 'apply-patches
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")
|
(let ((jami-apply-dependency-patches ,jami-apply-dependency-patches))
|
||||||
;; Comes from
|
;; Comes from
|
||||||
;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
|
;; "ring-project/daemon/contrib/src/pjproject/rules.mak".
|
||||||
;; WARNING: These amount for huge changes in pjproject.
|
;; WARNING: These amount for huge changes in pjproject.
|
||||||
(savoir-faire-linux-patches
|
(jami-apply-dependency-patches
|
||||||
'("fix_turn_alloc_failure"
|
#:inputs inputs
|
||||||
"rfc2466"
|
#:dep-name "pjproject"
|
||||||
"ipv6"
|
#:patches
|
||||||
"multiple_listeners"
|
'("fix_turn_alloc_failure"
|
||||||
"pj_ice_sess"
|
"rfc2466"
|
||||||
"fix_turn_fallback"
|
"ipv6"
|
||||||
"fix_ioqueue_ipv6_sendto"
|
"multiple_listeners"
|
||||||
"add_dtls_transport"
|
"pj_ice_sess"
|
||||||
"rfc6544"
|
"fix_turn_fallback"
|
||||||
"ice_config"
|
"fix_ioqueue_ipv6_sendto"
|
||||||
"sip_config"
|
"add_dtls_transport"
|
||||||
"fix_first_packet_turn_tcp"
|
"rfc6544"
|
||||||
"fix_ebusy_turn"
|
"ice_config"
|
||||||
"ignore_ipv6_on_transport_check"
|
"sip_config"
|
||||||
"fix_turn_connection_failure"
|
"fix_first_packet_turn_tcp"
|
||||||
;; "uwp_vs" ; for windows
|
"fix_ebusy_turn"
|
||||||
"disable_local_resolution")))
|
"ignore_ipv6_on_transport_check"
|
||||||
(mkdir-p savoir-faire-linux-patches-directory)
|
"fix_turn_connection_failure"
|
||||||
(invoke "tar" "-xvf" (assoc-ref inputs "savoir-faire-linux-patches")
|
"disable_local_resolution"))
|
||||||
"-C" savoir-faire-linux-patches-directory
|
#t)))
|
||||||
"--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))
|
|
||||||
;; TODO: We could use substitute-keyword-arguments instead of
|
;; TODO: We could use substitute-keyword-arguments instead of
|
||||||
;; repeating the phases from pjproject, but somehow it does
|
;; repeating the phases from pjproject, but somehow it does
|
||||||
;; not work.
|
;; not work.
|
||||||
|
|
Reference in a new issue