void-packages/srcpkgs/ctags/template
Đoàn Trần Công Danh c987560802 srcpkgs/c*: 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

23 lines
688 B
Bash

# Template file for 'ctags'
pkgname=ctags
version=5.9.20210214.0
revision=1
wrksrc=ctags-p${version}
build_style=gnu-configure
hostmakedepends="pkg-config automake python3-docutils"
short_desc="Generates an index file of language objects found in source files"
maintainer="Jan S. <jan.schreib@gmail.com>"
license="GPL-2.0-only"
homepage="https://ctags.io/"
distfiles="https://github.com/universal-ctags/ctags/archive/p${version}.tar.gz"
checksum=26d9efe481a57e81195878cdb0baca730a3c4d234b9a7c4f6bf2c8def42bf42b
do_configure() {
./autogen.sh
./configure ${configure_args}
}
do_install() {
make prefix=${DESTDIR}/usr bindir=${DESTDIR}/usr/bin mandir=${DESTDIR}/usr/share/man install
}