pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/fmtlib



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Sep 21 18:14:08 UTC 2025

Modified Files:
        pkgsrc/textproc/fmtlib: Makefile PLIST distinfo

Log Message:
fmtlib: update to 12.0.0.

# 12.0.0 - 2025-09-17

- Optimized the default floating point formatting
  (https://github.com/fmtlib/fmt/issues/3675,
  https://github.com/fmtlib/fmt/issues/4516). In particular, formatting a
  `double` with format string compilation into a stack allocated buffer is
  more than 60% faster in version 12.0 compared to 11.2 according to
  [dtoa-benchmark](https://github.com/fmtlib/dtoa-benchmark):

  ```
  Function  Time (ns)  Speedup
  fmt11        34.471    1.00x
  fmt12        21.000    1.64x
  ```

  <img width="766" height="609" src="https://github.com/user-attachments/assets/d7d768ad-7543-468c-b0bb-449abf73b31b"; />

- Added `constexpr` support to `fmt::format`. For example:

  ```c++
  #include <fmt/compile.h>

  using namespace fmt::literals;
  std::string s = fmt::format(""_cf, 42);
  ```

  now works at compile time provided that `std::string` supports `constexpr`
  (https://github.com/fmtlib/fmt/issues/3403,
  https://github.com/fmtlib/fmt/pull/4456). Thanks @msvetkin.

- Added `FMT_STATIC_FORMAT` that allows formatting into a string of the exact
  required size at compile time.

  For example:

  ```c++
  #include <fmt/compile.h>

  constexpr auto s = FMT_STATIC_FORMAT("{}", 42);
  ```

  compiles to just

  ```s
  __ZL1s:
        .asciiz "42"
  ```

  It can be accessed as a C string with `s.c_str()` or as a string view with
  `s.str()`.

- Improved C++20 module support

- Switched to using estimated display width in precision. For example:

  ```c++
  fmt::print("|{:.4}|\n|1234|\n", "🐱🐱🐱");
  ```

  prints

  ![](https://github.com/user-attachments/assets/6c4446b3-13eb-43b9-b74a-b4543540ad6a)

  because `🐱` has an estimated width of 2

- Fix interaction between debug presentation, precision, and width for strings

- Implemented allocator propagation on `basic_memory_buffer` move

- Fixed an ambiguity between `std::reference_wrapper<T>` and `format_as`
  formatters

- Removed the following deprecated APIs:

  - `has_formatter`: use `is_formattable` instead,
  - `basic_format_args::parse_context_type`,
    `basic_format_args::formatter_type` and similar aliases in context types,
  - wide stream overload of `fmt::printf`,
  - wide stream overloads of `fmt::print` that take text styles,
  - `is_*char` traits,
  - `fmt::localtime`.

- Deprecated wide overloads of `fmt::fprintf` and `fmt::sprintf`.

- Improved diagnostics for the incorrect usage of `fmt::ptr`

- Made handling of ANSI escape sequences more efficient

- Fixed a buffer overflow on all emphasis flags set

- Fixed an integer overflow for precision close to the max `int` value.

- Fixed compatibility with WASI (https://github.com/fmtlib/fmt/issues/4496,

- Fixed `back_insert_iterator` detection, preventing a fallback on slower path
  that handles arbitrary iterators

- Fixed handling of invalid glibc `FILE` buffers

- Added `wchar_t` support to the `std::byte` formatter

- Changed component prefix from `fmt-` to `fmt_` for compatibility with
  NSIS/CPack on Windows, e.g. `fmt-doc` changed to `fmt_doc`

- Added the `FMT_CUSTOM_ASSERT_FAIL` macro to simplify providing a custom
  `fmt::assert_fail` implementation

- Switched to `FMT_THROW` on reporting format errors so that it can be
  overriden by users when exceptions are disabled

- Improved master project detection and disabled install targets when using
  {fmt} as a subproject by default

- Made various code improvements

- Added Conan instructions to the docs

- Removed Bazel files to avoid issues with downstream packaging

- Added more entries for generated files to `.gitignore`

- Fixed various warnings and compilation issues


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/textproc/fmtlib/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/textproc/fmtlib/PLIST
cvs rdiff -u -r1.26 -r1.27 pkgsrc/textproc/fmtlib/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/fmtlib/Makefile
diff -u pkgsrc/textproc/fmtlib/Makefile:1.25 pkgsrc/textproc/fmtlib/Makefile:1.26
--- pkgsrc/textproc/fmtlib/Makefile:1.25        Tue May  6 13:35:04 2025
+++ pkgsrc/textproc/fmtlib/Makefile     Sun Sep 21 18:14:08 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.25 2025/05/06 13:35:04 wiz Exp $
+# $NetBSD: Makefile,v 1.26 2025/09/21 18:14:08 wiz Exp $
 
-DISTNAME=      fmt-11.2.0
+DISTNAME=      fmt-12.0.0
 PKGNAME=       ${DISTNAME:S/fmt/fmtlib/}
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=fmtlib/}

Index: pkgsrc/textproc/fmtlib/PLIST
diff -u pkgsrc/textproc/fmtlib/PLIST:1.12 pkgsrc/textproc/fmtlib/PLIST:1.13
--- pkgsrc/textproc/fmtlib/PLIST:1.12   Wed Jul 10 11:03:17 2024
+++ pkgsrc/textproc/fmtlib/PLIST        Sun Sep 21 18:14:08 2025
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.12 2024/07/10 11:03:17 prlw1 Exp $
+@comment $NetBSD: PLIST,v 1.13 2025/09/21 18:14:08 wiz Exp $
 include/fmt/args.h
 include/fmt/base.h
 include/fmt/chrono.h
@@ -19,5 +19,5 @@ lib/cmake/fmt/fmt-targets-release.cmake
 lib/cmake/fmt/fmt-targets.cmake
 lib/libfmt.so
 lib/libfmt.so.${PKGVERSION}
-lib/libfmt.so.11
+lib/libfmt.so.12
 lib/pkgconfig/fmt.pc

Index: pkgsrc/textproc/fmtlib/distinfo
diff -u pkgsrc/textproc/fmtlib/distinfo:1.26 pkgsrc/textproc/fmtlib/distinfo:1.27
--- pkgsrc/textproc/fmtlib/distinfo:1.26        Tue May  6 13:35:04 2025
+++ pkgsrc/textproc/fmtlib/distinfo     Sun Sep 21 18:14:08 2025
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.26 2025/05/06 13:35:04 wiz Exp $
+$NetBSD: distinfo,v 1.27 2025/09/21 18:14:08 wiz Exp $
 
-BLAKE2s (fmt-11.2.0.tar.gz) = 2ed356a1e77ca383a4071915577497fda6319a32c2433c5fe7a586ac0d15b31c
-SHA512 (fmt-11.2.0.tar.gz) = 46974efd36e613477351aa357c451cee434da797c2a505f9f86d73e394dcb35dc2dc0cda66abb98c023e8f24deac9d8e3ee6f9f6c0971cc4c00e37c34aa7f15f
-Size (fmt-11.2.0.tar.gz) = 705327 bytes
+BLAKE2s (fmt-12.0.0.tar.gz) = c61f80dd9d8043373d4e1ccda932c7e9fd4a1e2c2f0f65d80d2db24db643702e
+SHA512 (fmt-12.0.0.tar.gz) = c4ab814c20fbad7e3f0ae169125a4988a2795631194703251481dc36b18da65c886c4faa9acd046b0a295005217b3689eb0126108a9ba5aac2ca909aae263c2f
+Size (fmt-12.0.0.tar.gz) = 709036 bytes



Home | Main Index | Thread Index | Old Index