void-packages/srcpkgs/mcpp/template
Đoàn Trần Công Danh 765e304c4b srcpkgs/m*: 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

33 lines
734 B
Bash

# Template file for 'mcpp'
pkgname=mcpp
version=2.7.2
revision=8
build_style=gnu-configure
configure_args="--enable-mcpplib"
short_desc="Portable C preprocessor"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="http://mcpp.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/mcpp/mcpp-${version}.tar.gz"
checksum=3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864
post_install() {
vlicense LICENSE
}
libmcpp_package() {
short_desc+=" - Runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
mcpp-devel_package() {
depends="libmcpp>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}