Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/coinor-couenne/files/, sci-libs/coinor-couenne/
Date: Tue, 15 Jun 2021 04:44:20
Message-Id: 1623732232.8d3a84b70c2c2b3a20a40b30a88c3aa91db58203.sam@gentoo
1 commit: 8d3a84b70c2c2b3a20a40b30a88c3aa91db58203
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 15 04:43:52 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 15 04:43:52 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d3a84b7
7
8 sci-libs/coinor-couenne: fix build with GCC 11
9
10 Closes: https://bugs.gentoo.org/792798
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../coinor-couenne/coinor-couenne-0.5.8-r1.ebuild | 4 ++
14 ...coinor-couenne-0.5.8-fix-build-with-gcc11.patch | 43 ++++++++++++++++++++++
15 2 files changed, 47 insertions(+)
16
17 diff --git a/sci-libs/coinor-couenne/coinor-couenne-0.5.8-r1.ebuild b/sci-libs/coinor-couenne/coinor-couenne-0.5.8-r1.ebuild
18 index 63bb046a307..cd577558b1c 100644
19 --- a/sci-libs/coinor-couenne/coinor-couenne-0.5.8-r1.ebuild
20 +++ b/sci-libs/coinor-couenne/coinor-couenne-0.5.8-r1.ebuild
21 @@ -32,6 +32,10 @@ BDEPEND="
22 virtual/latex-base
23 )"
24
25 +PATCHES=(
26 + "${FILESDIR}"/${PN}-0.5.8-fix-build-with-gcc11.patch
27 +)
28 +
29 src_prepare() {
30 default
31 # Prevent unneeded call to pkg-config that needs ${ED}'s in path.
32
33 diff --git a/sci-libs/coinor-couenne/files/coinor-couenne-0.5.8-fix-build-with-gcc11.patch b/sci-libs/coinor-couenne/files/coinor-couenne-0.5.8-fix-build-with-gcc11.patch
34 new file mode 100644
35 index 00000000000..339ce1a0e90
36 --- /dev/null
37 +++ b/sci-libs/coinor-couenne/files/coinor-couenne-0.5.8-fix-build-with-gcc11.patch
38 @@ -0,0 +1,43 @@
39 +https://bugs.gentoo.org/792798
40 +
41 +From debc5de2d0ac9654c01db080448df064b808c56e Mon Sep 17 00:00:00 2001
42 +From: Sam James <sam@g.o>
43 +Date: Tue, 15 Jun 2021 04:24:22 +0000
44 +Subject: [PATCH] Fix build with GCC 11
45 +diff --git a/src/problem/CouenneProblem.hpp b/src/problem/CouenneProblem.hpp
46 +index e5b54a5..db28cfd 100644
47 +--- a/src/problem/CouenneProblem.hpp
48 ++++ b/src/problem/CouenneProblem.hpp
49 +@@ -74,7 +74,7 @@ class Nauty;
50 + #define COUENNE_EPS_SYMM 1e-8
51 +
52 + struct myclass0 {
53 +- inline bool operator() (register const Node &a, register const Node &b) {
54 ++ inline bool operator() (register const Node &a, register const Node &b) const {
55 +
56 + return (( a.get_code () < b.get_code ()) ||
57 + (( a.get_code () == b.get_code () &&
58 +@@ -120,7 +120,7 @@ class Nauty;
59 +
60 +
61 + struct myclass {
62 +- inline bool operator() (register const Node &a, register const Node &b) {
63 ++ inline bool operator() (register const Node &a, register const Node &b) const {
64 + return (a.get_index() < b.get_index() );
65 + }
66 + };
67 +
68 +--- a/src/cut/sdpcuts/CouenneMatrix.hpp
69 ++++ b/src/cut/sdpcuts/CouenneMatrix.hpp
70 +@@ -69,7 +69,7 @@ namespace Couenne {
71 +
72 + struct compare_scalars {
73 + inline bool operator() (register CouenneScalar * const &a,
74 +- register CouenneScalar * const &b)
75 ++ register CouenneScalar * const &b) const
76 + {return a -> getIndex () < b -> getIndex ();}
77 + };
78 +
79 +--
80 +2.32.0
81 +