mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
Fix build with fmt >=1.11.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
BROKEN = needs to be ported to fmt >=1.11
|
||||
|
||||
# ships a dynarmic copy, and dynarmic only supports x86-64 and AArch64
|
||||
ONLY_FOR_ARCHS = amd64 arm64
|
||||
|
||||
@@ -11,7 +9,7 @@ DISTNAME = citra-unified-source-20240303-0ff3440
|
||||
|
||||
V = 2104
|
||||
PKGNAME = citra-0.0.0.${V}
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
|
||||
CATEGORIES = emulators
|
||||
|
||||
@@ -85,7 +83,9 @@ WRKDIST = ${WRKDIR}/${DISTNAME}
|
||||
CXXFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/lib/qt5/cmake/Qt5/
|
||||
|
||||
post-extract:
|
||||
rm -rf ${WRKSRC}/externals/{sdl2,catch2,fmt,boost,cryptopp}
|
||||
rm -r ${WRKSRC}/externals/cryptopp-cmake \
|
||||
${WRKSRC}/externals/dynarmic/externals/catch/src/catch2 \
|
||||
${WRKSRC}/externals/dynarmic/externals/fmt
|
||||
|
||||
.if ${MACHINE_ARCH} == amd64
|
||||
PKG_ARGS += -Dx86=1
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
Fix build with fmt >=1.11
|
||||
|
||||
Index: src/common/logging/formatter.h
|
||||
--- src/common/logging/formatter.h.orig
|
||||
+++ src/common/logging/formatter.h
|
||||
@@ -5,7 +5,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
-#include <fmt/format.h>
|
||||
+//#include <fmt/format.h>
|
||||
+#include <fmt/ranges.h>
|
||||
|
||||
// adapted from https://github.com/fmtlib/fmt/issues/2704
|
||||
// a generic formatter for enum classes
|
||||
@@ -14,7 +15,7 @@ template <typename T>
|
||||
struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>
|
||||
: formatter<std::underlying_type_t<T>> {
|
||||
template <typename FormatContext>
|
||||
- auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) {
|
||||
+ auto format (const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
|
||||
return fmt::formatter<std::underlying_type_t<T>>::format(
|
||||
static_cast<std::underlying_type_t<T>>(value), ctx);
|
||||
}
|
||||
Reference in New Issue
Block a user