void-packages/srcpkgs/qv4l2/template
Đoàn Trần Công Danh 635e9da391 srcpkgs/q*: 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

35 lines
1 KiB
Bash

# Template file for 'qv4l2'
pkgname=qv4l2
version=1.18.0
revision=2
wrksrc="v4l-utils-${version}"
build_style=gnu-configure
configure_args="--enable-qv4l2 --with-udevdir=/usr/lib/udev"
hostmakedepends="perl pkg-config clang"
makedepends="alsa-lib-devel libjpeg-turbo-devel libsysfs-devel qt5-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Qt v4l2 control panel application"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://linuxtv.org/"
distfiles="https://linuxtv.org/downloads/v4l-utils/v4l-utils-${version}.tar.bz2"
checksum=6cb60d822eeed20486a03cc23e0fc65956fbc1e85e0c1a7477f68bbd9802880d
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" qt5-host-tools qt5-devel"
LDFLAGS="-lpthread"
fi
CFLAGS="-Wno-error=unused-function -fcommon"
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" argp-standalone"
CFLAGS+=" -D__off_t=off_t -D__off64_t=off_t -Du_int32_t=uint32_t"
LDFLAGS+=" -largp"
;;
esac
do_install() {
cd utils/qv4l2
make DESTDIR=${DESTDIR} install
}