[lcms] fix register usage for cpp >= 17 (#26008)

* lcms fix register usage in cpp code

* v db
This commit is contained in:
Alexander Neumann 2022-07-29 00:42:12 +02:00 committed by GitHub
parent d3f74469ee
commit f7b4df27ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 2 deletions

13
ports/lcms/cpp17.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/include/lcms2.h b/include/lcms2.h
index 7e061ce7c..5d234c4e4 100644
--- a/include/lcms2.h
+++ b/include/lcms2.h
@@ -152,7 +152,7 @@ typedef double cmsFloat64Number;
#endif
// Handle "register" keyword
-#if defined(CMS_NO_REGISTER_KEYWORD) && !defined(CMS_DLL) && !defined(CMS_DLL_BUILD)
+#if __cplusplus >= 201703L || defined(CMS_NO_REGISTER_KEYWORD) && !defined(CMS_DLL) && !defined(CMS_DLL_BUILD)
# define CMSREGISTER
#else
# define CMSREGISTER register

View File

@ -11,6 +11,7 @@ vcpkg_from_github(
PATCHES PATCHES
remove_library_directive.patch remove_library_directive.patch
${ADDITIONAL_PATCH} ${ADDITIONAL_PATCH}
cpp17.patch
) )
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

View File

@ -1,7 +1,7 @@
{ {
"name": "lcms", "name": "lcms",
"version": "2.12", "version": "2.12",
"port-version": 3, "port-version": 4,
"description": "Little CMS.", "description": "Little CMS.",
"homepage": "https://github.com/mm2/Little-CMS", "homepage": "https://github.com/mm2/Little-CMS",
"dependencies": [ "dependencies": [

View File

@ -3414,7 +3414,7 @@
}, },
"lcms": { "lcms": {
"baseline": "2.12", "baseline": "2.12",
"port-version": 3 "port-version": 4
}, },
"leaf": { "leaf": {
"baseline": "0.2.2", "baseline": "0.2.2",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "220d2255b3f13ec7b0266393d65c674f5c060c2b",
"version": "2.12",
"port-version": 4
},
{ {
"git-tree": "5e1b890660ea5d2a869407a0714d4385e949b4d6", "git-tree": "5e1b890660ea5d2a869407a0714d4385e949b4d6",
"version": "2.12", "version": "2.12",