void-packages/srcpkgs/imagescan/template
Đoàn Trần Công Danh 986c0a7d5e srcpkgs/i*: 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

31 lines
1.2 KiB
Bash

# Template file for 'imagescan'
pkgname=imagescan
version=3.55.0
revision=2
wrksrc=utsushi-0.55.0
build_style=gnu-configure
configure_args="--libexecdir=/usr/lib --with-boost-libdir=${XBPS_CROSS_BASE}/usr/lib
--with-gtkmm --enable-sane-config --with-sane-confdir=/etc/sane.d --enable-udev-config
--with-udev-confdir=/usr/lib/udev --with-jpeg --with-magick --with-sane --with-tiff"
conf_files="/etc/utsushi/combo.conf"
hostmakedepends="ImageMagick pkg-config sane"
makedepends="boost-devel eudev-libudev-devel gtkmm2-devel libusb-devel sane-devel"
depends="ImageMagick"
short_desc="EPSON Image Scan v3 front-end and backend for scanners and all-in-ones"
maintainer="Giuseppe Fierro <gspe@ae-design.ws>"
license="GPL-3.0-or-later"
homepage="https://gitlab.com/utsushi/imagescan/"
distfiles="http://support.epson.net/linux/src/scanner/imagescanv3/debian/${pkgname}_${version}.orig.tar.gz"
checksum=9440b103b8218863ab08e891d2a9dc9ef52db51485e11017d52fb2036e279477
mutable_files="/etc/sane.d/dll.d/utsushi"
CFLAGS="-Wno-error"
CXXFLAGS="-Wno-error"
post_install() {
# remove include dir
rm -rf $DESTDIR/usr/include
# rename udev rule
mv $DESTDIR/usr/lib/udev/rules.d/{,60-}utsushi-esci.rules
vinstall $FILESDIR/imagescan.desktop 644 usr/share/applications
}