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

47 lines
1.1 KiB
Bash

# Template file for 'libxo'
pkgname=libxo
version=1.4.0
revision=1
build_style=gnu-configure
configure_args="--disable-static"
short_desc="Library for programs to output XML, JSON and HTML"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="https://juniper.github.io/libxo/libxo-manual.html"
distfiles="https://github.com/Juniper/libxo/releases/download/${version}/libxo-${version}.tar.gz"
checksum=aa842d9374bc0c640d9526abdeb6f1dc75c1a14e892eafd3c9e0ee2e8dfc1c43
case $XBPS_TARGET_MACHINE in
*-musl)
makedepends+=" musl-legacy-compat"
;;
esac
post_install() {
vlicense Copyright
rm -rf ${DESTDIR}/usr/share/doc/libxo/Copyright
}
libxo-devel_package() {
depends="libxo-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/libxo-config
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/share/man/man3
vmove "usr/lib/*.so"
vmove usr/share/libxo
vmove "usr/lib/libxo/encoder/*.so"
}
}
libxo-progs_package() {
short_desc+=" - programs and utilities"
pkg_install() {
vmove usr/bin
vmove usr/share/man/man1
}
}