diff --git a/devel/spdlog/Makefile b/devel/spdlog/Makefile index f8e31aba672b..f475fb50775f 100644 --- a/devel/spdlog/Makefile +++ b/devel/spdlog/Makefile @@ -1,39 +1,40 @@ PORTNAME= spdlog DISTVERSIONPREFIX= v DISTVERSION= 1.16.0 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= vanilla@FreeBSD.org COMMENT= Super fast C++ logging library WWW= https://github.com/gabime/spdlog LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libfmt.so:devel/libfmt TEST_DEPENDS= catch2>0:devel/catch2 USES= cmake:testing compiler:c++14-lang pathfix .if make(test) USES+= pkgconfig .endif USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= gabime EXTRACT_AFTER_ARGS= --exclude ${GH_PROJECT_DEFAULT}-${GH_TAGNAME_EXTRACT}/include/spdlog/fmt/bundled PLIST_SUB= SOVERSION="${DISTVERSION}" CMAKE_TESTING_ON= SPDLOG_BUILD_TESTS CMAKE_ON= SPDLOG_BUILD_SHARED \ SPDLOG_FMT_EXTERNAL CMAKE_OFF= SPDLOG_BUILD_BENCH post-stage: # let consumers know that this package was compiled with SPDLOG_FMT_EXTERNAL=yes ${ECHO_CMD} '#define SPDLOG_FMT_EXTERNAL' >> ${STAGEDIR}${PREFIX}/include/spdlog/tweakme.h .include diff --git a/devel/spdlog/files/patch-include_spdlog_details_os-inl.h b/devel/spdlog/files/patch-include_spdlog_details_os-inl.h new file mode 100644 index 000000000000..7a620b04c1c2 --- /dev/null +++ b/devel/spdlog/files/patch-include_spdlog_details_os-inl.h @@ -0,0 +1,23 @@ +The calculate_gmt_offset attempt is a botch. It gets localtm passed in from the +self-test's yesterday, and then calls time() anew to obtain ::gmtime_r() by way of details::os::gmtime(), +and that cannot possibly work. + +https://github.com/gabime/spdlog/issues/3483 + +Fix: Disable the non-working code and use tm_gmtoff instead. + +--- include/spdlog/details/os-inl.h.orig 2025-10-11 12:53:05 UTC ++++ include/spdlog/details/os-inl.h +@@ -264,11 +264,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm + return offset; + #else + +- #if defined(sun) || defined(__sun) || defined(_AIX) || \ +- (defined(__NEWLIB__) && !defined(__TM_GMTOFF)) || \ +- (!defined(__APPLE__) && !defined(_BSD_SOURCE) && !defined(_GNU_SOURCE) && \ +- (!defined(_POSIX_VERSION) || (_POSIX_VERSION < 202405L))) +- // 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris ++ #if 0 + struct helper { + static long int calculate_gmt_offset(const std::tm &localtm = details::os::localtime(), + const std::tm &gmtm = details::os::gmtime()) {