diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-05-14 18:08:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-05-14 19:28:24 +0000 |
commit | 2ab36e0a74646c14200ab83a34670fd495ea7f51 (patch) | |
tree | 64a25f46d1bbdc9fe52236cb8f839f8c6951809c | |
parent | 6084a7f537241a5936d76883a9638571bb9c102c (diff) | |
download | ports-2ab36e0a74646c14200ab83a34670fd495ea7f51.tar.gz ports-2ab36e0a74646c14200ab83a34670fd495ea7f51.zip |
graphics/libcdr01: fix build with clang 16
Since clang 16 (and gcc 11) the default C++ standard is now gnu++17.
Because graphics/libcdr01's configure scripts and Makefiles do not
explicitly set the C++ standard, this leads to several errors:
In file included from CDRDocument.cpp:15:
In file included from ./CDRContentCollector.h:26:
In file included from ./CDRCollector.h:20:
/usr/local/include/lcms2.h:1291:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
typedef cmsInt32Number (* cmsSAMPLER16) (CMSREGISTER const cmsUInt16Number In[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1292:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER cmsUInt16Number Out[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1293:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER void * Cargo);
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1295:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
typedef cmsInt32Number (* cmsSAMPLERFLOAT)(CMSREGISTER const cmsFloat32Number In[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1296:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER cmsFloat32Number Out[],
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
/usr/local/include/lcms2.h:1297:44: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
CMSREGISTER void * Cargo);
^~~~~~~~~~~~
/usr/local/include/lcms2.h:158:23: note: expanded from macro 'CMSREGISTER'
# define CMSREGISTER register
^
Add -DCMS_NO_REGISTER_KEYWORD to CPPFLAGS, to avoid lcms2.h using
register keywords in its declarations.
PR: 271422
Approved by: sunpoet (maintainer)
MFH: 2023Q2
-rw-r--r-- | graphics/libcdr01/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/libcdr01/Makefile b/graphics/libcdr01/Makefile index 186cb4570ddb..70a8868b8d0a 100644 --- a/graphics/libcdr01/Makefile +++ b/graphics/libcdr01/Makefile @@ -1,6 +1,6 @@ PORTNAME= libcdr PORTVERSION= 0.1.7 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= graphics devel MASTER_SITES= LODEV PKGNAMESUFFIX= 01 @@ -23,6 +23,7 @@ USES= compiler:c++11-lib libtool pathfix pkgconfig tar:xz USE_LDCONFIG= yes INSTALL_TARGET= install-strip +CPPFLAGS+= -DCMS_NO_REGISTER_KEYWORD CPPFLAGS+= -I${LOCALBASE}/include CXXFLAGS+= -Wno-long-long |