void-packages/srcpkgs/sxiv/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

25 lines
726 B
Bash

# Template file for 'sxiv'
pkgname=sxiv
version=26
revision=1
build_style=gnu-makefile
makedepends="libX11-devel imlib2-devel giflib-devel libexif-devel libXft-devel"
short_desc="Simple X Image Viewer"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://github.com/muennich/sxiv"
distfiles="https://github.com/muennich/sxiv/archive/v${version}.tar.gz"
checksum=a382ad57734243818e828ba161fc0357b48d8f3a7f8c29cac183492b46b58949
pre_build() {
[ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h ||:
}
post_install() {
vinstall sxiv.desktop 644 usr/share/applications
}
if [ "$CROSS_BUILD" ]; then
# otherwise ft2build.h is not found
hostmakedepends+=" freetype-devel"
fi