diff --git a/ladspa-find-plugin-path.patch b/ladspa-find-plugin-path.patch deleted file mode 100644 index f71951d..0000000 --- a/ladspa-find-plugin-path.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Dave Plater -Date: 2007-11-06 12:48:06 +0200 -Subject: Find plugins -References: -Upstream: email - -Allow binary listplugins to find plugins without LADSPA_PATH set. -Index: src/search.c -=================================================================== ---- src/search.c.orig 2007-11-06 12:48:06.000000000 +0200 -+++ src/search.c 2017-11-04 09:00:29.169621959 +0200 -@@ -23,7 +23,7 @@ - /* Search just the one directory. */ - static void - LADSPADirectoryPluginSearch --(const char * pcDirectory, -+(const char * pcDirectory, - LADSPAPluginSearchCallbackFunction fCallbackFunction) { - - char * pcFilename; -@@ -61,7 +61,7 @@ LADSPADirectoryPluginSearch - if (iNeedSlash) - strcat(pcFilename, "/"); - strcat(pcFilename, psDirectoryEntry->d_name); -- -+ - pvPluginHandle = dlopen(pcFilename, RTLD_LAZY); - if (pvPluginHandle) { - /* This is a file and the file is a shared library! */ -@@ -89,7 +89,7 @@ LADSPADirectoryPluginSearch - - /*****************************************************************************/ - --void -+void - LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction) { - - char * pcBuffer; -@@ -99,23 +99,24 @@ LADSPAPluginSearch(LADSPAPluginSearchCal - - pcLADSPAPath = getenv("LADSPA_PATH"); - if (!pcLADSPAPath) { -+ pcLADSPAPath = "/usr/local/lib/ladspa:/usr/lib/ladspa:/usr/local/lib64/ladspa:/usr/lib64/ladspa"; - fprintf(stderr, - "Warning: You do not have a LADSPA_PATH " - "environment variable set.\n"); -- return; -+ //return; - } -- -+ - pcStart = pcLADSPAPath; - while (*pcStart != '\0') { - pcEnd = pcStart; - while (*pcEnd != ':' && *pcEnd != '\0') - pcEnd++; -- -+ - pcBuffer = malloc(1 + pcEnd - pcStart); - if (pcEnd > pcStart) - strncpy(pcBuffer, pcStart, pcEnd - pcStart); - pcBuffer[pcEnd - pcStart] = '\0'; -- -+ - LADSPADirectoryPluginSearch(pcBuffer, fCallbackFunction); - free(pcBuffer); - diff --git a/ladspa-ldcommand.patch b/ladspa-ldcommand.patch new file mode 100644 index 0000000..074388f --- /dev/null +++ b/ladspa-ldcommand.patch @@ -0,0 +1,29 @@ +Index: src/Makefile +=================================================================== +--- src/Makefile.orig 2019-01-03 17:08:22.000000000 +0200 ++++ src/Makefile 2019-01-06 10:29:48.264066021 +0200 +@@ -29,6 +29,7 @@ PROGRAMS = ../bin/analyseplugin \ + ../bin/listplugins + CC = cc + CPP = c++ ++LD = ld + + ############################################################################### + # +@@ -37,10 +38,13 @@ CPP = c++ + + ../plugins/%.so: plugins/%.c ladspa.h gcc_exports.map + $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c +- $(LD) -o ../plugins/$*.so \ ++ $(CC) -o ../plugins/$*.so \ + plugins/$*.o \ +- -shared \ +- --version-script=gcc_exports.map ++ -shared \ ++ ${LIBRARIES} \ ++ $(CFLAGS) \ ++ -s \ ++ -Wl,--version-script=gcc_exports.map + + ../plugins/%.so: plugins/%.cpp ladspa.h gcc_exports.map + $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp diff --git a/ladspa-pie.patch b/ladspa-pie.patch deleted file mode 100644 index e662372..0000000 --- a/ladspa-pie.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Dave Plater - davejplater@gmail.co.za -Date: 2017-11-04 10:48:22 +0200 -Subject: Build position independent executables -References: -Upstream: email - -Build position independent executables. -Index: src/makefile -=================================================================== ---- src/makefile.orig 2017-11-04 10:51:34.635255160 +0200 -+++ src/makefile 2017-11-04 11:08:08.154323693 +0200 -@@ -14,14 +14,14 @@ INSTALL_BINARY_DIR = /usr/bin/ - # - - INCLUDES = -I. --LIBRARIES = -ldl -lm -+LIBRARIES = -fPIE -pie -ldl -lm - CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC - CXXFLAGS = $(CFLAGS) - PLUGINS = ../plugins/amp.so \ - ../plugins/delay.so \ - ../plugins/filter.so \ - ../plugins/noise.so \ -- ../plugins/sine.so -+ ../plugins/sine.so - PROGRAMS = ../bin/analyseplugin \ - ../bin/applyplugin \ - ../bin/listplugins -@@ -112,7 +112,7 @@ targets: $(PLUGINS) $(PROGRAMS) - # UTILITIES - # - --always: -+always: - - clean: - -rm -f `find . -name "*.o"` ../bin/* ../plugins/* diff --git a/ladspa.changes b/ladspa.changes index 28efaa7..ea16dac 100644 --- a/ladspa.changes +++ b/ladspa.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Sat Jan 5 10:53:13 UTC 2019 - davejplater@gmail.com + +- Update to version 1.4 and remove incorporated patches: + ladspa-find-plugin-path.patch and ladspa-pie.patch +- Modified ladspa.dif, one hunk was incorporated. +- Added ladspa-ldcommand.patch to fix plugin linking. +- Upstream changes: + *Rename Makefile. + *Modernise C++ #include style. + *Make some globals static. + *Use mkdir -p rather than mkdirhier during build. + *Use GCC export map to ensure only the ladspa_descriptor() + is exported. + *Put libraries at the end of link instructions. + *Package with version number in archive and directory names. + *Tweaks to documentation processing. + *Fix bug in LADSPA plugin search which did not handle shared + libraries that are not plugins correctly. + *Introduce a default LADSPA plugin search path. + ------------------------------------------------------------------- Sat Nov 4 08:39:00 UTC 2017 - davejplater@gmail.com diff --git a/ladspa.dif b/ladspa.dif index d1572a6..d78a00c 100644 --- a/ladspa.dif +++ b/ladspa.dif @@ -1,38 +1,15 @@ --- - src/makefile | 9 ++++++--- src/plugins/amp.c | 8 ++++---- src/plugins/delay.c | 8 ++++---- src/plugins/filter.c | 8 ++++---- src/plugins/noise.c | 8 ++++---- 5 files changed, 22 insertions(+), 19 deletions(-) ---- a/src/makefile -+++ b/src/makefile -@@ -27,6 +27,9 @@ PROGRAMS = ../bin/analyseplugin \ - ../bin/listplugins - CC = cc - CPP = c++ -+LD = cc -+MKDIRHIER = mkdir -p -+# MKDIRHIER = mkdirhier - - ############################################################################### # -@@ -59,9 +62,9 @@ test: /tmp/test.wav ../snd/noise.wav alw - @echo Test complete. - - install: targets -- -mkdirhier $(INSTALL_PLUGINS_DIR) -- -mkdirhier $(INSTALL_INCLUDE_DIR) -- -mkdirhier $(INSTALL_BINARY_DIR) -+ -$(MKDIRHIER) $(INSTALL_PLUGINS_DIR) -+ -$(MKDIRHIER) $(INSTALL_INCLUDE_DIR) -+ -$(MKDIRHIER) $(INSTALL_BINARY_DIR) - cp ../plugins/* $(INSTALL_PLUGINS_DIR) - cp ladspa.h $(INSTALL_INCLUDE_DIR) - cp ../bin/* $(INSTALL_BINARY_DIR) ---- a/src/plugins/amp.c -+++ b/src/plugins/amp.c +Index: src/plugins/amp.c +=================================================================== +--- src/plugins/amp.c.orig 2019-01-04 15:15:04.192234406 +0200 ++++ src/plugins/amp.c 2019-01-04 15:15:27.917159413 +0200 @@ -152,8 +152,8 @@ LADSPA_Descriptor * g_psStereoDescriptor /* _init() is called automatically when the plugin library is first @@ -55,9 +32,11 @@ deleteDescriptor(g_psMonoDescriptor); deleteDescriptor(g_psStereoDescriptor); } ---- a/src/plugins/delay.c -+++ b/src/plugins/delay.c -@@ -228,8 +228,8 @@ LADSPA_Descriptor * g_psDescriptor = NUL +Index: src/plugins/delay.c +=================================================================== +--- src/plugins/delay.c.orig 2019-01-04 15:15:04.192234406 +0200 ++++ src/plugins/delay.c 2019-01-04 15:15:27.917159413 +0200 +@@ -228,8 +228,8 @@ static LADSPA_Descriptor * g_psDescripto /* _init() is called automatically when the plugin library is first loaded. */ @@ -79,9 +58,11 @@ long lIndex; if (g_psDescriptor) { free((char *)g_psDescriptor->Label); ---- a/src/plugins/filter.c -+++ b/src/plugins/filter.c -@@ -252,8 +252,8 @@ LADSPA_Descriptor * g_psHPFDescriptor = +Index: src/plugins/filter.c +=================================================================== +--- src/plugins/filter.c.orig 2019-01-04 15:15:04.192234406 +0200 ++++ src/plugins/filter.c 2019-01-04 15:15:27.917159413 +0200 +@@ -252,8 +252,8 @@ static LADSPA_Descriptor * g_psHPFDescri /* _init() is called automatically when the plugin library is first loaded. */ @@ -103,9 +84,11 @@ deleteDescriptor(g_psLPFDescriptor); deleteDescriptor(g_psHPFDescriptor); } ---- a/src/plugins/noise.c -+++ b/src/plugins/noise.c -@@ -142,8 +142,8 @@ LADSPA_Descriptor * g_psDescriptor; +Index: src/plugins/noise.c +=================================================================== +--- src/plugins/noise.c.orig 2019-01-04 15:15:04.192234406 +0200 ++++ src/plugins/noise.c 2019-01-04 15:15:27.917159413 +0200 +@@ -142,8 +142,8 @@ static LADSPA_Descriptor * g_psDescripto /* _init() is called automatically when the plugin library is first loaded. */ diff --git a/ladspa.spec b/ladspa.spec index 1398cc1..15c6f89 100644 --- a/ladspa.spec +++ b/ladspa.spec @@ -1,7 +1,7 @@ # # spec file for package ladspa # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,19 +17,19 @@ Name: ladspa -Version: 1.13 +Version: 1.14 Release: 0 Summary: The Linux Audio Developer's Simple Plug-In API -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Productivity/Multimedia/Sound/Utilities Url: http://www.ladspa.org/ Source: http://www.ladspa.org/download/%{name}_sdk_%{version}.tgz Source1: baselibs.conf Patch0: ladspa.dif -Patch1: ladspa-find-plugin-path.patch -Patch2: ladspa-pie.patch +#PATCH-FIX-UPSTREAM ladspa-ldcommand.patch davejplater@gmail.com - ld commands linked static libs, +# and generated Missing build-id warnings so use cc instead. +Patch1: ladspa-ldcommand.patch BuildRequires: gcc-c++ -BuildRoot: %{_tmppath}/%{name}-%{version}-build AutoReq: on Autoprov: off @@ -41,25 +41,18 @@ dynamically. This package contains the plugins built from LADSPA SDK. %package devel Summary: Include Files mandatory for Development Group: Development/Libraries/C and C++ -%if 0%{?suse_version} > 1110 BuildArch: noarch -%endif %description devel This package contains include files to develop LADSPA plugins. %prep -%setup -q -n ladspa_sdk -%patch0 -p1 -%patch1 -%patch2 -ln -s ../ladspa.h src/plugins/ladspa.h +%setup -q -n %{name}_sdk_%{version} +%autopatch -p0 %build -# This package failed when testing with -Wl,-as-needed being default. -# So we disable it here, if you want to retest, just delete this comment and the line below. -export SUSE_ASNEEDED=0 -make -C src %{?_smp_mflags} CFLAGS="%{optflags} -fPIC -ggdb" targets +export LADSPA_PATH="%{_libdir}/ladspa" +make -C src CFLAGS='-I. %{optflags} -fPIC -ggdb -DDEFAULT_LADSPA_PATH=\"%{_libdir}/ladspa/\"' targets %install make -C src \ @@ -74,6 +67,7 @@ ln -sf %{_includedir}/ladspa.h %{buildroot}%{_docdir}/%{name}-devel/ladspa.h.txt %files %defattr(-,root,root) %doc README +%license doc/COPYING %{_libdir}/ladspa %{_bindir}/* diff --git a/ladspa_sdk_1.13.tgz b/ladspa_sdk_1.13.tgz deleted file mode 100644 index d0b7084..0000000 --- a/ladspa_sdk_1.13.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5ed3f4f253a0f6c1b7a1f4b8cf62376ca9f51d999650dd822650c43852d306b -size 70540 diff --git a/ladspa_sdk_1.14.tgz b/ladspa_sdk_1.14.tgz new file mode 100644 index 0000000..34104ec --- /dev/null +++ b/ladspa_sdk_1.14.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0e744f5b46801cb282e734091f5e8d9b87d841173183564c88ff2157f80d6e9 +size 70614