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

18 lines
543 B
Bash

# Template file for 'libowfat'
pkgname=libowfat
version=0.32
revision=1
build_style=gnu-makefile
make_install_args="prefix=/usr MAN3DIR=/usr/share/man/man3"
short_desc="Reimplement libdjb"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2"
homepage="https://www.fefe.de/libowfat/"
distfiles="https://www.fefe.de/${pkgname}/${pkgname}-${version}.tar.xz"
checksum=f4b9b3d9922dc25bc93adedf9e9ff8ddbebaf623f14c8e7a5f2301bfef7998c1
CFLAGS="-fcommon"
do_build() {
make ${makejobs} CC="$CC" OPT_REG="$CFLAGS" OPT_PLUS="$CFLAGS -O3"
}