From 97a0e125363076cb678d2b6ee7e4a3729e05205a Mon Sep 17 00:00:00 2001 From: q66 Date: Tue, 17 Dec 2019 17:01:37 +0100 Subject: [PATCH] commoncpp2: fix with gcc9 The headers are still public, so revbump, as anything using them would also fail. --- srcpkgs/commoncpp2/patches/ftbfs.patch | 23 +++++++++++++++++++++++ srcpkgs/commoncpp2/template | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/commoncpp2/patches/ftbfs.patch diff --git a/srcpkgs/commoncpp2/patches/ftbfs.patch b/srcpkgs/commoncpp2/patches/ftbfs.patch new file mode 100644 index 0000000000..09e1ead1db --- /dev/null +++ b/srcpkgs/commoncpp2/patches/ftbfs.patch @@ -0,0 +1,23 @@ +C++ does not allow specifying default arguments on friend declarations. +We can simply do this as getline is not otherwise publicly declared. + +--- inc/cc++/string.h ++++ inc/cc++/string.h +@@ -731,7 +731,7 @@ public: + * @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 __EXPORT std::istream &getline(std::istream &is, String &str, char delim, size_t size); + + /** + * Stream the content of our string variable directly to a C++ +@@ -743,7 +743,7 @@ public: + * Stream input into our variable. + */ + inline friend std::istream &operator>>(std::istream &is, String &str) +- {return getline(is, str);}; ++ {return getline(is, str, '\n', 0);}; + + #ifdef HAVE_SNPRINTF + /** diff --git a/srcpkgs/commoncpp2/template b/srcpkgs/commoncpp2/template index 3d1ad5e57f..b3df4f4bdd 100644 --- a/srcpkgs/commoncpp2/template +++ b/srcpkgs/commoncpp2/template @@ -1,12 +1,12 @@ # Template file for 'commoncpp2' pkgname=commoncpp2 version=1.8.1 -revision=1 +revision=2 build_style=gnu-configure makedepends="libgcc-devel zlib-devel" short_desc="GNU Common C++ 2" maintainer="David " -license="GPL-3" +license="GPL-3.0-or-later" homepage='http://www.gnu.org/software/commoncpp/' distfiles="${GNU_SITE}/commoncpp/$pkgname-${version}.tar.gz" checksum="53ced4aff74e28a1d8018eb2b4974519028db3c12471ab6dff1c873578c9af4e"