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

37 lines
1.2 KiB
Bash

# Template file for 'libindicator'
pkgname=libindicator
version=12.10.1
revision=1
build_style=gnu-configure
configure_args="--with-gtk=3"
hostmakedepends="pkg-config glib-devel"
makedepends="garcon gtk+3-devel libglib-devel"
short_desc="Convenient symbols and functions for indicators in the Ayatana project"
maintainer="Toyam Cox <Vaelatern@gmail.com>"
license="GPL-3"
homepage="https://launchpad.net/libindicator"
distfiles="https://launchpad.net/libindicator/${version%.*}/${version}/+download/libindicator-${version}.tar.gz"
checksum=b2d2e44c10313d5c9cd60db455d520f80b36dc39562df079a3f29495e8f9447f
CFLAGS="-Wno-deprecated-declarations"
# Avoid errors for macros deprecated since glib-2.58 */
CFLAGS+=" -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56"
post_configure() {
# Due to laziness, let's just fix the problem here without
# understanding it
sed -i -e 's/-lglib-2.0-lm/-lglib-2.0 -lm/' Makefile */Makefile
}
libindicator-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove usr/lib/*.so
vmove usr/lib/*.a
}
}