Here is an update to fmt 10.2.1.
https://raw.githubusercontent.com/fmtlib/fmt/master/ChangeLog.md Index: Makefile =================================================================== RCS file: /cvs/ports/devel/fmt/Makefile,v retrieving revision 1.5 diff -u -p -u -p -r1.5 Makefile --- Makefile 7 Jun 2022 11:40:17 -0000 1.5 +++ Makefile 20 Mar 2024 00:29:29 -0000 @@ -2,9 +2,9 @@ COMMENT= alternative formatting library GH_ACCOUNT= fmtlib GH_PROJECT= fmt -GH_TAGNAME= 8.1.1 +GH_TAGNAME= 10.2.1 -SHARED_LIBS= fmt 1.1 +SHARED_LIBS= fmt 2.0 CATEGORIES= devel @@ -13,17 +13,11 @@ PERMIT_PACKAGE= Yes # C++11 COMPILER= base-clang ports-gcc + MODULES= devel/cmake -WANTLIB+= ${COMPILER_LIBCXX} +WANTLIB+= ${COMPILER_LIBCXX} m CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on - -# Fix undefined references to pthread_* symbols on clang+ld.bfd archs by -# disabling -Wl,--as-needed. -.include <bsd.port.arch.mk> -.if !${PROPERTIES:Mlld} && ${PROPERTIES:Mclang} -CONFIGURE_ARGS+= -DAS_NEEDED=off -.endif .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/devel/fmt/distinfo,v retrieving revision 1.3 diff -u -p -u -p -r1.3 distinfo --- distinfo 7 Jun 2022 11:40:17 -0000 1.3 +++ distinfo 20 Mar 2024 00:29:29 -0000 @@ -1,2 +1,2 @@ -SHA256 (fmt-8.1.1.tar.gz) = PXlNPPZ2M7NLJ3Hrnwc73ofoRuDTldJU33shHvHsc0Y= -SIZE (fmt-8.1.1.tar.gz) = 826254 +SHA256 (fmt-10.2.1.tar.gz) = ElDkzFi/Bu5jFWdSP0iEjcRZYTPhY/AmFcl/eLq2yBE= +SIZE (fmt-10.2.1.tar.gz) = 854665 Index: patches/patch-CMakeLists_txt =================================================================== RCS file: patches/patch-CMakeLists_txt diff -N patches/patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 7 Jun 2022 11:40:17 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,24 +0,0 @@ -Allow linking without '-Wl,--as-needed', fix the build on clang+ld.bfd archs. -It's needed to do it like this since target_link_libraries takes preference -over LDFLAGS. - -Index: CMakeLists.txt ---- CMakeLists.txt.orig -+++ CMakeLists.txt -@@ -72,6 +72,7 @@ set_verbose(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR} CA - option(FMT_PEDANTIC "Enable extra warnings and expensive tests." OFF) - option(FMT_WERROR "Halt the compilation with an error on compiler warnings." - OFF) -+option(AS_NEEDED "Use -Wl,--as-needed for linking." ON) - - # Options that control generation of various targets. - option(FMT_DOC "Generate the doc target." ${FMT_MASTER_PROJECT}) -@@ -286,7 +287,7 @@ endif () - - if (BUILD_SHARED_LIBS) - if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" AND -- NOT EMSCRIPTEN) -+ NOT EMSCRIPTEN AND AS_NEEDED) - # Fix rpmlint warning: - # unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6. - target_link_libraries(fmt -Wl,--as-needed) Index: patches/patch-src_os_cc =================================================================== RCS file: patches/patch-src_os_cc diff -N patches/patch-src_os_cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_os_cc 20 Mar 2024 00:29:29 -0000 @@ -0,0 +1,24 @@ +Fix handling of the fileno macro +38881e5acfbac830bdf68ad1c101ae420ac5bc92 + +Index: src/os.cc +--- src/os.cc.orig ++++ src/os.cc +@@ -182,12 +182,12 @@ void buffered_file::close() { + } + + int buffered_file::descriptor() const { +-#if !defined(fileno) ++#ifdef FMT_HAS_SYSTEM ++ // fileno is a macro on OpenBSD. ++# ifdef fileno ++# undef fileno ++# endif + int fd = FMT_POSIX_CALL(fileno(file_)); +-#elif defined(FMT_HAS_SYSTEM) +- // fileno is a macro on OpenBSD so we cannot use FMT_POSIX_CALL. +-# define FMT_DISABLE_MACRO +- int fd = FMT_SYSTEM(fileno FMT_DISABLE_MACRO(file_)); + #else + int fd = fileno(file_); + #endif Index: patches/patch-test_gtest-extra-test_cc =================================================================== RCS file: /cvs/ports/devel/fmt/patches/patch-test_gtest-extra-test_cc,v retrieving revision 1.3 diff -u -p -u -p -r1.3 patch-test_gtest-extra-test_cc --- patches/patch-test_gtest-extra-test_cc 11 Mar 2022 18:50:03 -0000 1.3 +++ patches/patch-test_gtest-extra-test_cc 20 Mar 2024 00:29:29 -0000 @@ -1,7 +1,7 @@ Index: test/gtest-extra-test.cc --- test/gtest-extra-test.cc.orig +++ test/gtest-extra-test.cc -@@ -345,6 +345,10 @@ TEST(output_redirect_test, flush_error_in_ctor) { +@@ -347,6 +347,10 @@ TEST(output_redirect_test, flush_error_in_ctor) { write_copy.dup2(write_fd); // "undo" close or dtor will fail } @@ -11,8 +11,8 @@ Index: test/gtest-extra-test.cc +// out for now while i work on figuring it out. TEST(output_redirect_test, dup_error_in_ctor) { buffered_file f = open_buffered_file(); - int fd = (f.fileno)(); -@@ -356,6 +360,7 @@ TEST(output_redirect_test, dup_error_in_ctor) { + int fd = (f.descriptor)(); +@@ -358,6 +362,7 @@ TEST(output_redirect_test, dup_error_in_ctor) { fmt::format("cannot duplicate file descriptor {}", fd)); copy.dup2(fd); // "undo" close or dtor will fail } Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/fmt/pkg/PLIST,v retrieving revision 1.3 diff -u -p -u -p -r1.3 PLIST --- pkg/PLIST 11 Mar 2022 18:50:03 -0000 1.3 +++ pkg/PLIST 20 Mar 2024 00:29:29 -0000 @@ -6,11 +6,11 @@ include/fmt/compile.h include/fmt/core.h include/fmt/format-inl.h include/fmt/format.h -include/fmt/locale.h include/fmt/os.h include/fmt/ostream.h include/fmt/printf.h include/fmt/ranges.h +include/fmt/std.h include/fmt/xchar.h lib/cmake/ lib/cmake/fmt/