From f29d569cd33a73da5ad675f43a34ad53c5cc9bc6 Mon Sep 17 00:00:00 2001
From: davidovski <david@davidovski.xyz>
Date: Thu, 2 Feb 2023 14:10:02 +0000
Subject: Work

---
 skip/lsp-plugins/lsp-plugins.xibuild | 32 ++++++++++++++++++++++++++++++++
 skip/lsp-plugins/null.patch          | 13 +++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 skip/lsp-plugins/lsp-plugins.xibuild
 create mode 100644 skip/lsp-plugins/null.patch

(limited to 'skip/lsp-plugins')

diff --git a/skip/lsp-plugins/lsp-plugins.xibuild b/skip/lsp-plugins/lsp-plugins.xibuild
new file mode 100644
index 0000000..6f494b9
--- /dev/null
+++ b/skip/lsp-plugins/lsp-plugins.xibuild
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+NAME="lsp-plugins"
+DESC="Collection of free plugins compatible with LADSPA, LV2 and LinuxVST"
+
+MAKEDEPS="cairo jack ladspa libsndfile libxrandr lv2 mesa"
+
+PKG_VER=1.2.3
+SOURCE="https://github.com/sadko4u/lsp-plugins/releases/download/$PKG_VER/lsp-plugins-src-$PKG_VER.tar.gz"
+
+ADDITIONAL="
+null.patch
+"
+
+prepare () {
+    apply_patches
+}
+
+build() {
+	export CFLAGS="$CFLAGS -O2 -flto=auto -Wno-alloc-size-larger-than"
+	export CXXFLAGS="$CFLAGS -O2 -flto=auto -Wno-alloc-size-larger-than"
+	make \
+		PREFIX=/usr \
+		ADD_FEATURES=xdg \
+		config
+	make PREFIX=/usr
+}
+
+package() {
+	make DESTDIR="$PKG_DEST" PREFIX=/usr install
+}
+
diff --git a/skip/lsp-plugins/null.patch b/skip/lsp-plugins/null.patch
new file mode 100644
index 0000000..6521e1f
--- /dev/null
+++ b/skip/lsp-plugins/null.patch
@@ -0,0 +1,13 @@
+diff --git a/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h b/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h
+index 9571a2e..2c484df 100644
+--- a/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h
++++ b/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/common/libpath.h
+@@ -241,7 +241,7 @@ namespace lsp
+         // Open file for reading
+         FILE *fd = fopen("/proc/self/maps", "r");
+         if (fd == NULL)
+-            return NULL;
++            return false;
+ 
+         char *line      = NULL;
+         ssize_t len     = 0;
-- 
cgit v1.2.1