pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/audio/ladspa



Module Name:    pkgsrc
Committed By:   khorben
Date:           Thu Nov 16 15:05:31 UTC 2017

Modified Files:
        pkgsrc/audio/ladspa: Makefile distinfo
        pkgsrc/audio/ladspa/patches: patch-aa
Added Files:
        pkgsrc/audio/ladspa/patches: patch-plugins_amp.c patch-plugins_delay.c
            patch-plugins_filter.c patch-plugins_noise.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/audio/ladspa/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/audio/ladspa/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/audio/ladspa/patches/patch-aa
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ladspa/patches/patch-plugins_amp.c \
    pkgsrc/audio/ladspa/patches/patch-plugins_delay.c \
    pkgsrc/audio/ladspa/patches/patch-plugins_filter.c \
    pkgsrc/audio/ladspa/patches/patch-plugins_noise.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/ladspa/Makefile
diff -u pkgsrc/audio/ladspa/Makefile:1.13 pkgsrc/audio/ladspa/Makefile:1.14
--- pkgsrc/audio/ladspa/Makefile:1.13   Sat Jul 15 18:12:51 2017
+++ pkgsrc/audio/ladspa/Makefile        Thu Nov 16 15:05:31 2017
@@ -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 @@ MAKE_FILE=   makefile
 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"

Index: pkgsrc/audio/ladspa/distinfo
diff -u pkgsrc/audio/ladspa/distinfo:1.11 pkgsrc/audio/ladspa/distinfo:1.12
--- pkgsrc/audio/ladspa/distinfo:1.11   Sat Jul 15 18:12:51 2017
+++ pkgsrc/audio/ladspa/distinfo        Thu Nov 16 15:05:31 2017
@@ -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

Index: pkgsrc/audio/ladspa/patches/patch-aa
diff -u pkgsrc/audio/ladspa/patches/patch-aa:1.5 pkgsrc/audio/ladspa/patches/patch-aa:1.6
--- pkgsrc/audio/ladspa/patches/patch-aa:1.5    Sat Jul 15 18:12:51 2017
+++ pkgsrc/audio/ladspa/patches/patch-aa        Thu Nov 16 15:05:31 2017
@@ -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 @@ $NetBSD: patch-aa,v 1.5 2017/07/15 18:12
  
  ###############################################################################
  #
-@@ -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
-+LIBRARIES     =       $(DL_LIBS) -lm
-+CFLAGS                =       $(INCLUDES) -Wall -Werror -fPIC
++CPPFLAGS      =       $(INCLUDES)
++CFLAGS                =       -Wall -Werror -fPIC
  CXXFLAGS      =       $(CFLAGS)
++LIBRARIES     =       $(DL_LIBS) -lm
++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 @@ $NetBSD: patch-aa,v 1.5 2017/07/15 18:12
  
  ###############################################################################
  #
-@@ -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 @@ $NetBSD: patch-aa,v 1.5 2017/07/15 18:12
  
  /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 @@ $NetBSD: patch-aa,v 1.5 2017/07/15 18:12
  
  ###############################################################################
  #
-@@ -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
  

Added files:

Index: pkgsrc/audio/ladspa/patches/patch-plugins_amp.c
diff -u /dev/null pkgsrc/audio/ladspa/patches/patch-plugins_amp.c:1.1
--- /dev/null   Thu Nov 16 15:05:31 2017
+++ pkgsrc/audio/ladspa/patches/patch-plugins_amp.c     Thu Nov 16 15:05:31 2017
@@ -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);
Index: pkgsrc/audio/ladspa/patches/patch-plugins_delay.c
diff -u /dev/null pkgsrc/audio/ladspa/patches/patch-plugins_delay.c:1.1
--- /dev/null   Thu Nov 16 15:05:31 2017
+++ pkgsrc/audio/ladspa/patches/patch-plugins_delay.c   Thu Nov 16 15:05:31 2017
@@ -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) {
Index: pkgsrc/audio/ladspa/patches/patch-plugins_filter.c
diff -u /dev/null pkgsrc/audio/ladspa/patches/patch-plugins_filter.c:1.1
--- /dev/null   Thu Nov 16 15:05:31 2017
+++ pkgsrc/audio/ladspa/patches/patch-plugins_filter.c  Thu Nov 16 15:05:31 2017
@@ -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);
Index: pkgsrc/audio/ladspa/patches/patch-plugins_noise.c
diff -u /dev/null pkgsrc/audio/ladspa/patches/patch-plugins_noise.c:1.1
--- /dev/null   Thu Nov 16 15:05:31 2017
+++ pkgsrc/audio/ladspa/patches/patch-plugins_noise.c   Thu Nov 16 15:05:31 2017
@@ -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