void-packages/srcpkgs/txr/template
Đoàn Trần Công Danh 4f75cf25fd srcpkgs/t*: 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

33 lines
898 B
Bash

# Template file for 'txr'
pkgname=txr
version=256
revision=1
archs="x86_64* i686* aarch64* arm* ppc64* mips*"
build_style=configure
configure_args="--prefix=/usr"
make_check_target=tests
makedepends="libffi-devel"
short_desc="Programming language for convenient data munging"
maintainer="Oliver Kiddle <okiddle@yahoo.co.uk>"
license="BSD-2-Clause"
homepage="http://www.nongnu.org/txr/"
changelog="http://www.kylheku.com/cgit/txr/tree/RELNOTES"
distfiles="http://www.kylheku.com/cgit/txr/snapshot/${pkgname}-${version}.tar.bz2"
checksum=58e3e19bb7f3f9a440761f046fdacbc4d619b11c494a4ed9f8ad25c7a2974ddc
nopie=yes
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" txr"
fi
pre_configure() {
if [ "$CROSS_BUILD" ]; then
vsed -i Makefile -e 's#^TXR :=.*#TXR = /usr/bin/txr#'
fi
}
post_install() {
vlicense LICENSE
vmkdir usr/share/vim/vimfiles/syntax
vcopy *.vim usr/share/vim/vimfiles/syntax/
}