pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/ladspa Fix LDFLAGS handling. Fixes RELRO build.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4fa5c9bab722
branches:  trunk
changeset: 365393:4fa5c9bab722
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat Jul 15 18:12:51 2017 +0000

description:
Fix LDFLAGS handling. Fixes RELRO build.

Funny how LDFLAGS passed to ld(1) doesn't work.

diffstat:

 audio/ladspa/Makefile         |   5 +++--
 audio/ladspa/distinfo         |   4 ++--
 audio/ladspa/patches/patch-aa |  35 +++++++++++++++++++++++++++++++----
 3 files changed, 36 insertions(+), 8 deletions(-)

diffs (92 lines):

diff -r e861827b0dba -r 4fa5c9bab722 audio/ladspa/Makefile
--- a/audio/ladspa/Makefile     Sat Jul 15 17:41:10 2017 +0000
+++ b/audio/ladspa/Makefile     Sat Jul 15 18:12:51 2017 +0000
@@ -1,5 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2012/09/12 00:24:40 asau Exp $
-#
+# $NetBSD: Makefile,v 1.13 2017/07/15 18:12:51 wiz Exp $
 
 DISTNAME=      ladspa_sdk_1.13
 PKGNAME=       ${DISTNAME:S/_sdk_/-/}
@@ -21,6 +20,8 @@
 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}
 
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r e861827b0dba -r 4fa5c9bab722 audio/ladspa/distinfo
--- a/audio/ladspa/distinfo     Sat Jul 15 17:41:10 2017 +0000
+++ b/audio/ladspa/distinfo     Sat Jul 15 18:12:51 2017 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.10 2015/11/03 01:12:35 agc Exp $
+$NetBSD: distinfo,v 1.11 2017/07/15 18:12:51 wiz 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) = 7d09109572f9da19aac4104437704d731fc3ff99
+SHA1 (patch-aa) = bdfb2e82d2f7800a16275cb521f42f20799d998d
 SHA1 (patch-ab) = 1ad33baf6dcc4633e1459b6585cc8ccada57831f
 SHA1 (patch-ac) = 40108e5e4fdba9b2be322d0de532a97322d22325
diff -r e861827b0dba -r 4fa5c9bab722 audio/ladspa/patches/patch-aa
--- a/audio/ladspa/patches/patch-aa     Sat Jul 15 17:41:10 2017 +0000
+++ b/audio/ladspa/patches/patch-aa     Sat Jul 15 18:12:51 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.4 2009/08/16 14:17:44 wiz Exp $
+$NetBSD: patch-aa,v 1.5 2017/07/15 18:12:51 wiz Exp $
 
 --- makefile.orig      2007-11-06 10:42:45.000000000 +0000
 +++ makefile
@@ -37,14 +37,20 @@
  
  ###############################################################################
  #
-@@ -38,8 +38,8 @@ CPP          =       c++
-       $(LD) -o ../plugins/$*.so plugins/$*.o -shared
+@@ -34,12 +34,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
  
  ../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) -o ../plugins/$*.so plugins/$*.o -shared
++      $(CXX) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
  
  ###############################################################################
  #
@@ -78,3 +84,24 @@
  
  ###############################################################################
  #
+@@ -90,17 +90,17 @@ targets:   $(PLUGINS) $(PROGRAMS)
+ #
+ 
+ ../bin/applyplugin:   applyplugin.o load.o default.o
+-      $(CC) $(CFLAGS) $(LIBRARIES)                                    \
++      $(CC) $(CFLAGS) $(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)                                 \
+               -o ../bin/analyseplugin                                 \
+               analyseplugin.o load.o default.o
+ 
+ ../bin/listplugins:   listplugins.o search.o
+-      $(CC) $(CFLAGS) $(LIBRARIES)                                    \
++      $(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES)                                 \
+               -o ../bin/listplugins                                   \
+               listplugins.o search.o
+ 



Home | Main Index | Thread Index | Old Index