diff --git a/emulators/fbsd-duckstation/Makefile b/emulators/fbsd-duckstation/Makefile index 80485d071336..d6b598f18ba6 100644 --- a/emulators/fbsd-duckstation/Makefile +++ b/emulators/fbsd-duckstation/Makefile @@ -1,66 +1,74 @@ PORTNAME= fbsd-duckstation PORTVERSION= 20240614 DISTVERSIONPREFIX= v -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= emulators MAINTAINER= martymac@FreeBSD.org COMMENT= Free and open-source PlayStation emulator WWW= https://www.duckstation.org LICENSE= GPLv3 NOT_FOR_ARCHS= i386 NOT_FOR_ARCHS_REASON= src/common/fastjmp.cpp:186:2: error: Unknown platform LIB_DEPENDS= libzstd.so:archivers/zstd \ libwebp.so:graphics/webp \ libpng.so:graphics/png \ libfreetype.so:print/freetype2 \ libcurl.so:ftp/curl \ libwayland-client.so:graphics/wayland \ libwayland-egl.so:graphics/wayland \ libbacktrace.so:devel/libbacktrace \ libpulse.so:audio/pulseaudio \ libjack.so:audio/jack \ libsndio.so:audio/sndio \ libdbus-1.so:devel/dbus \ libxkbcommon.so:x11/libxkbcommon # XXX Necessary for Qt6/FindWrapVulkanHeaders.cmake #BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers USES= cmake compiler:c++20-lang gl jpeg kde:5 pkgconfig qt:6 sdl xorg USE_GITHUB= yes GH_ACCOUNT= stenzek GH_PROJECT= duckstation # See: https://github.com/stenzek/duckstation/commits/latest GH_TAGNAME= v0.1-6937 USE_GL= egl USE_SDL= sdl2 USE_XORG= ice x11 xext xrandr xrender USE_QT= base tools USE_KDE= ecm:build # XXX Vulkan support needs libshaderc_shared.so:graphics/shaderc but # Duckstation embeds its own -patched/incompatible- version # (see: scripts/shaderc-changes.patch) so we just disable it for now. CMAKE_ARGS+= \ -DDUCKSTATION_APPLICATION_DIR_PATH:STRING=${DATADIR} \ -DENABLE_VULKAN:BOOL=OFF # - Program and resources are copied from target dir ${CONFIGURE_WRKSRC}/bin # because only necessary resources are installed there do-install: cd ${CONFIGURE_WRKSRC}/bin && \ ${COPYTREE_SHARE} resources/ ${STAGEDIR}${DATADIR}/ && \ ${COPYTREE_SHARE} translations/ ${STAGEDIR}${DATADIR}/ ${INSTALL_PROGRAM} \ ${CONFIGURE_WRKSRC}/bin/duckstation-qt \ ${STAGEDIR}${PREFIX}/bin/fbsd-duckstation-qt ${INSTALL_DATA} ${CONFIGURE_WRKSRC}/bin/resources/images/duck.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/duckstation.png ${INSTALL_DATA} ${FILESDIR}/fbsd-duckstation.desktop ${STAGEDIR}${DESKTOPDIR} -.include +.include + +# XXX Shipped fmt does not build with clang 21 and consteval enabled +# See also 76122faa9d1b5e85f9a5f32a5671103d7eef1695 +.if ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 211 +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-disable-consteval.txt +.endif + +.include diff --git a/emulators/fbsd-duckstation/files/extra-patch-disable-consteval.txt b/emulators/fbsd-duckstation/files/extra-patch-disable-consteval.txt new file mode 100644 index 000000000000..621ae11e1a43 --- /dev/null +++ b/emulators/fbsd-duckstation/files/extra-patch-disable-consteval.txt @@ -0,0 +1,25 @@ +--- dep/fmt/include/fmt/core.h.orig 2026-05-18 12:50:33 UTC ++++ dep/fmt/include/fmt/core.h +@@ -216,20 +216,8 @@ + # define FMT_UNICODE !FMT_MSC_VERSION + #endif + +-#ifndef FMT_CONSTEVAL +-# if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \ +- (!defined(__apple_build_version__) || \ +- __apple_build_version__ >= 14000029L) && \ +- FMT_CPLUSPLUS >= 202002L) || \ +- (defined(__cpp_consteval) && \ +- (!FMT_MSC_VERSION || _MSC_FULL_VER >= 193030704)) +-// consteval is broken in MSVC before VS2022 and Apple clang before 14. +-# define FMT_CONSTEVAL consteval +-# define FMT_HAS_CONSTEVAL +-# else +-# define FMT_CONSTEVAL +-# endif +-#endif ++// Disable consteval ++#define FMT_CONSTEVAL + + #ifndef FMT_USE_NONTYPE_TEMPLATE_ARGS + # if defined(__cpp_nontype_template_args) && \