void-packages/srcpkgs/okular/template
Đoàn Trần Công Danh 2fd8d4df94 srcpkgs/o*: 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

40 lines
1.2 KiB
Bash

# Template file for 'okular'
pkgname=okular
version=21.04.2
revision=1
build_style=cmake
hostmakedepends="extra-cmake-modules pkg-config gettext kcoreaddons
qt5-qmake qt5-host-tools kdoctools kconfig"
makedepends="discount-devel djvulibre-devel ebook-tools-devel khtml-devel
kpty-devel libchmlib-devel libkexiv25-devel libqmobipocket-devel
libspectre-devel libzip-devel plasma-framework-devel poppler-qt5-devel
purpose-devel qca-qt5-devel qt5-speech-devel threadweaver-devel"
depends="hicolor-icon-theme"
checkdepends="ebook-tools dbus"
short_desc="KDE Document Viewer"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-only"
homepage="https://kde.org/applications/en/graphics/org.kde.okular"
distfiles="${KDE_SITE}/release-service/${version}/src/${pkgname}-${version}.tar.xz"
checksum=330dbe847409bfc544093ac703754fb5f43398ea3dbea88b976dc393d3bda65c
do_check() {
cd build
dbus-run-session ctest
}
libokular_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove "usr/lib/*.so.*"
}
}
libokular-devel_package() {
short_desc+=" - development files"
depends="lib${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove "usr/lib/*.so"
}
}