void-packages/srcpkgs/CubicSDR/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

25 lines
982 B
Bash

# Template file for 'CubicSDR'
pkgname=CubicSDR
version=0.2.5
revision=3
build_style=cmake
build_helper="cmake-wxWidgets-gtk3"
configure_args="-DUSE_HAMLIB=1 $(vopt_bool alsa USE_AUDIO_ALSA)
$(vopt_bool pulseaudio USE_AUDIO_PULSE) $(vopt_bool jack USE_AUDIO_JACK)"
makedepends="SoapySDR-devel wxWidgets-gtk3-devel glu-devel liquid-dsp-devel hamlib-devel
$(vopt_if alsa alsa-lib-devel) $(vopt_if pulseaudio pulseaudio-devel)
$(vopt_if jack jack-devel)"
short_desc="Cross-Platform Software-Defined Radio (SDR) Application"
maintainer="bra1nwave <brainwave@openmailbox.org>"
license="GPL-2.0-or-later"
homepage="https://cubicsdr.com"
distfiles="https://github.com/cjcliffe/CubicSDR/archive/${version}.tar.gz"
checksum=5cb44c110fcbbb70a468b7fa402cf35f84d8901b3dd42d471a90ac3f5db00f4d
build_options="alsa pulseaudio jack"
build_options_default="alsa pulseaudio"
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
configure_args+=" -DOTHER_LIBRARIES=atomic"
fi