summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-01 21:39:44 +0200
committerRobin Gareus <robin@gareus.org>2017-04-01 21:49:34 +0200
commit4bafbcb1a82ed203fa3987970110df503126150f (patch)
tree6762b1375813254e02e35be123a5a452db4f2a44 /tools
parentb6768b46167fabbd6255419e4551ff99f21156ce (diff)
Add script to update vamp-plugins
Diffstat (limited to 'tools')
-rwxr-xr-xtools/update_qm-dsp.sh3
-rwxr-xr-xtools/update_qm-vamp.sh64
2 files changed, 64 insertions, 3 deletions
diff --git a/tools/update_qm-dsp.sh b/tools/update_qm-dsp.sh
index d15ddb984a..4e2f43ddcf 100755
--- a/tools/update_qm-dsp.sh
+++ b/tools/update_qm-dsp.sh
@@ -13,9 +13,6 @@ fi
ASRC=`pwd`
set -e
-cd libs/qm-dsp
-QMFILES=`find . -type f | grep -v MSVCqm-dsp | grep -v wscript`
-
TMP=`mktemp -d`
test -d "$TMP"
echo $TMP
diff --git a/tools/update_qm-vamp.sh b/tools/update_qm-vamp.sh
new file mode 100755
index 0000000000..4f11738280
--- /dev/null
+++ b/tools/update_qm-vamp.sh
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+if ! test -f wscript || ! test -d gtk2_ardour || ! test -d libs/qm-dsp/;then
+ echo "This script needs to run from ardour's top-level src tree"
+ exit 1
+fi
+
+if test -z "`which rsync`" -o -z "`which git`"; then
+ echo "this script needs rsync and git"
+ exit 1
+fi
+
+ASRC=`pwd`
+set -e
+
+TMP=`mktemp -d`
+test -d "$TMP"
+echo $TMP
+trap "rm -rf $TMP" EXIT
+
+cd $TMP
+git clone git://github.com/c4dm/qm-vamp-plugins.git
+VAMPPLUGS="$TMP/qm-vamp-plugins/plugins"
+
+cd "$ASRC/libs/vamp-plugins/"
+for src in *.cpp *.h; do
+ if test -f "$VAMPPLUGS/$src"; then
+ cp "$VAMPPLUGS/$src" ./
+ git add $src
+ fi
+done
+
+## MSVC patch on top of qm-vamp-plugins-v1.7.1-10-g76bc879
+patch -p3 << EOF
+diff --git b/libs/vamp-plugins/BarBeatTrack.cpp a/libs/vamp-plugins/BarBeatTrack.cpp
+index 8d0b887c3..a85c924c4 100644
+--- b/libs/vamp-plugins/BarBeatTrack.cpp
++++ a/libs/vamp-plugins/BarBeatTrack.cpp
+@@ -25,7 +25,7 @@ using std::vector;
+ using std::cerr;
+ using std::endl;
+
+-#ifndef __GNUC__
++#if !defined(__GNUC__) && !defined(_MSC_VER)
+ #include <alloca.h>
+ #endif
+
+diff --git b/libs/vamp-plugins/OnsetDetect.cpp a/libs/vamp-plugins/OnsetDetect.cpp
+index a2c4042c0..c2b6d68db 100644
+--- b/libs/vamp-plugins/OnsetDetect.cpp
++++ a/libs/vamp-plugins/OnsetDetect.cpp
+@@ -12,6 +12,9 @@
+ COPYING included with this distribution for more information.
+ */
+
++#ifdef COMPILER_MSVC
++#include <ardourext/float_cast.h>
++#endif
+ #include "OnsetDetect.h"
+
+ #include <dsp/onsets/DetectionFunction.h>
+EOF
+
+git add BarBeatTrack.cpp OnsetDetect.cpp