[SCM] zynjacku/master: 0007-unknown_ui_types.patch
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Thu Feb 10 14:10:13 UTC 2011
The following commit has been merged in the master branch:
commit d992ff059b49ef6db58f77e770139c0c26bb8032
Author: Alessio Treglia <alessio at debian.org>
Date: Thu Feb 10 15:10:04 2011 +0100
0007-unknown_ui_types.patch
React better to unknown or unspecified UI types. Minor refactoring.
diff --git a/debian/patches/0007-unknown_ui_types.patch b/debian/patches/0007-unknown_ui_types.patch
new file mode 100644
index 0000000..85a5f75
--- /dev/null
+++ b/debian/patches/0007-unknown_ui_types.patch
@@ -0,0 +1,65 @@
+From: Krzysztof Foltman <wdev at foltman.com>
+Date: Sat, 3 Apr 2010 14:20:32 +0000 (+0100)
+Subject: React better to unknown or unspecified UI types. Minor refactoring.
+X-Git-Url: http://repo.or.cz/w/zynjacku.git/commitdiff_plain/d1e2025e434b25bd8da2617b648a5668e265bc76
+
+React better to unknown or unspecified UI types. Minor refactoring.
+---
+
+---
+ zynworld/host.py | 11 +++++++----
+ zynworld/lv2.py | 12 +++++++++++-
+ 2 files changed, 18 insertions(+), 5 deletions(-)
+
+--- zynjacku.orig/zynworld/host.py
++++ zynjacku/zynworld/host.py
+@@ -2185,6 +2185,7 @@ class host:
+ break
+ self.lv2features_supported.append(feature)
+ index += 1
++ self.lv2guifeatures_supported = self.lv2features_supported + ["http://lv2plug.in/ns/extensions/ui#makeResident"]
+
+ self.available_plugins = []
+
+@@ -2244,12 +2245,14 @@ class host:
+ ui_binary_path = None
+
+ for ui_uri in info.ui:
+- ui = self.lv2db.get_ui_info(plugin.uri, ui_uri)
++ try:
++ ui = self.lv2db.get_ui_info(plugin.uri, ui_uri)
++ except ValueError, e:
++ print "Skipping UI %s: %s" % (ui_uri, str(e))
++ continue
+ features_match = True
+ for required_feature in ui.requiredFeatures:
+- if required_feature == "http://lv2plug.in/ns/extensions/ui#makeResident":
+- continue
+- if not required_feature in self.lv2features_supported:
++ if not required_feature in self.lv2guifeatures_supported:
+ features_match = False
+
+ if not features_match:
+--- zynjacku.orig/zynworld/lv2.py
++++ zynjacku/zynworld/lv2.py
+@@ -585,9 +585,19 @@ class LV2DB:
+ def get_ui_info(self, plugin_uri, uri):
+ info = self.plugin_info[plugin_uri]
+
++ classes = info.getProperty(uri, "a")
++ if classes is None:
++ raise ValueError, "No RDF type specified"
++ supported_classes = set(classes).intersection(set([lv2ui + 'GtkUI', lv2ui + 'external']))
++ if len(supported_classes) == 0:
++ if len(classes) == 1:
++ raise ValueError, "GUI RDF type not supported: %s" % classes[0]
++ else:
++ raise ValueError, "Neither of these types is supported: %s" % (", ".join(classes))
++
+ dest = LV2Plugin()
+ dest.uri = uri
+- dest.type = set(info.getProperty(uri, "a")).intersection(set([lv2ui + 'GtkUI', lv2ui + 'external'])).pop()
++ dest.type = classes.pop()
+ dest.binary = info.getProperty(uri, lv2ui_binary)[0]
+ dest.requiredFeatures = info.getProperty(uri, lv2ui + "requiredFeature", optional = True)
+ dest.optionalFeatures = info.getProperty(uri, lv2ui + "optionalFeature", optional = True)
--
zynjacku packaging
More information about the pkg-multimedia-commits
mailing list