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

112 lines
2.9 KiB
Bash

# Template file for 'cmus'
pkgname=cmus
version=2.9.1
revision=1
build_style=configure
configure_args="prefix=/usr LD=$CC"
hostmakedepends="pkg-config"
makedepends="ncurses-devel faad2-devel libcdio-devel libcdio-paranoia-devel
libcddb-devel libdiscid-devel libflac-devel libao-devel libmad-devel
libmodplug-devel libmp4v2-devel libmpcdec-devel pulseaudio-devel
opusfile-devel wavpack-devel alsa-lib-devel libvorbis-devel ffmpeg-devel
sndio-devel $(vopt_if elogind elogind-devel)"
short_desc="Small, fast and powerful console music player"
maintainer="UsernameRandomlyGenerated <coredavid@tutanota.com>"
license="GPL-2.0-or-later"
homepage="https://cmus.github.io"
distfiles="https://github.com/cmus/cmus/archive/v${version}.tar.gz"
checksum=6fb799cae60db9324f03922bbb2e322107fd386ab429c0271996985294e2ef44
build_options="elogind"
build_options_default="elogind"
desc_option_elogind="Support MPRIS interface via elogind"
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
export LDLIBS+=" -latomic"
fi
cmus-libao_package() {
short_desc+=" - libao output plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/op/ao.so
}
}
cmus-cdio_package() {
short_desc+=" - CDIO input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/cdio.so
}
}
cmus-faad_package() {
short_desc+=" - AAC/MP4 input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/aac.so
vmove usr/lib/cmus/ip/mp4.so
}
}
cmus-ffmpeg_package() {
short_desc+=" - FFmpeg input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/ffmpeg.so
}
}
cmus-flac_package() {
short_desc+=" - FLAC input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/flac.so
}
}
cmus-mpc_package() {
short_desc+=" - MPC input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/mpc.so
}
}
cmus-modplug_package() {
short_desc+=" - MOD input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/modplug.so
}
}
cmus-opus_package() {
short_desc+=" - Opus input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/opus.so
}
}
cmus-oss_package() {
short_desc+=" - OSS output plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/op/oss.so
}
}
cmus-pulseaudio_package() {
short_desc+=" - Pulseaudio output plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/op/pulse.so
}
}
cmus-wavpack_package() {
short_desc+=" - Wavpack input plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/ip/wavpack.so
}
}
cmus-sndio_package() {
short_desc+=" - sndio output plugin"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/lib/cmus/op/sndio.so
}
}