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

32 lines
956 B
Bash

# Template file for 'chafa'
pkgname=chafa
version=1.6.0
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="libglib-devel libmagick-devel libXext-devel libxml2-devel"
short_desc="Versatile and fast Unicode/ASCII/ANSI graphics renderer"
maintainer="Christian Buschau <christian.buschau@mailbox.org>"
license="LGPL-3.0-or-later"
homepage="https://hpjansson.org/chafa/"
distfiles="https://hpjansson.org/chafa/releases/chafa-${version}.tar.xz"
checksum=0706e101a6e0e806335aeb57445e2f6beffe0be29a761f561979e81691c2c681
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*) ;;
*) configure_args+=" ax_cv_gcc_check_x86_cpu_init=no
ax_cv_gcc_check_x86_cpu_supports=no" ;;
esac
chafa-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/gtk-doc
}
}