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

25 lines
848 B
Bash

# Template file for 'tilp2'
pkgname=tilp2
version=1.18
revision=2
build_style=gnu-configure
hostmakedepends="automake bison groff intltool libtool pkg-config texinfo
gettext-devel glib-devel"
makedepends="gtk+-devel libusb-devel zlib-devel glib-devel libarchive-devel
gettext-devel libticonv-devel libtifiles2-devel libticables2-devel
libticalcs2-devel"
depends="xdg-utils gfm"
short_desc="Connect to TI calculators"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://www.ticalc.org"
distfiles="${SOURCEFORGE_SITE}/tilp/tilp2-linux/tilp2-${version}/${pkgname}-${version}.tar.bz2"
checksum=7b3ab363eeb52504d6ef5811c5d264f8016060bb7bd427be5a064c2ed7384e47
pre_configure() {
mkdir -p m4
autoreconf -i -v -f
vsed -i -e '/DATADIRNAME=/s/=.*/=share/' \
-e '/CATOBJEXT=/s/\.mo/.gmo/' \
configure
}