From f2d5ea07700c81fe63bc5ad7d4ff6ea6faa1a1ed Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 29 Oct 2023 10:41:03 +0100 Subject: [PATCH] Update some plugin definitions for helping mod-app Signed-off-by: falkTX --- plugins/package/lv2-examples/lv2-examples.mk | 13 ++----- .../mod-audio-mixers/mod-audio-mixers.mk | 14 +++----- .../mod-pitchshifter/mod-pitchshifter.mk | 6 +++- .../tap-lv2/02_fix-mac-win-build.patch | 36 +++++++++++++++++++ 4 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 plugins/package/tap-lv2/02_fix-mac-win-build.patch diff --git a/plugins/package/lv2-examples/lv2-examples.mk b/plugins/package/lv2-examples/lv2-examples.mk index 04d93a8c..99a05aea 100644 --- a/plugins/package/lv2-examples/lv2-examples.mk +++ b/plugins/package/lv2-examples/lv2-examples.mk @@ -10,17 +10,10 @@ LV2_EXAMPLES_SITE_METHOD = git LV2_EXAMPLES_DEPENDENCIES = host-python LV2_EXAMPLES_BUNDLES = eg-metro.lv2 eg-sampler.lv2 -LV2_EXAMPLES_TARGET_WAF = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python ./waf +LV2_EXAMPLES_TARGET_WAF = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python3 ./waf -# needed for git submodules -define LV2_EXAMPLES_EXTRACT_CMDS - rm -rf $(@D) - git clone --recursive $(LV2_EXAMPLES_SITE) $(@D) - (cd $(@D) && \ - git reset --hard $(LV2_EXAMPLES_VERSION) && \ - git submodule update) - touch $(@D)/.stamp_downloaded -endef +# needed for submodules support +LV2_EXAMPLES_PRE_DOWNLOAD_HOOKS += MOD_PLUGIN_BUILDER_DOWNLOAD_WITH_SUBMODULES define LV2_EXAMPLES_CONFIGURE_CMDS (cd $(@D); $(LV2_EXAMPLES_TARGET_WAF) configure --prefix=/usr) diff --git a/plugins/package/mod-audio-mixers/mod-audio-mixers.mk b/plugins/package/mod-audio-mixers/mod-audio-mixers.mk index 17d0030d..f4fb0746 100644 --- a/plugins/package/mod-audio-mixers/mod-audio-mixers.mk +++ b/plugins/package/mod-audio-mixers/mod-audio-mixers.mk @@ -5,20 +5,14 @@ ###################################### MOD_AUDIO_MIXERS_VERSION = 80367aa5a2ddacb19dbd85ca14123ed48fdbac6c -MOD_AUDIO_MIXERS_SITE = $(call github,moddevices,mod-audio-mixer-lv2,$(MOD_AUDIO_MIXERS_VERSION)) +MOD_AUDIO_MIXERS_SITE = https://github.com/moddevices/mod-audio-mixer-lv2.git +MOD_AUDIO_MIXERS_SITE_METHOD = git MOD_AUDIO_MIXERS_BUNDLES = mod-mixer.lv2 mod-mixer-stereo.lv2 MOD_AUDIO_MIXERS_TARGET_MAKE = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -# needed for git submodules -define MOD_AUDIO_MIXERS_EXTRACT_CMDS - rm -rf $(@D) - git clone --recursive https://github.com/moddevices/mod-audio-mixer-lv2.git $(@D) - (cd $(@D) && \ - git reset --hard $(MOD_AUDIO_MIXERS_VERSION) && \ - git submodule update) - touch $(@D)/.stamp_downloaded -endef +# needed for submodules support +MOD_AUDIO_MIXERS_PRE_DOWNLOAD_HOOKS += MOD_PLUGIN_BUILDER_DOWNLOAD_WITH_SUBMODULES define MOD_AUDIO_MIXERS_BUILD_CMDS $(MOD_AUDIO_MIXERS_TARGET_MAKE) diff --git a/plugins/package/mod-pitchshifter/mod-pitchshifter.mk b/plugins/package/mod-pitchshifter/mod-pitchshifter.mk index 0ff0fbe2..a5b2c05e 100644 --- a/plugins/package/mod-pitchshifter/mod-pitchshifter.mk +++ b/plugins/package/mod-pitchshifter/mod-pitchshifter.mk @@ -26,7 +26,11 @@ else ifdef BR2_cortex_a72 MOD_PITCHSHIFTER_WISDOM_FILE = harmonizer.wisdom.raspberrypi4 endif -ifeq ($(BR2_arm)$(BR2_aarch64)$(BR2_x86_64),y) +ifeq ($(BR2_PAWPAW),y) +define MOD_PITCHSHIFTER_PREBUILD_STEP + touch $(@D)/Shared_files/harmonizer.wisdom +endef +else ifeq ($(BR2_arm)$(BR2_aarch64)$(BR2_x86_64),y) define MOD_PITCHSHIFTER_PREBUILD_STEP cp $($(PKG)_PKGDIR)/$(MOD_PITCHSHIFTER_WISDOM_FILE) $(@D)/Shared_files/harmonizer.wisdom endef diff --git a/plugins/package/tap-lv2/02_fix-mac-win-build.patch b/plugins/package/tap-lv2/02_fix-mac-win-build.patch new file mode 100644 index 00000000..7d967b67 --- /dev/null +++ b/plugins/package/tap-lv2/02_fix-mac-win-build.patch @@ -0,0 +1,36 @@ +diff --git a/Makefile.mk b/Makefile.mk +index a6b54c3..a283e52 100644 +--- a/Makefile.mk ++++ b/Makefile.mk +@@ -3,8 +3,16 @@ + CC ?= gcc + + # flags +-CFLAGS += -O3 -funroll-loops -ffast-math -fomit-frame-pointer -fstrength-reduce -Wall -Werror -fPIC -DPIC -I../utils +-LDFLAGS += -shared -Wl,-O1 -Wl,--as-needed -Wl,--no-undefined -Wl,--strip-all -lm -lrt ++CFLAGS += -O3 -std=gnu99 -funroll-loops -ffast-math -fomit-frame-pointer -fstrength-reduce -Wall -Werror -fPIC -DPIC -I../utils ++LDFLAGS += -shared -lm ++ ++ifneq ($(MACOS),true) ++LDFLAGS += -Wl,-O1,--as-needed,--no-undefined,--strip-all ++endif ++ ++ifneq ($(MACOS)$(WINDOWS),true) ++LDFLAGS += -lrt ++endif + + ifneq ($(NOOPT),true) + CFLAGS += -mtune=generic -msse -msse2 -mfpmath=sse +diff --git a/dynamics/tap_dynamics.c b/dynamics/tap_dynamics.c +index 85ee18a..7f18ff3 100644 +--- a/dynamics/tap_dynamics.c ++++ b/dynamics/tap_dynamics.c +@@ -267,7 +267,7 @@ rms_env_process(rms_env *r, const rms_t x) { + + + +-inline ++static inline + float + get_table_gain(int mode, float level) { +