void-packages/srcpkgs/fig2dev/template
Đoàn Trần Công Danh be5369a0cb srcpkgs/f*: convert patches to -Np1
* fpc is kept at -Np0

```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

20 lines
599 B
Bash

# Template file for 'fig2dev'
pkgname=fig2dev
version=3.2.8a
revision=1
build_style=gnu-configure
configure_args="--enable-transfig"
hostmakedepends="ghostscript"
makedepends="libpng-devel libXpm-devel"
short_desc="Export .xfig to various output formats"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="custom:MIT-like"
homepage="http://www.xfig.org/"
distfiles="${SOURCEFORGE_SITE}/mcj/${pkgname}-${version}.tar.xz"
checksum=6336ac492d0f71dfb7a1dd8f4d78eae17aa57a34f743d4e5ba9814991c2da7ae
replaces="transfig>=0"
post_install() {
sed '/^$/q' <fig2dev/fig2dev.c >LICENSE
vlicense LICENSE
}