ladspa-sdk: initial add 1.13

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
Andreas Müller
2016-09-19 00:11:17 +02:00
parent cfea5be3be
commit 35ff3f4532
3 changed files with 173 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
From f3cbe95449fd6346933179f13d9ce23216a148fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Sun, 18 Sep 2016 22:14:59 +0200
Subject: [PATCH] do not pin build flags - use defaults
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstrem-Status: Inappropriate [cross-specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/makefile | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/makefile b/src/makefile
index 886237f..ace5266 100644
--- a/src/makefile
+++ b/src/makefile
@@ -15,8 +15,6 @@ INSTALL_BINARY_DIR = /usr/bin/
INCLUDES = -I.
LIBRARIES = -ldl -lm
-CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC
-CXXFLAGS = $(CFLAGS)
PLUGINS = ../plugins/amp.so \
../plugins/delay.so \
../plugins/filter.so \
@@ -25,8 +23,6 @@ PLUGINS = ../plugins/amp.so \
PROGRAMS = ../bin/analyseplugin \
../bin/applyplugin \
../bin/listplugins
-CC = cc
-CPP = c++
###############################################################################
#
@@ -35,11 +31,11 @@ CPP = c++
../plugins/%.so: plugins/%.c ladspa.h
$(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
- $(LD) -o ../plugins/$*.so plugins/$*.o -shared
+ $(LD) -o ../plugins/$*.so plugins/$*.o -shared $(LDLDFLAGS)
../plugins/%.so: plugins/%.cpp ladspa.h
$(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
- $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
+ $(CPP) -o ../plugins/$*.so plugins/$*.o -shared $(LDFLAGS)
###############################################################################
#
@@ -90,17 +86,17 @@ targets: $(PLUGINS) $(PROGRAMS)
#
../bin/applyplugin: applyplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
+ $(CC) $(CFLAGS) $(LDFLAGS) \
-o ../bin/applyplugin \
applyplugin.o load.o default.o
../bin/analyseplugin: analyseplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
+ $(CC) $(CFLAGS) $(LDFLAGS) \
-o ../bin/analyseplugin \
analyseplugin.o load.o default.o
../bin/listplugins: listplugins.o search.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
+ $(CC) $(CFLAGS) $(LDFLAGS) \
-o ../bin/listplugins \
listplugins.o search.o
--
2.5.5

View File

@@ -0,0 +1,55 @@
From 3a3b4f3895ab18a60a734017fcaa22c1fdbabf6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Mon, 19 Sep 2016 00:06:04 +0200
Subject: [PATCH] Use fallback for plugindir in case env. var LADSPA_PATH is
not set
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Same as [1]
[1] https://git.archlinux.org/svntogit/packages.git/tree/trunk/fallback-ladspa-path.patch?h=packages/ladspa
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/load.c | 4 +++-
src/search.c | 5 +----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/load.c b/src/load.c
index c2a5aa7..72c4896 100644
--- a/src/load.c
+++ b/src/load.c
@@ -54,7 +54,9 @@ dlopenLADSPA(const char * pcFilename, int iFlag) {
to search. */
pcLADSPAPath = getenv("LADSPA_PATH");
-
+ if (! pcLADSPAPath)
+ pcLADSPAPath = "/usr/lib/ladspa";
+
if (pcLADSPAPath) {
pcStart = pcLADSPAPath;
diff --git a/src/search.c b/src/search.c
index 0006712..009f2c6 100644
--- a/src/search.c
+++ b/src/search.c
@@ -99,10 +99,7 @@ LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction) {
pcLADSPAPath = getenv("LADSPA_PATH");
if (!pcLADSPAPath) {
- fprintf(stderr,
- "Warning: You do not have a LADSPA_PATH "
- "environment variable set.\n");
- return;
+ pcLADSPAPath = "/usr/lib/ladspa";
}
pcStart = pcLADSPAPath;
--
2.5.5

View File

@@ -0,0 +1,43 @@
SUMMARY = "Linux Audio Developer's Simple Plug-in API, examples and tools"
LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://doc/COPYING;md5=6fd75d9d2ba6776dcdc4d5257eeab3dd"
#inherit autotools pkgconfig perlnative
DEPENDS += " \
fftw \
"
SRC_URI = " \
http://slackware.uk/slacky/slackware-13.0/multimedia/ladspa/${PV}/src/ladspa_sdk_${PV}.tgz \
file://0001-do-not-pin-flags-for-native.patch \
file://0002-Use-fallback-for-plugindir-in-case-env.-var-LADSPA_P.patch \
"
SRC_URI[md5sum] = "671be3e1021d0722cadc7fb27054628e"
SRC_URI[sha256sum] = "b5ed3f4f253a0f6c1b7a1f4b8cf62376ca9f51d999650dd822650c43852d306b"
S = "${WORKDIR}/ladspa_sdk"
CFLAGS += "-I. -fPIC"
CXXFLAGS += "-I. -fPIC"
LDFLAGS += "-ldl -lm"
do_compile() {
# ld does not accept -Wl -> remove (see patch)
export LDLDFLAGS=`echo ${LDFLAGS} | sed s:-Wl,::g`
cd ${S}/src
oe_runmake targets
}
do_install() {
install -d ${D}${bindir}
install -m 0755 ${S}/bin/* ${D}${bindir}
install -d ${D}${libdir}/ladspa
install -m 0644 ${S}/plugins/* ${D}${libdir}/ladspa
install -d ${D}${includedir}
install -m 0644 ${S}/src/ladspa.h ${D}${includedir}
}
FILES_${PN} += "${libdir}/ladspa"