void-packages/srcpkgs/plex-media-player/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

53 lines
3.1 KiB
Bash

# Template file for 'plex-media-player'
pkgname=plex-media-player
version=2.58.0
revision=3
_verbuild=1076
_commit_rev=38e019da
# See CMakeModules/WebClient.cmake
_buildid_version=183-045db5be50e175
# See https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/buildid.cmake
_clientdesktop_version=4.29.2-e50e175
_clienttv_version=4.29.6-045db5b
wrksrc="plex-media-player-${version}.${_verbuild}-${_commit_rev}"
build_style=cmake
configure_args="-DQTROOT="${XBPS_CROSS_BASE}/usr" -DFULL_GIT_REVISION=${_commit_rev}"
hostmakedepends="pkg-config python3"
makedepends="libcec-devel libX11-devel libXext-devel libXrandr-devel
MesaLib-devel mpv-devel qt5-devel qt5-declarative-devel qt5-location-devel
qt5-webchannel-devel qt5-webengine-devel qt5-x11extras-devel SDL2-devel zlib-devel"
depends="qt5-quickcontrols"
short_desc="Next generation Plex Desktop/Embedded Client"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://github.com/plexinc/plex-media-player"
distfiles="https://github.com/plexinc/plex-media-player/archive/v${version}.${_verbuild}-${_commit_rev}.tar.gz
https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/buildid.cmake>buildid-${_buildid_version}.cmake
https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-desktop-${_clientdesktop_version}.tar.xz
https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-desktop-${_clientdesktop_version}.tar.xz.sha1
https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-tv-${_clienttv_version}.tar.xz
https://artifacts.plex.tv/web-client-pmp/${_buildid_version}/web-client-tv-${_clienttv_version}.tar.xz.sha1"
checksum="f73ddae52d40eb5019283a16c83f4d5909dc1059ced85d6298e5525347705341
0331e53bb67c4b14284fafbe3a98700c3438ece99b9e969bcb49a1d583674af7
c56c1784dd8de0fbda971b66e4fc19a6b91c154e9122213a7c0ef577613a94fe
eef51c4ee379ca914522b072832bad119bb831897958f985bab79097a1ef571f
e04b7d77804efb850f6abbec48982526f6fe727a74a143f73b83033672de3fb8
53cbb948ec4fa73f073892ab6179481f1d17d3c165b2997aee1973739ee0eeff"
skip_extraction="buildid-${_buildid_version}.cmake
web-client-desktop-${_clientdesktop_version}.tar.xz
web-client-desktop-${_clientdesktop_version}.tar.xz.sha1
web-client-tv-${_clienttv_version}.tar.xz
web-client-tv-${_clienttv_version}.tar.xz.sha1"
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-devel qt5-host-tools"
fi
post_extract() {
mkdir -p "${wrksrc}/build/dependencies"
cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/buildid-${_buildid_version}.cmake" "${wrksrc}/build/dependencies"
cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-desktop-${_clientdesktop_version}.tar.xz" "${wrksrc}/build/dependencies"
cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-desktop-${_clientdesktop_version}.tar.xz.sha1" "${wrksrc}/build/dependencies"
cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-tv-${_clienttv_version}.tar.xz" "${wrksrc}/build/dependencies"
cp "${XBPS_SRCDISTDIR}/plex-media-player-${version}/web-client-tv-${_clienttv_version}.tar.xz.sha1" "${wrksrc}/build/dependencies"
}