[Debian-med-packaging] Bug#914937: edfbrowser: fix dh_auto_configure overriding

Pino Toscano pino at debian.org
Wed Nov 28 21:23:37 GMT 2018


Source: edfbrowser
Version: 1.66+dfsg-1
Severity: minor
Tags: patch

Hi,

the current rules overrides dh_auto_build to run qmake manually again,
specifying build flags.  OTOH, this runs qmake again, and it is not
needed with newer debhelper: using the DEB_<var>_MAINT_APPEND interface
of dpkg-buildflags will append the right flags when qmake is called by
the default dh_auto_configure invocation.  Also, debhelper already
handles noopt in DEB_BUILD_OPTIONS already.

Hence, the attached patch simplifies rules a lot, dropping also
variables not needed (anymore).

Thanks,
-- 
Pino
-------------- next part --------------
--- a/debian/rules
+++ b/debian/rules
@@ -5,37 +5,19 @@
 # export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE  )
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE )
-DEB_BUILD_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS  )
-ARCH                := $(shell dpkg-architecture -qDEB_BUILD_ARCH     )
-
-Q_LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
-export Q_LDFLAGS
-
-# of course, qmake wants to do it its own way
-QMAKE_CXXFLAGS += $(CPPFLAGS) -Wall -Wshadow -Wextra -ggdb3
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-  QMAKE_CXXFLAGS_RELEASE = -O0
-else
-  QMAKE_CXXFLAGS_RELEASE = -O2
-endif
+export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
+export DEB_CXXFLAGS_MAINT_APPEND := -Wall -Wshadow -Wextra -ggdb3
 
 export QT_SELECT=qt5
 
 %:
 	dh $@
 
-override_dh_auto_build:
-	qmake -makefile -after \
-		QMAKE_CXXFLAGS="$(QMAKE_CXXFLAGS)" \
-		QMAKE_CXXFLAGS_RELEASE="$(QMAKE_CXXFLAGS_RELEASE)" \
-		QMAKE_LFLAGS="$(Q_LDFLAGS)"
+override_dh_auto_configure:
+	dh_auto_configure
 	# libpthread is only used indirectly; no need for linking against it
 	sed -i -e 's/-lpthread//' Makefile
 
-	$(MAKE)
-
 override_dh_clean:
 	test ! -f Makefile  ||  $(MAKE) distclean
 	dh_clean


More information about the Debian-med-packaging mailing list