[fenix] 01/05: Debhelper compat 9, honor CFLAGS in the configure script.

Peter Pentchev roam at ringlet.net
Thu Dec 17 15:42:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

roam-guest pushed a commit to branch master
in repository fenix.

commit 1f2193a4e20b242e6591c828283a594a65f2a5fe
Author: Peter Pentchev <roam at ringlet.net>
Date:   Thu Dec 17 17:11:13 2015 +0200

    Debhelper compat 9, honor CFLAGS in the configure script.
    
    Bump the debhelper compatibility level to 9 and let debhelper invoke
    dpkg-buildflags automatically for us.
    
    Drop the explicit passing of CPPFLAGS, CFLAGS, and LDFLAGS to
    the configure script and add a patch letting it actually honor CFLAGS
    passed via the environment.
---
 debian/changelog                |  5 +++++
 debian/compat                   |  2 +-
 debian/control                  |  3 +--
 debian/patches/cflags-env.patch | 49 +++++++++++++++++++++++++++++++++++++++++
 debian/patches/series           |  1 +
 debian/rules                    | 16 +++++---------
 6 files changed, 62 insertions(+), 14 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index af372f7..6b773e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,11 @@ fenix (0.92a.dfsg1-12) UNRELEASED; urgency=medium
 
   * Fix the build with giflib5 using the patch supplied by
     Matthias Klose <doko at debian.org>.  Closes: #803279
+  * Bump the debhelper compatibility level to 9:
+    - use CPPFLAGS, CFLAGS, and LDFLAGS provided by debhelper
+    - thus, drop the explicit versioned dependency on dpkg-dev
+    - add the cflags-env patch to actually honor CFLAGS passed via
+      the environment
 
  -- Peter Pentchev <roam at ringlet.net>  Thu, 17 Dec 2015 16:11:53 +0200
 
diff --git a/debian/compat b/debian/compat
index 45a4fb7..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/debian/control b/debian/control
index f506092..437849a 100644
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,7 @@ Uploaders:
  Peter Pentchev <roam at ringlet.net>
 Build-Depends:
  autotools-dev (>= 20100122.1~),
- debhelper (>= 8),
- dpkg-dev (>= 1.15.7~),
+ debhelper (>= 9),
  libgif-dev,
  libmikmod2-dev,
  libpng-dev,
diff --git a/debian/patches/cflags-env.patch b/debian/patches/cflags-env.patch
new file mode 100644
index 0000000..87b2e46
--- /dev/null
+++ b/debian/patches/cflags-env.patch
@@ -0,0 +1,49 @@
+Description: Honor CFLAGS passed via the environment.
+Forwarded: no
+Author: Peter Pentchev <roam at ringlet.net>
+Last-Update: 2015-12-17
+
+--- a/configure
++++ b/configure
+@@ -3173,11 +3173,16 @@
+ fi
+ 
+ 
+-if test "x$enable_debug" = "xyes"; then
+-	CFLAGS="-g $INCLUDES"
+-else
+-	CFLAGS="-O2 -finline-functions -ffast-math $INCLUDES"
++echo "RDBG before: CFLAGS '$CFLAGS'" >&6
++if [ -z "$CFLAGS" ]; then
++	if test "x$enable_debug" = "xyes"; then
++		CFLAGS="-g"
++	else
++		CFLAGS="-O2 -finline-functions -ffast-math"
++	fi
+ fi
++CFLAGS="$CFLAGS $INCLUDES"
++echo "RDBG after:  CFLAGS '$CFLAGS'" >&6
+ 
+ 
+ ac_ext=c
+--- a/configure.in
++++ b/configure.in
+@@ -84,11 +84,14 @@
+ 
+ AC_CHECK_LIB(m,fabs,LIBS="$LIBS",AC_MSG_RESULT(math library not found))
+ 
+-if test "x$enable_debug" = "xyes"; then
+-	CFLAGS="-g $INCLUDES"
+-else
+-	CFLAGS="-O2 -finline-functions -ffast-math $INCLUDES"
++if [ -z "$CFLAGS" ]; then
++	if test "x$enable_debug" = "xyes"; then
++		CFLAGS="-g"
++	else
++		CFLAGS="-O2 -finline-functions -ffast-math"
++	fi
+ fi
++CFLAGS="$CFLAGS $INCLUDES"
+ 
+ dnl librerias para todos
+ 
diff --git a/debian/patches/series b/debian/patches/series
index b76aeaf..e3cd2f8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,3 +29,4 @@ no_--as-needed_in_fxi-src-Makefile.patch
 libgif.patch
 fix_ftbfs_libpng1.5.patch
 giflib5.diff
+cflags-env.patch
diff --git a/debian/rules b/debian/rules
index c05f882..3ae6e00 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,14 +5,11 @@
 
 export LC_ALL=C
 
-CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+DEB_CFLAGS_MAINT_APPEND= -Wall -fno-strict-aliasing -DUSE_GETTEXT
+export DEB_CFLAGS_MAINT_APPEND
 
-CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
-CFLAGS += -Wall -fno-strict-aliasing
-CFLAGS += -DUSE_GETTEXT
-
-LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
-LDFLAGS += -Wl,-z,defs
+DEB_LDFLAGS_MAINT_APPEND= -Wl,-z,defs
+export DEB_LDFLAGS_MAINT_APPEND
 
 override_dh_auto_configure:
 	chmod +x configure
@@ -22,13 +19,10 @@ override_dh_auto_configure:
 		--enable-map \
 		--enable-fpg \
 		--enable-dependency-tracking \
-		CFLAGS="$(CFLAGS)" \
-		CPPFLAGS="$(CPPFLAGS)" \
-		LDFLAGS="$(LDFLAGS)" \
 		LIBS="-lm -ldl"
 
 override_dh_auto_build:
-	dh_auto_build -- CFLAGS="$(CFLAGS)"
+	dh_auto_build
 	$(MAKE) -C debian/i18n
 
 override_dh_auto_clean:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/fenix.git



More information about the Pkg-games-commits mailing list