summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/triceratops-lv2/PKGBUILD26
-rw-r--r--pcr/triceratops-lv2/triceratops-lv2-read-presets.patch167
2 files changed, 185 insertions, 8 deletions
diff --git a/pcr/triceratops-lv2/PKGBUILD b/pcr/triceratops-lv2/PKGBUILD
index 5a8a78ea3..f0f1bac44 100644
--- a/pcr/triceratops-lv2/PKGBUILD
+++ b/pcr/triceratops-lv2/PKGBUILD
@@ -1,27 +1,37 @@
+# Maintainer (Arch): speps <speps at aur dot archlinux dot org>
# Maintainer: Guest One <theguestone at gmail dot com>
pkgname=triceratops-lv2
-pkgver=0.1.7
+pkgver=0.2.0
pkgrel=1
pkgdesc="Polyphonic synthesizer LV2 plugin"
-arch=('i686' 'x86_64' 'mips64el')
+arch=(i686 x86_64)
url="http://deliriumdecrypted.blogspot.com/"
-license=('GPL')
+license=('GPL3')
groups=('lv2-plugins')
depends=('gtkmm' 'lv2')
makedepends=('python2')
-source=("http://downloads.sourceforge.net/project/${pkgname/-lv2}/$pkgname-v$pkgver.tar.gz")
-md5sums=('b4f058c30b3b218bd21dbaa04430dd8b')
+source=("http://downloads.sourceforge.net/project/triceratops/$pkgname-v$pkgver.tar.gz"
+ "$pkgname-read-presets.patch")
+md5sums=('0946acd2bcab02bf8f8d6e4ea4b0e2ab'
+ '907c1d032eb888a2a69d0963720d6016')
+
+prepare() {
+ cd $pkgname-v$pkgver
+
+ # let inner presets being discovered
+ patch -p1 -i ../${source[1]}
+}
build() {
- cd "$srcdir/$pkgname-v$pkgver"
+ cd $pkgname-v$pkgver
python2 waf configure --prefix=/usr
python2 waf
}
package() {
- cd "$srcdir/$pkgname-v$pkgver"
- DESTDIR="$pkgdir/" python2 waf install
+ cd $pkgname-v$pkgver
+ python2 waf install --destdir="$pkgdir/"
}
# vim:set ts=2 sw=2 et:
diff --git a/pcr/triceratops-lv2/triceratops-lv2-read-presets.patch b/pcr/triceratops-lv2/triceratops-lv2-read-presets.patch
new file mode 100644
index 000000000..05d2785a1
--- /dev/null
+++ b/pcr/triceratops-lv2/triceratops-lv2-read-presets.patch
@@ -0,0 +1,167 @@
+diff -aur triceratops-lv2-v0.2.0/presets.cpp triceratops-lv2-v0.2.0.patched/presets.cpp
+--- triceratops-lv2-v0.2.0/presets.cpp 2014-06-18 13:33:34.000000000 +0200
++++ triceratops-lv2-v0.2.0.patched/presets.cpp 2014-09-11 10:43:59.932732363 +0200
+@@ -470,7 +470,7 @@
+ void presets::get_preset_names()
+ {
+
+- //------------------- LOAD /usr/lib/lv2/triceratops-presets.lv2/ presets
++ //------------------- LOAD ~/.lv2/triceratops-presets.lv2/ presets
+
+ stringstream home_lv2;
+ home_lv2.str("");
+@@ -484,74 +484,74 @@
+ {
+ cout << "No presets found in " << dir << endl;
+ closedir(dp);
+- return;
++ // return;
+ }
+-
+- while ((dirp = readdir(dp)) != NULL)
+- {
+- if (string(dirp->d_name) != ".directory" &&
+- string(dirp->d_name) != "." &&
+- string(dirp->d_name) != ".." &&
+- string(dirp->d_name) != "manifest.ttl")
++ else {
++ while ((dirp = readdir(dp)) != NULL)
+ {
+- stringstream file_name;
+- file_name.str("");
+- file_name << "." << dirp->d_name;
+-
+- stringstream preset_file_name_home;
+- preset_file_name_home.str("");
+- preset_file_name_home << getenv("HOME") << "/.lv2/";
+- preset_file_name_home << file_name.str().substr(1);
+- preset_file_name_home << "/";
+- dir = preset_file_name_home.str();
+- int file_name_length = file_name.str().length();
+- preset_file_name_home << file_name.str().substr(1,file_name_length-4);
+- preset_file_name_home << "ttl";
+-
+- bool our_preset = false;
+-
+- ifstream check_file(preset_file_name_home.str());
+- string line;
+- int preset_category_number = 0;
+-
+- while (getline(check_file,line))
++ if (string(dirp->d_name) != ".directory" &&
++ string(dirp->d_name) != "." &&
++ string(dirp->d_name) != ".." &&
++ string(dirp->d_name) != "manifest.ttl")
+ {
+- int triceratops_applies_to =
+- line.rfind("lv2:appliesTo <http://nickbailey.co.nr/triceratops>");
++ stringstream file_name;
++ file_name.str("");
++ file_name << "." << dirp->d_name;
++
++ stringstream preset_file_name_home;
++ preset_file_name_home.str("");
++ preset_file_name_home << getenv("HOME") << "/.lv2/";
++ preset_file_name_home << file_name.str().substr(1);
++ preset_file_name_home << "/";
++ dir = preset_file_name_home.str();
++ int file_name_length = file_name.str().length();
++ preset_file_name_home << file_name.str().substr(1,file_name_length-4);
++ preset_file_name_home << "ttl";
+
+- if (triceratops_applies_to > 0) our_preset = true;
++ bool our_preset = false;
+
+- int preset_category_finder = line.rfind("preset_category");
+- if (preset_category_finder > 0)
++ ifstream check_file(preset_file_name_home.str());
++ string line;
++ int preset_category_number = 0;
++
++ while (getline(check_file,line))
+ {
+- getline(check_file,line);
+- istringstream (line.substr(line.rfind("pset:value") + 11)) >> preset_category_number;
++ int triceratops_applies_to =
++ line.rfind("lv2:appliesTo <http://nickbailey.co.nr/triceratops>");
++
++ if (triceratops_applies_to > 0) our_preset = true;
++
++ int preset_category_finder = line.rfind("preset_category");
++ if (preset_category_finder > 0)
++ {
++ getline(check_file,line);
++ istringstream (line.substr(line.rfind("pset:value") + 11)) >> preset_category_number;
++ }
+ }
+- }
+
+- if (our_preset)
+- {
+- preset_file_names.push_back(file_name.str());
+- presets_object new_preset_object;
++ if (our_preset)
++ {
++ preset_file_names.push_back(file_name.str());
++ presets_object new_preset_object;
+
+- new_preset_object.type = PRESET_TYPE_PRESET;
+- new_preset_object.category = preset_category_number;
+-
+- stringstream file_name_ttl;
+- file_name_ttl.str("");
+- file_name_ttl << file_name.str().substr(1,file_name.str().size()-4) << "ttl";
++ new_preset_object.type = PRESET_TYPE_PRESET;
++ new_preset_object.category = preset_category_number;
+
+- new_preset_object.name = file_name_ttl.str();
+- new_preset_object.dir = dir;
+- new_preset_object.unfold = false;
++ stringstream file_name_ttl;
++ file_name_ttl.str("");
++ file_name_ttl << file_name.str().substr(1,file_name.str().size()-4) << "ttl";
+
+- preset_list.push_back(new_preset_object);
++ new_preset_object.name = file_name_ttl.str();
++ new_preset_object.dir = dir;
++ new_preset_object.unfold = false;
++
++ preset_list.push_back(new_preset_object);
++ }
+ }
+- }
+
++ }
++ closedir(dp);
+ }
+- closedir(dp);
+-
+ //------------------- LOAD /usr/lib/lv2/triceratops-presets.lv2/ presets
+
+
+@@ -563,7 +563,6 @@
+
+ else
+ {
+-
+ while ((dirp = readdir(dp)) != NULL)
+ {
+ if (string(dirp->d_name) != ".directory" &&
+@@ -1305,9 +1304,14 @@
+ string triceratops_ttl_file_name = "";
+
+ ifstream triceratops_ttl("/usr/lib/lv2/triceratops.lv2/triceratops.ttl" );
+- if (triceratops_ttl) triceratops_ttl_file_name = "/usr/lib/lv2/triceratops.lv2/triceratops.ttl" ;
+- triceratops_ttl.open("/usr/local/lib/lv2/triceratops.lv2/triceratops.ttl" );
+- if (triceratops_ttl) triceratops_ttl_file_name = "/usr/local/lib/lv2/triceratops.lv2/triceratops.ttl";
++ if (triceratops_ttl)
++ {
++ triceratops_ttl_file_name = "/usr/lib/lv2/triceratops.lv2/triceratops.ttl";
++ } else
++ {
++ triceratops_ttl.open("/usr/local/lib/lv2/triceratops.lv2/triceratops.ttl" );
++ if (triceratops_ttl) triceratops_ttl_file_name = "/usr/local/lib/lv2/triceratops.lv2/triceratops.ttl";
++ }
+
+ int current_port = -1;
+ int symbol_port = -1;