summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrahmajit Das <brahmajit.xyz@gmail.com>2023-09-16 07:40:52 +0000
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2023-10-27 10:35:26 +0200
commit71917d863d44659a4aae444db1f84ff87ec83a99 (patch)
tree82ba30ac295875100d06234baff4d9e692e4c216
parentsci-astronomy/pysiril: enable py3.12 (diff)
downloadgentoo-71917d863d44659a4aae444db1f84ff87ec83a99.tar.gz
gentoo-71917d863d44659a4aae444db1f84ff87ec83a99.tar.bz2
gentoo-71917d863d44659a4aae444db1f84ff87ec83a99.zip
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>
-rw-r--r--media-libs/SoXt/SoXt-1.4.0-r1.ebuild47
-rw-r--r--media-libs/SoXt/files/SoXt-1.4.0-drop-register-keyword.patch43
2 files changed, 90 insertions, 0 deletions
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 <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
+