diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-05-18 15:08:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-05-18 21:35:52 +0000 |
commit | 6a58ef80a134804463b7f9de82503bdb681b46c1 (patch) | |
tree | c87b18d00ca195aec0a0d7f663918ad16e3b0ae2 | |
parent | c035007f958a9fa3c45bb1441a63540be39018ed (diff) | |
download | ports-6a58ef80a134804463b7f9de82503bdb681b46c1.tar.gz ports-6a58ef80a134804463b7f9de82503bdb681b46c1.zip |
graphics/freeimage: fix build with clang 16
Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because graphics/freeimage's Makefile does not explicitly set its C++
standard, this leads to several errors:
In file included from Source/FreeImage/PluginEXR.cpp:33:
In file included from Source/FreeImage/../OpenEXR/IlmImf/ImfOutputFile.h:46:
In file included from Source/OpenEXR/IlmImf/ImfHeader.h:51:
Source/OpenEXR/Imath/ImathVec.h:228:34: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:228:34: note: use 'noexcept(false)' instead
const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
noexcept(false)
Source/OpenEXR/Imath/ImathVec.h:232:37: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
Vec2<T> normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Source/OpenEXR/Imath/ImathVec.h:232:37: note: use 'noexcept(false)' instead
Vec2<T> normalizedExc () const throw (IEX_NAMESPACE::MathExc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
noexcept(false)
Because these constructs are no longer available in C++17, add
USE_CXXSTD=gnu++14 to compile for C++14 with GNU extensions instead.
PR: 271493
Approved by: portmgr (build fix blanket)
MFH: 2023Q2
-rw-r--r-- | graphics/freeimage/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/freeimage/Makefile b/graphics/freeimage/Makefile index 04ac430f0d73..4dc5f8448d26 100644 --- a/graphics/freeimage/Makefile +++ b/graphics/freeimage/Makefile @@ -1,6 +1,6 @@ PORTNAME= freeimage PORTVERSION= 3.18.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= graphics MASTER_SITES= SF/${PORTNAME}/Source%20Distribution/${PORTVERSION} DISTNAME= FreeImage${PORTVERSION:S/.//g} @@ -21,6 +21,7 @@ BROKEN_mips= fails to compile: section referenced in discarded section BROKEN_mips64= fails to compile: opcode not supported on this processor: mips3 (mips3) 'madd $4,$5' USES= cpe dos2unix gmake zip +USE_CXXSTD= gnu++14 CPE_VENDOR= ${PORTNAME}_project DOS2UNIX_FILES= Source/LibOpenJPEG/opj_malloc.h \ Source/LibRawLite/dcraw/dcraw.c \ |