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

42 lines
1.2 KiB
Bash

# Template file for 'sile'
pkgname=sile
version=0.9.5.1
revision=4
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="harfbuzz-devel lua51-devel lua51-lpeg lua51-luaexpat
lua51-zlib lua51-luafilesystem lua51-luasocket lua51-luasec"
depends="lua51-lpeg lua51-luaexpat lua51-zlib lua51-luafilesystem
lua51-luasocket lua51-luasec"
short_desc="Modern typesetting system inspired by TeX"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="http://www.sile-typesetter.org/"
distfiles="https://github.com/simoncozens/sile/releases/download/v${version}/sile-${version}.tar.bz2"
checksum=60cdcc4509971973feab352dfc1a86217cc1fdb12d56823f04d863afef92003a
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" lua51 lua51-devel lua51-lpeg luaexpat lua51-zlib luafilesystem
luasocket lua51-luasec"
fi
post_install() {
vlicense LICENSE
}
libtexpdf_package() {
short_desc="PDF library extracted from TeX's dvipdfmx"
pkg_install() {
vmove "usr/lib/libtexpdf.so.*"
}
}
libtexpdf-devel_package() {
short_desc="PDF library extracted from TeX's dvipdfmx - (development files)"
depends="libtexpdf-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}