summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-06-22 11:48:30 +0200
committerDavid Seifert <soap@gentoo.org>2019-06-22 11:48:30 +0200
commit10e0e9358b88632b1cd64ecda26606d8f0565747 (patch)
treef4b23cbd49c43ee098bdf7d950a28beefd78d45b /dev-cpp/commoncpp2
parentdev-cpp/commoncpp2: Port to EAPI 7 (diff)
downloadgentoo-10e0e9358b88632b1cd64ecda26606d8f0565747.tar.gz
gentoo-10e0e9358b88632b1cd64ecda26606d8f0565747.tar.bz2
gentoo-10e0e9358b88632b1cd64ecda26606d8f0565747.zip
dev-cpp/commoncpp2: Fix building against GCC 9
Closes: https://bugs.gentoo.org/686012 Package-Manager: Portage-2.3.67, Repoman-2.3.15 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-cpp/commoncpp2')
-rw-r--r--dev-cpp/commoncpp2/commoncpp2-1.8.1-r4.ebuild1
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-fix-gcc9.patch28
2 files changed, 29 insertions, 0 deletions
diff --git a/dev-cpp/commoncpp2/commoncpp2-1.8.1-r4.ebuild b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r4.ebuild
index 0db41ca0b793..d8c63727a4e3 100644
--- a/dev-cpp/commoncpp2/commoncpp2-1.8.1-r4.ebuild
+++ b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r4.ebuild
@@ -39,6 +39,7 @@ PATCHES=(
"${FILESDIR}/1.8.1-fix-c++14.patch"
"${FILESDIR}/1.8.1-gnutls-3.4.patch"
"${FILESDIR}/1.8.1-libressl.patch" # bug 674416
+ "${FILESDIR}/1.8.1-fix-gcc9.patch" # bug 686012
)
src_prepare() {
diff --git a/dev-cpp/commoncpp2/files/1.8.1-fix-gcc9.patch b/dev-cpp/commoncpp2/files/1.8.1-fix-gcc9.patch
new file mode 100644
index 000000000000..795e44178c64
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-fix-gcc9.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/686012
+In file included from ../inc/cc++/thread.h:50,
+ from thread.cpp:41:
+../inc/cc++/string.h:734:35: error: friend declaration of ‘std::istream& getline(std::istream&, ost::String&, char, size_t)’ specifies default arguments and isn’t a definition [-fpermissive]
+ 734 | friend __EXPORT std::istream &getline(std::istream &is, String &str, char delim = '\n', size_t size = 0);
+ | ^~~~~~~
+
+--- a/inc/cc++/string.h
++++ b/inc/cc++/string.h
+@@ -58,6 +58,9 @@
+
+ class MemPager;
+
++class String;
++__EXPORT std::istream &getline(std::istream &is, String &str, char delim = '\n', size_t size = 0);
++
+ /**
+ * This is a generic and portable string class. It uses optimized
+ * memory allocation strategies to efficiently handle smaller string
+@@ -731,7 +734,7 @@
+ * @param delim deliminator to use.
+ * @param size optional size limitor.
+ */
+- friend __EXPORT std::istream &getline(std::istream &is, String &str, char delim = '\n', size_t size = 0);
++ friend std::istream &getline(std::istream &is, String &str, char delim, size_t size);
+
+ /**
+ * Stream the content of our string variable directly to a C++