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

22 lines
721 B
Bash

# Template file for 'biew'
pkgname=biew
version=6.1.0
revision=4
_shortversion=${version//.}
wrksrc="${pkgname}-${_shortversion}"
build_style=gnu-configure
short_desc="Console hex viewer/editor and disassembler"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-or-later"
homepage="http://beye.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/beye/${pkgname}/${version}/${pkgname}-${_shortversion}-src.tar.bz2"
checksum=2e85f03c908dd6ec832461fbfbc79169a33f4caccf48c8fe60cbd29f5fb06d17
pre_configure() {
configure_args+=" --target-arch=generic --ld=$CC"
sed -i 's/__GLIBC__/__STDC__/g' biewlib/sysdep/generic/__config.h
}
post_install() {
vmkdir usr/share/man
mv ${DESTDIR}/usr/man ${DESTDIR}/usr/share
}