commit:     71917d863d44659a4aae444db1f84ff87ec83a99
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Sat Sep 16 07:40:52 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 08:35:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71917d86

media-libs/SoXt: Fix C++17 does not allow register storage class

and update EAPI 7 -> 8

Closes: https://bugs.gentoo.org/896234
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32826
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 media-libs/SoXt/SoXt-1.4.0-r1.ebuild               | 47 ++++++++++++++++++++++
 .../files/SoXt-1.4.0-drop-register-keyword.patch   | 43 ++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/media-libs/SoXt/SoXt-1.4.0-r1.ebuild 
b/media-libs/SoXt/SoXt-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..64483888e526
--- /dev/null
+++ b/media-libs/SoXt/SoXt-1.4.0-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+MY_P=${P/soxt/SoXt}
+
+HOMEPAGE="https://github.com/coin3d/coin/wiki";
+DESCRIPTION="GUI binding for using Coin/Open Inventor with Xt/Motif"
+SRC_URI="https://github.com/coin3d/soxt/releases/download/${MY_P}/${P}-src.tar.gz";
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+SLOT="0"
+IUSE="debug doc"
+
+RDEPEND="
+       media-libs/coin
+       x11-libs/motif:0
+       virtual/opengl
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )
+"
+
+S="${WORKDIR}/soxt"
+
+DOCS=(AUTHORS ChangeLog HACKING NEWS README TODO BUGS.txt)
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.4.0-drop-register-keyword.patch
+)
+
+src_configure() {
+       use debug && append-cppflags -DSOXT_DEBUG=1
+       local mycmakeargs=(
+               -DCMAKE_INSTALL_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+               -DSOXT_BUILD_DOCUMENTATION=$(usex doc)
+               -DSOXT_BUILD_INTERNAL_DOCUMENTATION=OFF
+               -DSOXT_VERBOSE=$(usex debug)
+       )
+       cmake_src_configure
+}

diff --git a/media-libs/SoXt/files/SoXt-1.4.0-drop-register-keyword.patch 
b/media-libs/SoXt/files/SoXt-1.4.0-drop-register-keyword.patch
new file mode 100644
index 000000000000..fcbfa7dfd357
--- /dev/null
+++ b/media-libs/SoXt/files/SoXt-1.4.0-drop-register-keyword.patch
@@ -0,0 +1,43 @@
+https://github.com/coin3d/soxt/pull/17
+From: Brahmajit Das <[email protected]>
+Date: Sat, 16 Sep 2023 07:32:47 +0000
+Subject: [PATCH] Fix C++17 does not allow register storage class specifier
+
+The register storage class was deprecated in C++14 and completely
+removed in C++17. Hence, we cannot use it anymore and would result in a
+build error.
+
+Bug: https://bugs.gentoo.org/896234
+Signed-off-by: Brahmajit Das <[email protected]>
+--- a/src/Inventor/Xt/widgets/SoXtGLArea.cpp
++++ b/src/Inventor/Xt/widgets/SoXtGLArea.cpp
+@@ -468,7 +468,7 @@ createColormap(
+   } * cmapCache;
+   static int cacheEntries = 0;
+   static int cacheMalloced = 0;
+-  register int i;
++  int i;
+     
+   assert(widget->soxtGLArea.visualInfo);
+ 
+@@ -564,7 +564,7 @@ Realize(
+   Mask * valueMask,
+   XSetWindowAttributes * attributes)
+ {
+-  register SoXtGLAreaWidget glw = (SoXtGLAreaWidget) widget;
++  SoXtGLAreaWidget glw = (SoXtGLAreaWidget) widget;
+   SoXtGLAreaCallbackStruct cb;
+   Widget parentShell;
+   Status status;
+@@ -670,7 +670,7 @@ Destroy(
+   Widget parentShell;
+   Status status;
+   int countReturn;
+-  register int i;
++  int i;
+ 
+   if (glw->soxtGLArea.myList && glw->soxtGLArea.attribList)
+     XtFree((char *) glw->soxtGLArea.attribList);
+-- 
+2.42.0
+

Reply via email to