Package: cdbs
Version: 0.4.99
Tags: patch

The package gnomeradio fails to build from source because
dpkg-buildflags adds -Werror=format-security to CFLAGS.
Using DEB_CFLAGS_MAINT_STRIP=-Werror=format-security in debian/rules
should override that, but cdbs 0.4.99 doesn't seem to pick this up.

The attached patch should solve that.  The patch adds the use of the
variable DEB_DPKG_BUILDFLAGS_ENV to cdbs.

Packages like gnomeradio can then have this line in debian/rules:
DEB_DPKG_BUILDFLAGS_ENV := DEB_CFLAGS_MAINT_STRIP=-Werror=format-security

Regards,

Bart Martens
diff -ruN orig/cdbs-0.4.99/1/class/langcore.mk.in cdbs-0.4.99/1/class/langcore.mk.in
--- orig/cdbs-0.4.99/1/class/langcore.mk.in	2011-03-01 13:33:17.000000000 +0100
+++ cdbs-0.4.99/1/class/langcore.mk.in	2011-09-25 23:20:51.000000000 +0200
@@ -24,10 +24,10 @@
 
 # Resolve our defaults
 ifneq (,$(wildcard /usr/bin/dpkg-buildflags))
-deb_cflags := $(shell dpkg-buildflags --get CFLAGS)
-deb_cppflags := $(shell dpkg-buildflags --get CPPFLAGS)
-deb_cxxflags := $(shell dpkg-buildflags --get CXXFLAGS)
-deb_ldflags := $(shell dpkg-buildflags --get LDFLAGS)
+deb_cflags := $(shell $(DEB_DPKG_BUILDFLAGS_ENV) dpkg-buildflags --get CFLAGS)
+deb_cppflags := $(shell $(DEB_DPKG_BUILDFLAGS_ENV) dpkg-buildflags --get CPPFLAGS)
+deb_cxxflags := $(shell $(DEB_DPKG_BUILDFLAGS_ENV) dpkg-buildflags --get CXXFLAGS)
+deb_ldflags := $(shell $(DEB_DPKG_BUILDFLAGS_ENV) dpkg-buildflags --get LDFLAGS)
 else
 # TODO: Use above unconditionally when oldstable has dpkg >= 1.15.7
 deb_cflags = -g

Reply via email to