diff options
author | Sam James <sam@gentoo.org> | 2023-02-14 22:55:29 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-14 23:03:55 +0000 |
commit | 9c81ebf8c454cc218fa59993c95e92689a628639 (patch) | |
tree | a60c3e7bca81651161fccfdfc77f148aa5024234 /media-libs | |
parent | app-text/mecab: fix build w/ clang 16 (diff) | |
download | gentoo-9c81ebf8c454cc218fa59993c95e92689a628639.tar.gz gentoo-9c81ebf8c454cc218fa59993c95e92689a628639.tar.bz2 gentoo-9c81ebf8c454cc218fa59993c95e92689a628639.zip |
media-libs/glu: fix build w/ clang 16
Closes: https://bugs.gentoo.org/894314
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/glu/files/glu-9.0.2-clang-16-register.patch | 30 | ||||
-rw-r--r-- | media-libs/glu/glu-9.0.2.ebuild | 6 |
2 files changed, 35 insertions, 1 deletions
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 <raj.khem@gmail.com> +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 <raj.khem@gmail.com> +--- 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) |