Diff scrcpy-1.14 with a scrcpy-2.0

/usr/portage/app-mobilephone/scrcpy/scrcpy-2.0.ebuild 2023-10-09 14:52:28.832368334 +0300
1
# Copyright 1999-2018 Gentoo Foundation
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
4
EAPI=8
5 5

  
6
inherit meson ninja-utils git-r3
7

  
8
EGIT_REPO_URI="https://github.com/Genymobile/scrcpy.git"
9

  
10
if [[ ${PV} = 9999* ]]; then
11
	MY_SERVER_PV="1.3"
12
else
13
	EGIT_COMMIT="v${PV}"
14
	MY_SERVER_PV="${PV}"
15
	KEYWORDS="~amd64"
16
fi
17

  
18
MY_SERVER_PN="scrcpy-server"
19
MY_SERVER_P="${MY_SERVER_PN}-v${MY_SERVER_PV}"
20

  
21
SRC_URI="https://github.com/Genymobile/${PN}/releases/download/v${MY_SERVER_PV}/${MY_SERVER_P}"
6
inherit meson xdg
22 7

  
23 8
DESCRIPTION="Display and control your Android device"
24
HOMEPAGE="https://blog.rom1v.com/2018/03/introducing-scrcpy/"
9
HOMEPAGE="https://github.com/Genymobile/scrcpy"
10
# Source code and server part on Android device
11
SRC_URI="https://github.com/Genymobile/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
12
	https://github.com/Genymobile/${PN}/releases/download/v${PV}/${PN}-server-v${PV}"
25 13

  
26 14
LICENSE="Apache-2.0"
27 15
SLOT="0"
28
IUSE=""
16
KEYWORDS="~amd64 ~ppc64 ~x86"
17
IUSE="lto"
29 18

  
30
RESTRICT="test"
19
DEPEND="media-libs/libsdl2[X]
20
	media-video/ffmpeg
21
	virtual/libusb:1"
22
# Manual install for ppc64 until bug #723528 is fixed
23
RDEPEND="${DEPEND}
24
	!ppc64? ( dev-util/android-tools )"
25
BDEPEND=""
31 26

  
32
COMMON_DEPEND="media-libs/libsdl2[X]
33
	media-video/ffmpeg"
34
DEPEND="${COMMON_DEPEND}"
35
RDEPEND="${COMMON_DEPEND}"
36
PDEPEND=""
27
PATCHES=( "${FILESDIR}"/${P}-desktop.patch )
37 28

  
38 29
src_configure() {
39 30
	local emesonargs=(
40
		-Db_lto=true
41
		-Dprebuilt_server="${DISTDIR}/${MY_SERVER_P}"
31
		$(meson_use lto b_lto)
32
		-Dprebuilt_server="${DISTDIR}/${PN}-server-v${PV}"
42 33
	)
43 34
	meson_src_configure
44 35
}
36

  
37
pkg_postinst() {
38
	xdg_pkg_postrm
39
}
Thank you!