azahar: 2122.1 -> 2123.1 (#434282)

This commit is contained in:
Peder Bergebakken Sundt
2025-08-21 00:20:41 +02:00
committed by GitHub
3 changed files with 60 additions and 66 deletions
@@ -0,0 +1,33 @@
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index 66cbbd52ed..a8b9d41e4e 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -230,13 +230,8 @@
)
target_link_libraries(zstd_seekable PUBLIC libzstd_static)
- target_link_libraries(libzstd_static INTERFACE zstd_seekable)
-
- add_library(zstd ALIAS libzstd_static)
-
- install(TARGETS zstd_seekable
- EXPORT zstdExports
- )
+ add_library(zstd INTERFACE)
+ target_link_libraries(zstd INTERFACE libzstd_static zstd_seekable)
endif()
# ENet
diff --git a/src/common/zstd_compression.cpp b/src/common/zstd_compression.cpp
index 1e38877a1c..ac85ea1978 100644
--- a/src/common/zstd_compression.cpp
+++ b/src/common/zstd_compression.cpp
@@ -13,7 +13,7 @@
#include <mutex>
#include <sstream>
#include <zstd.h>
-#include <zstd/contrib/seekable_format/zstd_seekable.h>
+#include <zstd_seekable.h>
#include <boost/serialization/base_object.hpp>
#include <boost/serialization/unique_ptr.hpp>
+27 -23
View File
@@ -7,7 +7,6 @@
doxygen,
dynarmic,
enet,
fetchpatch,
fetchzip,
fmt,
ffmpeg_6-headless,
@@ -25,15 +24,15 @@
pipewire,
pkg-config,
portaudio,
python3,
robin-map,
SDL2,
spirv-tools,
spirv-headers,
soundtouch,
stdenv,
vulkan-headers,
xbyak,
xorg,
zstd,
enableQtTranslations ? true,
qt6,
enableCubeb ? true,
@@ -43,6 +42,9 @@
enableSSE42 ? true, # Disable if your hardware doesn't support SSE 4.2 (mainly CPUs before 2011)
gamemode,
enableGamemode ? lib.meta.availableOn stdenv.hostPlatform gamemode,
nix-update-script,
darwinMinVersionHook,
apple-sdk_12,
}:
let
inherit (lib)
@@ -54,16 +56,23 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "azahar";
version = "2122.1";
version = "2123.1";
src = fetchzip {
url = "https://github.com/azahar-emu/azahar/releases/download/${finalAttrs.version}/azahar-unified-source-${finalAttrs.version}.tar.xz";
hash = "sha256-RQ8dgD09cWyVWGSLzHz1oJOKia1OKr2jHqYwKaVGfxE=";
hash = "sha256-Rwq1fkRCzOna04d71w175iSQnH26z7gQfwfIZhFW/90=";
};
patches = [
# https://github.com/azahar-emu/azahar/pull/1305
./fix-zstd-seekable-include.patch
];
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
python3
pkg-config
qt6.wrapQtAppsHook
];
@@ -93,10 +102,15 @@ stdenv.mkDerivation (finalAttrs: {
qt6.qttools
soundtouch
SDL2
spirv-tools
spirv-headers
vulkan-headers
xbyak
zstd
# https://github.com/azahar-emu/azahar/pull/1281
# spirv-tools
# Azahar uses zstd_seekable which is not currently packaged in nixpkgs
# zstd
]
++ optionals enableQtTranslations [ qt6.qttools ]
++ optionals enableCubeb [ cubeb ]
@@ -109,23 +123,10 @@ stdenv.mkDerivation (finalAttrs: {
]
++ optionals stdenv.hostPlatform.isDarwin [
moltenvk
];
patches = [
# Fix boost errors
(fetchpatch {
url = "https://raw.githubusercontent.com/Tatsh/tatsh-overlay/fa2f92b888f8c0aab70414ca560b823ffb33b122/games-emulation/lime3ds/files/lime3ds-0002-boost-fix.patch";
hash = "sha256-XJogqvQE7I5lVHtvQja0woVlO40blhFOqnoYftIQwJs=";
})
# Fix boost 1.87
(fetchpatch {
url = "https://raw.githubusercontent.com/Tatsh/tatsh-overlay/5c4497d9b67fa6f2fa327b2f2ce4cb5be8c9f2f7/games-emulation/lime3ds/files/lime3ds-0003-boost-1.87-fixes.patch";
hash = "sha256-mwfI7fTx9aWF/EjMW3bxoz++A+6ONbNA70tT5nkhDUU=";
})
# https://github.com/azahar-emu/azahar/pull/1165
./update-cmake-lists.patch
# error: 'lowPowerModeEnabled' is unavailable: not available on macOS
apple-sdk_12
(darwinMinVersionHook "12.0")
];
postPatch = ''
@@ -143,12 +144,15 @@ stdenv.mkDerivation (finalAttrs: {
(cmakeBool "USE_SYSTEM_LIBS" true)
(cmakeBool "DISABLE_SYSTEM_LODEPNG" true)
(cmakeBool "DISABLE_SYSTEM_VMA" true)
(cmakeBool "DISABLE_SYSTEM_ZSTD" true)
(cmakeBool "ENABLE_QT_TRANSLATION" enableQtTranslations)
(cmakeBool "ENABLE_CUBEB" enableCubeb)
(cmakeBool "USE_DISCORD_PRESENCE" useDiscordRichPresence)
(cmakeBool "ENABLE_SSE42" enableSSE42)
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Open-source 3DS emulator project based on Citra";
homepage = "https://github.com/azahar-emu/azahar";
@@ -1,43 +0,0 @@
From d9e7361a174f0f491c49fe78cd96a823c65e97dd Mon Sep 17 00:00:00 2001
From: qr243vbi <uiguruigurovich@gmail.com>
Date: Sat, 7 Jun 2025 01:18:03 +0300
Subject: [PATCH 1/2] Update CMakeLists.txt
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 54051a4ef2..531c46abbe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,6 +16,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
include(DownloadExternals)
include(CMakeDependentOption)
+include(FindPkgConfig)
project(citra LANGUAGES C CXX ASM)
From 679a4036e2fbb96d1d6a803f3f59ae8f01f9e691 Mon Sep 17 00:00:00 2001
From: qr243vbi <uiguruigurovich@gmail.com>
Date: Sat, 7 Jun 2025 12:49:07 +0300
Subject: [PATCH 2/2] Add missing find_package directive
---
src/citra_qt/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/citra_qt/CMakeLists.txt b/src/citra_qt/CMakeLists.txt
index 1b78605a0a..de00dc4609 100644
--- a/src/citra_qt/CMakeLists.txt
+++ b/src/citra_qt/CMakeLists.txt
@@ -273,6 +273,7 @@ if (ENABLE_VULKAN)
endif()
if (NOT WIN32)
+ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
target_include_directories(citra_qt PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
endif()