void-packages/srcpkgs/lilyterm/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: 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

51 lines
1.2 KiB
Bash

# Template file for 'lilyterm'
pkgname=lilyterm
_githash=faf1254f46049edfb1fd6e9191e78b1b23b9c51d
version=0.9.9.4+20190725
revision=1
wrksrc=LilyTerm-$_githash
build_style="gnu-makefile"
hostmakedepends="pkg-config gettext"
makedepends="vte3-devel gtk+3-devel"
short_desc="Fast and lightweight terminal emulator based off of libvte"
maintainer="Kris Scott <kris@syntosis.net>"
license="GPL-3.0-or-later"
homepage="http://lilyterm.luna.com.tw"
# distfiles="http://lilyterm.luna.com.tw/file/lilyterm-${version}.tar.gz"
distfiles="https://github.com/Tetralet/LilyTerm/archive/$_githash.tar.gz"
conf_files="/etc/lilyterm.conf"
checksum=e777122cb4db0c75b893368aa5a3ae7de1bdfe27e1efb8fad8f9c19acb0a802e
CFLAGS="-Wno-deprecated-declarations"
post_patch() {
vsed -i -e '/LDFLAGS.*BINARY/s/$/ -lX11/' \
-e '/^PKGCONFIG :=/d' \
-e '/^STRIP :=/d' \
src/Makefile
}
do_configure() {
cat <<-_EOF >.config
BSD = 0
PREFIX = /usr
prefix = /usr
ETCDIR = /etc
NLS = Y
VERBOSITY = Y
DEBUG = N
SAFEMODE = Y
FORCE_ENABLE_VTE_BACKGROUND = N
CC = $CC
STRIP = $STRIP
CPPFLAGS = $CPPFLAGS
CFLAGS = $CFLAGS
LDFLAGS = $LDFLAGS
MAKE = make
GTK = gtk+-3.0
VTE = vte-2.91
GNOME_CONTROL_CENTER = N
PACKAGE = lilyterm
PKGCONFIG = $PKG_CONFIG
_EOF
}