void-packages/srcpkgs/libxml2/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

45 lines
1.3 KiB
Bash

# Template file for 'libxml2'
#
# Please keep this in sync with "srcpkgs/libxml2-python"
#
pkgname=libxml2
version=2.9.10
revision=4
build_style=gnu-configure
configure_args="--with-threads --with-history --with-icu --without-python"
hostmakedepends="automake libtool gettext-devel pkg-config"
makedepends="zlib-devel ncurses-devel readline-devel liblzma-devel icu-devel"
short_desc="Library providing XML and HTML support"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT"
homepage="http://www.xmlsoft.org/"
distfiles="http://xmlsoft.org/sources/${pkgname}-${version}.tar.gz"
checksum=aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
pre_configure() {
autoreconf -fi
sed '/PROGRAMS =/s,$(noinst_PROGRAMS),,' -i Makefile.in
}
post_install() {
vlicense COPYING
}
libxml2-devel_package() {
depends="zlib-devel liblzma-devel icu-devel libxml2>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/bin/xml2-config
vmove usr/lib/xml2Conf.sh
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
vmove usr/share/aclocal
vmove usr/share/gtk-doc
vmove usr/share/doc/${sourcepkg}-${version}
vmove "usr/share/man/man1/xml2-config*"
vmove usr/share/man/man3
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}