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

25 lines
940 B
Bash

# Template file for 'SLADE'
pkgname=SLADE
version=3.1.12a
revision=5
build_style=cmake
build_helper=cmake-wxWidgets-gtk3
hostmakedepends="pkg-config p7zip which"
makedepends="SFML-devel fluidsynth-devel freeimage-devel ftgl-devel glew-devel
gtk+3-devel libcurl-devel wxWidgets-gtk3-devel bzip2-devel zlib-devel
lua53-devel dumb-devel liblzma-devel"
short_desc="Modern editor for Doom-engine based games"
maintainer="John <me@johnnynator.dev>"
license="GPL-2.0-or-later"
homepage="https://github.com/sirjuddington/SLADE"
changelog="https://github.com/sirjuddington/SLADE/releases/tag/${version}"
distfiles="https://github.com/sirjuddington/SLADE/archive/${version}.tar.gz"
checksum=7dc8a0089855f6321d2ec185fa5c97fcb7cc54857033aa3adec9a5ec8226ed60
pre_configure() {
case $XBPS_TARGET_MACHINE in
x86_64* | i686*);;
*) vsed -e '/D_USE_SSE/d' -i src/CMakeLists.txt;;
esac
vsed -e 's/wx-config/wx-config-gtk3/g' -i src/CMakeLists.txt
}