Package: libsbml / 5.10.0+dfsg-1

hardening.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Description: hardening
 .
 libsbml (5.10.0-1) UNRELEASED; urgency=low
 .
   * update from upstream
Author: Ivo Maintz <ivo@maintz.de>

---
Last-Update: <2013-01-22>

Index: libsbml-5.10.0/src/bindings/matlab/Makefile.in
===================================================================
--- libsbml-5.10.0.orig/src/bindings/matlab/Makefile.in	2013-11-28 14:51:16.191345434 +0100
+++ libsbml-5.10.0/src/bindings/matlab/Makefile.in	2013-11-28 14:51:16.183345349 +0100
@@ -70,12 +70,7 @@
         installSBML.m            \
         isoctave.m               \
         matlab-tags-regexp.txt   \
-        mexopts-R2007.sh         \
-        mexopts-R2008.sh         \
-        mexopts-R2009-R2010.sh   \
-        mexopts-xcode43.sh       \
-        mexopts-xcode45.sh       \
-        mexopts-lion.sh          \
+        mexopts-R2009-2010.sh          \
         test.xml                 \
         test/CMakeLists.txt
 
@@ -142,7 +137,7 @@
 # is really necessary, but it seems prudent.
 
 define matlabrun
-  env CFLAGS="$(CFLAGS)" srcdir=. \
+  env CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" srcdir=. \
     $(LIBTOOL) -dlopen $(TOP_BUILDDIR)/src/libsbml.la --mode=execute $(1)
 endef
 
Index: libsbml-5.10.0/src/bindings/matlab/mexopts-R2009-R2010.sh
===================================================================
--- libsbml-5.10.0.orig/src/bindings/matlab/mexopts-R2009-R2010.sh	2013-11-28 14:51:16.191345434 +0100
+++ libsbml-5.10.0/src/bindings/matlab/mexopts-R2009-R2010.sh	2013-11-28 14:51:16.183345349 +0100
@@ -324,7 +324,13 @@
 #
 #----------------------------------------------------------------------------
 #           CC="$CC"
-#           CFLAGS="$CFLAGS"
+            CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+            CFLAGS += -Wall
+            CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
+            CXXFLAGS += -Wall
+            LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+            CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+            CCFLAGS = $(shell dpkg-buildflags --get CCFLAGS)
 #           COPTIMFLAGS="$COPTIMFLAGS"
 #           CDEBUGFLAGS="$CDEBUGFLAGS"
 #           CLIBS="$CLIBS"
Index: libsbml-5.10.0/src/bindings/perl/Makefile.in
===================================================================
--- libsbml-5.10.0.orig/src/bindings/perl/Makefile.in	2013-11-28 14:51:16.191345434 +0100
+++ libsbml-5.10.0/src/bindings/perl/Makefile.in	2013-11-28 14:51:16.183345349 +0100
@@ -177,6 +177,8 @@
 endif
 
 
+CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
+
 # If the last run was made with --enable-layout and this one isn't, or
 # vice-versa, the swig wrap files will be wrong for this run.  However, you
 # can't tell just by looking at file mod times, so you can't use normal
Index: libsbml-5.10.0/config/makefile-common-actions.mk
===================================================================
--- libsbml-5.10.0.orig/config/makefile-common-actions.mk	2013-11-28 14:51:16.191345434 +0100
+++ libsbml-5.10.0/config/makefile-common-actions.mk	2013-11-28 14:51:16.183345349 +0100
@@ -72,6 +72,15 @@
 # here is only to remove duplicates, which the 'sort' function does as a
 # documented side-effect.)
 
+# hardening
+CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS += -Wall
+CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
+CXXFLAGS += -Wall
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+CCFLAGS = $(shell dpkg-buildflags --get CFLAGS)
+
 compile ?= $(LIBTOOL) --mode=compile --tag=CC $(CC) $(sort $(default_includes) $(INCLUDES)) $(CPPFLAGS) \
         $(extra_CPPFLAGS) $(CFLAGS) $(extra_CFLAGS)