From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45884) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ionM7-0003Ii-Ns for guix-patches@gnu.org; Tue, 07 Jan 2020 06:49:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ionM6-0004dN-Hx for guix-patches@gnu.org; Tue, 07 Jan 2020 06:49:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41444) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ionM6-0004dF-F0 for guix-patches@gnu.org; Tue, 07 Jan 2020 06:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ionM6-0008VR-CD for guix-patches@gnu.org; Tue, 07 Jan 2020 06:49:02 -0500 Subject: [bug#39005] [PATCH 07/22] gnu: jami: Fix the procedure for applying patches. Use the procedure correctly in pjproject-jami. Resent-Message-ID: From: Jan Wielkiewicz Date: Tue, 7 Jan 2020 11:17:26 +0100 Message-Id: <20200107101741.970-7-tona_kosmicznego_smiecia@interia.pl> In-Reply-To: <20200107101741.970-1-tona_kosmicznego_smiecia@interia.pl> References: <20200107101741.970-1-tona_kosmicznego_smiecia@interia.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39005@debbugs.gnu.org Cc: Jan Wielkiewicz --- gnu/packages/jami.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm index c6f38d4a8c..f257767a85 100644 --- a/gnu/packages/jami.scm +++ b/gnu/packages/jami.scm @@ -58,6 +58,22 @@ #:use-module (guix download) #:use-module (guix git-download)) +(define-public jami-apply-dependency-patches + '(lambda* (#:key inputs dep-name patches) + (let ((savoir-faire-linux-patches-directory "Savoir-faire Linux patches")) + (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" + (string-append "ring-project/daemon/contrib/src/" + dep-name)) + (for-each + (lambda (file) + (invoke "patch" "--force" "-p1" "-i" + (string-append savoir-faire-linux-patches-directory "/" + file ".patch"))) + patches)))) + (define %jami-version "20191128.1.4c44bb7") (define* (jami-source #:key without-daemon) @@ -115,6 +131,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 @@ -157,6 +175,31 @@ file ".patch"))) savoir-faire-linux-patches)) #t)) + (lambda* (#:key inputs #:allow-other-keys) + (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.24.1