Accepting request 538910 from home:plater
Add ladspa-find-plugin-path.patch to enable listplugins to find plugins without LADSPA_PATH variable set. Add ladspa-pie.patch to enable position independent executables. OBS-URL: https://build.opensuse.org/request/show/538910 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ladspa?expand=0&rev=37
This commit is contained in:
parent
9434d76404
commit
5ec46e206a
67
ladspa-find-plugin-path.patch
Normal file
67
ladspa-find-plugin-path.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From: Dave Plater <davejplater@gmail.com>
|
||||
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);
|
||||
|
37
ladspa-pie.patch
Normal file
37
ladspa-pie.patch
Normal file
@ -0,0 +1,37 @@
|
||||
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/*
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 4 08:39:00 UTC 2017 - davejplater@gmail.com
|
||||
|
||||
- Add ladspa-find-plugin-path.patch to enable listplugins to find
|
||||
plugins without LADSPA_PATH variable set.
|
||||
- Add ladspa-pie.patch to enable position independent executables.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 3 11:58:41 CET 2014 - tiwai@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ladspa
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 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
|
||||
@ -24,7 +24,10 @@ License: LGPL-2.1+
|
||||
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
|
||||
BuildRequires: gcc-c++
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
AutoReq: on
|
||||
@ -48,6 +51,8 @@ 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
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user