Description: fix the build against fmtlib 11
 Two incompatibilities introduced by fmtlib 11:
 .
  * fmt::join moved out of fmt/format.h into fmt/ranges.h, so fmt_writer.h has
    to include the latter explicitly. The header exists in fmtlib 10 as well,
    so this keeps building against the fmtlib currently in unstable.
  * basic_string_view's constructor taking a bare const char* is now guarded
    by FMT_CONSTEXPR20, so it is only constexpr when compiling as C++20 or
    later; fmtlib 10 guarded the same constructor with FMT_CONSTEXPR_CHAR_TRAITS,
    which is already constexpr in C++17. This package builds as C++17, so the
    constexpr array of string_view_t that spdlog builds out of
    SPDLOG_LEVEL_NAMES can no longer be initialised from bare string literals.
    Pass explicit lengths, exactly as spdlog's own SPDLOG_LEVEL_NAME_* macros
    do; the emitted level names are unchanged.
Author: Aron Xu <aron@debian.org>
Bug-Debian: https://bugs.debian.org/1092841
Forwarded: no
Last-Update: 2026-09-11

Index: genomicsdb-1.5.5/src/main/cpp/include/utils/fmt_writer.h
===================================================================
--- genomicsdb-1.5.5.orig/src/main/cpp/include/utils/fmt_writer.h
+++ genomicsdb-1.5.5/src/main/cpp/include/utils/fmt_writer.h
@@ -28,9 +28,12 @@
 #ifdef USING_FMT_BUNDLED_WITH_SPDLOG
 #include <spdlog/fmt/bundled/format.h>
 #include <spdlog/fmt/bundled/printf.h>
+#include <spdlog/fmt/bundled/ranges.h>
 #else
 #include <fmt/format.h>
 #include <fmt/printf.h>
+// fmt::join lives in fmt/ranges.h, which fmt/format.h no longer pulls in as of fmt 11
+#include <fmt/ranges.h>
 #endif
 
 //Code for fixed iterator copied from https://github.com/fmtlib/fmt/issues/764#issuecomment-395753853
Index: genomicsdb-1.5.5/src/main/cpp/include/utils/genomicsdb_logger.h
===================================================================
--- genomicsdb-1.5.5.orig/src/main/cpp/include/utils/genomicsdb_logger.h
+++ genomicsdb-1.5.5/src/main/cpp/include/utils/genomicsdb_logger.h
@@ -34,8 +34,16 @@
 #define GENOMICSDB_LOGGER
 
 // Override spdlog level names to upper case for consistency with log4j from Java
+// Note: spdlog stores these in a constexpr array of string_view_t, and constructing
+// one from a bare pointer is not constexpr, so spell out the lengths as spdlog does.
 #if !defined(SPDLOG_LEVEL_NAMES)
-#define SPDLOG_LEVEL_NAMES { "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "OFF" }
+#define SPDLOG_LEVEL_NAMES { spdlog::string_view_t("TRACE", 5), \
+                             spdlog::string_view_t("DEBUG", 5), \
+                             spdlog::string_view_t("INFO", 4),  \
+                             spdlog::string_view_t("WARN", 4),  \
+                             spdlog::string_view_t("ERROR", 5), \
+                             spdlog::string_view_t("FATAL", 5), \
+                             spdlog::string_view_t("OFF", 3) }
 #endif
 
 #include <spdlog/spdlog.h>
