```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
```
21 lines
633 B
Bash
21 lines
633 B
Bash
# Template file for 'unknown-horizons'
|
|
pkgname=unknown-horizons
|
|
version=2019.1
|
|
revision=4
|
|
build_style=python3-module
|
|
hostmakedepends="python3 intltool git python3-Pillow"
|
|
depends="python3 fifengine python3-yaml"
|
|
short_desc="2D real time strategy simulation"
|
|
license="GPL-2.0-or-later, MIT, BSD-3-Clause, CC-BY-SY-3.0"
|
|
homepage="http://unknown-horizons.org"
|
|
distfiles="https://github.com/unknown-horizons/unknown-horizons/archive/${version}.tar.gz"
|
|
checksum=a417fd3d342212fd190e4f21be82ef13c10e1ed7c288fbbe46e46200cf3de4d8
|
|
|
|
pre_install() {
|
|
python3 horizons/engine/generate_atlases.py 2048
|
|
}
|
|
|
|
post_install() {
|
|
vlicense doc/LICENSE
|
|
}
|