diff --git a/ports/glog/fix-windows-CXX11_ATOMIC.patch b/ports/glog/fix-windows-CXX11_ATOMIC.patch deleted file mode 100644 index 1e1723e363e70a..00000000000000 --- a/ports/glog/fix-windows-CXX11_ATOMIC.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in -index 3ecacfb..2d48a0e 100644 ---- a/src/glog/logging.h.in -+++ b/src/glog/logging.h.in -@@ -100,6 +100,12 @@ - #include - #endif - -+#ifdef GLOG_OS_WINDOWS -+#ifndef HAVE_CXX11_ATOMIC -+#define HAVE_CXX11_ATOMIC -+#endif -+#endif -+ - #ifdef HAVE_CXX11_ATOMIC - #include - #elif defined(GLOG_OS_WINDOWS) diff --git a/ports/glog/noerror-nominmax.patch b/ports/glog/noerror-nominmax.patch new file mode 100644 index 00000000000000..f1d2a518b15aaa --- /dev/null +++ b/ports/glog/noerror-nominmax.patch @@ -0,0 +1,60 @@ +diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in +index 3ecacfb..0bdbe6d 100644 +--- a/src/glog/logging.h.in ++++ b/src/glog/logging.h.in +@@ -103,7 +103,19 @@ + #ifdef HAVE_CXX11_ATOMIC + #include + #elif defined(GLOG_OS_WINDOWS) ++# ifndef WIN32_LEAN_AND_MEAN ++# define WIN32_LEAN_AND_MEAN // We only need minimal includes ++# endif ++// To avoid macro definition of ERROR. ++// To avoid macro definition of min/max. ++# ifndef NOMINMAX ++# define NOMINMAX ++# endif ++ + #include ++#ifdef ERROR ++# undef ERROR ++#endif + #endif + + @ac_google_start_namespace@ +@@ -1061,7 +1073,7 @@ namespace google { + #elif defined(GLOG_OS_WINDOWS) + + #define SOME_KIND_OF_LOG_EVERY_N(severity, n, what_to_do) \ +- static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ ++ static volatile unsigned LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ + InterlockedIncrement(&LOG_OCCURRENCES); \ + if (InterlockedIncrement(&LOG_OCCURRENCES_MOD_N) > n) \ + InterlockedExchangeSubtract(&LOG_OCCURRENCES_MOD_N, n); \ +@@ -1071,7 +1083,7 @@ namespace google { + &what_to_do).stream() + + #define SOME_KIND_OF_LOG_IF_EVERY_N(severity, condition, n, what_to_do) \ +- static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ ++ static volatile unsigned LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ + InterlockedIncrement(&LOG_OCCURRENCES); \ + if (condition && \ + (InterlockedIncrement(&LOG_OCCURRENCES_MOD_N) || true) && \ +@@ -1082,7 +1094,7 @@ namespace google { + &what_to_do).stream() + + #define SOME_KIND_OF_PLOG_EVERY_N(severity, n, what_to_do) \ +- static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ ++ static volatile unsigned LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \ + InterlockedIncrement(&LOG_OCCURRENCES); \ + if (InterlockedIncrement(&LOG_OCCURRENCES_MOD_N) > n) \ + InterlockedExchangeSubtract(&LOG_OCCURRENCES_MOD_N, n); \ +@@ -1092,7 +1104,7 @@ namespace google { + &what_to_do).stream() + + #define SOME_KIND_OF_LOG_FIRST_N(severity, n, what_to_do) \ +- static int LOG_OCCURRENCES = 0; \ ++ static volatile unsigned LOG_OCCURRENCES = 0; \ + if (LOG_OCCURRENCES <= n) \ + InterlockedIncrement(&LOG_OCCURRENCES); \ + if (LOG_OCCURRENCES <= n) \ diff --git a/ports/glog/portfile.cmake b/ports/glog/portfile.cmake index 10e1d13c234441..7edbb2ed7b7dd0 100644 --- a/ports/glog/portfile.cmake +++ b/ports/glog/portfile.cmake @@ -8,7 +8,7 @@ vcpkg_from_github( glog_disable_debug_postfix.patch fix_glog_CMAKE_MODULE_PATH.patch fix_log_every_n.patch - fix-windows-CXX11_ATOMIC.patch + noerror-nominmax.patch fix_crosscompile_symbolize.patch ) diff --git a/ports/glog/vcpkg.json b/ports/glog/vcpkg.json index 5f6b947fed76ac..d53b0421e0417e 100644 --- a/ports/glog/vcpkg.json +++ b/ports/glog/vcpkg.json @@ -1,7 +1,7 @@ { "name": "glog", "version": "0.5.0", - "port-version": 4, + "port-version": 5, "description": "C++ implementation of the Google logging module", "homepage": "https://github.com/google/glog", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index ba25c0e43e45e0..949b0936a0a69e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2574,7 +2574,7 @@ }, "glog": { "baseline": "0.5.0", - "port-version": 4 + "port-version": 5 }, "gloo": { "baseline": "20201203", diff --git a/versions/g-/glog.json b/versions/g-/glog.json index 94c50d82ac0083..0e0d23076946ef 100644 --- a/versions/g-/glog.json +++ b/versions/g-/glog.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "bb84d3c0e6057e00ef151afde936fa6b4fba33c9", + "version": "0.5.0", + "port-version": 5 + }, { "git-tree": "bb5f54eba990cc0f03c64e1d09f343dd6cd7b22b", "version": "0.5.0",