diff --git a/ext/lv2/calf-lv2-port-groups.patch b/ext/lv2/calf-lv2-port-groups.patch
new file mode 100644
index 0000000000..232e3ccb30
--- /dev/null
+++ b/ext/lv2/calf-lv2-port-groups.patch
@@ -0,0 +1,71 @@
+diff --git a/src/makerdf.cpp b/src/makerdf.cpp
+index 430fb91..ee82152 100644
+--- a/src/makerdf.cpp
++++ b/src/makerdf.cpp
+@@ -168,16 +168,16 @@ static void add_port(string &ports, const char *symbol, const char *name, const
+ ss << ind << "lv2ev:supportsTimestamp ;\n";
+ }
+ if (!strcmp(symbol, "in_l"))
+- ss << ind << "pg:membership [ pg:group <#stereoIn>; pg:role pg:leftChannel ] ;" << endl;
++ ss << ind << "pg:inGroup <#stereoIn> ; pg:role pg:leftChannel ;" << endl;
+ else
+ if (!strcmp(symbol, "in_r"))
+- ss << ind << "pg:membership [ pg:group <#stereoIn>; pg:role pg:rightChannel ] ;" << endl;
++ ss << ind << "pg:inGroup <#stereoIn> ; pg:role pg:rightChannel ;" << endl;
+ else
+ if (!strcmp(symbol, "out_l"))
+- ss << ind << "pg:membership [ pg:group <#stereoOut>; pg:role pg:leftChannel ] ;" << endl;
++ ss << ind << "pg:inGroup <#stereoOut> ; pg:role pg:leftChannel ;" << endl;
+ else
+ if (!strcmp(symbol, "out_r"))
+- ss << ind << "pg:membership [ pg:group <#stereoOut>; pg:role pg:rightChannel ] ;" << endl;
++ ss << ind << "pg:inGroup <#stereoOut> ; pg:role pg:rightChannel ;" << endl;
+ ss << " ]";
+ ports += ss.str();
+ }
+@@ -469,7 +469,7 @@ void make_ttl(string path_prefix)
+ "@prefix lv2midi: .\n"
+ "@prefix lv2ctx: .\n"
+ "@prefix strport: .\n"
+- "@prefix pg: .\n"
++ "@prefix pg: .\n"
+ "@prefix ue: .\n"
+ "@prefix epp: .\n"
+ "@prefix kf: .\n"
+@@ -538,7 +538,17 @@ void make_ttl(string path_prefix)
+ ttl += gui_uri + " uiext:portNotification [\n uiext:plugin " + uri + " ;\n uiext:portIndex " + i2s(j) + "\n] .\n\n";
+ }
+ #endif
+-
++
++ if (pi->get_input_count() == 2)
++ ttl += "<#stereoIn> a pg:StereoGroup ;\n lv2:symbol \"in\";\n lv2:name \"Input\" .\n\n";
++
++ if (pi->get_output_count() == 2) {
++ ttl += "<#stereoOut> a pg:StereoGroup ;\n lv2:symbol \"out\" ;\n lv2:name \"Output\"";
++ if (pi->get_input_count() == 2)
++ ttl += " ;\n pg:source <#stereoIn>";
++ ttl += " .\n\n";
++ }
++
+ ttl += uri + " a lv2:Plugin ;\n";
+
+ if (classes.count(lpi.plugin_type))
+@@ -583,12 +593,13 @@ void make_ttl(string path_prefix)
+
+ string ports = "";
+ int pn = 0;
+- const char *in_names[] = { "in_l", "in_r" };
+- const char *out_names[] = { "out_l", "out_r" };
++ const char *in_syms[] = { "in_l", "in_r" };
++ const char *out_syms[] = { "out_l", "out_r" };
++ const char *names[] = { "Left", "Right" };
+ for (int i = 0; i < pi->get_input_count(); i++)
+- add_port(ports, in_names[i], in_names[i], "Input", pn++);
++ add_port(ports, in_syms[i], names[i], "Input", pn++);
+ for (int i = 0; i < pi->get_output_count(); i++)
+- add_port(ports, out_names[i], out_names[i], "Output", pn++);
++ add_port(ports, out_syms[i], names[i], "Output", pn++);
+ for (int i = 0; i < pi->get_param_count(); i++)
+ add_ctl_port(ports, *pi->get_param_props(i), pn++, pi, i);
+ if (pi->get_midi()) {
diff --git a/ext/lv2/swh-lv2-port-groups.patch b/ext/lv2/swh-lv2-port-groups.patch
new file mode 100644
index 0000000000..f841b3bb55
--- /dev/null
+++ b/ext/lv2/swh-lv2-port-groups.patch
@@ -0,0 +1,502 @@
+diff -ur swh-lv2-1.0.15/plugins/dj_eq-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/dj_eq-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/dj_eq-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/dj_eq-swh.lv2/plugin.xml 2009-07-03 16:55:25.000000000 -0400
+@@ -140,6 +140,9 @@
+ *(plugin_data->latency) = 3; //XXX is this right?
+ ]]>
+
++
++
++
+
+ Lo gain (dB)
+ Controls the gain of the low (100Hz) peak/dip band
+@@ -158,18 +161,18 @@
+
+
+
+-
++
+ Input L
+
+-
++
+ Input R
+
+
+-
++
+ Output L
+
+
+-
++
+ Output R
+
+
+diff -ur swh-lv2-1.0.15/plugins/gverb-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/gverb-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/gverb-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/gverb-swh.lv2/plugin.xml 2009-06-14 22:05:18.000000000 -0400
+@@ -119,16 +119,20 @@
+ The level of the classic reverb tail reflections.
+
+
++
++
+
+-
++
+ Input
+
++
++
+
+-
++
+ Left output
+
+
+-
++
+ Right output
+
+
+diff -ur swh-lv2-1.0.15/plugins/karaoke-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/karaoke-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/karaoke-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/karaoke-swh.lv2/plugin.xml 2009-07-03 16:55:05.000000000 -0400
+@@ -33,19 +33,22 @@
+
+
+
+-
++
++
++
++
+ Left in
+
+
+-
++
+ Right in
+
+
+-
++
+ Left out
+
+
+-
++
+ Right out
+
+
+diff -ur swh-lv2-1.0.15/plugins/lcr_delay-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/lcr_delay-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/lcr_delay-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/lcr_delay-swh.lv2/plugin.xml 2009-07-03 16:56:09.000000000 -0400
+@@ -197,20 +197,23 @@
+ The ammounts of the input and effect mixed to produce the output.
+
+
++
++
++
+
+-
++
+ L input
+
+
+-
++
+ R input
+
+
+-
++
+ L output
+
+
+-
++
+ R output
+
+
+diff -ur swh-lv2-1.0.15/plugins/matrix_ms_st-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/matrix_ms_st-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/matrix_ms_st-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/matrix_ms_st-swh.lv2/plugin.xml 2009-06-14 22:05:13.000000000 -0400
+@@ -27,17 +27,21 @@
+
+
+
+-
++
++
++
+ Mid
+
+-
++
+ Side
+
++
++
+
+-
++
+ Left
+
+-
++
+ Right
+
+
+diff -ur swh-lv2-1.0.15/plugins/matrix_spatialiser-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/matrix_spatialiser-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/matrix_spatialiser-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/matrix_spatialiser-swh.lv2/plugin.xml 2009-07-03 16:56:24.000000000 -0400
+@@ -142,10 +142,13 @@
+ plugin_data->current_s_gain = current_s_gain;
+ ]]>
+
+-
++
++
++
++
+ Input L
+
+-
++
+ Input R
+
+
+@@ -158,10 +161,12 @@
+ ]]>
+
+
+-
++
++
++
+ Output L
+
+-
++
+ Output R
+
+
+diff -ur swh-lv2-1.0.15/plugins/matrix_st_ms-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/matrix_st_ms-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/matrix_st_ms-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/matrix_st_ms-swh.lv2/plugin.xml 2009-06-14 22:05:10.000000000 -0400
+@@ -21,17 +21,21 @@
+ }
+ ]]>
+
+-
++
++
++
++
++
+ Left
+
+-
++
+ Right
+
+
+-
++
+ Mid
+
+-
++
+ Side
+
+
+diff -ur swh-lv2-1.0.15/plugins/plate-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/plate-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/plate-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/plate-swh.lv2/plugin.xml 2009-06-14 22:05:16.000000000 -0400
+@@ -109,15 +109,19 @@
+
+
+
+-
++
++
++
++
++
+ Input
+
+
+-
++
+ Left output
+
+
+-
++
+ Right output
+
+
+diff -ur swh-lv2-1.0.15/plugins/sc3-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/sc3-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/sc3-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/sc3-swh.lv2/plugin.xml 2009-07-03 16:56:34.000000000 -0400
+@@ -137,23 +137,28 @@
+
+
+
+-
++
++
++
+ Sidechain
+
++
++
++
+
+-
++
+ Left input
+
+
+-
++
+ Right input
+
+
+-
++
+ Left output
+
+
+-
++
+ Right output
+
+
+diff -ur swh-lv2-1.0.15/plugins/sc4-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/sc4-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/sc4-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/sc4-swh.lv2/plugin.xml 2009-07-03 16:54:48.000000000 -0400
+@@ -168,19 +168,22 @@
+
+
+
+-
++
++
++
++
+ Left input
+
+
+-
++
+ Right input
+
+
+-
++
+ Left output
+
+
+-
++
+ Right output
+
+
+diff -ur swh-lv2-1.0.15/plugins/se4-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/se4-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/se4-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/se4-swh.lv2/plugin.xml 2009-07-03 16:55:59.000000000 -0400
+@@ -164,20 +164,23 @@
+ The degree of gain expansion applied to the input signal, in decibels.
+
+
++
++
++
+
+-
++
+ Left input
+
+
+-
++
+ Right input
+
+
+-
++
+ Left output
+
+
+-
++
+ Right output
+
+
+Only in swh-lv2-port-groups/plugins/single_para-swh.lv2: .plugin.xml.swp
+diff -ur swh-lv2-1.0.15/plugins/split-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/split-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/split-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/split-swh.lv2/plugin.xml 2009-06-14 22:05:51.000000000 -0400
+@@ -23,17 +23,21 @@
+ }
+
+
+-
++
++
++
++
++
+ Input
+
+
+
+-
++
+ Output 1
+
+
+
+-
++
+ Output 2
+
+
+diff -ur swh-lv2-1.0.15/plugins/surround_encoder-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/surround_encoder-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/surround_encoder-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/surround_encoder-swh.lv2/plugin.xml 2009-06-14 22:05:23.000000000 -0400
+@@ -111,33 +111,37 @@
+ plugin_data->buffer_pos = buffer_pos;
+ ]]>
+
+-
++
+ L
+ Left channel input. Can be treated as per normal stereo recoding, except that the speaker should be at -22.5$^\circ$, rather than the normal stereo -30$^\circ$.
+
+
+-
++
++
++
+ R
+ Right channel input. As per left channel.
+
+
+-
++
+ C
+ Center channel input. Will be directly in front of the listener, stereo and mono compatible.
+
+
+-
++
+ S
+ Surround channel. Should sound from the rear speakers, may also leak into the left and right. Has slight delay and bandwidth reduction (cut below 100 Hz, and above 7 KHz) for leakage and noise reduction and enhanced psychoacoustic effects.
+
+ Not mono compatible.
+
++
++
+
+-
++
+ Lt
+
+
+-
++
+ Rt
+
+
+diff -ur swh-lv2-1.0.15/plugins/xfade-swh.lv2/plugin.xml swh-lv2-port-groups/plugins/xfade-swh.lv2/plugin.xml
+--- swh-lv2-1.0.15/plugins/xfade-swh.lv2/plugin.xml 2008-01-09 16:02:08.000000000 -0500
++++ swh-lv2-port-groups/plugins/xfade-swh.lv2/plugin.xml 2009-06-14 22:02:49.000000000 -0400
+@@ -34,24 +34,30 @@
+
+
+
+-
++
++
++
++
++
+ Input A left
+
+-
++
+ Input A right
+
+
+-
++
+ Input B left
+
+-
++
+ Input B right
+
++
++
+
+-
++
+ Output left
+
+-
++
+ Output right
+
+
+Only in swh-lv2-port-groups: swh-lv2-port-groups.patch
+diff -ur swh-lv2-1.0.15/xslt/turtle.xsl swh-lv2-port-groups/xslt/turtle.xsl
+--- swh-lv2-1.0.15/xslt/turtle.xsl 2008-01-09 16:02:07.000000000 -0500
++++ swh-lv2-port-groups/xslt/turtle.xsl 2009-06-16 23:33:26.000000000 -0400
+@@ -6,8 +6,20 @@
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
+ @prefix doap: <http://usefulinc.com/ns/doap#> .
+ @prefix swhext: <http://plugin.org.uk/extensions#> .
++@prefix pg: <http://lv2plug.in/ns/dev/port-groups#> .
+
+-swh: a :Plugin ;
++
++
++
++
++ -
++
++swh: a pg:Group ;
++ a pg: ;
++ :symbol "" ;
++ pg:source swh:- .
++
++swh: a :Plugin ;
+
+
+
+@@ -22,7 +34,8 @@
+
+
+- :pluginProperty :hardRtCapable ;
++
++ :pluginProperty :hardRtCapable ;
+
+
+
+@@ -64,6 +77,9 @@
+ :portProperty :sampleRate ;
+
+ :portProperty :toggled ;
++
++ pg:inGroup swh:- ;
++ pg:role pg: ;
+
+ ] ;