From patchwork Wed Apr 28 16:51:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 28962 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B17CA27BC7D; Wed, 28 Apr 2021 17:58:57 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7BA1727BC7C for ; Wed, 28 Apr 2021 17:58:57 +0100 (BST) Received: from localhost ([::1]:56764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbnWa-00059I-Ne for patchwork@mira.cbaines.net; Wed, 28 Apr 2021 12:58:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbnQu-0000Al-O4 for guix-patches@gnu.org; Wed, 28 Apr 2021 12:53:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbnQr-0000jx-Ua for guix-patches@gnu.org; Wed, 28 Apr 2021 12:53:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbnQr-0002sp-Tl for guix-patches@gnu.org; Wed, 28 Apr 2021 12:53:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48083] [PATCH 1/3] gnu: webrtc-for-telegram-desktop: Use usrsctp from guix instead of from third-party. References: In-Reply-To: Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Apr 2021 16:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48083 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48083@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 48083-submit@debbugs.gnu.org id=B48083.161962873110994 (code B ref 48083); Wed, 28 Apr 2021 16:53:01 +0000 Received: (at 48083) by debbugs.gnu.org; 28 Apr 2021 16:52:11 +0000 Received: from localhost ([127.0.0.1]:53960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbnQ3-0002rA-0x for submit@debbugs.gnu.org; Wed, 28 Apr 2021 12:52:11 -0400 Received: from out1.migadu.com ([91.121.223.63]:45385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbnQ0-0002qk-LG for 48083@debbugs.gnu.org; Wed, 28 Apr 2021 12:52:09 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1619628727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=1DlHAmWdfPAKv2FJAgTYVqxGy8NplnTgUcvYEw1HLWc=; b=lq0WDA+knNci/FjjMJP8lOa9kTySJYHzCW4b/+96dOg4NfyIkUCQQK1BmtscIxGkOS2E0d 0eqpeNRBwxwd7xaFjyfjJvqj8LAvLQj/xOoMBdSvVq9U96TD6j6mZwceFa9Tl1hJUdCh4q gmp0Ag+im3RHpvg82IAaV8vjkjWMxZWe3tCS2Hj7eHaDvp+v1/kZiBCwa6JPfkhr7SOwNz PRwgRdpRWlmh8qN0WH39IsXCI9ImHVz3B7UOsDlDdFF68ncBYxK6as6jTgJgPCV6FEGKWD aPmlXPr277HOb+lQpGGf2SmNeHVanyEl/wZABqzl6QbwrtKHLS/PGhtqBQvaTQ== Date: Wed, 28 Apr 2021 12:51:39 -0400 Message-Id: <20210428165141.27183-1-rg@raghavgururajan.name> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rg@raghavgururajan.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches X-Patchwork-Original-From: Raghav Gururajan via Guix-patches via From: Raghav Gururajan X-getmail-retrieved-from-mailbox: Patches UsrSCTP is now available in Guix (f5e69549ba5d6efcd03f4f50f771a8a76ed73c5b). * gnu/packages/telegram.scm (webrtc-for-telegram-desktop) [snippet]: Remove usrsctp from keep list. [phases](patch-cmake): New phase. --- gnu/packages/telegram.scm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index e6bfe6c4f2..cf5c173973 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -44,6 +44,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages lxqt) #:use-module (gnu packages lua) + #:use-module (gnu packages networking) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) @@ -96,7 +97,7 @@ '( ;; Custom forks which are incompatible with the ones in Guix. "abseil-cpp" "libsrtp" "openh264" "rnnoise" ;; Not available in Guix. - "pffft" "usrsctp" + "pffft" ;; Has cmake support files for libvpx input. "libvpx"))) (with-directory-excursion "src/third_party" @@ -124,9 +125,22 @@ "/src/third_party/libyuv"))) (copy-recursively libvpx-from libvpx-to) (copy-recursively libyuv-from libyuv-to)) - #t))))) + #t)) + (add-after 'copy-inputs 'patch-cmake + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + ;; Disable building of usrsctp as thirdparty, + ;; as we removed its source. + (("include\\(cmake/libusrsctp.cmake\\)") "") + ;; Link to usrsctp that is provided as input, + ;; instead of linking to usrsctp that is supossedly + ;; built as thirdparty. + (("tg_owt::libusrsctp") "usrsctp") + ;; Disable exporting of usrsctp, + ;; that is supossedly built as thirdparty. + (("[ \t]*libusrsctp") ""))))))) (native-inputs - `(("gcc" ,gcc-9) ; keep in line with telegram-desktop + `(("gcc" ,gcc-9) ; keep in line with telegram-desktop ("perl" ,perl) ("pkg-config" ,pkg-config) ("python" ,python-wrapper) @@ -161,6 +175,7 @@ ("opus" ,opus) ("protobuf" ,protobuf) ("pulseaudio" ,pulseaudio) + ("usrsctp" ,usrsctp) ("x11" ,libx11) ("xext" ,libxext) ("xtst" ,libxtst)))