Gentoo Archives: gentoo-commits

From: Bernard Cafarelli <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-mobilephone/scrcpy/, app-mobilephone/scrcpy/files/
Date: Tue, 14 Mar 2023 20:59:13
Message-Id: 1678827499.b30e760e6137caa4fba8a3692421894fc935362e.voyageur@gentoo
1 commit: b30e760e6137caa4fba8a3692421894fc935362e
2 Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 14 20:57:49 2023 +0000
4 Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 14 20:58:19 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b30e760e
7
8 app-mobilephone/scrcpy: add 2.0
9
10 Also fix desktop file validation
11
12 Closes: https://bugs.gentoo.org/888133
13 Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
14
15 app-mobilephone/scrcpy/Manifest | 2 ++
16 .../scrcpy/files/scrcpy-2.0-desktop.patch | 41 ++++++++++++++++++++++
17 app-mobilephone/scrcpy/scrcpy-2.0.ebuild | 39 ++++++++++++++++++++
18 3 files changed, 82 insertions(+)
19
20 diff --git a/app-mobilephone/scrcpy/Manifest b/app-mobilephone/scrcpy/Manifest
21 index 58b6a7aa10f0..928d2b985f99 100644
22 --- a/app-mobilephone/scrcpy/Manifest
23 +++ b/app-mobilephone/scrcpy/Manifest
24 @@ -1,2 +1,4 @@
25 DIST scrcpy-1.25.tar.gz 345594 BLAKE2B 9be58de258d2e048fc87ef642ba668ad7427faea51d6bd06d48d1ca61a5c55bbce2b758b445d21ea3052ac63809769043e57a28502c53fae98079056029ded1f SHA512 7f28adb69becdc247156d664744ef382cc9ac5e746d2be9c833a53309386c22eb90893b499aee80404cb9903ea40ce5f389b41f2201bf85801e1b8ab920b4eb0
26 +DIST scrcpy-2.0.tar.gz 375902 BLAKE2B b45a0191a4b634a6fd165a870ce925968eb2bf697eedd88744abf6e6282afa8a4c2108e85e6d479be47e6ddc08a8b5a54875315d1319721639fea8b49f423817 SHA512 c7f6a20ff470c529f3d9a211ee02eebc028f698b2215665c8386afda8db4ea51206bb3c3182d846485399101f0add35844477ebd37df30724cb43c3882c6dc4d
27 DIST scrcpy-server-v1.25 42151 BLAKE2B 90789c8b259f9a63820652f8884b51abe1040201f37788542796fbff6445bc13259e2aaf635c99c6ccdb515d8fd4b0b3bcd54d8972d134086f05d149a5073d41 SHA512 2861f423b6c982354c5959570708b51832e18b9d376397f98a78c8d6137af22bb3f19cbce501d7f413276362e9ac9e0358b8984566ff04102a3720074ff1fea1
28 +DIST scrcpy-server-v2.0 52867 BLAKE2B 6867677059ed60358e8d4f62a01d09d177a52a3ad5d9faf29017666b4566052c9be1777b75df24989d49acf640ff10071daddf760990f18c1df07e1f70c772ff SHA512 366e594ee87101635050185759eb03982b8749f1efe5c8f02d0fb5f60edfdacbd8280a183b872b1484648d2556cbde5abbaf1f3fd92a7f6f604181b9e81ffcde
29
30 diff --git a/app-mobilephone/scrcpy/files/scrcpy-2.0-desktop.patch b/app-mobilephone/scrcpy/files/scrcpy-2.0-desktop.patch
31 new file mode 100644
32 index 000000000000..531a4101a53c
33 --- /dev/null
34 +++ b/app-mobilephone/scrcpy/files/scrcpy-2.0-desktop.patch
35 @@ -0,0 +1,41 @@
36 +From 6706f3ce7f70a3ba5d09279be9c78d358af31e88 Mon Sep 17 00:00:00 2001
37 +From: Bernard Cafarelli <bernard.cafarelli@×××××.com>
38 +Date: Tue, 14 Mar 2023 21:48:23 +0100
39 +Subject: [PATCH] Fix linux desktop files validation
40 +
41 +Follow quoting rules from:
42 +https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
43 +Also use /bin/sh for scrpy-console
44 +
45 +Fixes #3633 <https://github.com/Genymobile/scrcpy/issues/3633>
46 +---
47 + app/data/scrcpy-console.desktop | 2 +-
48 + app/data/scrcpy.desktop | 2 +-
49 + 2 files changed, 2 insertions(+), 2 deletions(-)
50 +
51 +diff --git a/app/data/scrcpy-console.desktop b/app/data/scrcpy-console.desktop
52 +index 47a63ec99..db3d9014c 100644
53 +--- a/app/data/scrcpy-console.desktop
54 ++++ b/app/data/scrcpy-console.desktop
55 +@@ -5,7 +5,7 @@ Comment=Display and control your Android device
56 + # For some users, the PATH or ADB environment variables are set from the shell
57 + # startup file, like .bashrc or .zshrc… Run an interactive shell to get
58 + # environment correctly initialized.
59 +-Exec=/bin/bash --norc --noprofile -i -c '"$SHELL" -i -c scrcpy || read -p "Press any key to quit..."'
60 ++Exec=/bin/sh --norc --noprofile -i -c "\"\\$SHELL\" -i -c scrcpy || read -p 'Press any key to quit...'"
61 + Icon=scrcpy
62 + Terminal=true
63 + Type=Application
64 +diff --git a/app/data/scrcpy.desktop b/app/data/scrcpy.desktop
65 +index 082b75e0f..1be86a2ba 100644
66 +--- a/app/data/scrcpy.desktop
67 ++++ b/app/data/scrcpy.desktop
68 +@@ -5,7 +5,7 @@ Comment=Display and control your Android device
69 + # For some users, the PATH or ADB environment variables are set from the shell
70 + # startup file, like .bashrc or .zshrc… Run an interactive shell to get
71 + # environment correctly initialized.
72 +-Exec=/bin/sh -c '"$SHELL" -i -c scrcpy'
73 ++Exec=/bin/sh -c "\"\\$SHELL\" -i -c scrcpy"
74 + Icon=scrcpy
75 + Terminal=false
76 + Type=Application
77
78 diff --git a/app-mobilephone/scrcpy/scrcpy-2.0.ebuild b/app-mobilephone/scrcpy/scrcpy-2.0.ebuild
79 new file mode 100644
80 index 000000000000..819f99b5380d
81 --- /dev/null
82 +++ b/app-mobilephone/scrcpy/scrcpy-2.0.ebuild
83 @@ -0,0 +1,39 @@
84 +# Copyright 1999-2023 Gentoo Authors
85 +# Distributed under the terms of the GNU General Public License v2
86 +
87 +EAPI=8
88 +
89 +inherit meson xdg
90 +
91 +DESCRIPTION="Display and control your Android device"
92 +HOMEPAGE="https://github.com/Genymobile/scrcpy"
93 +# Source code and server part on Android device
94 +SRC_URI="https://github.com/Genymobile/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
95 + https://github.com/Genymobile/${PN}/releases/download/v${PV}/${PN}-server-v${PV}"
96 +
97 +LICENSE="Apache-2.0"
98 +SLOT="0"
99 +KEYWORDS="~amd64 ~ppc64 ~x86"
100 +IUSE="lto"
101 +
102 +DEPEND="media-libs/libsdl2[X]
103 + media-video/ffmpeg
104 + virtual/libusb:1"
105 +# Manual install for ppc64 until bug #723528 is fixed
106 +RDEPEND="${DEPEND}
107 + !ppc64? ( dev-util/android-tools )"
108 +BDEPEND=""
109 +
110 +PATCHES=( "${FILESDIR}"/${P}-desktop.patch )
111 +
112 +src_configure() {
113 + local emesonargs=(
114 + $(meson_use lto b_lto)
115 + -Dprebuilt_server="${DISTDIR}/${PN}-server-v${PV}"
116 + )
117 + meson_src_configure
118 +}
119 +
120 +pkg_postinst() {
121 + xdg_pkg_postrm
122 +}