Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because graphics/qt5-imageformats 's build infrastructure does not
explicitly set its C++ standard, this leads to an issue detecting libmng
in the configure stage:
Configure summary:
Further Image Formats:
JasPer ................................. yes
MNG .................................... no
TIFF ................................... yes
Using system libtiff ................. yes
WEBP ................................... yes
Using system libwebp ................. yes
This is because the small configure test program for libmng includes
libmng.h, which transitively includes lcms.h, and the latter fails due
to 'register' keywords in the header. With lcms2.h there is a special
define CMS_NO_REGISTER_KEYWORD to avoid usage of the register keyword,
but lcms.h is very old and does not support that.
As a workaround, define the register keyword away via a "head" object in
src/imageformats/configure.json, and via CXXFLAGS for the rest of the
build.
PR: 271914
Approved by: tcberner (maintainer)
MFH: 2023Q2
21 lines
615 B
JSON
21 lines
615 B
JSON
--- src/imageformats/configure.json.orig 2023-01-03 22:24:44 UTC
|
|
+++ src/imageformats/configure.json
|
|
@@ -19,6 +19,7 @@
|
|
"headers": "jasper/jasper.h",
|
|
"test": {
|
|
"include": [
|
|
+ "cstddef",
|
|
"string.h",
|
|
"jasper/jasper.h"
|
|
],
|
|
@@ -41,6 +42,9 @@
|
|
"mng": {
|
|
"headers": "libmng.h",
|
|
"test": {
|
|
+ "head": [
|
|
+ "#define register"
|
|
+ ],
|
|
"include": [
|
|
"stdio.h",
|
|
"libmng.h"
|