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

33 lines
920 B
Bash

# Template file for 'libportal'
pkgname=libportal
version=0.3
revision=2
build_style=meson
configure_args="$(vopt_bool gtk_doc gtk_doc)"
hostmakedepends="pkg-config gtk-doc glib-devel"
makedepends="glib-devel"
short_desc="Flatpak portal library"
maintainer="q66 <daniel@octaforge.org>"
license="LGPL-2.0-or-later"
homepage="https://github.com/flatpak/libportal"
distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
checksum=fd35d66357169e63e33ef46c43fdf22ddc07dbd960ec3462b58ca9ef15a65bd7
build_options="gtk_doc"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="gtk_doc"
fi
libportal-devel_package() {
depends="libportal>=${version}_${revision} glib-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
if [ "$build_option_gtk_doc" ]; then
vmove usr/share/gtk-doc
fi
}
}