dev-util/ddd: fix parallel compilation issue
authorMaciej Mrozowski <reavertm@gentoo.org>
Fri, 22 Nov 2019 21:54:52 +0000 (22:54 +0100)
committerMaciej Mrozowski <reavertm@gentoo.org>
Fri, 22 Nov 2019 21:56:02 +0000 (22:56 +0100)
Bug: https://bugs.gentoo.org/696934
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Maciej Mrozowski <reavertm@gentoo.org>
dev-util/ddd/ddd-3.3.12-r4.ebuild
dev-util/ddd/files/ddd-3.3.12-gcc9.patch [new file with mode: 0644]
dev-util/ddd/files/ddd-3.3.12-parallel.patch [new file with mode: 0644]

index 4110ccf39cd6edccd83618e7aba30c5728e67eaa..2694f0cffacf34bb094af9a0e3de591a5b30c47d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -41,6 +41,8 @@ PATCHES=(
        "${FILESDIR}/${P}-gdb-disassembler-bug.patch"
        "${FILESDIR}/${PN}-3.3.12-man.patch"
        "${FILESDIR}/${PN}-3.3.12-tinfo.patch"
+       "${FILESDIR}/${PN}-3.3.12-gcc9.patch"
+       "${FILESDIR}/${PN}-3.3.12-parallel.patch"
 )
 
 DOCS=(
diff --git a/dev-util/ddd/files/ddd-3.3.12-gcc9.patch b/dev-util/ddd/files/ddd-3.3.12-gcc9.patch
new file mode 100644 (file)
index 0000000..ce12a41
--- /dev/null
@@ -0,0 +1,93 @@
+diff -ruN -x '*.am' ddd-3.3.12/ddd/strclass.h my/ddd/strclass.h
+--- ddd-3.3.12/ddd/strclass.h  2009-02-11 18:25:06.000000000 +0100
++++ my/ddd/strclass.h  2019-11-22 22:00:49.000267420 +0100
+@@ -543,7 +543,6 @@
+     bool OK() const; 
+ };
+-
+ class string
+ {
+     friend class subString;
+@@ -811,9 +810,9 @@
+                    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 +863,8 @@
+     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;
+@@ -882,6 +881,58 @@
+     bool OK() const;
+ };
++inline void cat(const string&, const string&, string&);
++inline void cat(const string&, const subString&, string&);
++inline void cat(const string&, const constSubString&, string&);
++inline void cat(const string&, const char*, string&);
++inline void cat(const string&, char*, string&);
++inline void cat(const string&, char, string&);
++
++inline void cat(const subString&, const string&, string&);
++inline void cat(const subString&, const subString&, string&);
++inline void cat(const subString&, const char*, string&);
++inline void cat(const subString&, char*, string&);
++inline void cat(const subString&, char, string&);
++
++inline void cat(const char*, const string&, string&);
++inline void cat(const char*, const subString&, string&);
++inline void cat(const char*, const char*, string&);
++inline void cat(const char*, char*, string&);
++inline void cat(const char*, char, string&);
++
++inline void cat(char*, const string&, string&);
++inline void cat(char*, const subString&, string&);
++inline void cat(char*, const char*, string&);
++inline void cat(char*, char*, string&);
++inline void cat(char*, char, string&);
++
++inline void cat(char, const string&, string&);
++inline void cat(char, const subString&, string&);
++inline void cat(char, const char*, string&);
++inline void cat(char, char*, string&);
++inline void cat(char, char, string&);
++
++int split(const string& x, string *res, int maxn, 
++                   const string& sep);
++int split(const string& x, string *res, int maxn, 
++                   const regex& sep);
++
++string common_prefix(const string& x, const string& y, 
++                              int startpos = 0);
++string common_suffix(const string& x, const string& y, 
++                              int startpos = -1);
++string replicate(char c, int n);
++string replicate(const string& y, int n);
++string join(const string *src, int n, const string& sep);
++
++inline std::ostream& operator<<(std::ostream& s, const string& x);
++inline std::ostream& operator<<(std::ostream& s, const subString& x);
++std::istream& operator>>(std::istream& s, string& x);
++
++int readline(std::istream& s, string& x, 
++                      char terminator = '\n',
++                      int discard_terminator = 1);
++
+ // Inject names manually to accomodate argument-dependent name lookup (ADL)
+ // (aka Koenig lookup). The rule is that friend declarations are visible
+ // when found through ADL because an argument of the call happens to be
diff --git a/dev-util/ddd/files/ddd-3.3.12-parallel.patch b/dev-util/ddd/files/ddd-3.3.12-parallel.patch
new file mode 100644 (file)
index 0000000..21624a2
--- /dev/null
@@ -0,0 +1,15 @@
+diff -ruN -x strclass.h ddd-3.3.12/ddd/Makefile.am my/ddd/Makefile.am
+--- ddd-3.3.12/ddd/Makefile.am 2009-02-11 18:25:07.000000000 +0100
++++ my/ddd/Makefile.am 2019-11-22 22:49:26.212765331 +0100
+@@ -580,9 +580,8 @@
+ # Make sure needed headers are built before trying to compile these files
+ # (Assume ddd.C is the first source file to be built.)
+-ddd.o: version.h host.h root.h
+-resources.o: Ddd.ad.h
+-show.o: build.h
++# MM: AND WHY WOULD YOU ASSUME THAT??
++BUILT_SOURCES = version.h host.h root.h Ddd.ad.h build.h
+ # -----------------------------------------------------------------------------
+ # Local Libraries.