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

55 lines
1.5 KiB
Bash

# Template file for 'Carla'
pkgname=Carla
version=2.1
revision=3
archs="x86_64* i686* aarch64* arm*"
build_style=gnu-makefile
pycompile_dirs="usr/share/carla"
hostmakedepends="pkg-config python3 python3-PyQt5-devel-tools which"
makedepends="python3-PyQt5 libmagic file-devel libsndfile-devel
liblo-devel alsa-lib-devel pulseaudio-devel libX11-devel gtk+3-devel
gtk+-devel qt5-devel fluidsynth-devel fftw-devel zlib-devel
python3-rdflib"
depends="python3 python3-PyQt5 python3-PyQt5-svg which"
short_desc="Audio plugin host"
maintainer="nutcase84 <nutcase84@protonmail.com>"
license="GPL-2.0-or-later"
homepage="https://kxstudio.linuxaudio.org/Applications:Carla"
distfiles="https://github.com/falkTX/Carla/archive/v${version}.tar.gz"
checksum=a82ce08f3a82db9d878c8cb7e7e2f3b80834bf21801c6ec4ed95c0cfee25b963
python_version=3
case $XBPS_TARGET_MACHINE in
x86_64* | i686*);;
*) make_build_args+=" NOOPT=true"
make_install_args+=" NOOPT=true";;
esac
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" Carla-devel"
fi
pre_build() {
vsed -e '1,1i#include <unistd.h>' \
-i source/modules/water/text/CharacterFunctions.h
if [ "$CROSS_BUILD" ]; then
vsed -i -e 's#\./carla-lv2-export#/usr/bin/carla-lv2-export#g' \
source/plugin/Makefile
fi
make ${make_build_args} features
}
post_install() {
vbin bin/carla-lv2-export
}
Carla-devel_package() {
short_desc+=" - development files"
pkg_install() {
vmove usr/bin/carla-lv2-export
vmove usr/lib/pkgconfig
vmove usr/include
}
}