[med-svn] r22309 - in trunk/packages/rostlab/disulfinder/trunk/debian: . patches

Gert Wollny gert-guest at moszumanska.debian.org
Fri Jul 1 14:59:45 UTC 2016


Author: gert-guest
Date: 2016-07-01 14:59:45 +0000 (Fri, 01 Jul 2016)
New Revision: 22309

Added:
   trunk/packages/rostlab/disulfinder/trunk/debian/patches/gcc-6.patch
Modified:
   trunk/packages/rostlab/disulfinder/trunk/debian/changelog
   trunk/packages/rostlab/disulfinder/trunk/debian/patches/series
   trunk/packages/rostlab/disulfinder/trunk/debian/rules
Log:
Correct compilation with gcc-6 and enable parallel builds

Modified: trunk/packages/rostlab/disulfinder/trunk/debian/changelog
===================================================================
--- trunk/packages/rostlab/disulfinder/trunk/debian/changelog	2016-07-01 14:04:32 UTC (rev 22308)
+++ trunk/packages/rostlab/disulfinder/trunk/debian/changelog	2016-07-01 14:59:45 UTC (rev 22309)
@@ -1,11 +1,17 @@
 disulfinder (1.2.11-6) UNRELEASED; urgency=medium
 
   * Team upload.
+
+  [Tatiana Malygina]
   * fix in install override in debian/rules
   * add harderning
   * add simple testsuite
   * cme fix dpkg-control
   * add README.test
+  
+  [Gert Wollny] 
+  * d/p/gcc-6: Add patch to fix compilation with gcc-6, Closes: #811876
+  * d/rules: enable parallel builds 
 
  -- Tatiana Malygina <merlettaia at gmail.com>  Sun, 26 Jun 2016 05:46:50 +0300
 

Added: trunk/packages/rostlab/disulfinder/trunk/debian/patches/gcc-6.patch
===================================================================
--- trunk/packages/rostlab/disulfinder/trunk/debian/patches/gcc-6.patch	                        (rev 0)
+++ trunk/packages/rostlab/disulfinder/trunk/debian/patches/gcc-6.patch	2016-07-01 14:59:45 UTC (rev 22309)
@@ -0,0 +1,78 @@
+Description: compile with gcc-6
+ This patch enables compiling with g++-6 (i.e. -std >= c++11)
+ Since the code uses their Assert function very often on iostream
+ objects, it was easier to make the Assert function actually accept
+ an iostream object instead of add .good() to each call. 
+Forwarded: no
+Bug-Debian: http://bugs.debian.org/811876
+Author: Gert Wollny <gw.fossdev at gmail.com>
+Last-Update: Fri, 1 Jul 2016
+
+--- a/disulfind/src/Common/Exception.h
++++ b/disulfind/src/Common/Exception.h
+@@ -3,6 +3,7 @@
+ 
+ #include <string>
+ #include <iostream>
++#include <stdarg.h>
+ using namespace std;
+ 
+ //------------------------------------------------------------------------------------------------
+@@ -27,9 +28,35 @@
+   static void Throw() { throw new Exception(); }
+   static void Throw(const string &mex) { throw new Exception(mex); }
+   static void Throw(const char *const format,...);
++  
+   static void Assert(bool condition) { if(!condition) throw new Exception(); }
+   static void Assert(bool condition, const char *const format,...);
+   static void Assert(bool condition, const string &mex) { if(!condition) throw new Exception(mex); }
++  
++#if __cplusplus >= 201103L
++  template<class CharT, class Traits = std::char_traits<CharT> >
++  static void Assert(const std::basic_ios<CharT,Traits>& stream) {
++    if(!stream) throw new Exception();
++  }
++
++  template<class CharT, class Traits = std::char_traits<CharT> >
++  static void Assert(const std::basic_ios<CharT,Traits>& stream, const char *const format,...)
++  {
++    va_list arglist;
++    if( !stream ) {
++      char mex[1000];
++      va_start(arglist,format);
++      vsprintf(mex,format,arglist);
++      throw new Exception(mex);
++    }
++  }
++
++  template<class CharT, class Traits = std::char_traits<CharT> >
++  static void Assert(const std::basic_ios<CharT,Traits>& stream, const string &mex)
++    { if(!stream) throw new Exception(mex); }
++#endif 
++
++  
+ };
+ 
+ #endif
+--- a/disulfind/src/BRNN/rnn_util.cpp
++++ b/disulfind/src/BRNN/rnn_util.cpp
+@@ -222,7 +222,7 @@
+   // Read prediction and get bonded cystein indices
+   ifstream predfs(predfname.c_str());
+   if(!predfs) {
+-    cerr << "create_connectivity_input_data: unable to open bonding state prediction file " << predfs << "\n";
++    cerr << "create_connectivity_input_data: unable to open bonding state prediction file " << predfname << "\n";
+     exit(1);
+   }
+ 
+--- a/disulfind/src/Common/Util.cpp
++++ b/disulfind/src/Common/Util.cpp
+@@ -168,7 +168,7 @@
+   string runCommand(string command) {     
+     FILE *fp = popen(command.c_str(), "r");
+     if( fp==NULL ) 
+-      return false;
++      return "";
+ 
+     size_t read = 0;
+     char *buffer = NULL;

Modified: trunk/packages/rostlab/disulfinder/trunk/debian/patches/series
===================================================================
--- trunk/packages/rostlab/disulfinder/trunk/debian/patches/series	2016-07-01 14:04:32 UTC (rev 22308)
+++ trunk/packages/rostlab/disulfinder/trunk/debian/patches/series	2016-07-01 14:59:45 UTC (rev 22309)
@@ -1,3 +1,4 @@
 hardening.patch
 variable_length_array
 unknown_escape
+gcc-6.patch

Modified: trunk/packages/rostlab/disulfinder/trunk/debian/rules
===================================================================
--- trunk/packages/rostlab/disulfinder/trunk/debian/rules	2016-07-01 14:04:32 UTC (rev 22308)
+++ trunk/packages/rostlab/disulfinder/trunk/debian/rules	2016-07-01 14:59:45 UTC (rev 22309)
@@ -9,7 +9,7 @@
 pkgdata := $(pkg)-data
 
 %:
-	dh $@
+	dh $@ --parallel 
 
 override_dh_auto_install:
 	$(MAKE) DESTDIR=$(CURDIR)/debian/$(pkg) prefix=/usr install




More information about the debian-med-commit mailing list