Группа :: Звук
Пакет: zam-plugins
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: zam-plugins-unbundle-zita-convolver.patch
Скачать
Скачать
diff --git a/Makefile.mk b/Makefile.mk
index 7588326..87c08a1 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -85,6 +85,14 @@ ifeq ($(LINUX),true)
HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true)
HAVE_JACK = $(shell pkg-config --exists jack && echo true)
HAVE_LIBLO = $(shell pkg-config --exists liblo && echo true)
+
+# Allow to use system provided libs
+ifeq ($(USE_SYSTEM_LIBS),1)
+HAVE_ZITA_CONVOLVER = true
+ZITA_CONVOLVER_LIBS = -lzita-convolver
+export HAVE_ZITA_CONVOLVER
+endif
+
endif
ifeq ($(MACOS),true)
diff --git a/plugins/ZamHeadX2/Makefile b/plugins/ZamHeadX2/Makefile
index 24bfe1d..cd8e06a 100644
--- a/plugins/ZamHeadX2/Makefile
+++ b/plugins/ZamHeadX2/Makefile
@@ -12,8 +12,11 @@ NAME = ZamHeadX2
# --------------------------------------------------------------
# Files to build
-OBJS_DSP = \
- ../../lib/zita-convolver-3.1.0/zita-convolver.cpp.o \
+ifneq ($(HAVE_ZITA_CONVOLVER),true)
+OBJS_DSP = ../../lib/zita-convolver-3.1.0/zita-convolver.cpp.o
+endif
+
+OBJS_DSP += \
convolution.cpp.o \
ZamHeadX2Plugin.cpp.o
@@ -48,6 +51,11 @@ else
TARGETS += lv2_dsp
endif
+ifeq ($(HAVE_ZITA_CONVOLVER),true)
+BASE_FLAGS += -DHAVE_ZITA_CONVOLVER
+LINK_FLAGS += $(ZITA_CONVOLVER_LIBS)
+endif
+
TARGETS += vst
all: $(TARGETS)
diff --git a/plugins/ZamHeadX2/convolution.hpp b/plugins/ZamHeadX2/convolution.hpp
index ddf3d08..03e9d55 100644
--- a/plugins/ZamHeadX2/convolution.hpp
+++ b/plugins/ZamHeadX2/convolution.hpp
@@ -19,7 +19,11 @@
#ifndef CONVOLUTION_H_
#define CONVOLUTION_H_
+#ifdef HAVE_ZITA_CONVOLVER
+#include "zita-convolver.h"
+#else
#include "../../lib/zita-convolver-3.1.0/zita-convolver.h"
+#endif
#define MAX_CHANNEL_MAPS (4)
#define VERBOSE_printf(x, ...)
diff --git a/plugins/ZamVerb/Makefile b/plugins/ZamVerb/Makefile
index cfa412c..d65dd1e 100644
--- a/plugins/ZamVerb/Makefile
+++ b/plugins/ZamVerb/Makefile
@@ -15,8 +15,11 @@ NAME = ZamVerb
OBJS_DSP = \
ZamVerbPlugin.cpp.o \
ZamVerbImpulses.cpp.o \
- convolution.cpp.o \
- ../../lib/zita-convolver-3.1.0/zita-convolver.cpp.o
+ convolution.cpp.o
+
+ifneq ($(HAVE_ZITA_CONVOLVER),true)
+OBJS_DSP += ../../lib/zita-convolver-3.1.0/zita-convolver.cpp.o
+endif
OBJS_UI = \
ZamVerbArtwork.cpp.o \
@@ -28,7 +31,6 @@ OBJS_UI = \
include ../Makefile.mk
# --------------------------------------------------------------
-# Enable all possible plugin types
ifeq ($(HAVE_JACK),true)
TARGETS += jack
@@ -49,6 +51,11 @@ else
TARGETS += lv2_dsp
endif
+ifeq ($(HAVE_ZITA_CONVOLVER),true)
+BASE_FLAGS += -DHAVE_ZITA_CONVOLVER
+LINK_FLAGS += $(ZITA_CONVOLVER_LIBS)
+endif
+
TARGETS += vst
all: $(TARGETS)
diff --git a/plugins/ZamVerb/convolution.cpp b/plugins/ZamVerb/convolution.cpp
index 517a3cb..48a8d8c 100644
--- a/plugins/ZamVerb/convolution.cpp
+++ b/plugins/ZamVerb/convolution.cpp
@@ -42,7 +42,6 @@
#include <pthread.h>
#include <assert.h>
-#include "../../lib/zita-convolver-3.1.0/zita-convolver.h"
#include <samplerate.h>
#include "convolution.hpp"
#include "ZamVerbImpulses.hpp"
diff --git a/plugins/ZamVerb/convolution.hpp b/plugins/ZamVerb/convolution.hpp
index 4eeada5..666f2a5 100644
--- a/plugins/ZamVerb/convolution.hpp
+++ b/plugins/ZamVerb/convolution.hpp
@@ -19,7 +19,11 @@
#ifndef CONVOLUTION_H_
#define CONVOLUTION_H_
+#ifdef HAVE_ZITA_CONVOLVER
+#include "zita-convolver.h"
+#else
#include "../../lib/zita-convolver-3.1.0/zita-convolver.h"
+#endif
#define MAX_CHANNEL_MAPS (4)
#define VERBOSE_printf(x, ...)