Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 5)
@@ -0,0 +1,60 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url = $(DOWNLOAD_SERVER)/sources/packages/m/ladspa
+
+versions = 1.17
+pkgname = ladspa
+suffix = tar.gz
+
+tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+patches = $(CURDIR)/patches/ladspa-1.17-make.patch
+patches += $(CURDIR)/patches/ladspa-1.17-ladspa-path.patch
+patches += $(CURDIR)/patches/ladspa-1.17-memleak.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======" ; \
+ for tarball in $(tarballs) ; do \
+ echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+ done ; wait
+
+$(sha1s): $(tarballs)
+ @for sha in $@ ; do \
+ echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+ echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+ touch $$sha ; \
+ echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+ sha1sum --check $$sha ; ret="$$?" ; \
+ if [ "$$ret" == "1" ]; then \
+ echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+ exit 1 ; \
+ fi ; \
+ done
+
+$(patches): $(sha1s)
+ @echo -e "\n======= Create Patches =======\n" ; \
+ ( cd create-1.17-make-patch ; ./create.patch.sh ) ; \
+ ( cd create-1.17-ladspa-path-patch ; ./create.patch.sh ) ; \
+ ( cd create-1.17-memleak-patch ; ./create.patch.sh ) ; \
+ echo -e "\n"
+
+download_clean:
+ @rm -f $(tarballs) $(sha1s) $(patches)
Index: create-1.17-ladspa-path-patch/create.patch.sh
===================================================================
--- create-1.17-ladspa-path-patch/create.patch.sh (nonexistent)
+++ create-1.17-ladspa-path-patch/create.patch.sh (revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.17
+
+tar --files-from=file.list -xzvf ../ladspa-$VERSION.tar.gz
+mv ladspa-$VERSION ladspa-$VERSION-orig
+
+cp -rf ./ladspa-$VERSION-new ./ladspa-$VERSION
+
+diff --unified -Nr ladspa-$VERSION-orig ladspa-$VERSION > ladspa-$VERSION-ladspa-path.patch
+
+mv ladspa-$VERSION-ladspa-path.patch ../patches
+
+rm -rf ./ladspa-$VERSION
+rm -rf ./ladspa-$VERSION-orig
Property changes on: create-1.17-ladspa-path-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-1.17-ladspa-path-patch/file.list
===================================================================
--- create-1.17-ladspa-path-patch/file.list (nonexistent)
+++ create-1.17-ladspa-path-patch/file.list (revision 5)
@@ -0,0 +1 @@
+ladspa-1.17/src/search.c
Index: create-1.17-ladspa-path-patch/ladspa-1.17-new/src/search.c
===================================================================
--- create-1.17-ladspa-path-patch/ladspa-1.17-new/src/search.c (nonexistent)
+++ create-1.17-ladspa-path-patch/ladspa-1.17-new/src/search.c (revision 5)
@@ -0,0 +1,127 @@
+/* search.c
+
+ Free software by Richard W.E. Furse. Do with as you will. No
+ warranty. */
+
+/*****************************************************************************/
+
+#include <dirent.h>
+#include <dlfcn.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+/*****************************************************************************/
+
+#include "ladspa.h"
+#include "utils.h"
+
+/*****************************************************************************/
+
+/* Search just the one directory. */
+static void
+LADSPADirectoryPluginSearch
+(const char * pcDirectory,
+ LADSPAPluginSearchCallbackFunction fCallbackFunction) {
+
+ char * pcFilename;
+ DIR * psDirectory;
+ LADSPA_Descriptor_Function fDescriptorFunction;
+ long lDirLength;
+ long iNeedSlash;
+ struct dirent * psDirectoryEntry;
+ void * pvPluginHandle;
+
+ lDirLength = strlen(pcDirectory);
+ if (!lDirLength)
+ return;
+ if (pcDirectory[lDirLength - 1] == '/')
+ iNeedSlash = 0;
+ else
+ iNeedSlash = 1;
+
+ psDirectory = opendir(pcDirectory);
+ if (!psDirectory)
+ return;
+
+ while (1) {
+
+ psDirectoryEntry = readdir(psDirectory);
+ if (!psDirectoryEntry) {
+ closedir(psDirectory);
+ return;
+ }
+
+ pcFilename = malloc(lDirLength
+ + strlen(psDirectoryEntry->d_name)
+ + 1 + iNeedSlash);
+ strcpy(pcFilename, pcDirectory);
+ 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! */
+
+ dlerror();
+ fDescriptorFunction
+ = (LADSPA_Descriptor_Function)dlsym(pvPluginHandle,
+ "ladspa_descriptor");
+ if (dlerror() == NULL && fDescriptorFunction) {
+ /* We've successfully found a ladspa_descriptor function. Pass
+ it to the callback function. */
+ fCallbackFunction(pcFilename,
+ pvPluginHandle,
+ fDescriptorFunction);
+ free(pcFilename);
+ }
+ else {
+ /* It was a library, but not a LADSPA one. Unload it. */
+ dlclose(pvPluginHandle);
+ free(pcFilename);
+ }
+ }
+ }
+}
+
+/*****************************************************************************/
+
+void
+LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction) {
+
+ char * pcBuffer;
+ const char * pcEnd;
+ const char * pcLADSPAPath;
+ const char * pcStart;
+
+ pcLADSPAPath = getenv("LADSPA_PATH");
+ if (!pcLADSPAPath) {
+ pcLADSPAPath = EXPAND_AND_STRINGIFY(DEFAULT_LADSPA_PATH);
+ }
+
+ 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);
+
+ pcStart = pcEnd;
+ if (*pcStart == ':')
+ pcStart++;
+ }
+}
+
+/*****************************************************************************/
+
+/* EOF */
Index: create-1.17-ladspa-path-patch/ladspa-1.17-new/src
===================================================================
--- create-1.17-ladspa-path-patch/ladspa-1.17-new/src (nonexistent)
+++ create-1.17-ladspa-path-patch/ladspa-1.17-new/src (revision 5)
Property changes on: create-1.17-ladspa-path-patch/ladspa-1.17-new/src
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-ladspa-path-patch/ladspa-1.17-new
===================================================================
--- create-1.17-ladspa-path-patch/ladspa-1.17-new (nonexistent)
+++ create-1.17-ladspa-path-patch/ladspa-1.17-new (revision 5)
Property changes on: create-1.17-ladspa-path-patch/ladspa-1.17-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-ladspa-path-patch
===================================================================
--- create-1.17-ladspa-path-patch (nonexistent)
+++ create-1.17-ladspa-path-patch (revision 5)
Property changes on: create-1.17-ladspa-path-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-make-patch/create.patch.sh
===================================================================
--- create-1.17-make-patch/create.patch.sh (nonexistent)
+++ create-1.17-make-patch/create.patch.sh (revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.17
+
+tar --files-from=file.list -xzvf ../ladspa-$VERSION.tar.gz
+mv ladspa-$VERSION ladspa-$VERSION-orig
+
+cp -rf ./ladspa-$VERSION-new ./ladspa-$VERSION
+
+diff --unified -Nr ladspa-$VERSION-orig ladspa-$VERSION > ladspa-$VERSION-make.patch
+
+mv ladspa-$VERSION-make.patch ../patches
+
+rm -rf ./ladspa-$VERSION
+rm -rf ./ladspa-$VERSION-orig
Property changes on: create-1.17-make-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-1.17-make-patch/file.list
===================================================================
--- create-1.17-make-patch/file.list (nonexistent)
+++ create-1.17-make-patch/file.list (revision 5)
@@ -0,0 +1 @@
+ladspa-1.17/src/Makefile
Index: create-1.17-make-patch/ladspa-1.17-new/src/Makefile
===================================================================
--- create-1.17-make-patch/ladspa-1.17-new/src/Makefile (nonexistent)
+++ create-1.17-make-patch/ladspa-1.17-new/src/Makefile (revision 5)
@@ -0,0 +1,143 @@
+###############################################################################
+#
+# Installation DIRECTORIES
+#
+# Change these if you want to install somewhere else.
+
+INSTALL_PLUGINS_DIR = /usr/lib/ladspa/
+INSTALL_INCLUDE_DIR = /usr/include/
+INSTALL_BINARY_DIR = /usr/bin/
+
+###############################################################################
+#
+# GENERAL
+#
+
+INCLUDES = -I.
+LIBRARIES = -ldl -lm -lsndfile
+CFLAGS += $(INCLUDES) -Wall -Werror -O2 -fPIC \
+ -DDEFAULT_LADSPA_PATH=$(INSTALL_PLUGINS_DIR)
+BINFLAGS += -fPIE -pie
+CXXFLAGS += $(CFLAGS)
+PLUGINS = ../plugins/amp.so \
+ ../plugins/delay.so \
+ ../plugins/filter.so \
+ ../plugins/noise.so \
+ ../plugins/sine.so
+PROGRAMS = ../bin/analyseplugin \
+ ../bin/applyplugin \
+ ../bin/listplugins
+
+###############################################################################
+#
+# RULES TO BUILD PLUGINS FROM C OR C++ CODE
+#
+
+../plugins/%.so: plugins/%.c ladspa.h gcc_exports.map
+ $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
+ $(CC) -o ../plugins/$*.so \
+ plugins/$*.o \
+ -shared \
+ $(LDFLAGS) \
+ -fvisibility=hidden \
+ -fvisibility-inlines-hidden \
+ -s \
+ -Wl,--version-script=gcc_exports.map
+
+../plugins/%.so: plugins/%.cpp ladspa.h gcc_exports.map
+ $(CXX) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
+ $(CXX) -o ../plugins/$*.so \
+ plugins/$*.o \
+ -shared \
+ $(LDFLAGS) \
+ -fvisibility=hidden \
+ -fvisibility-inlines-hidden \
+ -s \
+ -Wl,--version-script=gcc_exports.map
+
+###############################################################################
+#
+# TARGETS
+#
+
+test: /tmp/test.wav ../snd/noise.wav always
+ @echo ---------------------------------------------
+ @echo First listen to the white noise input signal:
+ @echo ---------------------------------------------
+ -sndfile-play ../snd/noise.wav
+ @echo -------------------------
+ @echo Compare to plugin output.
+ @echo -------------------------
+ @echo Should be a noise band around 6000Hz, repeated quietly after 1s.
+ -sndfile-play /tmp/test.wav
+ @echo Test complete.
+
+install: targets
+ -mkdir -p $(DESTDIR)$(INSTALL_PLUGINS_DIR)
+ -mkdir -p $(DESTDIR)$(INSTALL_INCLUDE_DIR)
+ -mkdir -p $(DESTDIR)$(INSTALL_BINARY_DIR)
+ cp ../plugins/* $(DESTDIR)$(INSTALL_PLUGINS_DIR)
+ cp ladspa.h $(DESTDIR)$(INSTALL_INCLUDE_DIR)
+ cp ../bin/* $(DESTDIR)$(INSTALL_BINARY_DIR)
+
+/tmp/test.wav: targets ../snd/noise.wav
+ ../bin/listplugins
+ ../bin/analyseplugin ../plugins/filter.so
+ ../bin/analyseplugin ../plugins/delay.so
+ ../bin/analyseplugin ../plugins/sine.so
+ echo ; ../bin/analyseplugin -l ../plugins/sine.so ; echo
+ ../bin/analyseplugin ../plugins/amp.so
+ ../bin/analyseplugin ../plugins/noise.so
+ ../bin/applyplugin -s 1 \
+ ../snd/noise.wav /tmp/test.wav \
+ ../plugins/filter.so lpf 500 \
+ ../plugins/filter.so lpf 500 \
+ ../plugins/sine.so sine_fcaa 6000 \
+ ../plugins/delay.so delay_5s 1 0.1 \
+ ../plugins/amp.so amp_mono 4 \
+
+targets: $(PLUGINS) $(PROGRAMS)
+
+###############################################################################
+#
+# PROGRAMS
+#
+
+../bin/applyplugin: applyplugin.o load.o default.o
+ $(CC) $(CFLAGS) $(BINFLAGS) \
+ -o ../bin/applyplugin \
+ applyplugin.o load.o default.o \
+ $(LIBRARIES)
+
+../bin/analyseplugin: analyseplugin.o load.o default.o
+ $(CC) $(CFLAGS) $(BINFLAGS) \
+ -o ../bin/analyseplugin \
+ analyseplugin.o load.o default.o \
+ $(LIBRARIES)
+
+../bin/listplugins: listplugins.o search.o
+ $(CC) $(CFLAGS) $(BINFLAGS) \
+ -o ../bin/listplugins \
+ listplugins.o search.o \
+ $(LIBRARIES)
+
+###############################################################################
+#
+# UTILITIES
+#
+
+always:
+
+clean:
+ -rm -f `find . -name "*.o"` ../bin/* ../plugins/*
+ -rm -f `find .. -name "*~"`
+ -rm -f *.bak core score.srt
+ -rm -f *.bb *.bbg *.da *-ann gmon.out bb.out
+ -rm -f `find .. -name "*.class"`
+
+backup: clean
+ (cd ../../; \
+ tar czf `date '+../backup/ladspa_sdk.%Y%m%d%H%M.tgz'` ladspa_sdk/)
+
+###############################################################################
+
Index: create-1.17-make-patch/ladspa-1.17-new/src
===================================================================
--- create-1.17-make-patch/ladspa-1.17-new/src (nonexistent)
+++ create-1.17-make-patch/ladspa-1.17-new/src (revision 5)
Property changes on: create-1.17-make-patch/ladspa-1.17-new/src
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-make-patch/ladspa-1.17-new
===================================================================
--- create-1.17-make-patch/ladspa-1.17-new (nonexistent)
+++ create-1.17-make-patch/ladspa-1.17-new (revision 5)
Property changes on: create-1.17-make-patch/ladspa-1.17-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-make-patch
===================================================================
--- create-1.17-make-patch (nonexistent)
+++ create-1.17-make-patch (revision 5)
Property changes on: create-1.17-make-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-memleak-patch/create.patch.sh
===================================================================
--- create-1.17-memleak-patch/create.patch.sh (nonexistent)
+++ create-1.17-memleak-patch/create.patch.sh (revision 5)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.17
+
+tar --files-from=file.list -xzvf ../ladspa-$VERSION.tar.gz
+mv ladspa-$VERSION ladspa-$VERSION-orig
+
+cp -rf ./ladspa-$VERSION-new ./ladspa-$VERSION
+
+diff --unified -Nr ladspa-$VERSION-orig ladspa-$VERSION > ladspa-$VERSION-memleak.patch
+
+mv ladspa-$VERSION-memleak.patch ../patches
+
+rm -rf ./ladspa-$VERSION
+rm -rf ./ladspa-$VERSION-orig
Property changes on: create-1.17-memleak-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: create-1.17-memleak-patch/file.list
===================================================================
--- create-1.17-memleak-patch/file.list (nonexistent)
+++ create-1.17-memleak-patch/file.list (revision 5)
@@ -0,0 +1 @@
+ladspa-1.17/src/search.c
Index: create-1.17-memleak-patch/ladspa-1.17-new/src/search.c
===================================================================
--- create-1.17-memleak-patch/ladspa-1.17-new/src/search.c (nonexistent)
+++ create-1.17-memleak-patch/ladspa-1.17-new/src/search.c (revision 5)
@@ -0,0 +1,134 @@
+/* search.c
+
+ Free software by Richard W.E. Furse. Do with as you will. No
+ warranty. */
+
+/*****************************************************************************/
+
+#include <dirent.h>
+#include <dlfcn.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+/*****************************************************************************/
+
+#include "ladspa.h"
+#include "utils.h"
+
+/*****************************************************************************/
+
+/* Search just the one directory. */
+static void
+LADSPADirectoryPluginSearch
+(const char * pcDirectory,
+ LADSPAPluginSearchCallbackFunction fCallbackFunction) {
+
+ char * pcFilename;
+ DIR * psDirectory;
+ LADSPA_Descriptor_Function fDescriptorFunction;
+ long lDirLength;
+ long iNeedSlash;
+ struct dirent * psDirectoryEntry;
+ void * pvPluginHandle;
+
+ lDirLength = strlen(pcDirectory);
+ if (!lDirLength)
+ return;
+ if (pcDirectory[lDirLength - 1] == '/')
+ iNeedSlash = 0;
+ else
+ iNeedSlash = 1;
+
+ psDirectory = opendir(pcDirectory);
+ if (!psDirectory)
+ return;
+
+ while (1) {
+
+ psDirectoryEntry = readdir(psDirectory);
+ if (!psDirectoryEntry) {
+ closedir(psDirectory);
+ return;
+ }
+
+ pcFilename = malloc(lDirLength
+ + strlen(psDirectoryEntry->d_name)
+ + 1 + iNeedSlash);
+ strcpy(pcFilename, pcDirectory);
+ 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! */
+
+ dlerror();
+ fDescriptorFunction
+ = (LADSPA_Descriptor_Function)dlsym(pvPluginHandle,
+ "ladspa_descriptor");
+ if (dlerror() == NULL && fDescriptorFunction) {
+ /* We've successfully found a ladspa_descriptor function. Pass
+ it to the callback function. */
+ fCallbackFunction(pcFilename,
+ pvPluginHandle,
+ fDescriptorFunction);
+ free(pcFilename);
+ }
+ else {
+ /* It was a library, but not a LADSPA one. Unload it. */
+ dlclose(pvPluginHandle);
+ free(pcFilename);
+ }
+ } else {
+ free(pcFilename);
+ }
+ }
+}
+
+/*****************************************************************************/
+
+void
+LADSPAPluginSearch(LADSPAPluginSearchCallbackFunction fCallbackFunction) {
+
+ char * pcBuffer;
+ const char * pcEnd;
+ const char * pcLADSPAPath;
+ const char * pcStart;
+
+ pcLADSPAPath = getenv("LADSPA_PATH");
+ if (!pcLADSPAPath) {
+ fprintf(stderr,
+ "Warning: You do not have a LADSPA_PATH "
+ "environment variable set. Defaulting to "
+ EXPAND_AND_STRINGIFY(DEFAULT_LADSPA_PATH)
+ ".\n");
+ pcLADSPAPath = EXPAND_AND_STRINGIFY(DEFAULT_LADSPA_PATH);
+ }
+
+ 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);
+
+ pcStart = pcEnd;
+ if (*pcStart == ':')
+ pcStart++;
+ }
+}
+
+/*****************************************************************************/
+
+/* EOF */
Index: create-1.17-memleak-patch/ladspa-1.17-new/src
===================================================================
--- create-1.17-memleak-patch/ladspa-1.17-new/src (nonexistent)
+++ create-1.17-memleak-patch/ladspa-1.17-new/src (revision 5)
Property changes on: create-1.17-memleak-patch/ladspa-1.17-new/src
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-memleak-patch/ladspa-1.17-new
===================================================================
--- create-1.17-memleak-patch/ladspa-1.17-new (nonexistent)
+++ create-1.17-memleak-patch/ladspa-1.17-new (revision 5)
Property changes on: create-1.17-memleak-patch/ladspa-1.17-new
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: create-1.17-memleak-patch
===================================================================
--- create-1.17-memleak-patch (nonexistent)
+++ create-1.17-memleak-patch (revision 5)
Property changes on: create-1.17-memleak-patch
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: patches/README
===================================================================
--- patches/README (nonexistent)
+++ patches/README (revision 5)
@@ -0,0 +1,10 @@
+
+/* begin *
+
+ Patch order:
+ -----------
+ 1) ladspa-1.17-make.patch
+ 2) ladspa-1.17-ladspa-path.patch
+ 3) ladspa-1.17-memleak.patch
+
+ * end */
Index: patches
===================================================================
--- patches (nonexistent)
+++ patches (revision 5)
Property changes on: patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 5)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~