From nobody Thu Dec 14 15:50:07 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SrcHg5B1jz52fKp; Thu, 14 Dec 2023 15:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SrcHg3gX8z3Q3b; Thu, 14 Dec 2023 15:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702569007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWgcZGleve/GZpKTcK1fJmk7BUz5AeFCOnC6FXMjOn8=; b=aTPv4F29aEnnRLg0j1BGXFF+Eeo72GzB0DH55CjnqqL0HHGKMYpROEKzLHCKwBRI14Ot+1 UMhYvMXN4SLeEYvtkZdt4JpClXfXbcfgO2D8eUZJDytbId01tl5/+BVxw8WLBZOkKVMvLY FWFl5mYRNkj5tHRwRJHO2GD21Y4Ppd6iFdjEXzn70J/nn4q88aejNXfXzW1wTdcQ2aumU4 L+YafDJxr9OWn6mlghZ2gnTU7j7Xz9i7kwuAcdqdFzbKPAQPrS7Yb5MfaSrTnubv9ya5FS eQSYDCbBV8OGcSiujwxbD3wN+OxuJSRFJpWPpFxiEDDFI4wHDrJri875oJMwPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702569007; a=rsa-sha256; cv=none; b=uD4ylEGosMrxCUaWZ1AaRZEt+Ay94QcZLQxKNnBHKa/gLNgibG2uSqTB4uD5ry+XE41mT+ +lTj9KbRs1UJ89lkF64TyHIzkg+wd7L5o3aLmeQUGX/zuhjdFwlyTg4NaG0T41qnByLba9 XQt+DBlEroMGpY++PY7r8zhiX5BIrQh5JvXlRtEaMg+GXJ9P2jt1qww95u0OSBGCh4AvQO QukmldyoS3uCFdBpfK7dIramlIeipwVag3FwF4b3C4JRn5pfUixFzOxlIKDdELiW32i7QX nXb0lxxc5Xp4ufT++1FT/lHcViG8O6hDIOtwq7pXNOVIDP/x3lXasZjYZFxsPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702569007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWgcZGleve/GZpKTcK1fJmk7BUz5AeFCOnC6FXMjOn8=; b=Zvg642vI47+SxoVrEGZpNvgu08QgrTivXsrDXiwVANci9Ve5R6nW1gjJn0jAzirxSF6oFY GlYMsdTBTuE6DsCsPP9iRXtwYoCLs2L39fDEpOV9Fz//SNNDGODYHNKbkKb74MLhv1lhop 8l5hm+mfAwm39NqPfCQspAd9fRJOYt/aIUPtIYcXDSqi+XZmwZNcR4OHzruOLA3lYxS6ew YXBMRSpq74Is0RL2MA322lUWDBECPeW6u6Y3YaNy8czXeORcNKoSQLSfD3WELb1JEfxZ9N jwbkWPKk/8bRSxcPlQ4G1QNadTvyJ1d2yr4j4tizaZwJ03cszt5dHX2TlZFE+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SrcHg2lzvzYTL; Thu, 14 Dec 2023 15:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BEFo7aj084822; Thu, 14 Dec 2023 15:50:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BEFo7eY084817; Thu, 14 Dec 2023 15:50:07 GMT (envelope-from git) Date: Thu, 14 Dec 2023 15:50:07 GMT Message-Id: <202312141550.3BEFo7eY084817@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 558f7ba7e2b8 - main - emulators/dolphin-emu: Fix build with libfmt 10.1.1+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 558f7ba7e2b816c6f09ff5f0905b2bb933a1d60a Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=558f7ba7e2b816c6f09ff5f0905b2bb933a1d60a commit 558f7ba7e2b816c6f09ff5f0905b2bb933a1d60a Author: Po-Chuan Hsieh AuthorDate: 2023-12-14 15:40:01 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-12-14 15:49:39 +0000 emulators/dolphin-emu: Fix build with libfmt 10.1.1+ - Add BUILD_DEPENDS to ensure libfmt 10.1+ is used Obtained from: https://github.com/dolphin-emu/dolphin/commit/63467559b20682a6b9e4ec43c6b43456e1fca111 https://github.com/dolphin-emu/dolphin/commit/b5b28da39d371ff2abbb0855fadc3c748a8a7043 --- emulators/dolphin-emu/Makefile | 3 +- emulators/dolphin-emu/files/patch-libfmt | 168 +++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+), 1 deletion(-) diff --git a/emulators/dolphin-emu/Makefile b/emulators/dolphin-emu/Makefile index 7f86d74b3969..6f9a8b472747 100644 --- a/emulators/dolphin-emu/Makefile +++ b/emulators/dolphin-emu/Makefile @@ -10,6 +10,8 @@ WWW= https://www.dolphin-emu.org LICENSE= BSD3CLAUSE CC0-1.0 GPLv2+ MIT LICENSE_COMB= multi +BUILD_DEPENDS= libfmt>=10.1:devel/libfmt \ + vulkan-headers>0:graphics/vulkan-headers # Notes on dependencies: # - alsa support has been disabled (not optimal) # - enet and soundtouch come from Externals/ as Dolphin's versions diverge @@ -42,7 +44,6 @@ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ libcurl.so:ftp/curl \ libhidapi.so:comms/hidapi \ libxkbcommon.so:x11/libxkbcommon -BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers USES= cmake compiler:c++17-lang desktop-file-utils elfctl gl iconv \ pkgconfig qmake qt:6 sdl xorg diff --git a/emulators/dolphin-emu/files/patch-libfmt b/emulators/dolphin-emu/files/patch-libfmt new file mode 100644 index 000000000000..56679c6177f5 --- /dev/null +++ b/emulators/dolphin-emu/files/patch-libfmt @@ -0,0 +1,168 @@ +Obtained from: https://github.com/dolphin-emu/dolphin/commit/63467559b20682a6b9e4ec43c6b43456e1fca111 + https://github.com/dolphin-emu/dolphin/commit/b5b28da39d371ff2abbb0855fadc3c748a8a7043 + +--- CMakeLists.txt.orig 2023-07-23 02:24:09 UTC ++++ CMakeLists.txt +@@ -630,7 +630,7 @@ if (_M_X86) + endif() + add_subdirectory(Externals/cpp-optparse) + +-dolphin_find_optional_system_library(fmt Externals/fmt 8) ++dolphin_find_optional_system_library(fmt Externals/fmt 10.1) + + add_subdirectory(Externals/imgui) + add_subdirectory(Externals/implot) +--- Source/Android/jni/GpuDriver.cpp.orig 2023-07-23 02:24:09 UTC ++++ Source/Android/jni/GpuDriver.cpp +@@ -7,6 +7,7 @@ + + #include + ++#include "Common/EnumUtils.h"` + #include "Common/IniFile.h" + #include "jni/AndroidCommon/AndroidCommon.h" + #include "jni/AndroidCommon/IDCache.h" +@@ -69,7 +70,7 @@ Java_org_dolphinemu_dolphinemu_utils_GpuDriverHelper_0 + properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; + properties2.pNext = &driverProperties; + vkGetPhysicalDeviceProperties2(gpu_list.front(), &properties2); +- driverId = fmt::format("{}", driverProperties.driverID); ++ driverId = fmt::format("{}", Common::ToUnderlying(driverProperties.driverID)); + } + else + { +--- Source/Core/Common/HRWrap.cpp.orig 2023-07-23 02:24:09 UTC ++++ Source/Core/Common/HRWrap.cpp +@@ -3,13 +3,15 @@ + + #include "HRWrap.h" + +-#include +- + namespace Common + { + std::string GetHResultMessage(HRESULT hr) + { + auto err = winrt::hresult_error(hr); + return winrt::to_string(err.message()); ++} ++std::string GetHResultMessage(const winrt::hresult& hr) ++{ ++ return GetHResultMessage(hr.value); + } + } // namespace Common +--- Source/Core/Common/HRWrap.h.orig 2023-07-23 02:24:09 UTC ++++ Source/Core/Common/HRWrap.h +@@ -6,6 +6,7 @@ + #include + #include + #include ++#include + + #include "Common/CommonTypes.h" + +@@ -31,5 +32,16 @@ struct fmt::formatter + { + return fmt::format_to(ctx.out(), "{} ({:#010x})", Common::GetHResultMessage(hr.m_hr), + static_cast(hr.m_hr)); ++ } ++}; ++ ++template <> ++struct fmt::formatter ++{ ++ constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); } ++ template ++ auto format(const winrt::hresult& hr, FormatContext& ctx) const ++ { ++ return fmt::format_to(ctx.out(), "{} ({:#010x})", Common::GetHResultMessage(hr), hr.value); + } + }; +--- Source/Core/Common/Swap.h.orig 2023-07-23 02:24:09 UTC ++++ Source/Core/Common/Swap.h +@@ -16,6 +16,8 @@ + #include + #endif + ++#include ++ + #include "Common/CommonTypes.h" + + namespace Common +@@ -183,3 +185,15 @@ struct BigEndianValue (private) + value_type raw; + }; + } // Namespace Common ++ ++template ++struct fmt::formatter> ++{ ++ fmt::formatter m_formatter; ++ constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); } ++ template ++ auto format(const Common::BigEndianValue& value, FormatContext& ctx) const ++ { ++ return m_formatter.format(value.operator value_type(), ctx); ++ } ++}; +--- Source/Core/InputCommon/ControllerInterface/WGInput/WGInput.cpp.orig 2023-07-23 02:24:09 UTC ++++ Source/Core/InputCommon/ControllerInterface/WGInput/WGInput.cpp +@@ -23,6 +23,7 @@ + + #include + ++#include "Common/HRWrap.h" + #include "Common/Logging/Log.h" + #include "Common/StringUtil.h" + #include "InputCommon/ControllerInterface/ControllerInterface.h" +@@ -506,7 +507,7 @@ class Device : public Core::Device (private) + catch (winrt::hresult_error error) + { + ERROR_LOG_FMT(CONTROLLERINTERFACE, +- "WGInput: IRawGameController::GetCurrentReading failed: {:x}", error.code()); ++ "WGInput: IRawGameController::GetCurrentReading failed: {}", error.code()); + } + + // IGamepad: +@@ -518,7 +519,7 @@ class Device : public Core::Device (private) + } + catch (winrt::hresult_error error) + { +- ERROR_LOG_FMT(CONTROLLERINTERFACE, "WGInput: IGamepad::GetCurrentReading failed: {:x}", ++ ERROR_LOG_FMT(CONTROLLERINTERFACE, "WGInput: IGamepad::GetCurrentReading failed: {}", + error.code()); + } + } +--- Source/Core/VideoCommon/Assets/DirectFilesystemAssetLibrary.cpp.orig 2023-07-23 02:24:09 UTC ++++ Source/Core/VideoCommon/Assets/DirectFilesystemAssetLibrary.cpp +@@ -4,7 +4,8 @@ + #include "VideoCommon/Assets/DirectFilesystemAssetLibrary.h" + + #include +-#include ++ ++#include + + #include "Common/FileUtil.h" + #include "Common/Logging/Log.h" +--- Source/Core/VideoCommon/BPMemory.h.orig 2023-07-23 02:24:09 UTC ++++ Source/Core/VideoCommon/BPMemory.h +@@ -1863,7 +1863,7 @@ enum class ColorChannel : u32 + template <> + struct fmt::formatter : EnumFormatter + { +- formatter() : EnumFormatter({"Red", "Green", "Blue", "Alpha"}) {} ++ constexpr formatter() : EnumFormatter({"Red", "Green", "Blue", "Alpha"}) {} + }; + + enum class KonstSel : u32 +--- Source/Core/VideoCommon/TextureCacheBase.h.orig 2023-07-23 02:24:09 UTC ++++ Source/Core/VideoCommon/TextureCacheBase.h +@@ -98,7 +98,6 @@ struct EFBCopyParams + template <> + struct fmt::formatter + { +- std::shared_ptr state; + constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } + template + auto format(const EFBCopyParams& uid, FormatContext& ctx) const