Description: hardening
 .
 libsbml (5.7.0-1) UNRELEASED; urgency=low
 .
   * update from upstream
Author: Ivo Maintz <ivo@maintz.de>

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

Index: libsbml-5.7.0/src/bindings/matlab/Makefile.in
===================================================================
--- libsbml-5.7.0.orig/src/bindings/matlab/Makefile.in	2013-01-13 09:33:06.000000000 +0100
+++ libsbml-5.7.0/src/bindings/matlab/Makefile.in	2013-01-22 19:23:43.984536958 +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.7.0/src/bindings/matlab/mexopts-R2009-R2010.sh
===================================================================
--- libsbml-5.7.0.orig/src/bindings/matlab/mexopts-R2009-R2010.sh	2013-01-13 09:33:06.000000000 +0100
+++ libsbml-5.7.0/src/bindings/matlab/mexopts-R2009-R2010.sh	2013-01-22 19:22:22.000000000 +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.7.0/src/bindings/perl/Makefile.in
===================================================================
--- libsbml-5.7.0.orig/src/bindings/perl/Makefile.in	2013-01-13 09:33:11.000000000 +0100
+++ libsbml-5.7.0/src/bindings/perl/Makefile.in	2013-01-22 19:22:22.000000000 +0100
@@ -180,6 +180,8 @@
       CXXFLAGS += -DUSE_LAYOUT
 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.7.0/config/makefile-common-actions.mk
===================================================================
--- libsbml-5.7.0.orig/config/makefile-common-actions.mk	2012-01-13 02:25:36.000000000 +0100
+++ libsbml-5.7.0/config/makefile-common-actions.mk	2013-01-22 19:22:22.000000000 +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) 
 
