void-packages/srcpkgs/supercollider/template
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: 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

48 lines
1.7 KiB
Bash

# Template file for 'supercollider'
pkgname=supercollider
version=3.11.1
revision=2
wrksrc="SuperCollider-${version}-Source"
build_style=cmake
make_cmd=make
configure_args="-DENABLE_TESTSUITE=OFF -DSYSTEM_BOOST=ON -DSYSTEM_YAMLCPP=ON"
hostmakedepends="emacs pkg-config qt5-host-tools qt5-qmake"
makedepends="avahi-libs-devel boost-devel fftw-devel jack-devel libatomic-devel
libsndfile-devel libXt-devel qt5-declarative-devel qt5-location-devel
qt5-plugin-mysql qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite
qt5-plugin-tds qt5-sensors-devel qt5-tools-devel qt5-svg-devel
qt5-webchannel-devel qt5-websockets-devel yaml-cpp-devel"
short_desc="Environment and programming language for real time audio synthesis"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://github.com/supercollider/supercollider"
distfiles="https://github.com/supercollider/supercollider/releases/download/Version-${version}/SuperCollider-${version}-Source.tar.bz2"
checksum=2dd2f8179a55de4735ac940e2e2d0df4e68cc3a33172628e4dd99ae89c74856b
export CMAKE_GENERATOR="Unix Makefiles"
build_options="webengine"
desc_option_webengine="Build Qt5 WebEngine support"
if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then
if [ "$XBPS_TARGET_WORDSIZE" = "$XBPS_WORDSIZE" ]; then
build_options_default="webengine"
fi
fi
if [ "$build_option_webengine" ]; then
makedepends+=" qt5-webengine-devel"
else
configure_args+=" -DSC_USE_QTWEBENGINE=OFF"
fi
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*);;
*) configure_args+=" -DSSE=OFF -DSSE2=OFF";;
esac
pre_configure() {
# https://github.com/supercollider/supercollider/issues/4096
rm -rf external_libraries/boost
sed -i 's/yaml/yaml-cpp/g' CMakeLists.txt editors/sc-ide/CMakeLists.txt
}