Skip to content

Commit

Permalink
Fix macOS builds for a few plugins
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 29, 2023
1 parent 6c0d4cd commit 4868c21
Show file tree
Hide file tree
Showing 8 changed files with 1,517 additions and 10 deletions.
1,442 changes: 1,442 additions & 0 deletions plugins/package/caps-lv2/005_fix-macos-build.patch

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions plugins/package/gxquack/01_fix-macos-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/plugin/gx_quack.cpp b/plugin/gx_quack.cpp
index f416239..c68aac9 100644
--- a/plugin/gx_quack.cpp
+++ b/plugin/gx_quack.cpp
@@ -26,8 +26,13 @@

///////////////////////// MACRO SUPPORT ////////////////////////////////

+#ifndef __APPLE__
#define __rt_func __attribute__((section(".rt.text")))
#define __rt_data __attribute__((section(".rt.data")))
+#else
+#define __rt_func
+#define __rt_data
+#endif

///////////////////////// FAUST SUPPORT ////////////////////////////////

14 changes: 14 additions & 0 deletions plugins/package/mod-audio-mixers/02_fix-mac-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/Makefile b/Makefile
index 4afe655..9cd20b5 100644
--- a/Makefile
+++ b/Makefile
@@ -33,9 +33,6 @@ gen: plugins dpf/utils/lv2_ttl_generator
#@$(CURDIR)/dpf/utils/generate-ttl.sh
cp plugins/$(MIXER_MONO)/lv2-data/* bin/$(MIXER_MONO).lv2/
cp plugins/$(MIXER_STEREO)/lv2-data/* bin/$(MIXER_STEREO).lv2/
-ifeq ($(MACOS),true)
- @$(CURDIR)/dpf/utils/generate-vst-bundles.sh
-endif

dpf/utils/lv2_ttl_generator:
$(MAKE) -C dpf/utils/lv2-ttl-generator
14 changes: 14 additions & 0 deletions plugins/package/mod-cv-plugins/01_fix-macos-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/source/mod-logic-operators/Makefile b/source/mod-logic-operators/Makefile
index 73645f2..21bb552 100644
--- a/source/mod-logic-operators/Makefile
+++ b/source/mod-logic-operators/Makefile
@@ -25,9 +25,6 @@ ifneq ($(CROSS_COMPILING),true)
gen: plugins dpf/utils/lv2_ttl_generator
#@$(CURDIR)/dpf/utils/generate-ttl.sh
cp -r plugins/logic-operators/lv2-data/* bin/logic-operators.lv2/
-ifeq ($(MACOS),true)
- @$(CURDIR)/dpf/utils/generate-vst-bundles.sh
-endif

dpf/utils/lv2_ttl_generator:
$(MAKE) -C dpf/utils/lv2-ttl-generator
19 changes: 19 additions & 0 deletions plugins/package/mod-pitchshifter/02_fix-macos-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/Makefile.mk b/Makefile.mk
index edb804b..0e9d6d8 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -3,8 +3,12 @@
CXX ?= g++

# flags
-CXXFLAGS += -O3 -ffast-math -Wall -fPIC -DPIC $(shell pkg-config --cflags fftw3f) -I. -I../Shared_files
-LDFLAGS += -shared -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -Wl,--strip-all $(shell pkg-config --libs fftw3f) -larmadillo -lm
+CXXFLAGS += -O3 -ffast-math -Wall -fPIC -DPIC $(shell pkg-config --cflags fftw3f) -I. -I../Shared_files -std=gnu++11
+LDFLAGS += -shared $(shell pkg-config --libs fftw3f) -larmadillo -lm
+
+ifneq ($(MACOS),true)
+LDFLAGS += -Wl,-O1,--as-needed,--no-undefined,--strip-all
+endif

ifneq ($(NOOPT),true)
CXXFLAGS += -mtune=generic -msse -msse2 -mfpmath=sse
2 changes: 1 addition & 1 deletion plugins/package/setbfree-mod/setbfree-mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ define SETBFREE_MOD_INSTALL_TARGET_CMDS
$(SETBFREE_MOD_TARGET_MAKE) install DESTDIR=$(TARGET_DIR)

install -d $(TARGET_DIR)/usr/lib/lv2/b_whirl_mod
cp $(TARGET_DIR)/usr/lib/lv2/b_whirl/*.* $(TARGET_DIR)/usr/lib/lv2/b_whirl_mod/
cp -rL $($(PKG)_PKGDIR)/b_whirl_mod/* $(TARGET_DIR)/usr/lib/lv2/b_whirl_mod/
cp $(TARGET_DIR)/usr/lib/lv2/b_whirl/*.so $(TARGET_DIR)/usr/lib/lv2/b_whirl_mod/
endef

$(eval $(generic-package))
10 changes: 5 additions & 5 deletions plugins/package/setbfree/setbfree.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ endef

define SETBFREE_INSTALL_TARGET_CMDS
$(SETBFREE_TARGET_MAKE) install DESTDIR=$(TARGET_DIR)
cp -rL $($(PKG)_PKGDIR)/b_synth/* $(TARGET_DIR)/usr/lib/lv2/b_synth/
cp -rL $($(PKG)_PKGDIR)/b_synth/* $(TARGET_DIR)/usr/lib/lv2/b_synth/

# b_whirl has been manually splitted into separate bundles
mv $(TARGET_DIR)/usr/lib/lv2/b_whirl/b_whirl.so $(TARGET_DIR)/usr/lib/lv2/b_whirl.so
mv $(TARGET_DIR)/usr/lib/lv2/b_whirl/b_whirl.* $(TARGET_DIR)/usr/lib/lv2/
rm -rf $(TARGET_DIR)/usr/lib/lv2/b_whirl/
cp -rL $($(PKG)_PKGDIR)/b_whirl $(TARGET_DIR)/usr/lib/lv2/
cp $(TARGET_DIR)/usr/lib/lv2/b_whirl.so $(TARGET_DIR)/usr/lib/lv2/b_whirl/
rm $(TARGET_DIR)/usr/lib/lv2/b_whirl.so
cp -rL $($(PKG)_PKGDIR)/b_whirl $(TARGET_DIR)/usr/lib/lv2/
cp $(TARGET_DIR)/usr/lib/lv2/b_whirl.* $(TARGET_DIR)/usr/lib/lv2/b_whirl/
rm $(TARGET_DIR)/usr/lib/lv2/b_whirl.*
endef

$(eval $(generic-package))
8 changes: 4 additions & 4 deletions plugins/package/sooperlooper-lv2/01_fix-win-mac-build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ index 3bfcf9c..f33a527 100644
#include <math.h>
#include <lv2.h>
#include <string.h>
+#ifdef _WIN64
+#define MAXLONG UINT32_MAX
+#if defined(__APPLE__) || defined(_WIN32)
+#define MAXLONG (sizeof(long)-1U)
+#else
+#include <values.h>
+#endif
Expand Down Expand Up @@ -64,8 +64,8 @@ index 6798a04..27ee190 100644
#include <math.h>
#include <lv2.h>
#include <string.h>
+#ifdef _WIN64
+#define MAXLONG UINT32_MAX
+#if defined(__APPLE__) || defined(_WIN32)
+#define MAXLONG (sizeof(long)-1U)
+#else
+#include <values.h>
+#endif
Expand Down

0 comments on commit 4868c21

Please sign in to comment.