void-packages/srcpkgs/ZMusic/template
Đoàn Trần Công Danh ec4c2d75fa srcpkgs/[A-Z]*: 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

32 lines
920 B
Bash

# Template file for 'ZMusic'
pkgname=ZMusic
version=1.1.8
revision=1
build_style=cmake
configure_args="-DDYN_SNDFILE=OFF -DDYN_FLUIDSYNTH=OFF -DDYN_MPG123=OFF"
hostmakedepends="pkg-config"
makedepends="zlib-devel alsa-lib-devel libsndfile-devel fluidsynth-devel mpg123-devel"
short_desc="GZDoom's music system"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/coelckers/ZMusic"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=73082f661b7b0bb33348d1d186c132deec9132a1613480348a00172b49c9fd68
if [ "$XBPS_TARGET_LIBC" = musl ]; then
makedepends+=" musl-fts-devel"
fi
post_install() {
vmkdir usr/share/licenses/${pkgname}
vcopy "licenses/*" usr/share/licenses/${pkgname}/
}
ZMusic-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}