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@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32826
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
This commit is contained in:
Brahmajit Das
2023-09-16 07:40:52 +00:00
committed by Andrew Ammerlaan
parent 9853af0ee5
commit 71917d863d
2 changed files with 90 additions and 0 deletions

View File

@@ -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
}

View File

@@ -0,0 +1,43 @@
https://github.com/coin3d/soxt/pull/17
From: Brahmajit Das <brahmajit.xyz@gmail.com>
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 <brahmajit.xyz@gmail.com>
--- 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