void-packages/srcpkgs/gscan2pdf/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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
1,012 B
Bash

# Template file for 'gscan2pdf'.
pkgname=gscan2pdf
version=2.12.1
revision=1
build_style=perl-module
hostmakedepends="perl gettext"
makedepends="ImageMagick djvulibre libmagick-perl perl-Config-General
perl-Data-UUID perl-Date-Calc perl-Filesys-Df perl-Font-TTF perl-GooCanvas2
perl-Gtk3-SimpleList perl-HTML-Parser perl-IO-String perl-Image-Sane
perl-Linux-Distribution perl-List-MoreUtils perl-Locale-gettext
perl-Log-Log4perl perl-PDF-Builder perl-Pango perl-Proc-ProcessTable perl-Readonly
perl-Set-IntSpan perl-Try-Tiny unpaper xdg-utils perl-Locale-Codes perl-Gtk3-ImageView"
depends="$makedepends sane"
short_desc="GUI to produce PDFs or DjVus from scanned documents"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="GPL-3.0-or-later"
homepage="http://gscan2pdf.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=e5c10a9e695674308d29fe8661c5bb7230e25dfbc098716c26a3188ef1e54074
nocross=yes
do_check() {
# Tests require a Display server
:
}