void-packages/srcpkgs/kvirc/template
Đoàn Trần Công Danh dd9d4a1979 srcpkgs/k*: 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

28 lines
916 B
Bash

# Template file for 'kvirc'
pkgname=kvirc
version=5.0.0
revision=7
wrksrc="KVIrc-$version"
build_style=cmake
configure_args="-DWANT_ENV_FLAGS=1 -DWANT_KDE=0"
hostmakedepends="perl"
makedepends="zlib-devel qt5-devel qt5-webkit-devel openssl-devel python-devel perl
qt5-multimedia-devel qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql
qt5-plugin-sqlite qt5-plugin-tds"
short_desc="Qt-based IRC client"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="GPL-2.0-or-later"
homepage="http://www.kvirc.net"
distfiles="ftp://ftp.kvirc.net/pub/kvirc/${version}/source/KVIrc-${version}.tar.bz2"
checksum=76cd4cdcaca5e4056f086cdcbb6122c2ca7e331d6e66c7ebc57d32565f626a65
if [ "$CROSS_BUILD" ];then
hostmakedepends+=" qt5-qmake qt5-host-tools"
configure_args+=" -DWANT_PERL=0" # breaks at least on arm
fi
pre_configure() {
if [ "$CROSS_BUILD" ]; then
configure_args+=" -C ${FILESDIR}/TryRunResults.cmake"
fi
}