void-packages/srcpkgs/commoncpp2/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

26 lines
734 B
Bash

# Template file for 'commoncpp2'
pkgname=commoncpp2
version=1.8.1
revision=2
build_style=gnu-configure
makedepends="zlib-devel"
short_desc="GNU Common C++ 2"
maintainer="David <kalichakra@zoho.com>"
license="GPL-3.0-or-later"
homepage='http://www.gnu.org/software/commoncpp/'
distfiles="${GNU_SITE}/commoncpp/$pkgname-${version}.tar.gz"
checksum="53ced4aff74e28a1d8018eb2b4974519028db3c12471ab6dff1c873578c9af4e"
commoncpp2-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/ccgnu2-config
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share/info
vmove usr/share/aclocal
}
}