void-packages/srcpkgs/rapidjson/template
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0

```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

27 lines
882 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Template file for 'rapidjson'
pkgname=rapidjson
version=1.1.0
revision=4
build_style=cmake
short_desc="Fast JSON parser/generator for C++ with both SAX/DOM style API"
maintainer="Alexander Egorenkov <egorenar-dev@posteo.net>"
license="BSD-3-Clause, MIT"
homepage="https://github.com/miloyip/rapidjson"
distfiles="https://github.com/miloyip/${pkgname}/archive/v${version}.tar.gz"
checksum=bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e
# class-memaccess is required by https://github.com/Tencent/rapidjson/issues/1700
CXXFLAGS="-Wno-type-limits -Wno-error=class-memaccess -DNDEBUG"
post_patch() {
# Remove bin/jsonchecker, which is the JSON licensed files
rm -rf bin/jsonchecker
vsed -i license.txt \
-e 's/To avoid the problematic JSON.*//' \
-e '/Under the JSON License/,/OTHER DEALINGS IN THE SOFTWARE/d'
}
post_install() {
vlicense license.txt
}