git: f82231b90cd7 - main - math/coinutils: fix build with clang 16

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Thu, 08 Jun 2023 16:30:50 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f82231b90cd753bb00025162f79f4b2cb492d41a

commit f82231b90cd753bb00025162f79f4b2cb492d41a
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-06 15:46:11 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-08 16:29:48 +0000

    math/coinutils: fix build with clang 16
    
    Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
    Because math/coinutils's build infrastructure does not explicitly set
    its C++ standard, this leads to several errors:
    
      ./CoinOslC.h:37:15: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int c_ekkbtrn(register const EKKfactinfo *fact,
                    ^~~~~~~~~
      ./CoinOslC.h:40:22: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int c_ekkbtrn_ipivrw(register const EKKfactinfo *fact,
                           ^~~~~~~~~
      ./CoinOslC.h:44:15: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int c_ekketsj(register /*const*/ EKKfactinfo *fact,
                    ^~~~~~~~
      ./CoinOslC.h:49:15: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int c_ekkftrn(register const EKKfactinfo *fact,
                    ^~~~~~~~~
      ./CoinOslC.h:53:18: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int c_ekkftrn_ft(register EKKfactinfo *fact,
                       ^~~~~~~~~
      ./CoinOslC.h:55:17: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      void c_ekkftrn2(register EKKfactinfo *fact, double *dwork1,
                      ^~~~~~~~~
      ./CoinOslC.h:59:15: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int c_ekklfct(register EKKfactinfo *fact);
                    ^~~~~~~~~
      ./CoinOslC.h:60:15: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      int c_ekkslcf(register const EKKfactinfo *fact);
                    ^~~~~~~~~
    
    To work around the errors, define the register keyword away using
    CPPFLAGS.
    
    PR:             271870
    Approved by:    yuri (maintainer)
    MFH:            2023Q2
---
 math/coinutils/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/math/coinutils/Makefile b/math/coinutils/Makefile
index 41f97eda927d..d059a758ff98 100644
--- a/math/coinutils/Makefile
+++ b/math/coinutils/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	CoinUtils
 DISTVERSIONPREFIX=	releases/
 DISTVERSION=	2.11.9
+PORTREVISION=	1
 CATEGORIES=	math
 PKGNAMEPREFIX=	coin-or-
 
@@ -25,6 +26,8 @@ CONFIGURE_ARGS=	--with-blas-lib="-lopenblas" --with-lapack-lib="-lopenblas" \
 		# doesn't link with the optional dependency glpk: https://github.com/coin-or/CoinUtils/issues/7
 USE_LDCONFIG=	yes
 
+CPPFLAGS+=	-Dregister=
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	coin-or