commit:     438973c52e3f7342c5a06cc03dd97de720296bdf
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Wed Jul 19 07:47:21 2023 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Mon Jul 31 07:04:24 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=438973c5

games-strategy/seven-kingdoms: Fix C++17 does not allow register storage class

Closes: https://bugs.gentoo.org/895996
Closes: https://github.com/gentoo/gentoo/pull/31954
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 .../files/seven-kingdoms-2.15.5-c++17.patch        | 23 ++++++++++++++++++++++
 .../seven-kingdoms/seven-kingdoms-2.15.5.ebuild    |  4 ++++
 2 files changed, 27 insertions(+)

diff --git 
a/games-strategy/seven-kingdoms/files/seven-kingdoms-2.15.5-c++17.patch 
b/games-strategy/seven-kingdoms/files/seven-kingdoms-2.15.5-c++17.patch
new file mode 100644
index 000000000000..5f8e8dd7bb6d
--- /dev/null
+++ b/games-strategy/seven-kingdoms/files/seven-kingdoms-2.15.5-c++17.patch
@@ -0,0 +1,23 @@
+Bug: https://bugs.gentoo.org/895996
+--- a/src/OMISC.cpp
++++ b/src/OMISC.cpp
+@@ -608,7 +608,7 @@ int Misc::str_icmpx( const char* str1, const char* str2 )
+    err_when( !str1 || !str2 );
+ 
+    int i;
+-   register int a,b;
++   int a,b;
+ 
+ 
+    for (i=0 ; (a=str1[i]) != '\0' && (b=str2[i]) != '\0' ; i++)
+--- a/src/OSPATHBT.cpp
++++ b/src/OSPATHBT.cpp
+@@ -50,7 +50,7 @@ void NodePriorityQueue::reset_priority_queue()
+ void NodePriorityQueue::insert_node(Node *insertNode)
+ {
+       unsigned int i = ++size;
+-      register int f=insertNode->node_f;
++      int f=insertNode->node_f;
+       Node **localElements = elements;
+       
+       while(i>1 && localElements[i/2]->node_f > f)

diff --git a/games-strategy/seven-kingdoms/seven-kingdoms-2.15.5.ebuild 
b/games-strategy/seven-kingdoms/seven-kingdoms-2.15.5.ebuild
index 2499b114bada..1e339923691e 100644
--- a/games-strategy/seven-kingdoms/seven-kingdoms-2.15.5.ebuild
+++ b/games-strategy/seven-kingdoms/seven-kingdoms-2.15.5.ebuild
@@ -26,6 +26,10 @@ RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+       "${FILESDIR}/${P}-c++17.patch"
+)
+
 src_unpack() {
        unpack ${MY_P}.tar.xz
 }

Reply via email to