Skip to content

Commit

Permalink
[fmt] update to 11.0.2 (#39738)
Browse files Browse the repository at this point in the history
  • Loading branch information
miyanyan committed Aug 3, 2024
1 parent 513aa7c commit fe1cde6
Show file tree
Hide file tree
Showing 46 changed files with 461 additions and 35 deletions.
12 changes: 12 additions & 0 deletions ports/buck-yeh-bux/fix-build-error-with-fmt11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/include/bux/FA.h b/include/bux/FA.h
index 907ed95..f8439b8 100644
--- a/include/bux/FA.h
+++ b/include/bux/FA.h
@@ -9,6 +9,7 @@
#include <map> // std::map<>
#include <set> // std::set<>
#include <vector> // std::vector<>
+#include <iterator>

namespace bux {

2 changes: 2 additions & 0 deletions ports/buck-yeh-bux/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ vcpkg_from_github(
REF "${VERSION}"
SHA512 7b58e67d0744ead50fb5a826118d1026dc85b6bd880a2d3f30a9d355fc20f48697057eec139ad3960a65cebfbd0e30b99bee42b71bd23058c815a50b6df10c5c
HEAD_REF main
PATCHES
fix-build-error-with-fmt11.patch
)

vcpkg_cmake_configure(
Expand Down
2 changes: 1 addition & 1 deletion ports/buck-yeh-bux/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "buck-yeh-bux",
"version": "1.6.8",
"port-version": 1,
"port-version": 2,
"description": "A supplemental C++ library with functionalities not directly supported from Modern C++ standard.",
"homepage": "https://github.com/buck-yeh/bux",
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions ports/fizz/fix-build-error-with-fmt11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/fizz/record/Types.h b/fizz/record/Types.h
index 2cb449a..f1a370b 100644
--- a/fizz/record/Types.h
+++ b/fizz/record/Types.h
@@ -454,7 +454,7 @@ struct hash<fizz::ExtensionType> {

template <>
struct fmt::formatter<fizz::ExtensionType> : formatter<unsigned> {
- auto format(fizz::ExtensionType t, format_context& ctx) {
+ auto format(fizz::ExtensionType t, format_context& ctx) const {
return formatter<unsigned>::format(folly::to_underlying(t), ctx);
}
};
1 change: 1 addition & 0 deletions ports/fizz/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF main
PATCHES
fix-build.patch
fix-build-error-with-fmt11.patch
)

# Prefer installed config files
Expand Down
1 change: 1 addition & 0 deletions ports/fizz/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "fizz",
"version-string": "2024.07.29.00",
"port-version": 1,
"description": "a TLS 1.3 implementation by Facebook",
"homepage": "https://github.com/facebookincubator/fizz",
"license": "BSD-3-Clause",
Expand Down
12 changes: 0 additions & 12 deletions ports/fmt/fix-visibility.patch

This file was deleted.

5 changes: 2 additions & 3 deletions ports/fmt/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fmtlib/fmt
REF "${VERSION}"
SHA512 27df90c681ec37e55625062a79e3b83589b6d7e94eff37a3b412bb8c1473f757a8adb727603acc9185c3490628269216843b7d7bd5a3cb37f0029da5d1495ffa
SHA512 47ff6d289dcc22681eea6da465b0348172921e7cafff8fd57a1540d3232cc6b53250a4625c954ee0944c87963b17680ecbc3ea123e43c2c822efe0dc6fa6cef3
HEAD_REF master
PATCHES
fix-visibility.patch
fix-write-batch.patch
)

Expand All @@ -23,7 +22,7 @@ vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()

if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fmt/core.h
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fmt/base.h"
"defined(FMT_SHARED)"
"1"
)
Expand Down
3 changes: 1 addition & 2 deletions ports/fmt/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "fmt",
"version": "10.2.1",
"port-version": 2,
"version": "11.0.2",
"description": "{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.",
"homepage": "https://github.com/fmtlib/fmt",
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions ports/folly/fix-fmt11-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake
index 0e93175..1637d9f 100644
--- a/CMake/GenPkgConfig.cmake
+++ b/CMake/GenPkgConfig.cmake
@@ -93,7 +93,7 @@ function(gen_pkgconfig_vars)
# Set the output variables
string(REPLACE ";" " " cflags "${cflags}")
string(REPLACE ";" " " private_libs "${private_libs}")
-
+ string(REPLACE "<$<COMPILE_LANGUAGE:CXX>:/utf-8>" "/utf-8" cflags "${cflags}")
# Since CMake 3.18 FindThreads may include a generator expression requiring
# a target, which gets propagated to us through INTERFACE_COMPILE_OPTIONS.
# Before CMake 3.19 there's no way to solve this in a general way, so we
8 changes: 8 additions & 0 deletions ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

vcpkg_download_distfile(FMT11_RANGE_PATCH
URLS https://github.com/facebook/folly/commit/21e8dcd464ee46b2144a1e4d4c0e452355ae15f0.patch?full_index=1
FILENAME fmt11-range.patch
SHA512 6a3afe361cd24b4f62b3aba625dfbbfb767c91f27fa45ed4604adc5ec3d574e571ece13eeda0d9d47b8a37166fc31b1ed7f58f120a35d35977085a08172de105
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/folly
Expand All @@ -17,6 +23,8 @@ vcpkg_from_github(
fix-deps.patch
disable-uninitialized-resize-on-new-stl.patch
fix-unistd-include.patch
fix-fmt11-cmake.patch
${FMT11_RANGE_PATCH}
)

file(REMOVE "${SOURCE_PATH}/CMake/FindFmt.cmake")
Expand Down
1 change: 1 addition & 0 deletions ports/folly/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "folly",
"version-string": "2024.07.29.00",
"port-version": 1,
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0",
Expand Down
36 changes: 36 additions & 0 deletions ports/libtorch/fix-build-error-with-fmt11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
diff --git a/torch/csrc/distributed/c10d/socket.cpp b/torch/csrc/distributed/c10d/socket.cpp
index 51ea05fa..3c3fbb39 100644
--- a/torch/csrc/distributed/c10d/socket.cpp
+++ b/torch/csrc/distributed/c10d/socket.cpp
@@ -29,6 +29,7 @@

#include <fmt/chrono.h>
#include <fmt/format.h>
+#include <fmt/ranges.h>

#include <torch/csrc/distributed/c10d/error.h>
#include <torch/csrc/distributed/c10d/exception.h>
diff --git a/torch/csrc/profiler/standalone/execution_trace_observer.cpp b/torch/csrc/profiler/standalone/execution_trace_observer.cpp
index 93d9e2d1..ea241a8b 100644
--- a/torch/csrc/profiler/standalone/execution_trace_observer.cpp
+++ b/torch/csrc/profiler/standalone/execution_trace_observer.cpp
@@ -10,6 +10,7 @@
#endif // _WIN32

#include <fmt/format.h>
+#include <fmt/ranges.h>
#include <algorithm>
#include <chrono>
#include <cmath>
diff --git a/torch/csrc/profiler/util.cpp b/torch/csrc/profiler/util.cpp
index 180555f9..1358c9ab 100644
--- a/torch/csrc/profiler/util.cpp
+++ b/torch/csrc/profiler/util.cpp
@@ -5,6 +5,7 @@
#include <c10/util/ArrayRef.h>
#include <c10/util/irange.h>
#include <fmt/format.h>
+#include <fmt/ranges.h>

#ifdef USE_KINETO
#include <libkineto.h>
1 change: 1 addition & 0 deletions ports/libtorch/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ vcpkg_from_github(
fix-calculate-minloglevel.patch
force-cuda-include.patch
fix-aten-cutlass.patch
fix-build-error-with-fmt11.patch
)

file(REMOVE_RECURSE "${SOURCE_PATH}/caffe2/core/macros.h") # We must use generated header files
Expand Down
2 changes: 1 addition & 1 deletion ports/libtorch/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libtorch",
"version": "2.1.2",
"port-version": 4,
"port-version": 5,
"description": "Tensors and Dynamic neural networks in Python with strong GPU acceleration",
"homepage": "https://pytorch.org/",
"license": null,
Expand Down
12 changes: 12 additions & 0 deletions ports/saucer/fix-build-error-with-fmt11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/include/saucer/serializers/glaze/glaze.inl b/include/saucer/serializers/glaze/glaze.inl
index c0e1395..d704ed9 100644
--- a/include/saucer/serializers/glaze/glaze.inl
+++ b/include/saucer/serializers/glaze/glaze.inl
@@ -7,6 +7,7 @@

#include <fmt/args.h>
#include <fmt/format.h>
+#include <fmt/ranges.h>
#include <source_location>

#include <boost/callable_traits.hpp>
1 change: 1 addition & 0 deletions ports/saucer/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_github(
HEAD_REF dev
PATCHES
fix_findpkg.patch
fix-build-error-with-fmt11.patch
)

vcpkg_cmake_configure(
Expand Down
1 change: 1 addition & 0 deletions ports/saucer/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "saucer",
"version": "2.3.0",
"port-version": 1,
"description": "Next-gen desktop apps with web-frontend in C++",
"homepage": "https://saucer.github.io/",
"license": "MIT",
Expand Down
108 changes: 108 additions & 0 deletions ports/seacas/fix-build-error-with-fmt11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
diff --git a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C
index fa2719a..0a7cfff 100644
--- a/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C
+++ b/packages/seacas/libraries/ioss/src/Ioss_Decomposition.C
@@ -14,6 +14,7 @@
#include <algorithm>
#include <cassert>
#include <fmt/ostream.h>
+#include <fmt/ranges.h>
#include <numeric>

#if !defined(NO_ZOLTAN_SUPPORT)
diff --git a/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C b/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C
index ef20a45..faa7943 100644
--- a/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C
+++ b/packages/seacas/libraries/ioss/src/Ioss_IOFactory.C
@@ -11,6 +11,7 @@
#include <Ioss_Version.h>
#include <cstddef> // for nullptr
#include <fmt/ostream.h>
+#include <fmt/ranges.h>
#include <map> // for _Rb_tree_iterator, etc
#include <ostream> // for basic_ostream, etc
#include <set>
diff --git a/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C b/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C
index 488d28a..0a1e5e2 100644
--- a/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C
+++ b/packages/seacas/libraries/ioss/src/Ioss_StructuredBlock.C
@@ -14,6 +14,7 @@
#include <Ioss_SmartAssert.h>
#include <Ioss_StructuredBlock.h>
#include <fmt/ostream.h>
+#include <fmt/ranges.h>

#include <cstddef> // for size_t
#include <numeric>
diff --git a/packages/seacas/libraries/ioss/src/Ioss_Utils.C b/packages/seacas/libraries/ioss/src/Ioss_Utils.C
index 241ff80..d234b8b 100644
--- a/packages/seacas/libraries/ioss/src/Ioss_Utils.C
+++ b/packages/seacas/libraries/ioss/src/Ioss_Utils.C
@@ -20,6 +20,7 @@
#include <fmt/chrono.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
+#include <fmt/ranges.h>
#include <fstream>
#include <sstream>
#include <string>
diff --git a/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C b/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C
index 6888e17..f53c5e5 100644
--- a/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C
+++ b/packages/seacas/libraries/ioss/src/Ioss_ZoneConnectivity.C
@@ -8,6 +8,7 @@
#include <Ioss_ZoneConnectivity.h>
#include <cstddef> // for size_t
#include <fmt/ostream.h>
+#include <fmt/ranges.h>
#include <string> // for string
#include <vector> // for vector

diff --git a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h
index c486d69..b67a5c6 100644
--- a/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h
+++ b/packages/seacas/libraries/ioss/src/heartbeat/Iohb_Layout.h
@@ -9,6 +9,7 @@
#include "iohb_export.h"

#include <fmt/ostream.h>
+#include <fmt/ranges.h>
#include <sstream>
#include <string>
#include <vector>
diff --git a/packages/seacas/libraries/ioss/src/main/io_info.C b/packages/seacas/libraries/ioss/src/main/io_info.C
index 53a162b..bcadb55 100644
--- a/packages/seacas/libraries/ioss/src/main/io_info.C
+++ b/packages/seacas/libraries/ioss/src/main/io_info.C
@@ -11,6 +11,7 @@
#define FMT_DEPRECATED_OSTREAM
#include <fmt/format.h>
#include <fmt/ostream.h>
+#include <fmt/ranges.h>
#if defined(SEACAS_HAVE_CGNS)
#include <cgnslib.h>
#endif
diff --git a/packages/seacas/libraries/ioss/src/main/io_modify.C b/packages/seacas/libraries/ioss/src/main/io_modify.C
index 50a217d..c01191b 100644
--- a/packages/seacas/libraries/ioss/src/main/io_modify.C
+++ b/packages/seacas/libraries/ioss/src/main/io_modify.C
@@ -58,6 +58,7 @@
#include <fmt/color.h>
#include <fmt/format.h>
#include <fmt/ostream.h>
+#include <fmt/ranges.h>

#if defined(SEACAS_HAVE_EXODUS)
#include <exodus/Ioex_Internals.h>
diff --git a/packages/seacas/libraries/ioss/src/main/sphgen.C b/packages/seacas/libraries/ioss/src/main/sphgen.C
index f633d55..24c2e2f 100644
--- a/packages/seacas/libraries/ioss/src/main/sphgen.C
+++ b/packages/seacas/libraries/ioss/src/main/sphgen.C
@@ -14,6 +14,7 @@
#include <cstdlib>
#include <cstring>
#include <fmt/ostream.h>
+#include <fmt/ranges.h>
#include <iostream>
#include <string>
#include <vector>
1 change: 1 addition & 0 deletions ports/seacas/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vcpkg_from_github(
fix-mpi.patch
fix-headers.patch
fix-fmt-10.patch
fix-build-error-with-fmt11.patch
)
file(REMOVE "${SOURCE_PATH}/cmake/tribits/common_tpls/find_modules/FindHDF5.cmake")

Expand Down
2 changes: 1 addition & 1 deletion ports/seacas/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "seacas",
"version-date": "2022-11-22",
"port-version": 6,
"port-version": 7,
"description": "The Sandia Engineering Analysis Code Access System (SEACAS) is a suite of preprocessing, postprocessing, translation, and utility applications supporting finite element analysis software using the Exodus database file format.",
"homepage": "https://github.com/sandialabs/seacas",
"license": null,
Expand Down
24 changes: 24 additions & 0 deletions ports/shogun/fix-build-error-with-fmt11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/shogun/labels/BinaryLabelEncoder.h b/src/shogun/labels/BinaryLabelEncoder.h
index 5bcd57e..69ed63e 100644
--- a/src/shogun/labels/BinaryLabelEncoder.h
+++ b/src/shogun/labels/BinaryLabelEncoder.h
@@ -14,6 +14,7 @@
#include <shogun/labels/LabelEncoder.h>
#include <shogun/lib/SGVector.h>
#include <unordered_set>
+#include <fmt/ranges.h>
namespace shogun
{
/** @brief Implements a reversible mapping from
diff --git a/src/shogun/labels/MulticlassLabelsEncoder.h b/src/shogun/labels/MulticlassLabelsEncoder.h
index 41e9855..04151e4 100644
--- a/src/shogun/labels/MulticlassLabelsEncoder.h
+++ b/src/shogun/labels/MulticlassLabelsEncoder.h
@@ -13,6 +13,7 @@
#include <shogun/labels/LabelEncoder.h>
#include <shogun/labels/MulticlassLabels.h>
#include <shogun/lib/SGVector.h>
+#include <fmt/ranges.h>

namespace shogun
{
1 change: 1 addition & 0 deletions ports/shogun/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vcpkg_from_github(
fmt.patch
syntax.patch
remove-bitsery.patch
fix-build-error-with-fmt11.patch
)

vcpkg_find_acquire_program(PYTHON3)
Expand Down
1 change: 1 addition & 0 deletions ports/shogun/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "shogun",
"version-date": "2023-12-19",
"port-version": 1,
"description": "Unified and efficient Machine Learning",
"homepage": "https://github.com/shogun-toolbox/shogun",
"dependencies": [
Expand Down
Loading

0 comments on commit fe1cde6

Please sign in to comment.