Skip to content

Commit

Permalink
fix: update dpf patches to apply cleanly again
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
  • Loading branch information
SpotlightKid committed Nov 19, 2024
1 parent cf284a2 commit 1d010ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
26 changes: 8 additions & 18 deletions patches/dpf/fix-lv2-version-export.patch
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp
index c074109..1bce6b0 100644
index ba3cb196..4a238eb9 100644
--- a/distrho/src/DistrhoPluginLV2export.cpp
+++ b/distrho/src/DistrhoPluginLV2export.cpp
@@ -746,16 +746,11 @@ void lv2_generate_ttl(const char* const basename)
{
const uint32_t version(plugin.getVersion());
@@ -1183,8 +1183,8 @@ void lv2_generate_ttl(const char* const basename)
const uint32_t microVersion = (version & 0x0000FF) >> 0;

- const uint32_t majorVersion = (version & 0xFF0000) >> 16;
- const uint32_t microVersion = (version & 0x00FF00) >> 8;
- /* */ uint32_t minorVersion = (version & 0x0000FF) >> 0;
+ const uint32_t minorVersion = (version & 0x00FF00) >> 8;
+ const uint32_t microVersion = (version & 0x0000FF) >> 0;

- // NOTE: LV2 ignores 'major' version and says 0 for minor is pre-release/unstable.
// NOTE: LV2 ignores 'major' version and says 0 for minor is pre-release/unstable.
- if (majorVersion > 0)
- minorVersion += 2;
-
- pluginString += " lv2:microVersion " + String(microVersion) + " ;\n";
- pluginString += " lv2:minorVersion " + String(minorVersion) + " .\n";
+ pluginString += " lv2:minorVersion " + String(minorVersion) + " ;\n";
+ pluginString += " lv2:microVersion " + String(microVersion) + " .\n";
}
+ if (majorVersion > 0 && minorVersion == 0)
+ minorVersion = 2;

pluginFile << pluginString << std::endl;
pluginString += " lv2:microVersion " + String(microVersion) + " ;\n";
pluginString += " lv2:minorVersion " + String(minorVersion) + " .\n";
14 changes: 7 additions & 7 deletions patches/dpf/no-port-name-lv2-prefix.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp
index c074109..b6b2875 100644
index ba3cb196..a8b7ef76 100644
--- a/distrho/src/DistrhoPluginLV2export.cpp
+++ b/distrho/src/DistrhoPluginLV2export.cpp
@@ -422,7 +422,7 @@ void lv2_generate_ttl(const char* const basename)
@@ -490,7 +490,7 @@ void lv2_generate_ttl(const char* const basename)
pluginString += " a lv2:InputPort, lv2:AudioPort ;\n";

pluginString += " lv2:index " + String(portIndex) + " ;\n";
Expand All @@ -11,7 +11,7 @@ index c074109..b6b2875 100644
pluginString += " lv2:name \"" + port.name + "\" ;\n";

if (port.hints & kAudioPortIsSidechain)
@@ -452,7 +452,7 @@ void lv2_generate_ttl(const char* const basename)
@@ -586,7 +586,7 @@ void lv2_generate_ttl(const char* const basename)
pluginString += " a lv2:OutputPort, lv2:AudioPort ;\n";

pluginString += " lv2:index " + String(portIndex) + " ;\n";
Expand All @@ -20,7 +20,7 @@ index c074109..b6b2875 100644
pluginString += " lv2:name \"" + port.name + "\" ;\n";

if (port.hints & kAudioPortIsSidechain)
@@ -471,7 +471,7 @@ void lv2_generate_ttl(const char* const basename)
@@ -665,7 +665,7 @@ void lv2_generate_ttl(const char* const basename)
pluginString += " a lv2:InputPort, atom:AtomPort ;\n";
pluginString += " lv2:index " + String(portIndex) + " ;\n";
pluginString += " lv2:name \"Events Input\" ;\n";
Expand All @@ -29,7 +29,7 @@ index c074109..b6b2875 100644
pluginString += " rsz:minimumSize " + String(DISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE) + " ;\n";
pluginString += " atom:bufferType atom:Sequence ;\n";
# if (DISTRHO_PLUGIN_WANT_STATE && DISTRHO_PLUGIN_HAS_UI)
@@ -492,7 +492,7 @@ void lv2_generate_ttl(const char* const basename)
@@ -693,7 +693,7 @@ void lv2_generate_ttl(const char* const basename)
pluginString += " a lv2:OutputPort, atom:AtomPort ;\n";
pluginString += " lv2:index " + String(portIndex) + " ;\n";
pluginString += " lv2:name \"Events Output\" ;\n";
Expand All @@ -38,7 +38,7 @@ index c074109..b6b2875 100644
pluginString += " rsz:minimumSize " + String(DISTRHO_PLUGIN_MINIMUM_BUFFER_SIZE) + " ;\n";
pluginString += " atom:bufferType atom:Sequence ;\n";
# if (DISTRHO_PLUGIN_WANT_STATE && DISTRHO_PLUGIN_HAS_UI)
@@ -510,7 +510,7 @@ void lv2_generate_ttl(const char* const basename)
@@ -718,7 +718,7 @@ void lv2_generate_ttl(const char* const basename)
pluginString += " a lv2:OutputPort, lv2:ControlPort ;\n";
pluginString += " lv2:index " + String(portIndex) + " ;\n";
pluginString += " lv2:name \"Latency\" ;\n";
Expand All @@ -47,7 +47,7 @@ index c074109..b6b2875 100644
pluginString += " lv2:designation lv2:latency ;\n";
pluginString += " lv2:portProperty lv2:reportsLatency, lv2:integer, <" LV2_PORT_PROPS__notOnGUI "> ;\n";
pluginString += " ] ;\n\n";
@@ -561,7 +561,7 @@ void lv2_generate_ttl(const char* const basename)
@@ -776,7 +776,7 @@ void lv2_generate_ttl(const char* const basename)
String symbol(plugin.getParameterSymbol(i));

if (symbol.isEmpty())
Expand Down

0 comments on commit 1d010ae

Please sign in to comment.