void-packages/srcpkgs/woff2/template
Đoàn Trần Công Danh 04b9978a29 srcpkgs/w*: convert patches to -Np1
* wine 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

47 lines
1.1 KiB
Bash

# Template file for 'woff2'
pkgname=woff2
version=1.0.2
revision=1
build_style=cmake
hostmakedepends="pkg-config"
makedepends="brotli-devel"
short_desc="Web Open Font Format 2 reference implementaton"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/google/woff2"
distfiles="https://github.com/google/woff2/archive/v${version}.tar.gz"
checksum=add272bb09e6384a4833ffca4896350fdb16e0ca22df68c0384773c67a175594
libwoff2common1.0.2_package() {
short_desc+=" - common library"
pkg_install() {
vmove "usr/lib/libwoff2common.so.*"
}
}
libwoff2enc1.0.2_package() {
short_desc+=" - encoder library"
pkg_install() {
vmove "usr/lib/libwoff2enc.so.*"
}
}
libwoff2dec1.0.2_package() {
short_desc+=" - decoder library"
pkg_install() {
vmove "usr/lib/libwoff2dec.so.*"
}
}
woff2-devel_package() {
depends="libwoff2common1.0.2-${version}_${revision}
libwoff2dec1.0.2-${version}_${revision}
libwoff2enc1.0.2-${version}_${revision}
brotli-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}