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

30 lines
808 B
Bash

# Template file for 'osmid'
pkgname=osmid
version=0.8.0
revision=1
build_style=cmake
hostmakedepends="pkg-config"
makedepends="alsa-lib-devel libX11-devel"
short_desc="Tool to convert MIDI to OSC and OSC to MIDI"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT, ISC, GPL-3.0-or-later"
homepage="https://github.com/llloret/osmid/"
distfiles="https://github.com/llloret/osmid/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=774d6c2c7ba81d1ab9d4e7ee031ce15a1506f19ee940166d277dbdee98f87b50
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" libexecinfo-devel" ;;
esac
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*-musl) vsed -i CMakeLists.txt \
-e "/target_link_libraries/s/X11)/X11 execinfo)/"
;;
esac
}
post_install() {
vlicense LICENSE.md
vdoc README.md
}