void-packages/srcpkgs/Cataclysm-DDA/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

70 lines
1.7 KiB
Bash

# Template file for 'Cataclysm-DDA'
pkgname=Cataclysm-DDA
version=0.E
revision=4
build_style=cmake
configure_args="-DRELEASE=1 $(vopt_bool backtrace BACKTRACE) -DUSE_HOME_DIR=1 -DPREFIX=/usr"
make_cmd=make
hostmakedepends="gettext pkg-config"
makedepends="$(vopt_if tiles 'SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel freetype-devel')
ncurses-devel"
depends="Cataclysm-DDA-data>=${version}_${revision}"
short_desc="Turn-based survival game set in a post-apocalyptic world"
maintainer="John <me@johnnynator.dev>"
license="CC-BY-SA-3.0, CC-BY-3.0"
homepage="https://cataclysmdda.org/"
distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz"
checksum=b0af9a9292929e17332edcea770bca9a91f1d08ea47726d78a47e09281a42fa3
build_options="tiles backtrace"
build_options_default="tiles"
export CMAKE_GENERATOR="Unix Makefiles"
case $XBPS_TARGET_MACHINE in
*-musl);;
*) build_options_default+=" backtrace";;
esac
subpackages=""
if [ "$build_option_tiles" ]; then
subpackages+=" Cataclysm-DDA-tiles"
post_configure() {
local cmake_builddir=build-tiles
configure_args+=" -DTILES=ON -DSOUND=ON"
do_configure
}
post_build() {
local cmake_builddir=build-tiles
do_build
}
post_install() {
local cmake_builddir=build-tiles
do_install
}
fi
subpackages+=" Cataclysm-DDA-data"
do_check() {
: #needs tap++.h
}
Cataclysm-DDA-tiles_package() {
short_desc+=" - SDL tiles version"
depends="Cataclysm-DDA-data"
replaces="Cataclysm-DDA-tiles-data>=0"
pkg_install() {
vmove usr/bin/cataclysm-tiles
vmove usr/share/cataclysm-dda/gfx
vmove usr/share/cataclysm-dda/sound
}
}
Cataclysm-DDA-data_package() {
short_desc+=" - data files"
pkg_install() {
vmove usr/share
}
}