diff --git a/devel/spdlog/Makefile b/devel/spdlog/Makefile index 5c527c89b6a7..78f30fdd0d63 100644 --- a/devel/spdlog/Makefile +++ b/devel/spdlog/Makefile @@ -1,35 +1,35 @@ PORTNAME= spdlog DISTVERSIONPREFIX= v DISTVERSION= 1.15.2 -PORTREVISION= 3 +PORTREVISION= 4 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 USES= cmake compiler:c++11-lib pathfix USE_GITHUB= yes GH_ACCOUNT= gabime USE_LDCONFIG= yes CMAKE_ON= SPDLOG_BUILD_SHARED SPDLOG_FMT_EXTERNAL CMAKE_OFF= SPDLOG_BUILD_BENCH PLIST_SUB= SOVERSION="${DISTVERSION}" post-extract: ${RM} -r ${WRKSRC}/include/spdlog/fmt/bundled post-patch: ${RM} ${WRKSRC}/include/spdlog/fmt/*.h.orig 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..494b1276160c --- /dev/null +++ b/devel/spdlog/files/patch-include_spdlog_details_os-inl.h @@ -0,0 +1,22 @@ +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-03-29 11:01:07 UTC ++++ include/spdlog/details/os-inl.h +@@ -265,10 +265,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))) ++ #if 0 + // 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris + struct helper { + static long int calculate_gmt_offset(const std::tm &localtm = details::os::localtime(),