summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-06-23 22:43:43 +0200
committerDavid Seifert <soap@gentoo.org>2019-06-23 22:43:43 +0200
commit32f1d8c31b170487e5f39e402ac3fbf4cb929771 (patch)
treef0b2f9aa4b2871565738c7e81ffabcb769707657 /dev-lang
parentsys-apps/dbus: stable 1.12.16 for hppa, bug #687900 (diff)
downloadgentoo-32f1d8c31b170487e5f39e402ac3fbf4cb929771.tar.gz
gentoo-32f1d8c31b170487e5f39e402ac3fbf4cb929771.tar.bz2
gentoo-32f1d8c31b170487e5f39e402ac3fbf4cb929771.zip
dev-lang/yap: Fix building against GCC 9
Closes: https://bugs.gentoo.org/686048 Package-Manager: Portage-2.3.67, Repoman-2.3.15 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/yap/files/yap-6.3.3-fix-gcc9.patch27
-rw-r--r--dev-lang/yap/yap-6.3.3-r1.ebuild5
2 files changed, 31 insertions, 1 deletions
diff --git a/dev-lang/yap/files/yap-6.3.3-fix-gcc9.patch b/dev-lang/yap/files/yap-6.3.3-fix-gcc9.patch
new file mode 100644
index 000000000000..f16d29142215
--- /dev/null
+++ b/dev-lang/yap/files/yap-6.3.3-fix-gcc9.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/686048
+
+./SolverTypes.h:122:20: error: friend declaration of ‘Clause* Clause_new(const V&, bool)’ specifies default arguments and isn’t a definition [-fpermissive]
+ 122 | friend Clause* Clause_new(const V& ps, bool learnt = false);
+ | ^~~~~~~~~~
+
+--- a/packages/swi-minisat2/C/SolverTypes.h
++++ b/packages/swi-minisat2/C/SolverTypes.h
+@@ -97,6 +97,9 @@
+ //=================================================================================================
+ // Clause -- a simple class for representing a clause:
+
++class Clause;
++template<class V>
++Clause* Clause_new(const V& ps, bool learnt = false);
+
+ class Clause {
+ uint32_t size_etc;
+@@ -119,7 +122,7 @@
+
+ // -- use this function instead:
+ template<class V>
+- friend Clause* Clause_new(const V& ps, bool learnt = false);
++ friend Clause* Clause_new(const V& ps, bool learnt);
+
+ int size () const { return size_etc >> 3; }
+ void shrink (int i) { assert(i <= size()); size_etc = (((size_etc >> 3) - i) << 3) | (size_etc & 7); }
diff --git a/dev-lang/yap/yap-6.3.3-r1.ebuild b/dev-lang/yap/yap-6.3.3-r1.ebuild
index fd653ef29268..3864fe27707b 100644
--- a/dev-lang/yap/yap-6.3.3-r1.ebuild
+++ b/dev-lang/yap/yap-6.3.3-r1.ebuild
@@ -29,7 +29,10 @@ RDEPEND="sys-libs/zlib
DEPEND="${RDEPEND}
doc? ( app-text/texi2html )"
-PATCHES=( "${WORKDIR}"/${PV} )
+PATCHES=(
+ "${WORKDIR}"/${PV}
+ "${FILESDIR}"/${PN}-6.3.3-fix-gcc9.patch
+)
src_prepare() {
default