fmtlib: updated to 10.2.1 10.2.1 - 2024-01-03 - Fixed ABI compatibility with earlier 10.x versions 10.2.0 - 2024-01-01 - Added support for the `%j` specifier (the number of days) for `std::chrono::duration` - Added support for the chrono suffix for days and changed the suffix for minutes from "m" to the correct "min" For example ([godbolt](https://godbolt.org/z/9KhMnq9ba)): ```c++ #include <fmt/chrono.h> int main() { fmt::print("{}\n", std::chrono::days(42)); // prints "42d" } ``` - Fixed an overflow in `std::chrono::time_point` formatting with large dates - Added a formatter for `std::source_location` For example ([godbolt](https://godbolt.org/z/YajfKjhhr)): ```c++ #include <source_location> #include <fmt/std.h> int main() { fmt::print("{}\n", std::source_location::current()); } ``` prints ``` /app/example.cpp:5:51: int main() ``` - Added a formatter for `std::bitset` ```c++ #include <bitset> #include <fmt/std.h> int main() { fmt::print("{}\n", std::bitset<6>(42)); // prints "101010" } ``` - Added an experimental `nested_formatter` that provides an easy way of applying a formatter to one or more subobjects while automatically handling width, fill and alignment. For example: ```c++ #include <fmt/format.h> struct point { double x, y; }; template <> struct fmt::formatter<point> : nested_formatter<double> { auto format(point p, format_context& ctx) const { return write_padded(ctx, [=](auto out) { return format_to(out, "({}, {})", nested(p.x), nested(p.y)); }); } }; int main() { fmt::print("[{:>20.2f}]", point{1, 2}); } ``` prints ``` [ (1.00, 2.00)] ``` - Added the generic representation (`g`) to `std::filesystem::path` ```c++ #include <filesystem> #include <fmt/std.h> int main() { fmt::print("{:g}\n", std::filesystem::path("C:\\foo")); } ``` prints `"C:/foo"` on Windows. - Made `format_as` work with references - Fixed formatting of invalid UTF-8 with precision - Fixed an inconsistency between `fmt::to_string` and `fmt::format` - Disallowed unsafe uses of `fmt::styled` ```c++ auto s = fmt::styled(std::string("dangle"), fmt::emphasis::bold); fmt::print("{}\n", s); // compile error ``` Pass `fmt::styled(...)` as a parameter instead. - Added a null check when formatting a C string with the `s` specifier - Disallowed the `c` specifier for `bool` - Made the default formatting unlocalized in `fmt::ostream_formatter` for consistency with the rest of the library - Fixed localized formatting in bases other than decimal - Fixed a performance regression in experimental `fmt::ostream::print` - Added synchronization with the underlying output stream when writing to the Windows console - Changed to only export `format_error` when {fmt} is built as a shared library - Made `fmt::streamed` `constexpr`. - Enabled `consteval` on older versions of MSVC - Added an option to build without `wchar_t` support on Windows - Improved build and CI configuration - Fixed various warnings, compilation and test issues - Improved documentation and README - Updated CI dependenciesdiff -r1.16 -r1.17 pkgsrc/textproc/fmtlib/Makefile
(adam)
@@ -1,24 +1,25 @@ | @@ -1,24 +1,25 @@ | |||
1 | # $NetBSD: Makefile,v 1.16 2023/08/29 07:08:09 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.17 2024/01/04 18:42:57 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= fmt-10.1.1 | 3 | DISTNAME= fmt-10.2.1 | |
4 | PKGNAME= ${DISTNAME:S/fmt/fmtlib/} | 4 | PKGNAME= ${DISTNAME:S/fmt/fmtlib/} | |
5 | CATEGORIES= textproc | 5 | CATEGORIES= textproc | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=fmtlib/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=fmtlib/} | |
7 | GITHUB_PROJECT= fmt | 7 | GITHUB_PROJECT= fmt | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://fmt.dev/ | 10 | HOMEPAGE= https://fmt.dev/ | |
11 | COMMENT= Formatting library | 11 | COMMENT= Formatting library | |
12 | LICENSE= mit | 12 | LICENSE= mit | |
13 | 13 | |||
14 | USE_LANGUAGES= c c++11 | 14 | USE_CXX_FEATURES= c++11 | |
15 | USE_LANGUAGES= c c++ | |||
15 | PKGCONFIG_OVERRIDE= support/cmake/fmt.pc.in | 16 | PKGCONFIG_OVERRIDE= support/cmake/fmt.pc.in | |
16 | TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR} | 17 | TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR} | |
17 | # For Darwin | 18 | # For Darwin | |
18 | TEST_ENV+= DYLD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR} | 19 | TEST_ENV+= DYLD_LIBRARY_PATH=${WRKSRC}/${CMAKE_BUILD_DIR} | |
19 | TEST_TARGET= test | 20 | TEST_TARGET= test | |
20 | 21 | |||
21 | CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON | 22 | CMAKE_ARGS+= -DBUILD_SHARED_LIBS=ON | |
22 | 23 | |||
23 | .include "../../devel/cmake/build.mk" | 24 | .include "../../devel/cmake/build.mk" | |
24 | .include "../../mk/bsd.pkg.mk" | 25 | .include "../../mk/bsd.pkg.mk" |
@@ -1,22 +1,22 @@ | @@ -1,22 +1,22 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.10 2023/08/29 07:08:09 adam Exp $ | 1 | @comment $NetBSD: PLIST,v 1.11 2024/01/04 18:42:57 adam Exp $ | |
2 | include/fmt/args.h | 2 | include/fmt/args.h | |
3 | include/fmt/chrono.h | 3 | include/fmt/chrono.h | |
4 | include/fmt/color.h | 4 | include/fmt/color.h | |
5 | include/fmt/compile.h | 5 | include/fmt/compile.h | |
6 | include/fmt/core.h | 6 | include/fmt/core.h | |
7 | include/fmt/format-inl.h | 7 | include/fmt/format-inl.h | |
8 | include/fmt/format.h | 8 | include/fmt/format.h | |
9 | include/fmt/os.h | 9 | include/fmt/os.h | |
10 | include/fmt/ostream.h | 10 | include/fmt/ostream.h | |
11 | include/fmt/printf.h | 11 | include/fmt/printf.h | |
12 | include/fmt/ranges.h | 12 | include/fmt/ranges.h | |
13 | include/fmt/std.h | 13 | include/fmt/std.h | |
14 | include/fmt/xchar.h | 14 | include/fmt/xchar.h | |
15 | lib/cmake/fmt/fmt-config-version.cmake | 15 | lib/cmake/fmt/fmt-config-version.cmake | |
16 | lib/cmake/fmt/fmt-config.cmake | 16 | lib/cmake/fmt/fmt-config.cmake | |
17 | lib/cmake/fmt/fmt-targets-release.cmake | 17 | lib/cmake/fmt/fmt-targets-release.cmake | |
18 | lib/cmake/fmt/fmt-targets.cmake | 18 | lib/cmake/fmt/fmt-targets.cmake | |
19 | lib/libfmt.so | 19 | lib/libfmt.so | |
20 | lib/libfmt.so.${PKGVERSION} | |||
20 | lib/libfmt.so.10 | 21 | lib/libfmt.so.10 | |
21 | lib/libfmt.so.10.1.0 | |||
22 | lib/pkgconfig/fmt.pc | 22 | lib/pkgconfig/fmt.pc |
@@ -1,5 +1,5 @@ | @@ -1,5 +1,5 @@ | |||
1 | $NetBSD: distinfo,v 1.18 2023/08/29 07:08:09 adam Exp $ | 1 | $NetBSD: distinfo,v 1.19 2024/01/04 18:42:57 adam Exp $ | |
2 | 2 | |||
3 | BLAKE2s (fmt-10.1.1.tar.gz) = 0e5d93144689e4b56a664fbcc25107900b1b490e7bcdadf6197e4ecb3cc8e998 | 3 | BLAKE2s (fmt-10.2.1.tar.gz) = 41991f39f59619e216b5244caa2e4cac73686de95bc809be9e7a919744229ba9 | |
4 | SHA512 (fmt-10.1.1.tar.gz) = 288c349baac5f96f527d5b1bed0fa5f031aa509b4526560c684281388e91909a280c3262a2474d963b5d1bf7064b1c9930c6677fe54a0d8f86982d063296a54c | 4 | SHA512 (fmt-10.2.1.tar.gz) = 27df90c681ec37e55625062a79e3b83589b6d7e94eff37a3b412bb8c1473f757a8adb727603acc9185c3490628269216843b7d7bd5a3cb37f0029da5d1495ffa | |
5 | Size (fmt-10.1.1.tar.gz) = 851454 bytes | 5 | Size (fmt-10.2.1.tar.gz) = 854665 bytes |