[packages/ddd] - rel 15; fix build

arekm arekm at pld-linux.org
Sun Oct 20 22:19:34 CEST 2019


commit 76873ea7f105ab6e0da35aa3644477edfb3b3ded
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Oct 20 22:19:28 2019 +0200

    - rel 15; fix build

 ddd.spec              |   4 +-
 fix-ftbfs-gcc-9.patch | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 104 insertions(+), 1 deletion(-)
---
diff --git a/ddd.spec b/ddd.spec
index e049063..99395b1 100644
--- a/ddd.spec
+++ b/ddd.spec
@@ -4,7 +4,7 @@ Summary(pl.UTF-8):	Interfejs X do debugerów GDB, DBX i XDB
 Summary(zh_CN.UTF-8):	图形化的程序调试器前端;如GDB,DBX,Ladebug,JDB,Perl,Python
 Name:		ddd
 Version:	3.3.12
-Release:	14
+Release:	15
 Epoch:		1
 License:	GPL
 Group:		Development/Debuggers
@@ -18,6 +18,7 @@ Patch1:		%{name}-info.patch
 Patch2:		%{name}-home_etc.patch
 Patch3:		%{name}-am185.patch
 Patch4:		%{name}-gcc.4.4-build.patch
+Patch5:		fix-ftbfs-gcc-9.patch
 URL:		http://www.gnu.org/software/ddd/
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake >= 1:1.9
@@ -88,6 +89,7 @@ pełną edycją, historią i wyszukiwaniem.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 %{__libtoolize}
diff --git a/fix-ftbfs-gcc-9.patch b/fix-ftbfs-gcc-9.patch
new file mode 100644
index 0000000..4ce9379
--- /dev/null
+++ b/fix-ftbfs-gcc-9.patch
@@ -0,0 +1,101 @@
+From: Sophie Brun <sophie at offensive-security.com>
+Date: Mon, 30 Sep 2019 16:17:19 +0200
+Subject: Fix ftbfs with GCC-9
+
+Last-Update: 2019-10-01
+Description:
+"If a friend declaration specifies a default, it must be a friend
+function definition, and no other declarations of this function are
+allowed in the translation unit."
+Remove default values from declaration and change these functions calls
+in the code to add default values if not overwritten.
+---
+ ddd/DispValue.C |  4 ++--
+ ddd/complete.C  |  2 +-
+ ddd/exit.C      |  2 +-
+ ddd/strclass.C  |  1 +
+ ddd/strclass.h  | 10 ++++++----
+ 5 files changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/ddd/DispValue.C b/ddd/DispValue.C
+index de25768..2656242 100644
+--- a/ddd/DispValue.C
++++ b/ddd/DispValue.C
+@@ -1432,8 +1432,8 @@ void DispValue::get_index_surroundings(string& prefix, string& suffix) const
+ 
+     for (int i = 1; i < nchildren(); i++)
+     {
+-	prefix = common_prefix(prefix, child(i)->full_name());
+-	suffix = common_suffix(suffix, child(i)->full_name());
++	prefix = common_prefix(prefix, child(i)->full_name(), 0);
++	suffix = common_suffix(suffix, child(i)->full_name(), -1);
+     }
+ }
+ 
+diff --git a/ddd/complete.C b/ddd/complete.C
+index b161e74..4bde5ff 100644
+--- a/ddd/complete.C
++++ b/ddd/complete.C
+@@ -354,7 +354,7 @@ static void complete_reply(const string& complete_answer, void *qu_data)
+ 	string common_pfx = completions[0];
+ 	int i;
+ 	for (i = 1; i < completions_size; i++)
+-	    common_pfx = common_prefix(common_pfx, completions[i]);
++	    common_pfx = common_prefix(common_pfx, completions[i], 0);
+ 
+ 	if (completions_size > 1 && input == common_pfx)
+ 	{
+diff --git a/ddd/exit.C b/ddd/exit.C
+index f490c23..664f203 100644
+--- a/ddd/exit.C
++++ b/ddd/exit.C
+@@ -478,7 +478,7 @@ void get_core_pattern(int signal)
+ 	str_func_ret = "core";
+     }
+     else {
+-	readline(patternfile, pattern);
++	readline(patternfile, pattern, '\n', 1);
+ 	core_pat = pattern.chars();
+ 	while(*core_pat)
+ 	{
+diff --git a/ddd/strclass.C b/ddd/strclass.C
+index be0bade..dfbb054 100644
+--- a/ddd/strclass.C
++++ b/ddd/strclass.C
+@@ -1563,6 +1563,7 @@ std::istream& operator>>(std::istream& s, string& x)
+     return s;
+ }
+ 
++
+ int readline(std::istream& s, string& x, char terminator, int discard)
+ {
+     assert(!x.consuming());
+diff --git a/ddd/strclass.h b/ddd/strclass.h
+index 7ef16fa..035a17e 100644
+--- a/ddd/strclass.h
++++ b/ddd/strclass.h
+@@ -811,9 +811,11 @@ public:
+ 		     const regex& sep);
+ 
+     friend string common_prefix(const string& x, const string& y, 
+-				int startpos = 0);
++				int startpos);
++
+     friend string common_suffix(const string& x, const string& y, 
+-				int startpos = -1);
++				int startpos);
++
+     friend string replicate(char c, int n);
+     friend string replicate(const string& y, int n);
+     friend string join(const string *src, int n, const string& sep);
+@@ -864,8 +866,8 @@ public:
+     friend std::istream& operator>>(std::istream& s, string& x);
+ 
+     friend int readline(std::istream& s, string& x, 
+-			char terminator = '\n',
+-			int discard_terminator = 1);
++			char terminator,
++			int discard_terminator);
+ 
+     // Status
+     unsigned int length() const;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ddd.git/commitdiff/76873ea7f105ab6e0da35aa3644477edfb3b3ded



More information about the pld-cvs-commit mailing list