app-mobilephone/scrcpy: add 2.0

Also fix desktop file validation

Closes: https://bugs.gentoo.org/888133
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
This commit is contained in:
Bernard Cafarelli
2023-03-14 21:57:49 +01:00
parent d208f874c9
commit b30e760e61
3 changed files with 82 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST scrcpy-1.25.tar.gz 345594 BLAKE2B 9be58de258d2e048fc87ef642ba668ad7427faea51d6bd06d48d1ca61a5c55bbce2b758b445d21ea3052ac63809769043e57a28502c53fae98079056029ded1f SHA512 7f28adb69becdc247156d664744ef382cc9ac5e746d2be9c833a53309386c22eb90893b499aee80404cb9903ea40ce5f389b41f2201bf85801e1b8ab920b4eb0
DIST scrcpy-2.0.tar.gz 375902 BLAKE2B b45a0191a4b634a6fd165a870ce925968eb2bf697eedd88744abf6e6282afa8a4c2108e85e6d479be47e6ddc08a8b5a54875315d1319721639fea8b49f423817 SHA512 c7f6a20ff470c529f3d9a211ee02eebc028f698b2215665c8386afda8db4ea51206bb3c3182d846485399101f0add35844477ebd37df30724cb43c3882c6dc4d
DIST scrcpy-server-v1.25 42151 BLAKE2B 90789c8b259f9a63820652f8884b51abe1040201f37788542796fbff6445bc13259e2aaf635c99c6ccdb515d8fd4b0b3bcd54d8972d134086f05d149a5073d41 SHA512 2861f423b6c982354c5959570708b51832e18b9d376397f98a78c8d6137af22bb3f19cbce501d7f413276362e9ac9e0358b8984566ff04102a3720074ff1fea1
DIST scrcpy-server-v2.0 52867 BLAKE2B 6867677059ed60358e8d4f62a01d09d177a52a3ad5d9faf29017666b4566052c9be1777b75df24989d49acf640ff10071daddf760990f18c1df07e1f70c772ff SHA512 366e594ee87101635050185759eb03982b8749f1efe5c8f02d0fb5f60edfdacbd8280a183b872b1484648d2556cbde5abbaf1f3fd92a7f6f604181b9e81ffcde

View File

@@ -0,0 +1,41 @@
From 6706f3ce7f70a3ba5d09279be9c78d358af31e88 Mon Sep 17 00:00:00 2001
From: Bernard Cafarelli <bernard.cafarelli@gmail.com>
Date: Tue, 14 Mar 2023 21:48:23 +0100
Subject: [PATCH] Fix linux desktop files validation
Follow quoting rules from:
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
Also use /bin/sh for scrpy-console
Fixes #3633 <https://github.com/Genymobile/scrcpy/issues/3633>
---
app/data/scrcpy-console.desktop | 2 +-
app/data/scrcpy.desktop | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/data/scrcpy-console.desktop b/app/data/scrcpy-console.desktop
index 47a63ec99..db3d9014c 100644
--- a/app/data/scrcpy-console.desktop
+++ b/app/data/scrcpy-console.desktop
@@ -5,7 +5,7 @@ Comment=Display and control your Android device
# For some users, the PATH or ADB environment variables are set from the shell
# startup file, like .bashrc or .zshrc… Run an interactive shell to get
# environment correctly initialized.
-Exec=/bin/bash --norc --noprofile -i -c '"$SHELL" -i -c scrcpy || read -p "Press any key to quit..."'
+Exec=/bin/sh --norc --noprofile -i -c "\"\\$SHELL\" -i -c scrcpy || read -p 'Press any key to quit...'"
Icon=scrcpy
Terminal=true
Type=Application
diff --git a/app/data/scrcpy.desktop b/app/data/scrcpy.desktop
index 082b75e0f..1be86a2ba 100644
--- a/app/data/scrcpy.desktop
+++ b/app/data/scrcpy.desktop
@@ -5,7 +5,7 @@ Comment=Display and control your Android device
# For some users, the PATH or ADB environment variables are set from the shell
# startup file, like .bashrc or .zshrc… Run an interactive shell to get
# environment correctly initialized.
-Exec=/bin/sh -c '"$SHELL" -i -c scrcpy'
+Exec=/bin/sh -c "\"\\$SHELL\" -i -c scrcpy"
Icon=scrcpy
Terminal=false
Type=Application

View File

@@ -0,0 +1,39 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson xdg
DESCRIPTION="Display and control your Android device"
HOMEPAGE="https://github.com/Genymobile/scrcpy"
# Source code and server part on Android device
SRC_URI="https://github.com/Genymobile/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://github.com/Genymobile/${PN}/releases/download/v${PV}/${PN}-server-v${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
IUSE="lto"
DEPEND="media-libs/libsdl2[X]
media-video/ffmpeg
virtual/libusb:1"
# Manual install for ppc64 until bug #723528 is fixed
RDEPEND="${DEPEND}
!ppc64? ( dev-util/android-tools )"
BDEPEND=""
PATCHES=( "${FILESDIR}"/${P}-desktop.patch )
src_configure() {
local emesonargs=(
$(meson_use lto b_lto)
-Dprebuilt_server="${DISTDIR}/${PN}-server-v${PV}"
)
meson_src_configure
}
pkg_postinst() {
xdg_pkg_postrm
}