void-packages/srcpkgs/sysprof/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

37 lines
980 B
Bash

# Template file for 'sysprof'
pkgname=sysprof
version=3.38.0
revision=1
build_style=meson
configure_args="-Denable_gtk=true -Dsystemdunitdir=deleteme"
hostmakedepends="gettext pkg-config itstool glib-devel"
makedepends="gtk+3-devel libdazzle-devel polkit-devel glib-devel elogind-devel"
short_desc="System-wide profiler for Linux"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later, GPL-3.0-or-later"
homepage="http://sysprof.com/"
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
checksum=8bcd728dc2f74e6f589410370dfb1b8801468bb3cc1803aa240735a7cff241ce
# for ITS rules
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" polkit-devel"
fi
pre_build() {
export SHELL=/bin/bash
}
post_install() {
rm -rf ${DESTDIR}/usr/deleteme
}
sysprof-devel_package() {
depends="sysprof>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
}
}