void-packages/srcpkgs/portmidi/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par 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

34 lines
1,019 B
Bash

# Template file for 'portmidi'
pkgname=portmidi
version=217
revision=3
wrksrc="portmidi"
build_style=cmake
configure_args="-DCMAKE_INSTALL_PREFIX=/usr \
-DPORTMIDI_ENABLE_JAVA=OFF \
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release"
hostmakedepends="unzip"
makedepends="alsa-lib-devel"
short_desc="Real-time input and output of MIDI data"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="MIT"
homepage="http://portmedia.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/portmedia/${pkgname}/${version}/${pkgname}-src-${version}.zip"
checksum=08e9a892bd80bdb1115213fb72dc29a7bf2ff108b378180586aa65f3cfd42e0f
post_install() {
ln -s libportmidi.so ${DESTDIR}/usr/lib/libporttime.so
ln -s libportmidi.a ${DESTDIR}/usr/lib/libporttime.a
vlicense license.txt
}
portmidi-devel_package() {
depends="portmidi>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
}
}