commit: 9c81ebf8c454cc218fa59993c95e92689a628639 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Feb 14 22:55:29 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Feb 14 23:03:55 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c81ebf8
media-libs/glu: fix build w/ clang 16 Closes: https://bugs.gentoo.org/894314 Signed-off-by: Sam James <sam <AT> gentoo.org> .../glu/files/glu-9.0.2-clang-16-register.patch | 30 ++++++++++++++++++++++ media-libs/glu/glu-9.0.2.ebuild | 6 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/media-libs/glu/files/glu-9.0.2-clang-16-register.patch b/media-libs/glu/files/glu-9.0.2-clang-16-register.patch new file mode 100644 index 000000000000..c06d893f1151 --- /dev/null +++ b/media-libs/glu/files/glu-9.0.2-clang-16-register.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/894314 +https://gitlab.freedesktop.org/mesa/glu/-/merge_requests/10 + +From b6c308172993dfd0f76ee9f4fe083cff8c51ced8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 13 Jan 2023 20:58:07 -0800 +Subject: [PATCH] Remove deprecated register in C++17 + +Fixes errors like + +src/libnurbs/internals/varray.cc:76:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] + register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]); + ^~~~~~~~~ + +Signed-off-by: Khem Raj <[email protected]> +--- a/src/libnurbs/internals/varray.cc ++++ b/src/libnurbs/internals/varray.cc +@@ -73,8 +73,8 @@ Varray::~Varray( void ) + inline void + Varray::update( Arc_ptr arc, long dir[2], REAL val ) + { +- register long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]); +- register long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]); ++ long ds = sgn(arc->tail()[0] - arc->prev->tail()[0]); ++ long dt = sgn(arc->tail()[1] - arc->prev->tail()[1]); + + if( dir[0] != ds || dir[1] != dt ) { + dir[0] = ds; +-- +GitLab diff --git a/media-libs/glu/glu-9.0.2.ebuild b/media-libs/glu/glu-9.0.2.ebuild index da35e84be92a..bb010d61a62e 100644 --- a/media-libs/glu/glu-9.0.2.ebuild +++ b/media-libs/glu/glu-9.0.2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -28,6 +28,10 @@ IUSE="static-libs" DEPEND=">=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]" RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}"/${PN}-9.0.2-clang-16-register.patch +) + multilib_src_configure() { local emesonargs=( -Ddefault_library=$(usex static-libs both shared)
