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

49 lines
1.5 KiB
Bash

# Template file for 'libosinfo'
pkgname=libosinfo
version=1.9.0
revision=1
wrksrc="${pkgname}-v${version}"
build_style=meson
build_helper="gir"
configure_args="-Denable-introspection=$(vopt_if gir enabled disabled)
-Denable-vala=$(vopt_if vala enabled disabled)
-Denable-gtk-doc=$(vopt_if gtk_doc true false)"
hostmakedepends="glib-devel intltool pkg-config wget hwids
$(vopt_if gtk_doc gtk-doc)
$(vopt_if vala vala)"
makedepends="libxslt-devel libglib-devel libsoup-devel"
depends="osinfo-db hwids"
short_desc="GObject based library API for managing info about operating systems"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
homepage="https://libosinfo.org/"
changelog="https://gitlab.com/libosinfo/libosinfo/raw/master/NEWS"
distfiles="https://gitlab.com/libosinfo/libosinfo/-/archive/v${version}/libosinfo-v${version}.tar.gz"
checksum=7270d7a54f4ea46b21163aa1704caf69a5e8ed980434dac6b9951588cae62ea7
build_options="gtk_doc gir vala"
desc_option_gtk_doc="Build GTK API docs"
build_options_default="gir vala"
if [ -z "$CROSS_BUILD" ] ; then
build_options_default+=" gtk_doc"
fi
libosinfo-devel_package() {
depends="libglib-devel ${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove "usr/lib/*.so"
vmove usr/include
vmove usr/lib/pkgconfig
if [ "$build_option_docs" ]; then
vmove usr/share/gtk-doc
fi
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
if [ "$build_option_vala" ]; then
vmove usr/share/vala
fi
}
}