pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/ladspa More generic fix for CFLAGS and LDFLAGS f...
details: https://anonhg.NetBSD.org/pkgsrc/rev/80f83f94698e
branches: trunk
changeset: 371661:80f83f94698e
user: khorben <khorben%pkgsrc.org@localhost>
date: Thu Nov 16 15:05:31 2017 +0000
description:
More generic fix for CFLAGS and LDFLAGS for audio/ladspa
In the C plug-ins, mark the constructor and destructor functions as
such. While there, comment out a new target to run the tests; they are
broken, but not because of this modification. This allows us to use
cc(1) to link the plug-ins, thus working around a bug in the cwrappers
for ld(1).
Bump PKGREVISION, since this generates a different binary now that SSP
and FORTIFY are enabled.
diffstat:
audio/ladspa/Makefile | 12 ++++++--
audio/ladspa/distinfo | 8 ++++-
audio/ladspa/patches/patch-aa | 39 +++++++++++++++++-----------
audio/ladspa/patches/patch-plugins_amp.c | 26 +++++++++++++++++++
audio/ladspa/patches/patch-plugins_delay.c | 26 +++++++++++++++++++
audio/ladspa/patches/patch-plugins_filter.c | 26 +++++++++++++++++++
audio/ladspa/patches/patch-plugins_noise.c | 26 +++++++++++++++++++
7 files changed, 142 insertions(+), 21 deletions(-)
diffs (276 lines):
diff -r fde090d14933 -r 80f83f94698e audio/ladspa/Makefile
--- a/audio/ladspa/Makefile Thu Nov 16 14:52:30 2017 +0000
+++ b/audio/ladspa/Makefile Thu Nov 16 15:05:31 2017 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2017/07/15 18:12:51 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2017/11/16 15:05:31 khorben Exp $
DISTNAME= ladspa_sdk_1.13
PKGNAME= ${DISTNAME:S/_sdk_/-/}
+PKGREVISION= 1
CATEGORIES= audio
MASTER_SITES= http://www.ladspa.org/download/
EXTRACT_SUFX= .tgz
@@ -20,8 +21,13 @@
BUILDLINK_LIBS.dl+= ${BUILDLINK_LDADD.dl}
INSTALLATION_DIRS+= bin include lib
-REAL_LDFLAGS= ${LDFLAGS:S/-Wl,-z,/-z /g}
-MAKEFLAGS+= REAL_LDFLAGS=${REAL_LDFLAGS:Q}
+
+MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
+
+#XXX does not work (No rule to make target 'targets')
+#do-test:
+# cd ${WRKSRC} && && ${BUILD_MAKE_CMD} test
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r fde090d14933 -r 80f83f94698e audio/ladspa/distinfo
--- a/audio/ladspa/distinfo Thu Nov 16 14:52:30 2017 +0000
+++ b/audio/ladspa/distinfo Thu Nov 16 15:05:31 2017 +0000
@@ -1,9 +1,13 @@
-$NetBSD: distinfo,v 1.11 2017/07/15 18:12:51 wiz Exp $
+$NetBSD: distinfo,v 1.12 2017/11/16 15:05:31 khorben Exp $
SHA1 (ladspa_sdk_1.13.tgz) = 2b69e28afb62c0d97943124f48ed82de796f83ed
RMD160 (ladspa_sdk_1.13.tgz) = e9eeae8edd24a6890fac3e34c4b55f844f44f8a0
SHA512 (ladspa_sdk_1.13.tgz) = a1dab807fda58e08869d3f519be5fa91c394690eb13006fbe7f20b332548e4676b32b01273f5695bf36c8da72190c07618662a76d50f991b3f05068ac2b346ef
Size (ladspa_sdk_1.13.tgz) = 70540 bytes
-SHA1 (patch-aa) = bdfb2e82d2f7800a16275cb521f42f20799d998d
+SHA1 (patch-aa) = 721eddb7269f2c20eecc45b64a293b44395a3fc3
SHA1 (patch-ab) = 1ad33baf6dcc4633e1459b6585cc8ccada57831f
SHA1 (patch-ac) = 40108e5e4fdba9b2be322d0de532a97322d22325
+SHA1 (patch-plugins_amp.c) = e0336ff7fe078aa6b4e6b3d25b21b70ac6dc127d
+SHA1 (patch-plugins_delay.c) = ee551be35938b69d7b535640858d67ceeb261ee0
+SHA1 (patch-plugins_filter.c) = 79b050f99a68ebd87e76f552054592331c31828e
+SHA1 (patch-plugins_noise.c) = 9e996f5f9ad4e39974cafea52af143e9db4603f7
diff -r fde090d14933 -r 80f83f94698e audio/ladspa/patches/patch-aa
--- a/audio/ladspa/patches/patch-aa Thu Nov 16 14:52:30 2017 +0000
+++ b/audio/ladspa/patches/patch-aa Thu Nov 16 15:05:31 2017 +0000
@@ -1,4 +1,8 @@
-$NetBSD: patch-aa,v 1.5 2017/07/15 18:12:51 wiz Exp $
+$NetBSD: patch-aa,v 1.6 2017/11/16 15:05:31 khorben Exp $
+
+* Fix the destination directories
+* Use cc(1) to link the plug-ins
+* Add support for CFLAGS and LDFLAGS
--- makefile.orig 2007-11-06 10:42:45.000000000 +0000
+++ makefile
@@ -15,18 +19,21 @@
###############################################################################
#
-@@ -14,8 +14,8 @@ INSTALL_BINARY_DIR = /usr/bin/
+@@ -14,9 +14,11 @@ INSTALL_BINARY_DIR = /usr/bin/
#
INCLUDES = -I.
-LIBRARIES = -ldl -lm
-CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC
++CPPFLAGS = $(INCLUDES)
++CFLAGS = -Wall -Werror -fPIC
+ CXXFLAGS = $(CFLAGS)
+LIBRARIES = $(DL_LIBS) -lm
-+CFLAGS = $(INCLUDES) -Wall -Werror -fPIC
- CXXFLAGS = $(CFLAGS)
++LDFLAGS =
PLUGINS = ../plugins/amp.so \
../plugins/delay.so \
-@@ -25,8 +25,8 @@ PLUGINS = ../plugins/amp.so \
+ ../plugins/filter.so \
+@@ -25,8 +27,8 @@ PLUGINS = ../plugins/amp.so \
PROGRAMS = ../bin/analyseplugin \
../bin/applyplugin \
../bin/listplugins
@@ -37,24 +44,24 @@
###############################################################################
#
-@@ -34,12 +34,12 @@ CPP = c++
+@@ -34,12 +36,12 @@ CPP = c++
#
../plugins/%.so: plugins/%.c ladspa.h
- $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
- $(LD) -o ../plugins/$*.so plugins/$*.o -shared
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o plugins/$*.o -c plugins/$*.c
-+ $(LD) $(REAL_LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
++ $(CC) -shared $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o
../plugins/%.so: plugins/%.cpp ladspa.h
- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
- $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
-+ $(CXX) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
-+ $(CXX) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
++ $(CXX) -shared $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o
###############################################################################
#
-@@ -58,13 +58,13 @@ test: /tmp/test.wav ../snd/noise.wav alw
+@@ -58,13 +60,13 @@ test: /tmp/test.wav ../snd/noise.wav alw
-sndfile-play /tmp/test.wav
@echo Test complete.
@@ -75,7 +82,7 @@
/tmp/test.wav: targets ../snd/noise.wav
../bin/listplugins
-@@ -82,7 +82,7 @@ install: targets
+@@ -82,7 +84,7 @@ install: targets
../plugins/delay.so delay_5s 1 0.1 \
../plugins/amp.so amp_mono 4 \
@@ -84,24 +91,24 @@
###############################################################################
#
-@@ -90,17 +90,17 @@ targets: $(PLUGINS) $(PROGRAMS)
+@@ -90,17 +92,17 @@ targets: $(PLUGINS) $(PROGRAMS)
#
../bin/applyplugin: applyplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES) \
++ $(CC) $(LDFLAGS) $(LIBRARIES) \
-o ../bin/applyplugin \
applyplugin.o load.o default.o
../bin/analyseplugin: analyseplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES) \
++ $(CC) $(LDFLAGS) $(LIBRARIES) \
-o ../bin/analyseplugin \
analyseplugin.o load.o default.o
../bin/listplugins: listplugins.o search.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
-+ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES) \
++ $(CC) $(LDFLAGS) $(LIBRARIES) \
-o ../bin/listplugins \
listplugins.o search.o
diff -r fde090d14933 -r 80f83f94698e audio/ladspa/patches/patch-plugins_amp.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ladspa/patches/patch-plugins_amp.c Thu Nov 16 15:05:31 2017 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-plugins_amp.c,v 1.1 2017/11/16 15:05:31 khorben Exp $
+
+Mark the constructor and destructor functions as such.
+
+--- plugins/amp.c.orig 2002-07-06 17:20:19.000000000 +0000
++++ plugins/amp.c
+@@ -152,7 +152,8 @@ LADSPA_Descriptor * g_psStereoDescriptor
+
+ /* _init() is called automatically when the plugin library is first
+ loaded. */
+-void
++static void _init() __attribute__((constructor));
++static void
+ _init() {
+
+ char ** pcPortNames;
+@@ -335,7 +336,8 @@ deleteDescriptor(LADSPA_Descriptor * psD
+ /*****************************************************************************/
+
+ /* _fini() is called automatically when the library is unloaded. */
+-void
++static void _fini() __attribute__((destructor));
++static void
+ _fini() {
+ deleteDescriptor(g_psMonoDescriptor);
+ deleteDescriptor(g_psStereoDescriptor);
diff -r fde090d14933 -r 80f83f94698e audio/ladspa/patches/patch-plugins_delay.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ladspa/patches/patch-plugins_delay.c Thu Nov 16 15:05:31 2017 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-plugins_delay.c,v 1.1 2017/11/16 15:05:31 khorben Exp $
+
+Mark the constructor and destructor functions as such.
+
+--- plugins/delay.c.orig 2002-07-06 17:21:20.000000000 +0000
++++ plugins/delay.c
+@@ -228,7 +228,8 @@ LADSPA_Descriptor * g_psDescriptor = NUL
+
+ /* _init() is called automatically when the plugin library is first
+ loaded. */
+-void
++static void _init() __attribute__((constructor));
++static void
+ _init() {
+
+ char ** pcPortNames;
+@@ -322,7 +323,8 @@ _init() {
+ /*****************************************************************************/
+
+ /* _fini() is called automatically when the library is unloaded. */
+-void
++static void _fini() __attribute__((destructor));
++static void
+ _fini() {
+ long lIndex;
+ if (g_psDescriptor) {
diff -r fde090d14933 -r 80f83f94698e audio/ladspa/patches/patch-plugins_filter.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ladspa/patches/patch-plugins_filter.c Thu Nov 16 15:05:31 2017 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-plugins_filter.c,v 1.1 2017/11/16 15:05:31 khorben Exp $
+
+Mark the constructor and destructor functions as such.
+
+--- plugins/filter.c.orig 2002-07-06 17:22:01.000000000 +0000
++++ plugins/filter.c
+@@ -252,7 +252,8 @@ LADSPA_Descriptor * g_psHPFDescriptor =
+
+ /* _init() is called automatically when the plugin library is first
+ loaded. */
+-void
++static void _init() __attribute__((constructor));
++static void
+ _init() {
+
+ char ** pcPortNames;
+@@ -431,7 +432,8 @@ deleteDescriptor(LADSPA_Descriptor * psD
+ /*****************************************************************************/
+
+ /* _fini() is called automatically when the library is unloaded. */
+-void
++static void _fini() __attribute__((destructor));
++static void
+ _fini() {
+ deleteDescriptor(g_psLPFDescriptor);
+ deleteDescriptor(g_psHPFDescriptor);
diff -r fde090d14933 -r 80f83f94698e audio/ladspa/patches/patch-plugins_noise.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ladspa/patches/patch-plugins_noise.c Thu Nov 16 15:05:31 2017 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-plugins_noise.c,v 1.1 2017/11/16 15:05:31 khorben Exp $
+
+Mark the constructor and destructor functions as such.
+
+--- plugins/noise.c.orig 2002-07-06 17:22:34.000000000 +0000
++++ plugins/noise.c
+@@ -142,7 +142,8 @@ LADSPA_Descriptor * g_psDescriptor;
+
+ /* _init() is called automatically when the plugin library is first
+ loaded. */
+-void
++static void _init() __attribute__((constructor));
++static void
+ _init() {
+
+ char ** pcPortNames;
+@@ -219,7 +220,8 @@ _init() {
+ /*****************************************************************************/
+
+ /* _fini() is called automatically when the library is unloaded. */
+-void
++static void _fini() __attribute__((destructor));
++static void
+ _fini() {
+ long lIndex;
+ if (g_psDescriptor) {
Home |
Main Index |
Thread Index |
Old Index