76acfa2dd2
```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 ```
29 lines
695 B
Bash
29 lines
695 B
Bash
# Template file for 'vpcs'
|
|
pkgname=vpcs
|
|
version=0.8
|
|
revision=2
|
|
build_wrksrc="src"
|
|
build_style=gnu-makefile
|
|
make_cmd="make -f Makefile.linux"
|
|
short_desc="Virtual PC Simulator"
|
|
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
|
license="BSD-2-Clause"
|
|
homepage="https://sourceforge.net/projects/vpcs"
|
|
distfiles="${SOURCEFORGE_SITE}/project/vpcs/${version}/${pkgname}-${version}-src.tbz"
|
|
checksum=dca602d0571ba852c916632c4c0060aa9557dd744059c0f7368860cfa8b3c993
|
|
|
|
archs="i686* x86_64*"
|
|
|
|
CFLAGS="-fcommon"
|
|
|
|
pre_build() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*) sed -i "s|i386|amd64|" Makefile.linux;;
|
|
esac
|
|
}
|
|
|
|
do_install() {
|
|
vbin vpcs
|
|
vman ${wrksrc}/man/vpcs.1
|
|
vlicense ${wrksrc}/COPYING
|
|
}
|