128 lines
4.1 KiB
Bash
128 lines
4.1 KiB
Bash
# Template file for 'cabbage'
|
|
pkgname=cabbage
|
|
version=2.9.0
|
|
revision=1
|
|
# specified in build.py
|
|
_jucever=6.1.2
|
|
_vstsdkver=3611_22_10_2018_build_34
|
|
build_style=cmake
|
|
configure_args="-DJUCE_TARGET_ARCHITECTURE=${XBPS_TARGET_MACHINE}"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="libfreeglut-devel libcurl-devel jack-devel libXcomposite-devel
|
|
libXrandr-devel libXcursor-devel libX11-devel libXinerama-devel MesaLib-devel
|
|
gtk+3-devel libwebkit2gtk41-devel csound alsa-lib-devel libsndfile-devel"
|
|
depends="csound"
|
|
short_desc="Framework for audio software development"
|
|
maintainer="Olga U <me@laserbat.pw>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://cabbageaudio.com/"
|
|
distfiles="https://github.com/WeAreROLI/JUCE/archive/${_jucever}.tar.gz>juce-${_jucever}.tar.gz
|
|
https://github.com/rorywalsh/cabbage/archive/v${version}.tar.gz
|
|
https://cabbageaudio.com/beta/heads.zip
|
|
https://download.steinberg.net/sdk_downloads/vstsdk${_vstsdkver}.zip"
|
|
checksum="7b519711f65bf14054cd5b579d936920066cfa15b60895c04bd9fa0cb087be28
|
|
66e81355399acebcea4e5723ec0d865f8458a8dbd0ddcde5f7fc714a04e51268
|
|
6167199d752fa301e93f1383f9ad700ef646611db53c97d7433fffdb19765e29
|
|
de64ff1b5b40a7fdc2de873e80d911ffa9fd6b82435a555dda1e8edc267d1fa3"
|
|
skip_extraction="juce-${_jucever}.tar.gz vstsdk${_vstsdkver}.zip heads.zip"
|
|
patch_args="-Np1 --binary"
|
|
nocross="Fails to cross-compile juceaide"
|
|
|
|
CXXFLAGS="-DJUCER_ENABLE_GPL_MODE=1"
|
|
|
|
# vsx accel stuff from libpng is not shipped
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
ppc*) CXXFLAGS+=" -DPNG_POWERPC_VSX_OPT=0" ;;
|
|
esac
|
|
|
|
post_extract() {
|
|
vsrcextract -C JUCE juce-${_jucever}.tar.gz
|
|
vsrcextract -C SDKs/VST_SDK vstsdk${_vstsdkver}.zip
|
|
vsrcextract -C SDKs/VST_SDK/VST3_SDK/pluginterfaces/vst2.x heads.zip
|
|
}
|
|
|
|
post_patch() {
|
|
vsed -e '/opcodeFile\ +=/s#/opcodes.txt#/usr/share/doc/cabbage/opcodes.txt#' \
|
|
-i Source/CodeEditor/CabbageCodeEditor.cpp
|
|
|
|
vsed -e '/CabbagePlugin\(Synth\|Effect\)/s#"/#"/usr/lib/vst/#' \
|
|
-i Source/Utilities/CabbageExportPlugin.cpp
|
|
|
|
if [ "${XBPS_TARGET_MACHINE}" = "x86_64" ]; then
|
|
vsed -e 's/x86_64-linux/${XBPS_TARGET_MACHINE}-linux/' \
|
|
-i Source/Utilities/CabbageExportPlugin.cpp
|
|
fi
|
|
|
|
# Fix compilation on i686
|
|
vsed -e 's/__sigemptyset/sigemptyset/' \
|
|
-i JUCE/modules/juce_audio_formats/codecs/flac/libFLAC/cpu.c
|
|
|
|
vsed -e 's/webkit2gtk-4.0/webkit2gtk-4.1/' \
|
|
-i JUCE/extras/Build/CMake/JUCEUtils.cmake
|
|
|
|
vsed -e 's/webkit2gtk-4.0/webkit2gtk-4.1/' \
|
|
-i JUCE/extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.cpp
|
|
}
|
|
|
|
pre_configure() {
|
|
# Searches for VST SDK in $HOME
|
|
oldhome=$HOME
|
|
HOME=$wrksrc
|
|
}
|
|
|
|
post_configure() {
|
|
mkdir -p buildPluginEffect buildPluginSynth buildPluginMidiEffect buildCLIconverter
|
|
(
|
|
cd buildPluginEffect
|
|
configure_args+=" -DPROJECT_NAME=CabbagePluginEffect"
|
|
do_configure
|
|
)
|
|
(
|
|
cd buildPluginSynth
|
|
configure_args+=" -DPROJECT_NAME=CabbagePluginSynth"
|
|
do_configure
|
|
)
|
|
(
|
|
cd buildPluginMidiEffect
|
|
configure_args+=" -DPROJECT_NAME=CabbagePluginMidiEffect"
|
|
do_configure
|
|
)
|
|
(
|
|
cd buildCLIconverter
|
|
configure_args+=" -DPROJECT_NAME=CLIConverter"
|
|
do_configure
|
|
)
|
|
|
|
HOME=$oldhome
|
|
}
|
|
|
|
post_build() {
|
|
( cd buildPluginEffect && NINJA_STATUS="[2/5][%f/%t] " do_build )
|
|
( cd buildPluginSynth && NINJA_STATUS="[3/5][%f/%t] " do_build )
|
|
( cd buildPluginMidiEffect && NINJA_STATUS="[4/5][%f/%t] " do_build )
|
|
( cd buildCLIconverter && NINJA_STATUS="[5/5][%f/%t] " do_build )
|
|
}
|
|
|
|
do_install() {
|
|
find Examples -name '.DS_Store' -delete
|
|
find Examples -name '*_Log.txt' -delete
|
|
|
|
vbin build/Cabbage_artefacts/None/Cabbage
|
|
vbin buildCLIconverter/build/CLIConverter_artefacts/None/CLIConverter
|
|
|
|
vmkdir usr/lib/vst
|
|
for plugin in PluginEffect PluginSynth PluginMidiEffect; do
|
|
(
|
|
cd "build${plugin}/build/Cabbage${plugin}_artefacts/None"
|
|
vinstall "VST/libCabbage${plugin}.so" 755 usr/lib/vst
|
|
vinstall "VST3/Cabbage${plugin}.vst3/Contents/${XBPS_TARGET_MACHINE}-linux/Cabbage${plugin}.so" 755 "usr/lib/vst/Cabbage${plugin}.vst3/Contents/${XBPS_TARGET_MACHINE}-linux/"
|
|
)
|
|
done
|
|
|
|
vinstall Images/cabbage.png 644 usr/share/icons/hicolor/512x512/apps/
|
|
vinstall Installers/Linux/Cabbage.desktop 644 usr/share/applications/
|
|
|
|
vmkdir usr/share/doc/cabbage/examples
|
|
vcopy 'Examples/*' usr/share/doc/cabbage/examples/
|
|
}
|