Package: libtk-img
Version: 1:1.3-release-11
Severity: important
Tags: patch

Please enabled hardened build flags through dpkg-buildflags.

Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)

Cheers,
        Moritz
--- libtk-img-1.3-release.harden/debian/rules	2012-01-24 21:28:52.000000000 +0100
+++ libtk-img-1.3-release/debian/rules	2012-01-24 21:37:56.000000000 +0100
@@ -13,17 +13,18 @@
 pkgdir=$(shell pwd)/debian/tmp
 libdir=$(pkgdir)/usr/lib
 
-#CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
 
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+LDFLAGS_DEFAULT = `dpkg-buildflags --get LDFLAGS`
+export LDFLAGS_DEFAULT
+LDFLAGS_OPTIMIZE = `dpkg-buildflags --get LDFLAGS`
+export LDFLAGS_OPTIMIZE
+
 unpatch:
 	dh_testdir
 	quilt pop -a || test $$? = 2
@@ -60,7 +61,7 @@
 configure-stamp: patch-stamp
 	dh_testdir
 
-	./configure \
+	CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \
 		--host=$(DEB_HOST_GNU_TYPE) \
 		--build=$(DEB_BUILD_GNU_TYPE) \
 		--prefix=/usr \

Reply via email to