mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
emulators/duckstation: Update to 20240614
Also, add missing dependencies + disable Vulkan support for now (Duckstation needs a patched version of shaderc and cannot use graphics/shaderc from ports yet).
This commit is contained in:
parent
e916668cf4
commit
64e2bf7a6a
@ -1,5 +1,5 @@
|
||||
PORTNAME= duckstation
|
||||
PORTVERSION= 20240125
|
||||
PORTVERSION= 20240614
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= emulators
|
||||
|
||||
@ -12,30 +12,41 @@ LICENSE= GPLv3
|
||||
NOT_FOR_ARCHS= i386
|
||||
NOT_FOR_ARCHS_REASON= src/common/fastjmp.cpp:186:2: error: Unknown platform
|
||||
|
||||
LIB_DEPENDS= libcurl.so:ftp/curl \
|
||||
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 \
|
||||
libxkbcommon.so:x11/libxkbcommon \
|
||||
libpulse.so:audio/pulseaudio \
|
||||
libjack.so:audio/jack \
|
||||
libsndio.so:audio/sndio \
|
||||
libdbus-1.so:devel/dbus
|
||||
libdbus-1.so:devel/dbus \
|
||||
libxkbcommon.so:x11/libxkbcommon
|
||||
# XXX Necessary for Qt6/FindWrapVulkanHeaders.cmake
|
||||
BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers
|
||||
#BUILD_DEPENDS= vulkan-headers>0:graphics/vulkan-headers
|
||||
|
||||
USES= cmake compiler:c++20-lang gl pkgconfig qt:6 sdl xorg
|
||||
USES= cmake compiler:c++20-lang gl jpeg kde:5 pkgconfig qt:6 sdl xorg
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= stenzek
|
||||
# See: https://github.com/stenzek/duckstation/commits/latest
|
||||
GH_TAGNAME= a38d692
|
||||
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}
|
||||
-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
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1706300245
|
||||
SHA256 (stenzek-duckstation-v20240125-a38d692_GH0.tar.gz) = 4b1fcecfeba05f0921d65beb7331fcbedde6f4e13eb9ed7cf7f9275c15c36c8e
|
||||
SIZE (stenzek-duckstation-v20240125-a38d692_GH0.tar.gz) = 13984655
|
||||
TIMESTAMP = 1720199749
|
||||
SHA256 (stenzek-duckstation-v20240614-v0.1-6937_GH0.tar.gz) = 6f7aff4484fa8aa67bb84f6be6f6d04c9097c5cb45b80a7667bf2999a062231d
|
||||
SIZE (stenzek-duckstation-v20240614-v0.1-6937_GH0.tar.gz) = 13548770
|
||||
|
30
emulators/duckstation/files/patch-dep-cubeb-CMakeLists.txt
Normal file
30
emulators/duckstation/files/patch-dep-cubeb-CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
||||
--- dep/cubeb/CMakeLists.txt.orig 2024-06-14 05:59:32 UTC
|
||||
+++ dep/cubeb/CMakeLists.txt
|
||||
@@ -15,6 +15,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
+set(CMAKE_REQUIRED_INCLUDES "${CMAKE_INSTALL_PREFIX}/include")
|
||||
|
||||
set(CMAKE_CXX_WARNING_LEVEL 4)
|
||||
if(NOT MSVC)
|
||||
@@ -33,8 +34,10 @@ add_library(cubeb
|
||||
src/cubeb_strings.c
|
||||
src/cubeb_utils.cpp
|
||||
)
|
||||
-target_include_directories(cubeb
|
||||
- PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
|
||||
+target_include_directories(cubeb PUBLIC
|
||||
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
+ $<BUILD_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
|
||||
+ $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
|
||||
add_library(speex OBJECT subprojects/speex/resample.c)
|
||||
@@ -178,4 +181,4 @@ endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
-endif()
|
||||
\ No newline at end of file
|
||||
+endif()
|
@ -0,0 +1,11 @@
|
||||
--- dep/discord-rpc/CMakeLists.txt.orig 2024-06-14 05:59:32 UTC
|
||||
+++ dep/discord-rpc/CMakeLists.txt
|
||||
@@ -25,7 +25,7 @@ elseif(APPLE)
|
||||
src/connection_unix.cpp
|
||||
src/discord_register_osx.m
|
||||
)
|
||||
-elseif(LINUX OR FREEBSD)
|
||||
+elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|FreeBSD)")
|
||||
target_sources(discord-rpc PRIVATE
|
||||
src/connection_unix.cpp
|
||||
src/discord_register_linux.cpp
|
@ -1,20 +1,21 @@
|
||||
Allow relocation of resource files and translations
|
||||
|
||||
--- CMakeLists.txt.orig 2023-10-16 12:57:57 UTC
|
||||
--- CMakeLists.txt.orig 2024-06-14 05:59:32 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -44,6 +44,9 @@ endif()
|
||||
endif()
|
||||
endif()
|
||||
@@ -34,6 +34,10 @@ include(DuckStationBuildOptions)
|
||||
# Build options. Depends on system attributes.
|
||||
include(DuckStationBuildOptions)
|
||||
|
||||
+if(DEFINED DUCKSTATION_APPLICATION_DIR_PATH)
|
||||
+ add_compile_definitions(DUCKSTATION_APPLICATION_DIR_PATH="${DUCKSTATION_APPLICATION_DIR_PATH}")
|
||||
+endif()
|
||||
|
||||
# Required libraries.
|
||||
if(ENABLE_SDL2)
|
||||
--- src/duckstation-qt/qthost.cpp.orig 2023-11-20 14:04:38 UTC
|
||||
+
|
||||
# Set _DEBUG macro for Debug builds.
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
|
||||
--- src/duckstation-qt/qthost.cpp.orig 2024-06-14 05:59:32 UTC
|
||||
+++ src/duckstation-qt/qthost.cpp
|
||||
@@ -259,6 +259,10 @@ void QtHost::SetResourcesDirectory()
|
||||
@@ -503,6 +503,10 @@ void QtHost::SetResourcesDirectory()
|
||||
|
||||
void QtHost::SetResourcesDirectory()
|
||||
{
|
||||
@ -25,38 +26,17 @@ Allow relocation of resource files and translations
|
||||
#ifndef __APPLE__
|
||||
// On Windows/Linux, these are in the binary directory.
|
||||
EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources");
|
||||
@@ -266,6 +270,7 @@ void QtHost::SetResourcesDirectory()
|
||||
@@ -510,6 +514,7 @@ void QtHost::SetResourcesDirectory()
|
||||
// On macOS, this is in the bundle resources directory.
|
||||
EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources"));
|
||||
#endif
|
||||
+#endif // DUCKSTATION_APPLICATION_DIR_PATH
|
||||
}
|
||||
|
||||
void QtHost::SetDataDirectory()
|
||||
--- src/duckstation-nogui/nogui_host.cpp.orig 2023-10-16 12:57:57 UTC
|
||||
+++ src/duckstation-nogui/nogui_host.cpp
|
||||
@@ -156,6 +156,10 @@ void NoGUIHost::SetResourcesDirectory()
|
||||
|
||||
void NoGUIHost::SetResourcesDirectory()
|
||||
{
|
||||
+#ifdef DUCKSTATION_APPLICATION_DIR_PATH
|
||||
+ // Resources' path specified at compile time
|
||||
+ EmuFolders::Resources = Path::Canonicalize(DUCKSTATION_APPLICATION_DIR_PATH "/resources");
|
||||
+#else
|
||||
#ifndef __APPLE__NOT_USED // Not using bundles yet.
|
||||
// On Windows/Linux, these are in the binary directory.
|
||||
EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources");
|
||||
@@ -163,6 +167,7 @@ void NoGUIHost::SetResourcesDirectory()
|
||||
// On macOS, this is in the bundle resources directory.
|
||||
EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources"));
|
||||
#endif
|
||||
+#endif // DUCKSTATION_APPLICATION_DIR_PATH
|
||||
}
|
||||
|
||||
void NoGUIHost::SetDataDirectory()
|
||||
--- src/duckstation-qt/qttranslations.cpp.orig 2023-10-16 12:57:57 UTC
|
||||
bool QtHost::SetDataDirectory()
|
||||
--- src/duckstation-qt/qttranslations.cpp.orig 2024-06-14 05:59:32 UTC
|
||||
+++ src/duckstation-qt/qttranslations.cpp
|
||||
@@ -73,11 +73,15 @@ void QtHost::InstallTranslator()
|
||||
@@ -80,11 +80,15 @@ void QtHost::InstallTranslator(QWidget* dialog_parent)
|
||||
FixLanguageName(QString::fromStdString(Host::GetBaseStringSettingValue("Main", "Language", GetDefaultLanguage())));
|
||||
|
||||
// install the base qt translation first
|
||||
|
11
emulators/duckstation/files/patch-src-util-CMakeLists.txt
Normal file
11
emulators/duckstation/files/patch-src-util-CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/util/CMakeLists.txt.orig 2024-06-14 05:59:32 UTC
|
||||
+++ src/util/CMakeLists.txt
|
||||
@@ -114,7 +114,7 @@ if(ENABLE_OPENGL)
|
||||
target_link_libraries(util PRIVATE "opengl32.lib")
|
||||
endif()
|
||||
|
||||
- if(LINUX OR FREEBSD OR ANDROID)
|
||||
+ if(CMAKE_SYSTEM_NAME MATCHES "(Linux|FreeBSD|Android)")
|
||||
target_sources(util PRIVATE
|
||||
opengl_context_egl.cpp
|
||||
opengl_context_egl.h
|
@ -0,0 +1,20 @@
|
||||
--- src/util/platform_misc_unix.cpp.orig 2024-06-14 05:59:32 UTC
|
||||
+++ src/util/platform_misc_unix.cpp
|
||||
@@ -134,6 +134,7 @@ size_t PlatformMisc::GetRuntimeCacheLineSize()
|
||||
|
||||
size_t PlatformMisc::GetRuntimeCacheLineSize()
|
||||
{
|
||||
+#if defined(__linux__)
|
||||
int l1i = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
|
||||
int l1d = sysconf(_SC_LEVEL1_ICACHE_LINESIZE);
|
||||
int res = (l1i > l1d) ? l1i : l1d;
|
||||
@@ -152,6 +153,9 @@ size_t PlatformMisc::GetRuntimeCacheLineSize()
|
||||
}
|
||||
|
||||
return (res > 0) ? static_cast<size_t>(res) : 0;
|
||||
+#else
|
||||
+ return HOST_CACHE_LINE_SIZE;
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool PlatformMisc::PlaySoundAsync(const char* path)
|
@ -2,6 +2,7 @@ bin/duckstation-qt
|
||||
share/applications/duckstation.desktop
|
||||
share/pixmaps/duckstation.png
|
||||
%%DATADIR%%/resources/chtdb.txt
|
||||
%%DATADIR%%/resources/discdb.yaml
|
||||
%%DATADIR%%/resources/fonts/LICENSE.txt
|
||||
%%DATADIR%%/resources/fonts/Roboto-Regular.ttf
|
||||
%%DATADIR%%/resources/fonts/RobotoMono-Medium.ttf
|
||||
@ -12,6 +13,10 @@ share/pixmaps/duckstation.png
|
||||
%%DATADIR%%/resources/fullscreenui/PAL.png
|
||||
%%DATADIR%%/resources/fullscreenui/address-book-new.png
|
||||
%%DATADIR%%/resources/fullscreenui/applications-system.png
|
||||
%%DATADIR%%/resources/fullscreenui/back-icon.png
|
||||
%%DATADIR%%/resources/fullscreenui/desktop-mode.png
|
||||
%%DATADIR%%/resources/fullscreenui/drive-cdrom.png
|
||||
%%DATADIR%%/resources/fullscreenui/exit.png
|
||||
%%DATADIR%%/resources/fullscreenui/media-cdrom.png
|
||||
%%DATADIR%%/resources/fullscreenui/multimedia-player.png
|
||||
%%DATADIR%%/resources/fullscreenui/star-0.png
|
||||
@ -20,8 +25,10 @@ share/pixmaps/duckstation.png
|
||||
%%DATADIR%%/resources/fullscreenui/star-3.png
|
||||
%%DATADIR%%/resources/fullscreenui/star-4.png
|
||||
%%DATADIR%%/resources/fullscreenui/star-5.png
|
||||
%%DATADIR%%/resources/fullscreenui/start-bios.png
|
||||
%%DATADIR%%/resources/fullscreenui/start-file.png
|
||||
%%DATADIR%%/resources/gamecontrollerdb.txt
|
||||
%%DATADIR%%/resources/gamedb.json
|
||||
%%DATADIR%%/resources/gamedb.yaml
|
||||
%%DATADIR%%/resources/images/cover-placeholder.png
|
||||
%%DATADIR%%/resources/images/crosshair.png
|
||||
%%DATADIR%%/resources/images/duck.png
|
||||
@ -32,10 +39,18 @@ share/pixmaps/duckstation.png
|
||||
%%DATADIR%%/resources/shaders/crt-lottes.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/bloom.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/celshading.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/crt/CRT-EASYMODE.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/crt/CRT-HYLLIAN.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/crt/ZFAST-CRT-COMPOSITE.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/edge-smoothing/DDT.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/edge-smoothing/XBR.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/interpolation/JINC2.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/pixel-art/PIXELLATE.glsl
|
||||
%%DATADIR%%/resources/shaders/dolphinfx/scanlines.glsl
|
||||
%%DATADIR%%/resources/shaders/reshade/README.md
|
||||
%%DATADIR%%/resources/shaders/reshade/REFERENCE.md
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/Blending.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/CRT-Guest-HD.fx
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/CRT-NewPixie.fx
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/CRTLottes2.fx
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/Daltonize.fx
|
||||
@ -47,7 +62,37 @@ share/pixmaps/duckstation.png
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/ReShade.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/ReShadeUI.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/TriDither.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale.fx
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/bind-shader-params.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/bloom-functions.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/blur-functions.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/derived-settings-and-constants.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/downsampling-functions.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/gamma-management.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/geometry-functions.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/helper-functions-and-macros.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/phosphor-mask-calculations.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/quad-pixel-communication.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/scanline-functions.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/special-functions.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/tex2Dantialias.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/lib/user-settings.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/bloom.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/blurring.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/brightpass.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/content-box.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/deinterlace.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/electron-beams.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/geometry-aa-last-pass.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/input-blurring.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/phosphor-mask.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/shaders/shared-objects.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/crt-royale/version-number.fxh
|
||||
%%DATADIR%%/resources/shaders/reshade/Shaders/scanlines-abs.fx
|
||||
%%DATADIR%%/resources/shaders/reshade/Textures/CRT-LUT-1.png
|
||||
%%DATADIR%%/resources/shaders/reshade/Textures/CRT-LUT-2.png
|
||||
%%DATADIR%%/resources/shaders/reshade/Textures/CRT-LUT-3.png
|
||||
%%DATADIR%%/resources/shaders/reshade/Textures/CRT-LUT-4.png
|
||||
%%DATADIR%%/resources/shaders/reshade/Textures/FontAtlas.png
|
||||
%%DATADIR%%/resources/shaders/reshade/Textures/crt-newpixie/crtframe.png
|
||||
%%DATADIR%%/resources/shaders/reshade/Textures/lut.png
|
||||
@ -67,6 +112,7 @@ share/pixmaps/duckstation.png
|
||||
%%DATADIR%%/translations/duckstation-qt_es.qm
|
||||
%%DATADIR%%/translations/duckstation-qt_fr.qm
|
||||
%%DATADIR%%/translations/duckstation-qt_he.qm
|
||||
%%DATADIR%%/translations/duckstation-qt_id.qm
|
||||
%%DATADIR%%/translations/duckstation-qt_it.qm
|
||||
%%DATADIR%%/translations/duckstation-qt_ja.qm
|
||||
%%DATADIR%%/translations/duckstation-qt_ko.qm
|
||||
|
Loading…
Reference in New Issue
Block a user