void-packages/srcpkgs/omxplayer/template
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: convert patches to -Np1
```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

29 lines
953 B
Bash

# Template file for 'omxplayer'
pkgname=omxplayer
version=20190102
revision=1
short_desc="Commandline OMX player for the Raspberry Pi"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2"
homepage="https://github.com/popcornmix/omxplayer"
_commit="f06235cc9690a6d58187514452df8cf8fcdaacec"
wrksrc="omxplayer-$_commit"
distfiles="$homepage/archive/$_commit.tar.gz"
checksum=af2d9450f8947842ea8c401fe9f71eec444013ebbdee29f2ac828c9c493c1329
# XXX only rpi
archs="armv6l* armv7l*"
build_style=gnu-makefile
hostmakedepends="curl pkg-config"
makedepends="alsa-lib-devel rpi-userland-devel pcre-devel boost-devel freetype-devel ffmpeg-devel dbus-devel"
depends="freefont-ttf"
do_build() {
sed -e 's,/usr/share/fonts/truetype/freefont,/usr/share/fonts/TTF,g' -i omxplayer.cpp
mkdir -p /opt/vc/lib
make CC=$CC XBPS_CROSS_BASE=$XBPS_CROSS_BASE ${makejobs}
}
post_install() {
sed -i 's,omxplayer.bin,omxplayer,g' ${DESTDIR}/usr/bin/omxplayer-dbus
}