summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Cherny2018-03-24 21:11:51 +0200
committerEugene Cherny2018-03-24 21:11:51 +0200
commite5871d938a52e116e4ab2d8b209bbe7c2149faa8 (patch)
tree69d6db779c7f91db24ecadc4e5811af2db9e5c2b
downloadaur-e5871d938a52e116e4ab2d8b209bbe7c2149faa8.tar.gz
[init]
-rw-r--r--.SRCINFO34
-rw-r--r--Cabbage.desktop10
-rw-r--r--CabbageLite.desktop10
-rw-r--r--PKGBUILD122
-rw-r--r--fix_paths.patch98
5 files changed, 274 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9dcc9bf2fbb8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,34 @@
+pkgbase = cabbage-git
+ pkgdesc = A framework for audio software development
+ pkgver = 1.0.0r1173
+ pkgrel = 1
+ url = http://cabbageaudio.com/
+ arch = x86_64
+ license = GPLv3
+ makedepends = freeglut
+ makedepends = curl
+ makedepends = jack
+ makedepends = libxcomposite
+ makedepends = libxrandr
+ makedepends = libxcursor
+ makedepends = libx11
+ makedepends = libxinerama
+ makedepends = mesa
+ makedepends = gtk3
+ makedepends = vim
+ depends = csound
+ depends = steinberg-vst36
+ provides = cabbage
+ source = git+https://github.com/rorywalsh/cabbage.git#branch=master
+ source = git+https://github.com/WeAreROLI/JUCE.git#tag=5.2.0
+ source = fix_paths.patch
+ source = Cabbage.desktop
+ source = CabbageLite.desktop
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = 0c2ddec78ea91ed5736bad0d81f21ea7
+ md5sums = c499a03801cf0e760c14759ab1927bef
+ md5sums = 39992361c05babc4d12cbdcd2c3f6e04
+
+pkgname = cabbage-git
+
diff --git a/Cabbage.desktop b/Cabbage.desktop
new file mode 100644
index 000000000000..95e7ecffc722
--- /dev/null
+++ b/Cabbage.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Cabbage
+GenericName=Audio development toolkit
+Type=Application
+Categories=AudioVideo;Audio;Multimedia
+Exec=/opt/cabbage/Cabbage
+Terminal=false
+StartupNotify=false
+Icon=/opt/cabbage/cabbage.png
diff --git a/CabbageLite.desktop b/CabbageLite.desktop
new file mode 100644
index 000000000000..b817489bf6af
--- /dev/null
+++ b/CabbageLite.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Cabbage Lite
+GenericName=Audio development toolkit
+Type=Application
+Categories=AudioVideo;Audio;Multimedia
+Exec=/opt/cabbage/CabbageLite
+Terminal=false
+StartupNotify=false
+Icon=/opt/cabbage/cabbage.png
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..83de00b3d5c3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,122 @@
+# Maintainer: Eugene Cherny <iam@oscii.ru>
+pkgname=cabbage-git
+pkgrel=1
+pkgver=1.0.0r1173
+pkgdesc='A framework for audio software development'
+arch=('x86_64')
+url="http://cabbageaudio.com/"
+license=('GPLv3')
+makedepends=('freeglut' 'curl' 'jack' 'libxcomposite' 'libxrandr' 'libxcursor'
+ 'libx11' 'libxinerama' 'mesa' 'gtk3' 'vim')
+depends=('csound' 'steinberg-vst36')
+provides=('cabbage')
+source=('git+https://github.com/rorywalsh/cabbage.git#branch=master'
+ 'git+https://github.com/WeAreROLI/JUCE.git#tag=5.2.0'
+ 'fix_paths.patch'
+ 'Cabbage.desktop'
+ 'CabbageLite.desktop')
+md5sums=('SKIP'
+ 'SKIP'
+ '0c2ddec78ea91ed5736bad0d81f21ea7'
+ 'c499a03801cf0e760c14759ab1927bef'
+ '39992361c05babc4d12cbdcd2c3f6e04')
+
+_projucer_dir="JUCE/extras/Projucer/Builds/LinuxMakefile/build/"
+_projucer="${_projucer_dir}/Projucer"
+
+function patch_strings_in_file() {
+ # Source (Johan Hedin):
+ # http://everydaywithlinux.blogspot.com/2012/11/patch-strings-in-binary-files-with-sed.html
+ # Slight modification by Colin Wallace to force the pattern to capture the entire line
+ # Usage: patch_strings_in_file <file> <pattern> <replacement>
+ # replaces all occurances of <pattern> with <replacement> in <file>, padding
+ # <replacement> with null characters to match the length
+ # Unlike sed or patch, this works on binary files
+ local FILE="$1"
+ local PATTERN="$2"
+ local REPLACEMENT="$3"
+
+ # Find all unique strings in FILE that contain the pattern
+ STRINGS=$(strings ${FILE} | grep "^${PATTERN}$" | sort -u -r)
+
+ if [ "${STRINGS}" != "" ] ; then
+ echo "File '${FILE}' contains strings equal to '${PATTERN}':"
+
+ for OLD_STRING in ${STRINGS} ; do
+ # Create null terminated ASCII HEX representations of the strings
+ OLD_STRING_HEX="$(echo -n ${OLD_STRING} | xxd -g 0 -u -ps -c 256)00"
+ NEW_STRING_HEX="$(echo -n ${REPLACEMENT} | xxd -g 0 -u -ps -c 256)00"
+
+ if [ ${#NEW_STRING_HEX} -le ${#OLD_STRING_HEX} ] ; then
+ # Pad the replacement string with null terminations so the
+ # length matches the original string
+ while [ ${#NEW_STRING_HEX} -lt ${#OLD_STRING_HEX} ] ; do
+ NEW_STRING_HEX="${NEW_STRING_HEX}00"
+ done
+
+ # Now, replace every occurrence of OLD_STRING with NEW_STRING
+ echo -n "Replacing ${OLD_STRING} with ${REPLACEMENT}... "
+ hexdump -ve '1/1 "%.2X"' ${FILE} | \
+ sed "s/${OLD_STRING_HEX}/${NEW_STRING_HEX}/g" | \
+ xxd -r -p > ${FILE}.tmp
+ chmod --reference ${FILE} ${FILE}.tmp
+ mv ${FILE}.tmp ${FILE}
+ echo "Done!"
+ else
+ echo "New string '${NEW_STRING}' is longer than old" \
+ "string '${OLD_STRING}'. Skipping."
+ fi
+ done
+ fi
+}
+
+prepare() {
+ # Projucer - building here to use it in pkgver()
+
+ sed -i -e "s/JUCER_ENABLE_GPL_MODE 0/JUCER_ENABLE_GPL_MODE 1/" \
+ "${srcdir}/JUCE/extras/Projucer/JuceLibraryCode/AppConfig.h"
+ cd "${srcdir}/JUCE/extras/Projucer/Builds/LinuxMakefile/"
+ make -j4
+
+ # a hack to make Projucer use the system's VST header path
+ patch_strings_in_file "${srcdir}/${_projucer}" "~/SDKs/VST_SDK/VST3_SDK" "/usr/include/vst36"
+ # will be replaced with the following once Cabbage is ported to JUCE 5.3.0
+ # "${srcdir}/${_projucer_dir}" --set-global-search-path linux vst3Path /usr/include/vst36/
+
+ # Cabbage
+
+ cd "${srcdir}/cabbage"
+ patch -p1 < ../../fix_paths.patch
+}
+
+pkgver() {
+ cd "${srcdir}/cabbage"
+ printf "1.0.0r%s" "$(git rev-list --count HEAD)"
+}
+
+build() {
+ cd "${srcdir}/cabbage/Builds/LinuxMakefile"
+ ./buildCabbage
+}
+
+package() {
+ install -Dm644 Cabbage.desktop "${pkgdir}/usr/share/applications/Cabbage.desktop"
+ install -Dm644 Cabbage.desktop "${pkgdir}/usr/share/applications/CabbageLite.desktop"
+
+ cd "${srcdir}/cabbage/Builds/LinuxMakefile/CabbageBuild/"
+ install -d "${pkgdir}/opt/Cabbage"
+# install -Dm644 Cabbage "${pkgdir}/opt/Cabbage/Cabbage"
+# install -Dm644 CabbageLite "${pkgdir}/opt/Cabbage/CabbageLite"
+# install -Dm644 CabbagePluginEffect.so "${pkgdir}/opt/Cabbage/CabbagePluginEffect.so"
+# install -Dm644 CabbagePluginSynth.so "${pkgdir}/opt/Cabbage/CabbagePluginSynth.so"
+# install -Dm644 cabbage.png "${pkgdir}/opt/Cabbage/cabbage.png"
+# install -Dm644 opcodes.txt "${pkgdir}/opt/Cabbage/opcodes.txt"
+# install -Dm644 Examples "${pkgdir}/opt/Cabbage/Examples"
+ cp -R ./* "${pkgdir}/opt/Cabbage/"
+
+
+
+ install -d "${pkgdir}/usr/bin"
+ ln -s ../../opt/Cabbage/Cabbage "${pkgdir}/usr/bin/Cabbage"
+ ln -s ../../opt/Cabbage/CabbageLite "${pkgdir}/usr/bin/CabbageLite"
+}
diff --git a/fix_paths.patch b/fix_paths.patch
new file mode 100644
index 000000000000..94567090c32a
--- /dev/null
+++ b/fix_paths.patch
@@ -0,0 +1,98 @@
+diff --git a/Builds/LinuxMakefile/buildCabbage b/Builds/LinuxMakefile/buildCabbage
+index a8aba851..751d5b63 100755
+--- a/Builds/LinuxMakefile/buildCabbage
++++ b/Builds/LinuxMakefile/buildCabbage
+@@ -60,9 +60,6 @@ cp ./../opcodes.txt CabbageBuild/opcodes.txt
+ cp ./../../Images/cabbage.png CabbageBuild/cabbage.png
+ cp -rf ../../Examples/ CabbageBuild/Examples
+
+-g++ ../../Source/testCsoundFile.cpp -o testCsoundFile -I"/usr/local/include/csound" -lcsound64
++g++ ../../Source/testCsoundFile.cpp -o testCsoundFile -I"/usr/include/csound" -lcsound64
+
+ #cp -rf ../../Docs/_book CabbageBuild/Docs
+-
+-sed "s@CURRENTDIR@$(pwd)@" dummy.desktop > CabbageBuild/cabbage.desktop
+-cp CabbageBuild/cabbage.desktop ~/.local/share/applications/
+diff --git a/CabbageIDE.jucer b/CabbageIDE.jucer
+index bcedbf1e..13a89c4b 100755
+--- a/CabbageIDE.jucer
++++ b/CabbageIDE.jucer
+@@ -270,9 +270,9 @@
+ extraCompilerFlags="">
+ <CONFIGURATIONS>
+ <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="Cabbage"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"/>
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"/>
+ <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="Cabbage"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"/>
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"/>
+ </CONFIGURATIONS>
+ <MODULEPATHS>
+ <MODULEPATH id="juce_core" path="../JUCE/modules"/>
+diff --git a/CabbageLite.jucer b/CabbageLite.jucer
+index f12c8bdd..09f966b5 100755
+--- a/CabbageLite.jucer
++++ b/CabbageLite.jucer
+@@ -219,9 +219,9 @@
+ externalLibraries="csound64&#10;sndfile">
+ <CONFIGURATIONS>
+ <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="CabbageLite"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"/>
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"/>
+ <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="CabbageLite"
+- libraryPath="&quot;/usr/local/lib&quot;" headerPath="&quot;/usr/local/include/csound&quot;"/>
++ libraryPath="&quot;/usr/lib&quot;" headerPath="&quot;/usr/include/csound&quot;"/>
+ </CONFIGURATIONS>
+ <MODULEPATHS>
+ <MODULEPATH id="juce_core" path="../sourcecode/JUCE/modules"/>
+diff --git a/CabbagePlugin.jucer b/CabbagePlugin.jucer
+index 731fde68..11b8c00e 100755
+--- a/CabbagePlugin.jucer
++++ b/CabbagePlugin.jucer
+@@ -187,10 +187,10 @@
+ extraLinkerFlags="-Wall">
+ <CONFIGURATIONS>
+ <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="CabbagePlugin"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"
+ defines=""/>
+ <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="CabbagePlugin"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"
+ defines="Cabbage_Plugin_Synth=1"/>
+ </CONFIGURATIONS>
+ <MODULEPATHS>
+diff --git a/CabbagePluginMIDIEffect.jucer b/CabbagePluginMIDIEffect.jucer
+index 19991106..2bf842d6 100755
+--- a/CabbagePluginMIDIEffect.jucer
++++ b/CabbagePluginMIDIEffect.jucer
+@@ -187,10 +187,10 @@
+ extraLinkerFlags="-Wall">
+ <CONFIGURATIONS>
+ <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="CabbagePlugin"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"
+ defines="Cabbage_Plugin_Synth=1"/>
+ <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="CabbagePlugin"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"
+ defines="Cabbage_Plugin_Synth=1"/>
+ </CONFIGURATIONS>
+ <MODULEPATHS>
+diff --git a/CabbagePluginSynth.jucer b/CabbagePluginSynth.jucer
+index 9edffcbb..39d5cf01 100755
+--- a/CabbagePluginSynth.jucer
++++ b/CabbagePluginSynth.jucer
+@@ -187,10 +187,10 @@
+ extraLinkerFlags="-Wall">
+ <CONFIGURATIONS>
+ <CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="CabbagePlugin"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"
+ defines="Cabbage_Plugin_Synth=1"/>
+ <CONFIGURATION name="Release" isDebug="0" optimisation="3" targetName="CabbagePlugin"
+- headerPath="&quot;/usr/local/include/csound&quot;" libraryPath="&quot;/usr/local/lib&quot;"
++ headerPath="&quot;/usr/include/csound&quot;" libraryPath="&quot;/usr/lib&quot;"
+ defines="Cabbage_Plugin_Synth=1"/>
+ </CONFIGURATIONS>
+ <MODULEPATHS>