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

41 lines
1.1 KiB
Bash

# Template file for 'expect'
pkgname=expect
version=5.45.4
revision=3
wrksrc=${pkgname}${version}
build_style=gnu-configure
configure_args="expect_cv_wnohang_value=1"
make_check_target="test"
hostmakedepends="automake libtool tcl-devel"
makedepends="tcl-devel"
short_desc="Programmed dialogue with interactive programs"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Public Domain"
homepage="http://www.nist.gov/el/msid/expect.cfm"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/Expect/${version}/${pkgname}${version}.tar.gz"
checksum=49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34
alternatives="
mkpasswd:mkpasswd:/usr/bin/expect-mkpasswd
mkpasswd:mkpasswd.1:/usr/share/man/man1/expect-mkpasswd.1"
LDFLAGS+=" -Wl,-rpath=/usr/lib:/usr/lib/${pkgname}${version}"
pre_configure() {
autoreconf -fi
}
post_install() {
rm ${DESTDIR}/usr/bin/weather
mv ${DESTDIR}/usr/bin/{,expect-}mkpasswd
mv ${DESTDIR}/usr/share/man/man1/{,expect-}mkpasswd.1
}
expect-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" -- development files"
pkg_install() {
vmove usr/include
vmove usr/share/man/man3
}
}