void-packages/srcpkgs/gnuradio-nrsc5/template
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```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

35 lines
1 KiB
Bash

# Template file for 'gnuradio-nrsc5'
pkgname=gnuradio-nrsc5
version=1.0.0
revision=4
wrksrc="gr-nrsc5-${version}"
build_style=cmake
make_cmd=make
hostmakedepends="git automake libtool pkg-config gnuradio swig"
makedepends="gnuradio-devel boost-devel libcppunit-devel python3-devel
log4cpp-devel gmpxx-devel mpir-devel gsl-devel volk-devel"
short_desc="GNU Radio implementation of HD Radio"
maintainer="Remi Pommarel <repk@triplefau.lt>"
license="GPL-3.0-or-later"
homepage="https://github.com/argilo/gr-nrsc5/"
distfiles="https://github.com/argilo/gr-nrsc5/archive/v${version}.tar.gz"
checksum=d736c4cb1104254d07296d2a61880e07149c9bfd1a49aed504215672d4e09485
export CMAKE_GENERATOR="Unix Makefiles"
pre_configure() {
if [ "$CROSS_BUILD" ]; then
vsed -i CMakeLists.txt \
-e "s;\./configure ;& --host=${XBPS_MACHINE%-musl} ;"
fi
}
gnuradio-nrsc5-devel_package() {
depends="${makedepends} ${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove "usr/lib/*.so"
}
}