From 87d1a9337256015130c98f1cd6f368179018f07a Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 26 Jul 2020 01:40:33 +0100 Subject: [PATCH] Update blop, now builds on windows --- .../blop-lv2/01_fix-wavedata-prototype.patch | 26 ------------------- patches/blop-lv2/01_fix-win32-build.patch | 26 +++++++++++++++++++ plugins-todo/blop-lv2.json | 8 ------ plugins/blop.json | 8 ++++++ 4 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 patches/blop-lv2/01_fix-wavedata-prototype.patch create mode 100644 patches/blop-lv2/01_fix-win32-build.patch delete mode 100644 plugins-todo/blop-lv2.json create mode 100644 plugins/blop.json diff --git a/patches/blop-lv2/01_fix-wavedata-prototype.patch b/patches/blop-lv2/01_fix-wavedata-prototype.patch deleted file mode 100644 index 7320c8c..0000000 --- a/patches/blop-lv2/01_fix-wavedata-prototype.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/wavedata.c b/src/wavedata.c -index e574903..8ec3783 100644 ---- a/src/wavedata.c -+++ b/src/wavedata.c -@@ -58,7 +58,7 @@ wavedata_load(Wavedata* w, - typedef int (*DescFunc)(Wavedata*, unsigned long); - DescFunc desc_func = (DescFunc)dlsym(handle, wdat_descriptor_name); - if (desc_func) { -- retval = desc_func(w, sample_rate); -+ retval = desc_func(w, (unsigned long)sample_rate); - w->data_handle = handle; - return retval; - } -diff --git a/src/wdatutil.c b/src/wdatutil.c -index b3bf84e..86b5fb0 100644 ---- a/src/wdatutil.c -+++ b/src/wdatutil.c -@@ -249,7 +249,7 @@ wavedata_write_prototype(FILE* wdat_fp, - fprintf(wdat_fp, "int\n"); - fprintf( - wdat_fp, -- "blop_get_%s (Wavedata * w, double sample_rate, const char* bundle_path, const LV2_Feature* const* features)", -+ "blop_get_%s (Wavedata * w, unsigned long sample_rate)", - data_name); - } - diff --git a/patches/blop-lv2/01_fix-win32-build.patch b/patches/blop-lv2/01_fix-win32-build.patch new file mode 100644 index 0000000..3e0723a --- /dev/null +++ b/patches/blop-lv2/01_fix-win32-build.patch @@ -0,0 +1,26 @@ +diff --git a/src/wavedata.c b/src/wavedata.c +index 910577f..a926596 100644 +--- a/src/wavedata.c ++++ b/src/wavedata.c +@@ -28,7 +28,7 @@ + # include + # define dlopen(path, flags) LoadLibrary(path) + # define dlclose(lib) FreeLibrary((HMODULE)lib) +-# define dlsym(lib, sym) GetProcAddress((HMODULE)lib, sym) ++# define dlfunc(lib, sym) GetProcAddress((HMODULE)lib, sym) + # define snprintf _snprintf + #else + # include +@@ -55,10 +55,12 @@ wavedata_load(Wavedata* w, + free(lib_path); + + if (handle) { ++#ifndef _WIN32 + // Avoid pedantic warnings about fetching functions with dlsym + typedef void (*VoidFunc)(void); + typedef VoidFunc (*VoidFuncGetter)(void*, const char*); + VoidFuncGetter dlfunc = (VoidFuncGetter)dlsym; ++#endif + + typedef int (*DescFunc)(Wavedata*, unsigned long); + DescFunc desc_func = (DescFunc)dlfunc(handle, wdat_descriptor_name); diff --git a/plugins-todo/blop-lv2.json b/plugins-todo/blop-lv2.json deleted file mode 100644 index 152d6a8..0000000 --- a/plugins-todo/blop-lv2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "blop-lv2", - "lv2bundles": ["blop.lv2"], - "version": "1.0.0", - "dlbaseurl": "http://download.drobilla.net", - "dlext": "tar.bz2", - "buildtype": "waf" -} diff --git a/plugins/blop.json b/plugins/blop.json new file mode 100644 index 0000000..ba2e64b --- /dev/null +++ b/plugins/blop.json @@ -0,0 +1,8 @@ +{ + "name": "blop-lv2", + "lv2bundles": ["blop.lv2"], + "version": "e76724d58c39a52e3f47dbff40c011c54d9a0fdb", + "dlbaseurl": "http://git.drobilla.net/blop.lv2.git", + "dlmethod": "git", + "buildtype": "waf" +}