void-packages/srcpkgs/xerces-c/template
Đoàn Trần Công Danh 3353bf4722 srcpkgs/x*: 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

51 lines
1.3 KiB
Bash

# Template file for 'xerces-c'
pkgname=xerces-c
version=3.2.3
revision=3
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config"
makedepends="libcurl-devel icu-devel"
depends="lib${pkgname}>=${version}_${revision}"
short_desc="Validating XML parser written in portable C++"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Apache-2.0"
homepage="http://xerces.apache.org/xerces-c/"
distfiles="http://archive.apache.org/dist/xerces/c/3/sources/${pkgname}-${version}.tar.bz2"
checksum=45c2329e684405f2b8854ecbddfb8d5b055cdf0fe4d35736cc352c504989bbb6
pre_configure() {
autoreconf -fi
}
pre_build() {
# Copy samples before build: avoid binaries in -doc package
mkdir -p _docs
cp -a samples/ _docs/
}
libxerces-c_package() {
short_desc+=" - shared library"
pkg_install() {
vmove usr/lib/libxerces-c-${version%.*}.so
}
}
libxerces-c-devel_package() {
short_desc+=" - development files"
depends="lib${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove usr/lib/libxerces-c.so
}
}
xerces-c-doc_package() {
short_desc+=" - documentation"
pkg_install() {
vdoc "CREDITS"
vcopy "${wrksrc}/doc" "/usr/share/doc/${pkgname}"
vcopy "${wrksrc}/_docs/samples" "/usr/share/doc/${pkgname}"
}
}