void-packages/srcpkgs/zynaddsubfx/template
Đoàn Trần Công Danh e2a21ccfd6 srcpkgs/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

56 lines
1.9 KiB
Bash

# Template file for 'zynaddsubfx'
pkgname=zynaddsubfx
version=3.0.5
revision=3
build_style=cmake
build_helper=qemu
configure_args="-DDefaultOutput=jack -DDefaultInput=jack -DGuiModule=fltk"
hostmakedepends="doxygen fltk pkg-config"
makedepends="fltk-devel fftw-devel liblo-devel libXpm-devel mxml-devel
jack-devel portaudio-devel"
short_desc="Open Source software synthesizer"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://zynaddsubfx.sourceforge.net/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}/${version}/${pkgname}-${version}.tar.bz2"
checksum=7447322268114a1e0ac5f281ac37a09a78e761a7be61999caf79100049789f63
replaces="zynaddsubfx-data>=0"
case "$XBPS_TARGET_MACHINE" in
armv5*) configure_args+=" -DSUPPORT_NEON=NO";;
esac
post_patch() {
# The x86 assembler check is broken for cross compiling
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*);;
*) vsed -e '/-DASM_F2I_YES/d' -i src/CMakeLists.txt;;
esac
vsed -e 's/COMMAND.*lv2-ttl-generator/COMMAND lv2-ttl-generator/g' -i \
src/Plugin/AlienWah/CMakeLists.txt \
src/Plugin/Chorus/CMakeLists.txt \
src/Plugin/Distortion/CMakeLists.txt \
src/Plugin/DynamicFilter/CMakeLists.txt \
src/Plugin/Echo/CMakeLists.txt \
src/Plugin/Phaser/CMakeLists.txt \
src/Plugin/Reverb/CMakeLists.txt \
src/Plugin/ZynAddSubFX/CMakeLists.txt
vsed -i -e 's;gcc ;${CC} ;' \
-e 's;.fltk-config --cflags.;& ${CFLAGS};' \
-e 's;.fltk-config --ldflags.;& ${LDFLAGS};' \
ExternalPrograms/Spliter/Makefile \
ExternalPrograms/Controller/Makefile
}
post_build() {
# Build external program
make ${makejobs} -C ExternalPrograms/Spliter
make ${makejobs} -C ExternalPrograms/Controller
}
post_install() {
# Install external programs
vbin ${wrksrc}/ExternalPrograms/Spliter/spliter
vdoc ${wrksrc}/ExternalPrograms/Spliter/readme.txt SPLITER.txt
vbin ${wrksrc}/ExternalPrograms/Controller/controller
}