FreeBSD Bugzilla – Attachment 242693 Details for
Bug 271914
graphics/qt5-imageformats: fix build with clang 16
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
graphics/qt5-imageformats: fix build with clang 16
graphics__qt5-imageformats-fix-clang16-build-1.diff (text/plain), 2.69 KB, created by
Dimitry Andric
on 2023-06-08 17:55:07 UTC
(
hide
)
Description:
graphics/qt5-imageformats: fix build with clang 16
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2023-06-08 17:55:07 UTC
Size:
2.69 KB
patch
obsolete
>commit 3f88df9bc77c55287c2e8ec8583343cfbf5640dc >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2023-06-08 19:48:04 +0200 > > graphics/qt5-imageformats: fix build with clang 16 > > 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. > >diff --git a/graphics/qt5-imageformats/Makefile b/graphics/qt5-imageformats/Makefile >index 9ed2948a12a9..6a256be0c216 100644 >--- a/graphics/qt5-imageformats/Makefile >+++ b/graphics/qt5-imageformats/Makefile >@@ -15,4 +15,6 @@ LIB_DEPENDS= libjasper.so:graphics/jasper \ > USES= compiler:c++11-lang localbase qmake qt-dist:5,imageformats > USE_QT= core gui buildtools:build > >+CXXFLAGS+= -Dregister= >+ > .include <bsd.port.mk> >diff --git a/graphics/qt5-imageformats/files/patch-src_imageformats_configure.json b/graphics/qt5-imageformats/files/patch-src_imageformats_configure.json >index d88962cfe129..3617b167d5b4 100644 >--- a/graphics/qt5-imageformats/files/patch-src_imageformats_configure.json >+++ b/graphics/qt5-imageformats/files/patch-src_imageformats_configure.json >@@ -1,4 +1,4 @@ >---- src/imageformats/configure.json.orig 2022-03-02 19:21:52 UTC >+--- src/imageformats/configure.json.orig 2023-01-03 22:24:44 UTC > +++ src/imageformats/configure.json > @@ -19,6 +19,7 @@ > "headers": "jasper/jasper.h", >@@ -8,3 +8,13 @@ > "string.h", > "jasper/jasper.h" > ], >+@@ -41,6 +42,9 @@ >+ "mng": { >+ "headers": "libmng.h", >+ "test": { >++ "head": [ >++ "#define register" >++ ], >+ "include": [ >+ "stdio.h", >+ "libmng.h"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271914
: 242693