From patchwork Wed Jul 20 13:20:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 40778 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 D1E3C27BBEA; Wed, 20 Jul 2022 14:28:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2DCA027BBE9 for ; Wed, 20 Jul 2022 14:28:23 +0100 (BST) Received: from localhost ([::1]:35772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oE9kU-0004JO-Bp for patchwork@mira.cbaines.net; Wed, 20 Jul 2022 09:28:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oE9dP-0000M9-8b for guix-patches@gnu.org; Wed, 20 Jul 2022 09:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58595) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oE9dP-00008A-0G for guix-patches@gnu.org; Wed, 20 Jul 2022 09:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oE9dN-0000l9-Rn for guix-patches@gnu.org; Wed, 20 Jul 2022 09:21:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56664] [PATCH] gnu: Add qtscrcpy. Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 20 Jul 2022 13:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56664 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56664@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.16583232382877 (code B ref -1); Wed, 20 Jul 2022 13:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Jul 2022 13:20:38 +0000 Received: from localhost ([127.0.0.1]:56353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oE9d0-0000kL-7F for submit@debbugs.gnu.org; Wed, 20 Jul 2022 09:20:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:60724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oE9cx-0000kD-Vs for submit@debbugs.gnu.org; Wed, 20 Jul 2022 09:20:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oE9cx-0007oy-My for guix-patches@gnu.org; Wed, 20 Jul 2022 09:20:35 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]:48005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oE9cv-0008Ue-57 for guix-patches@gnu.org; Wed, 20 Jul 2022 09:20:35 -0400 Date: Wed, 20 Jul 2022 13:20:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1658323230; x=1658582430; bh=ZRGx8u8Maf2kbXU+pGxyyXtOefCISjPe/B0J+6G14Vs=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=DGY6zbGT9OoqhK5Hr4K2bexflghzzQjC1R3NKb8i0+2vOYyc3+uY4QZ13eqFjyINK SyDBPBz2AC5X+QddWphlgC6laQ+dF5i15ZNMbemZ2nmEdHVSRcKkNX/EgH/+L6eNiZ bglp5TZ28zBjFMN+bz0mOgx5zvnObMYAPL75/CN7k1677OwAjuSkKOql3fWuq3ib+O 8kWBbcdLbgQc0sdtguqh0xUHhLri2O+zGYMlUBgupANljF24z06UlNwJqilHo3Of3A +NHnCjwS3u1SzZbV5zWKHnQhXhqFRR1/jQScwPEeCIrPwWrwGYrjVQYOUyW0j9ObOi 0Ephlwconwx6Q== Message-ID: Feedback-ID: 14143818:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.43.16; envelope-from=phodina@protonmail.com; helo=mail-4316.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches Hi, this patch adds support for screen mirroring Android phones on the desktops. There are 2 remarks: - The Android part scrcpy-server is prebuild due to Guix not supporting gradle and Android builds. Without this the tool does not work. - I've currently hardcoded the x86 architecture in the install phase. Not sure how to make it architecture agnostic. ---- Petr From 3ec453db1bc1c6b5d75242ae2491f0bd36f5a26a Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Tue, 11 Jan 2022 03:14:03 +0100 Subject: [PATCH] gnu: Add qtscrcpy. * gnu/packages/android.scm (qtscrcpy): New variable. diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 04dc4b6499..15f96ba294 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2019 Ricardo Wurmus ;;; Copyright © 2020 Sergey Trofimov ;;; Copyright © 2021 Guillaume Le Vaillant -;;; Copyright © 2021 Petr Hodina +;;; Copyright © 2021, 2022 Petr Hodina ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +34,7 @@ (define-module (gnu packages android) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system android-ndk) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system python) @@ -49,7 +50,9 @@ (define-module (gnu packages android) #:use-module (gnu packages image) #:use-module (gnu packages java) #:use-module (gnu packages linux) + #:use-module (gnu packages qt) #:use-module (gnu packages pcre) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) @@ -61,6 +64,7 @@ (define-module (gnu packages android) #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) + #:use-module (gnu packages video) #:use-module (gnu packages virtualization) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml)) @@ -1133,6 +1137,90 @@ (define-public python-miio for communicating with Xiaomi smart appliances over miIO and MIoT protocols.") (license license:gpl3+))) +(define-public qtscrcpy + ;; this tracks the QtScrcpyCore submodule + (let ((commit "3004e63935fe8a3e57b91e117a91c1a6aa68ae42") + (revision "1")) + (package + (name "qtscrcpy") + (version "2.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/barry-ran/QtScrcpy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1l3l6z4snzfljzzywf6yxw0fc1c0kkkcw3477rmfkrd7rapwxndl")))) + (build-system cmake-build-system) + (arguments + (list #:tests? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'download-qtscrcpycore + (lambda* _ + (copy-recursively (string-append #$(origin + (method + git-fetch) + (uri (git-reference + (url + "https://github.com/barry-ran/QtScrcpyCore") + (commit + commit))) + (file-name (git-file-name + name + version)) + (sha256 (base32 + "0x57vv1la27m67dgvbll24h7amqmxjs8xik4qyizx5qjxhylw93c"))) + "/") + "QtScrcpy/QtScrcpyCore") + (substitute* "QtScrcpy/QtScrcpyCore/CMakeLists.txt" + ((".*/src/third_party/adb/linux/adb.*") + "")) + (delete-file-recursively + "QtScrcpy/QtScrcpyCore/src/third_party/adb") + (delete-file-recursively + "QtScrcpy/QtScrcpyCore/src/third_party/ffmpeg"))) + (add-after 'unpack 'fix-adb-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "QtScrcpy/main.cpp" + (("\"\\..*linux/adb") + (string-append "\"" + (assoc-ref inputs "adb") + "/bin/adb"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((bin (string-append #$output "/bin")) + (build (string-append (getenv "PWD") + "/source/output/x64/RelWithDebInfo")) + (qtscrcpy (string-append build + "/QtScrcpy")) + (scrcpy-server (string-append build + "/scrcpy-server")) + (config (string-append #$output + "/etc/qtscrcpy")) + (ini (string-append (getenv "PWD") + "/source/config/config.ini"))) + (mkdir-p bin) + (mkdir-p config) + (install-file qtscrcpy bin) + (install-file scrcpy-server bin) + (install-file ini config))))))) + (native-inputs (list qttools pkg-config)) + (inputs (list adb + ffmpeg + qtx11extras + qtmultimedia + qtbase-5 + zlib)) + (synopsis "Android real-time display control software") + (description + "This package provides QtScrcpy which connects to Android +devices via USB (or via TCP/IP) for display and control. It does NOT require +the root privileges. Supports up to 16 Android device connections at the same time.") + (home-page "https://github.com/DanielOgorchock/joycond") + (license license:asl2.0)))) + (define-public fdroidserver (package (name "fdroidserver") -- 2.37.0