[polybori] 02/02: Fix tests to work without std=c++-98.

Tobias Hansen thansen at moszumanska.debian.org
Mon Jan 2 10:48:18 UTC 2017


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

thansen pushed a commit to branch master
in repository polybori.

commit ddcc668f79fde5472bf0259261687041647eac10
Author: Tobias Hansen <thansen at debian.org>
Date:   Mon Jan 2 10:43:31 2017 +0000

    Fix tests to work without std=c++-98.
---
 debian/changelog                   |  3 +++
 debian/patches/fix-testsuite.patch | 19 +++++++++++++++++++
 debian/rules                       |  5 ++++-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 0b7bdf9..060e687 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ brial (0.8.5-4) UNRELEASED; urgency=medium
   * Add fix_ftbfs_gcc-6.patch:
     Upstream patch to fix FTBFS with gcc 6.
   * Remove -std=c++98 flag, obsolete with new patch.
+  * Run tests after dh_auto_install to avoid modifying files (config.h)
+    before installation.
+  * Change fix-testsuite.patch: Do not set CXXFLAGS=-std=c++98.
 
  -- Tobias Hansen <thansen at debian.org>  Sun, 01 Jan 2017 22:17:07 +0100
 
diff --git a/debian/patches/fix-testsuite.patch b/debian/patches/fix-testsuite.patch
index 4316ce6..de871e6 100644
--- a/debian/patches/fix-testsuite.patch
+++ b/debian/patches/fix-testsuite.patch
@@ -3,6 +3,7 @@ Description: Fix test suite
    tests can be executed.
  - Library sources were moved to folder libbrial.
  - Add a missing ;
+ - Do not set CXXFLAGS=-std=c++98.
 From: Alexander Dreyer <adreyer at gmx.de>, Tobias Hansen <thansen at debian.org>
 Bug: https://github.com/BRiAl/BRiAl/issues/12
 
@@ -21,6 +22,24 @@ Bug: https://github.com/BRiAl/BRiAl/issues/12
   build""") ]
  
  M4RIPath = PathJoiner('M4RI')
+@@ -304,7 +304,7 @@
+ 
+     if oldstyle_flags() :
+         defaultenv.Append(CCFLAGS=["-std=c99", "$M4RI_CFLAGS"])
+-        defaultenv.Append(CXXFLAGS=["-std=c++98", "$M4RI_CFLAGS", 
++        defaultenv.Append(CXXFLAGS=["$M4RI_CFLAGS", 
+                                     "-ftemplate-depth-100"])
+         for (var, help, default) in [('CCFLAGS', "C compiler flags", ["-O3"]),
+                                      ('CXXFLAGS', "C++ compiler flags", ["-O3"])]:
+@@ -313,7 +313,7 @@
+     else:
+         defaultenv.Append(CCFLAGS=["$M4RI_CFLAGS"])
+         defaultenv.Append(CFLAGS=["-std=c99"])
+-        defaultenv.Append(CXXFLAGS=["-std=c++98", "-ftemplate-depth-100"])
++        defaultenv.Append(CXXFLAGS=["-ftemplate-depth-100"])
+ 
+         for (var, help, default) in [('CCFLAGS', "C/C++ compiler flags", ["-O3"]),
+                                      ('CFLAGS', "C compiler flags", []),
 @@ -1252,6 +1252,8 @@
                          [BOOST_TEST] + libpbShared + libgbShared  + libm4ri + GD_LIBS,
                      CPPDEFINES = ["BOOST_TEST_DYN_LINK"] )
diff --git a/debian/rules b/debian/rules
index 4fd46cf..8d77148 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,10 @@ override_dh_strip:
 	dh_strip -a -Nlibbrial0 \
 	  -Nlibbrial-groebner0
 
-override_dh_auto_test:
+# Run tests after dh_auto_install because scons modifies files
+# that are installed (e.g. config.h).
+override_dh_auto_install-arch:
+	dh_auto_install
 	scons $(SCONSPARFLAGS) testsuite/unittests
 ifeq ($(DEB_HOST_ARCH_OS),hurd) # problems with rpath on hurd
 	LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) testsuite/unittests

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/polybori.git



More information about the debian-science-commits mailing list