mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: dolphin-emu: Update to 2506-0.79a3af2.
* gnu/packages/emulators.scm (dolphin-emu): Update to 2506-0.79a3af2. [source] {patches}: Update patches. (dolphin-rcheevos-submodule): New variable. [source]: Refine and update snippet. [#:phases] {remove-unittests-target-post-build-command}: Delete. {generate-fonts&hardcode-libvulkan-path}: Fix typo in phase name. Remove obsolete cstdint patching. {post-check}: Delete. [#:configure-flags]: Streamline. Add -DUSE_DISCORD_PRESENCE=OFF. [native-inputs]: Add googletest [inputs]: Replace ffmpeg-4 with ffmpeg. Replace fmt-7 with fmt-11. Replace gtk+-2 with gtk+ and minizip-ng-compat with minizip-ng. Add lz4, mgba-for-dolphin, qtsvg, spirv-cross, spng, tinygltf, vulkan-headers, vulkan-memory-allocator and watcher. Replace qtbase-5 with qtbase. Replace sdl2 with sdl3. Replace sfml-2 with sfml. Remove soundtouch-1/integer-samples. (libretro-dolphin-emu): Update to 5.0-1.a09f78f. [source]: Break inheritance with dolphin-emu, adjusting snippet for its older code base. [patches]: Apply libretro-dolphin-emu-libusb-assert.patch and libretro-dolphin-emu-vulkan-headers.patch. [#:phases] {link-unittest-to-gtest}: New phase. [inputs]: Do not inherit from dolphin-emu. Replace fmt-7 with fmt. Replace minizip-ng with minizip-ng-compat. googletest, vulkan-headers. * gnu/packages/patches/dolphin-emu-data.patch: Delete file. * gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch * gnu/packages/patches/dolphin-emu-unbundle-watcher.patch * gnu/packages/patches/libretro-dolphin-emu-gc-font-tool.patch * gnu/packages/patches/libretro-dolphin-emu-libusb-assert.patch * gnu/packages/patches/libretro-dolphin-emu-vulkan-headers.patch: New files. * gnu/local.mk (dist_patch_DATA): Update accordingly. Fixes: #1327 Change-Id: I5a870a5e29c1ca243fb1d5e049ee06c5e254a04f
This commit is contained in:
parent
9d1f9a867d
commit
186a9714a3
8 changed files with 412 additions and 145 deletions
|
@ -1214,7 +1214,8 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/docbook2x-static-datadir-evaluation.patch \
|
%D%/packages/patches/docbook2x-static-datadir-evaluation.patch \
|
||||||
%D%/packages/patches/doc++-include-directives.patch \
|
%D%/packages/patches/doc++-include-directives.patch \
|
||||||
%D%/packages/patches/doc++-segfault-fix.patch \
|
%D%/packages/patches/doc++-segfault-fix.patch \
|
||||||
%D%/packages/patches/dolphin-emu-data.patch \
|
%D%/packages/patches/dolphin-emu-unbundle-tinygltf.patch \
|
||||||
|
%D%/packages/patches/dolphin-emu-unbundle-watcher.patch \
|
||||||
%D%/packages/patches/dovecot-opensslv3.patch \
|
%D%/packages/patches/dovecot-opensslv3.patch \
|
||||||
%D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
|
%D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
|
||||||
%D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \
|
%D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \
|
||||||
|
@ -1687,6 +1688,9 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/libguestfs-syms.patch \
|
%D%/packages/patches/libguestfs-syms.patch \
|
||||||
%D%/packages/patches/libinfinity-renew-test-certificate.patch \
|
%D%/packages/patches/libinfinity-renew-test-certificate.patch \
|
||||||
%D%/packages/patches/libretro-dolphin-emu-data.patch \
|
%D%/packages/patches/libretro-dolphin-emu-data.patch \
|
||||||
|
%D%/packages/patches/libretro-dolphin-emu-gc-font-tool.patch \
|
||||||
|
%D%/packages/patches/libretro-dolphin-emu-libusb-assert.patch \
|
||||||
|
%D%/packages/patches/libretro-dolphin-emu-vulkan-headers.patch \
|
||||||
%D%/packages/patches/librewolf-add-store-to-rdd-allowlist.patch \
|
%D%/packages/patches/librewolf-add-store-to-rdd-allowlist.patch \
|
||||||
%D%/packages/patches/librewolf-neuter-locale-download.patch \
|
%D%/packages/patches/librewolf-neuter-locale-download.patch \
|
||||||
%D%/packages/patches/librewolf-use-system-wide-dir.patch \
|
%D%/packages/patches/librewolf-use-system-wide-dir.patch \
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com>
|
;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com>
|
||||||
;;; Copyright © 2021 Felipe Balbi <balbi@kernel.org>
|
;;; Copyright © 2021 Felipe Balbi <balbi@kernel.org>
|
||||||
;;; Copyright © 2021, 2024 Felix Gruber <felgru@posteo.net>
|
;;; Copyright © 2021, 2024 Felix Gruber <felgru@posteo.net>
|
||||||
;;; Copyright © 2021, 2024, 2025 Maxim Cournoyer <maxim@guixotic.coop>
|
;;; Copyright © 2021, 2024-2025 Maxim Cournoyer <maxim@guixotic.coop>
|
||||||
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
;;; Copyright © 2023 c4droid <c4droid@foxmail.com>
|
;;; Copyright © 2023 c4droid <c4droid@foxmail.com>
|
||||||
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
|
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
|
||||||
|
@ -73,6 +73,7 @@
|
||||||
#:use-module (gnu packages digest)
|
#:use-module (gnu packages digest)
|
||||||
#:use-module (gnu packages engineering)
|
#:use-module (gnu packages engineering)
|
||||||
#:use-module (gnu packages elf)
|
#:use-module (gnu packages elf)
|
||||||
|
#:use-module (gnu packages file-systems)
|
||||||
#:use-module (gnu packages flex)
|
#:use-module (gnu packages flex)
|
||||||
#:use-module (gnu packages fltk)
|
#:use-module (gnu packages fltk)
|
||||||
#:use-module (gnu packages fonts)
|
#:use-module (gnu packages fonts)
|
||||||
|
@ -111,6 +112,7 @@
|
||||||
#:use-module (gnu packages texinfo)
|
#:use-module (gnu packages texinfo)
|
||||||
#:use-module (gnu packages textutils)
|
#:use-module (gnu packages textutils)
|
||||||
#:use-module (gnu packages tls)
|
#:use-module (gnu packages tls)
|
||||||
|
#:use-module (gnu packages toolkits)
|
||||||
#:use-module (gnu packages upnp)
|
#:use-module (gnu packages upnp)
|
||||||
#:use-module (gnu packages video)
|
#:use-module (gnu packages video)
|
||||||
#:use-module (gnu packages vulkan)
|
#:use-module (gnu packages vulkan)
|
||||||
|
@ -322,97 +324,96 @@ console.")
|
||||||
It aims to support Nintendo DSi and 3DS as well.")
|
It aims to support Nintendo DSi and 3DS as well.")
|
||||||
(license license:gpl3+)))
|
(license license:gpl3+)))
|
||||||
|
|
||||||
;; Building from recent Git because the official 5.0 release no longer builds.
|
(define dolphin-rcheevos-submodule
|
||||||
;; Following commits and revision numbers of beta versions listed at
|
(origin
|
||||||
;; https://dolphin-emu.org/download/.
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/RetroAchievements/rcheevos")
|
||||||
|
(commit "b443902b1cdfee5a66b09fec20a94d2d2afaf2ec")))
|
||||||
|
(file-name "dolphin-rcheevos-submodule-checkout")
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"1118l6ln73rjj7hw45712lm2i24m96nygiiw57hlcyaxijppl1vj"))))
|
||||||
|
|
||||||
(define-public dolphin-emu
|
(define-public dolphin-emu
|
||||||
(let ((commit "f9deb68aee962564b1495ff04c54c015e58d086f")
|
;; Note: make sure to update the above rcheevos commit to match that of the
|
||||||
(revision "13669"))
|
;; corresponding git submodule in dolphin (see:
|
||||||
|
;; <https://github.com/dolphin-emu/dolphin/tree/master/Externals/>).
|
||||||
|
(let ((commit "64d4c4020cf444d5afea708b38d1b363e532c7ba")
|
||||||
|
(revision "0"))
|
||||||
(package
|
(package
|
||||||
(name "dolphin-emu")
|
(name "dolphin-emu")
|
||||||
(version (git-version "5.0" revision commit))
|
(version (git-version "2506" revision commit))
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/dolphin-emu/dolphin")
|
(url "https://github.com/dolphin-emu/dolphin")
|
||||||
(commit commit)))
|
(commit commit)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1p8qsxlabgmz3nic0a9ghh9d3lzl5f8i3kmdrrvx6w8kdlp33018"))
|
(base32 "095326n1dznaplll5crlfdg2d39qxxlhgch5fn7vz8majz0qb5pg"))
|
||||||
(modules '((guix build utils)
|
(modules '((guix build utils)
|
||||||
(ice-9 regex)))
|
(ice-9 ftw)
|
||||||
|
(ice-9 regex)
|
||||||
|
(srfi srfi-26)))
|
||||||
(snippet
|
(snippet
|
||||||
'(begin
|
#~(begin
|
||||||
;; Remove external stuff we don't need.
|
(define (delete-all-but directory . preserve)
|
||||||
(for-each (lambda (dir)
|
(with-directory-excursion directory
|
||||||
(delete-file-recursively
|
(let* ((pred (negate (cut member <>
|
||||||
(string-append "Externals/" dir)))
|
(cons* "." ".." preserve))))
|
||||||
'("LZO" "OpenAL" "Qt" "SFML" "bzip2"
|
(items (scandir "." pred)))
|
||||||
;; XXX: Attempting to use the vulkan-headers package
|
(for-each (cut delete-file-recursively <>) items))))
|
||||||
;; results in "error:
|
|
||||||
;; ‘VK_PRESENT_MODE_RANGE_SIZE_KHR’ was not declared
|
;; Clean up the source from bundled libraries we don't need.
|
||||||
;; in this scope".
|
(delete-all-but "Externals"
|
||||||
;;"Vulkan"
|
;; XXX: The build system is currently hard-coded
|
||||||
"cubeb" "curl" "enet"
|
;; to rely on these bundled copies.
|
||||||
"ffmpeg" "fmt" "gettext"
|
"Bochs_disasm"
|
||||||
;; XXX: Attempting to use an unbundled glslang at the
|
"FatFs"
|
||||||
;; exact commit used by Dolphin still results in
|
"FreeSurround"
|
||||||
;; "error: ‘DefaultTBuiltInResource’ is not a member
|
"cpp-optparse"
|
||||||
;; of ‘glslang’".
|
"expr"
|
||||||
;;"glslang"
|
"glslang"
|
||||||
;; XXX: Googletest cannot currently easily be
|
"imgui"
|
||||||
;; unbundled, as there are missing linking
|
"implot" ;submodule
|
||||||
;; directives.
|
"picojson"
|
||||||
;;"gtest"
|
"rangeset"
|
||||||
"hidapi" "libpng" "libusb" "mbedtls"
|
"rcheevos") ;submodule
|
||||||
"miniupnpc" "minizip" "MoltenVK" "pugixml"
|
(with-directory-excursion "Externals"
|
||||||
"soundtouch"
|
(copy-recursively #$dolphin-rcheevos-submodule
|
||||||
"xxhash" "zlib" "zstd"))
|
"rcheevos/rcheevos")
|
||||||
;; Clean up the source.
|
(copy-recursively #$(package-source implot)
|
||||||
(for-each delete-file
|
"implot/implot"))
|
||||||
(find-files
|
|
||||||
"."
|
(for-each delete-file
|
||||||
(lambda (file _)
|
(find-files
|
||||||
(and (string-match "\\.(bin|dsy|exe|jar|rar)$" file)
|
"."
|
||||||
;; Preserve the important wc24 .bin
|
(lambda (file _)
|
||||||
;; configuration *data* files.
|
(and (string-match "\\.(bin|dsy|exe|jar|rar)$" file)
|
||||||
(not (member (basename file)
|
;; Preserve the important wc24 .bin
|
||||||
'("misc.bin"
|
;; configuration *data* files.
|
||||||
"nwc24dl.bin"
|
(not (member (basename file)
|
||||||
"nwc24fl.bin"
|
'("misc.bin"
|
||||||
"nwc24fls.bin")))))))
|
"nwc24dl.bin"
|
||||||
;; Do not attempt to include now-missing directories.
|
"nwc24fl.bin"
|
||||||
(substitute* "CMakeLists.txt"
|
"nwc24fls.bin")))))))))
|
||||||
((".*add_subdirectory.*Externals/enet.*") "")
|
(patches (search-patches "dolphin-emu-unbundle-watcher.patch"
|
||||||
((".*add_subdirectory.*Externals/soundtouch.*") "")
|
"dolphin-emu-unbundle-tinygltf.patch"))))
|
||||||
((".*add_subdirectory.*Externals/xxhash.*") ""))))
|
|
||||||
(patches (search-patches "dolphin-emu-data.patch"))))
|
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'configure 'remove-unittests-target-post-build-command
|
(add-before 'configure 'generate-fonts&hardcode-libvulkan-path
|
||||||
(lambda _
|
|
||||||
;; To skip a few problematic tests, CTest will be manually
|
|
||||||
;; invoked in the post-check phase.
|
|
||||||
(with-directory-excursion "Source/UnitTests"
|
|
||||||
(substitute* "CMakeLists.txt"
|
|
||||||
(("add_custom_command\\(TARGET unittests POST_BUILD.*")
|
|
||||||
"")))))
|
|
||||||
(add-before 'configure 'generate-fonts&hardcore-libvulkan-path
|
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((fontfile
|
(let ((fontfile
|
||||||
(search-input-file inputs
|
(search-input-file
|
||||||
"/share/fonts/truetype/wqy-microhei.ttc"))
|
inputs "/share/fonts/truetype/wqy-microhei.ttc"))
|
||||||
(libvulkan
|
(libvulkan
|
||||||
(search-input-file inputs "/lib/libvulkan.so")))
|
(search-input-file inputs "/lib/libvulkan.so")))
|
||||||
(chdir "docs")
|
(chdir "docs")
|
||||||
;; Include a missing header, needed for gcc@14.
|
|
||||||
(substitute* "gc-font-tool.cpp"
|
|
||||||
(("#include <cstring>" all)
|
|
||||||
(string-append all "\n#include <cstdint>")))
|
|
||||||
(invoke "bash" "-c" "g++ -O2 $(freetype-config \
|
(invoke "bash" "-c" "g++ -O2 $(freetype-config \
|
||||||
--cflags --libs) gc-font-tool.cpp -o gc-font-tool")
|
--cflags --libs) gc-font-tool.cpp -o gc-font-tool")
|
||||||
(invoke "./gc-font-tool" "a" fontfile "font_western.bin")
|
(invoke "./gc-font-tool" "a" fontfile "font_western.bin")
|
||||||
|
@ -424,21 +425,6 @@ It aims to support Nintendo DSi and 3DS as well.")
|
||||||
(("\"vulkan\", 1") (string-append "\"vulkan\""))
|
(("\"vulkan\", 1") (string-append "\"vulkan\""))
|
||||||
(("\"vulkan\"") (string-append "\"" libvulkan "\""))
|
(("\"vulkan\"") (string-append "\"" libvulkan "\""))
|
||||||
(("Common::DynamicLibrary::GetVersionedFilename") "")))))
|
(("Common::DynamicLibrary::GetVersionedFilename") "")))))
|
||||||
(add-after 'check 'post-check
|
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
|
||||||
(when tests?
|
|
||||||
(with-directory-excursion "Source/UnitTests"
|
|
||||||
(invoke "ctest" "-V" "--output-on-failure"
|
|
||||||
;; These tests fail due to libusb failing to
|
|
||||||
;; init inside the build container.
|
|
||||||
"-E" (string-join
|
|
||||||
'("MMIOTest"
|
|
||||||
"PageFaultTest"
|
|
||||||
"CoreTimingTest"
|
|
||||||
"FileSystemTest"
|
|
||||||
"PowerPCTest"
|
|
||||||
"VertexLoaderTest")
|
|
||||||
"|"))))))
|
|
||||||
(add-before 'install 'build-codeloader.bin
|
(add-before 'install 'build-codeloader.bin
|
||||||
(lambda _
|
(lambda _
|
||||||
(with-directory-excursion "../source/docs"
|
(with-directory-excursion "../source/docs"
|
||||||
|
@ -462,26 +448,14 @@ It aims to support Nintendo DSi and 3DS as well.")
|
||||||
(with-directory-excursion "../source"
|
(with-directory-excursion "../source"
|
||||||
(invoke "python3" "docs/DSP/free_dsp_rom/generate_coefs.py")
|
(invoke "python3" "docs/DSP/free_dsp_rom/generate_coefs.py")
|
||||||
(rename-file "dsp_coef.bin" "Data/Sys/GC/dsp_coef.bin")))))
|
(rename-file "dsp_coef.bin" "Data/Sys/GC/dsp_coef.bin")))))
|
||||||
;; The FindGTK2 cmake script only checks hardcoded directories for
|
|
||||||
;; glib/gtk headers. Also add some include directories via the CXX
|
|
||||||
;; flags to let GCC find some headers not actively searched by the
|
|
||||||
;; build system.
|
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
#~(list (string-append "-DCMAKE_CXX_FLAGS="
|
#~(list "-DUSE_DISCORD_PRESENCE=OFF" ;avoid bundled discord-rpc lib
|
||||||
"-I" (search-input-directory
|
"-DDSPTOOL=ON")
|
||||||
%build-inputs "include/soundtouch"))
|
|
||||||
"-DDSPTOOL=ON"
|
|
||||||
(string-append "-DX11_INCLUDE_DIR="
|
|
||||||
#$(this-package-input "libx11")
|
|
||||||
"/include")
|
|
||||||
(string-append "-DX11_LIBRARIES="
|
|
||||||
(search-input-file %build-inputs
|
|
||||||
"lib/libX11.so"))
|
|
||||||
"-DX11_FOUND=1")
|
|
||||||
#:test-target "unittests"))
|
#:test-target "unittests"))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list (cross-gcc "powerpc-linux-gnu")
|
(list (cross-gcc "powerpc-linux-gnu")
|
||||||
gettext-minimal
|
gettext-minimal
|
||||||
|
googletest
|
||||||
pkg-config
|
pkg-config
|
||||||
python-minimal
|
python-minimal
|
||||||
python-numpy))
|
python-numpy))
|
||||||
|
@ -494,14 +468,14 @@ It aims to support Nintendo DSi and 3DS as well.")
|
||||||
curl
|
curl
|
||||||
enet
|
enet
|
||||||
eudev
|
eudev
|
||||||
ffmpeg-4
|
ffmpeg
|
||||||
fmt-7
|
fmt-11
|
||||||
font-wqy-microhei
|
font-wqy-microhei
|
||||||
freetype
|
freetype
|
||||||
glew
|
glew
|
||||||
glib
|
glib
|
||||||
glu
|
glu
|
||||||
gtk+-2
|
gtk+
|
||||||
hidapi
|
hidapi
|
||||||
libevdev
|
libevdev
|
||||||
libpng
|
libpng
|
||||||
|
@ -509,20 +483,28 @@ It aims to support Nintendo DSi and 3DS as well.")
|
||||||
libx11
|
libx11
|
||||||
libxi
|
libxi
|
||||||
libxrandr
|
libxrandr
|
||||||
|
lz4
|
||||||
lzo
|
lzo
|
||||||
mbedtls-lts
|
mbedtls-lts
|
||||||
|
mgba-for-dolphin
|
||||||
mesa
|
mesa
|
||||||
miniupnpc
|
miniupnpc
|
||||||
minizip-ng-compat
|
minizip-ng
|
||||||
openal
|
openal
|
||||||
pugixml
|
pugixml
|
||||||
pulseaudio
|
pulseaudio
|
||||||
qtbase-5
|
qtbase
|
||||||
sdl2
|
qtsvg
|
||||||
sfml-2
|
sdl3
|
||||||
|
sfml
|
||||||
soil
|
soil
|
||||||
soundtouch-1/integer-samples
|
spirv-cross
|
||||||
|
spng
|
||||||
|
tinygltf
|
||||||
|
vulkan-headers ;references loader
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
|
vulkan-memory-allocator
|
||||||
|
watcher
|
||||||
xxhash
|
xxhash
|
||||||
zlib
|
zlib
|
||||||
`(,zstd "lib")))
|
`(,zstd "lib")))
|
||||||
|
@ -536,36 +518,102 @@ turbo speed, networked multiplayer, and graphical enhancements.")
|
||||||
;; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
|
;; dolphin/Data/Sys/GC/font_*.bin: Licensed under ASL2.0.
|
||||||
(license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
|
(license (list license:gpl2+ license:asl2.0 license:fdl1.2+)))))
|
||||||
|
|
||||||
|
;;; XXX: The libretro port is currently based on an old version of dolphin, so
|
||||||
|
;;; its packaging/inputs are lagging behind.
|
||||||
(define-public libretro-dolphin-emu
|
(define-public libretro-dolphin-emu
|
||||||
;; There are no tag or release; use the latest commit.
|
;; There are no tag or release; use the latest commit.
|
||||||
(let ((commit "89a4df725d4eb24537728f7d655cddb1add25c18")
|
(let ((commit "a09f78f735f0d2184f64ba5b134abe98ee99c65f")
|
||||||
(revision "0"))
|
(revision "1"))
|
||||||
(package
|
(package
|
||||||
(inherit dolphin-emu)
|
(inherit dolphin-emu)
|
||||||
(name "libretro-dolphin-emu")
|
(name "libretro-dolphin-emu")
|
||||||
(version (git-version "5.0" revision commit))
|
(version (git-version "5.0" revision commit))
|
||||||
(source (origin
|
(source
|
||||||
(inherit (package-source dolphin-emu))
|
(origin
|
||||||
(method git-fetch)
|
(inherit (package-source dolphin-emu))
|
||||||
(uri (git-reference
|
(method git-fetch)
|
||||||
(url "https://github.com/libretro/dolphin")
|
(uri (git-reference
|
||||||
(commit commit)))
|
(url "https://github.com/libretro/dolphin")
|
||||||
(file-name (git-file-name name version))
|
(commit commit)))
|
||||||
(sha256
|
(file-name (git-file-name name version))
|
||||||
(base32
|
(sha256
|
||||||
"1fvm6hy0ihc0j3sgv88a7ak08c0kyikmmiif827j981fy7zvglvz"))
|
(base32
|
||||||
(patches (search-patches "libretro-dolphin-emu-data.patch"))))
|
"15vv3kz1vcsk53m4b19ckx9xx9cx8l0lgpzalpy625iv7qvdcj9m"))
|
||||||
|
(modules '((guix build utils)
|
||||||
|
(ice-9 ftw)
|
||||||
|
(ice-9 regex)
|
||||||
|
(srfi srfi-26)))
|
||||||
|
(snippet
|
||||||
|
#~(begin
|
||||||
|
;; XXX: 'delete-all-but' is copied from the turbovnc package.
|
||||||
|
(define (delete-all-but directory . preserve)
|
||||||
|
(define (directory? x)
|
||||||
|
(and=> (stat x #f)
|
||||||
|
(compose (cut eq? 'directory <>) stat:type)))
|
||||||
|
(with-directory-excursion directory
|
||||||
|
(let* ((pred
|
||||||
|
(negate (cut member <> (append '("." "..") preserve))))
|
||||||
|
(items (scandir "." pred)))
|
||||||
|
(for-each (lambda (item)
|
||||||
|
(if (directory? item)
|
||||||
|
(delete-file-recursively item)
|
||||||
|
(delete-file item)))
|
||||||
|
items))))
|
||||||
|
|
||||||
|
;; Clean up the source from bundled libraries we don't need.
|
||||||
|
(delete-all-but "Externals"
|
||||||
|
;; XXX: The build system is currently hard-coded
|
||||||
|
;; to rely on these bundled copies.
|
||||||
|
"Bochs_disasm"
|
||||||
|
"FreeSurround"
|
||||||
|
"Libretro"
|
||||||
|
"cpp-optparse"
|
||||||
|
"glslang"
|
||||||
|
"imgui"
|
||||||
|
"picojson")
|
||||||
|
(for-each delete-file
|
||||||
|
(find-files
|
||||||
|
"."
|
||||||
|
(lambda (file _)
|
||||||
|
(and (string-match "\\.(bin|dsy|exe|jar|rar)$" file)
|
||||||
|
;; Preserve the important wc24 .bin
|
||||||
|
;; configuration *data* files.
|
||||||
|
(not (member (basename file)
|
||||||
|
'("misc.bin"
|
||||||
|
"nwc24dl.bin"
|
||||||
|
"nwc24fl.bin"
|
||||||
|
"nwc24fls.bin")))))))))
|
||||||
|
(patches
|
||||||
|
(search-patches "libretro-dolphin-emu-data.patch"
|
||||||
|
"libretro-dolphin-emu-gc-font-tool.patch"
|
||||||
|
"libretro-dolphin-emu-libusb-assert.patch"
|
||||||
|
"libretro-dolphin-emu-vulkan-headers.patch"))))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments dolphin-emu)
|
(substitute-keyword-arguments (package-arguments dolphin-emu)
|
||||||
((#:configure-flags flags ''())
|
((#:configure-flags flags ''())
|
||||||
#~(cons "-DLIBRETRO=ON" #$flags))
|
#~(cons* (string-append "-DCMAKE_CXX_FLAGS="
|
||||||
|
"-I" (search-input-directory
|
||||||
|
%build-inputs "include/soundtouch"))
|
||||||
|
"-DLIBRETRO=ON"
|
||||||
|
"-DUSE_SHARED_ENET=ON"
|
||||||
|
#$flags))
|
||||||
((#:phases phases '%standard-phases)
|
((#:phases phases '%standard-phases)
|
||||||
#~(modify-phases #$phases
|
#~(modify-phases #$phases
|
||||||
|
(add-after 'unpack 'link-unittest-to-gtest
|
||||||
|
(lambda _
|
||||||
|
;; Otherwise, linking with the tests with gtest_main fails
|
||||||
|
;; with a "DSO missing from command line"
|
||||||
|
(substitute* "Source/UnitTests/CMakeLists.txt"
|
||||||
|
(("PRIVATE core uicommon gtest_main" all)
|
||||||
|
(string-append all " gtest")))))
|
||||||
(add-after 'unpack 'deregister-bundled-sources
|
(add-after 'unpack 'deregister-bundled-sources
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
((".*add_subdirectory.*Externals/curl.*") "")
|
((".*add_subdirectory.*Externals/curl.*") "")
|
||||||
((".*add_subdirectory.*Externals/libpng.*") ""))))
|
((".*add_subdirectory.*Externals/gtest.*") "")
|
||||||
|
((".*add_subdirectory.*Externals/libpng.*") "")
|
||||||
|
((".*add_subdirectory.*Externals/soundtouch.*") "")
|
||||||
|
((".*add_subdirectory.*Externals/xxhash.*") ""))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda _
|
(lambda _
|
||||||
(install-file "dolphin_libretro.so"
|
(install-file "dolphin_libretro.so"
|
||||||
|
@ -581,11 +629,45 @@ turbo speed, networked multiplayer, and graphical enhancements.")
|
||||||
(copy-recursively "../source/Data/Sys"
|
(copy-recursively "../source/Data/Sys"
|
||||||
(string-append sysdir "/Sys")))))))))
|
(string-append sysdir "/Sys")))))))))
|
||||||
(inputs
|
(inputs
|
||||||
;; Delete large and extraneous inputs.
|
(list alsa-lib
|
||||||
(modify-inputs (package-inputs dolphin-emu)
|
ao
|
||||||
(delete "ffmpeg"
|
bluez
|
||||||
"gtk+"
|
bzip2
|
||||||
"qtbase")))
|
cubeb
|
||||||
|
curl
|
||||||
|
enet
|
||||||
|
eudev
|
||||||
|
fmt
|
||||||
|
font-wqy-microhei
|
||||||
|
freetype
|
||||||
|
glew
|
||||||
|
glib
|
||||||
|
glu
|
||||||
|
googletest
|
||||||
|
hidapi
|
||||||
|
libevdev
|
||||||
|
libpng
|
||||||
|
libusb
|
||||||
|
libx11
|
||||||
|
libxi
|
||||||
|
libxrandr
|
||||||
|
lzo
|
||||||
|
mbedtls-lts
|
||||||
|
mesa
|
||||||
|
miniupnpc
|
||||||
|
minizip-ng-compat
|
||||||
|
openal
|
||||||
|
pugixml
|
||||||
|
pulseaudio
|
||||||
|
sdl2
|
||||||
|
sfml-2
|
||||||
|
soil
|
||||||
|
soundtouch-1/integer-samples
|
||||||
|
xxhash
|
||||||
|
vulkan-loader
|
||||||
|
vulkan-headers
|
||||||
|
zlib
|
||||||
|
`(,zstd "lib")))
|
||||||
(synopsis "Libretro port of Dolphin, the Nintendo Wii/GameCube emulator"))))
|
(synopsis "Libretro port of Dolphin, the Nintendo Wii/GameCube emulator"))))
|
||||||
|
|
||||||
(define-public dosbox
|
(define-public dosbox
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
Resolve a hang in the menu of this game.
|
|
||||||
|
|
||||||
Upstream-status: https://github.com/dolphin-emu/dolphin/pull/13285
|
|
||||||
|
|
||||||
diff --git a/Data/Sys/GameSettings/GWR.ini b/Data/Sys/GameSettings/GWR.ini
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000..fdbc0c312f
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/Data/Sys/GameSettings/GWR.ini
|
|
||||||
@@ -0,0 +1,5 @@
|
|
||||||
+# GWR - WAVE RACE / BLUE STORM
|
|
||||||
+
|
|
||||||
+[Core]
|
|
||||||
+# Disable multi-threading to avoid a hang in the game menu.
|
|
||||||
+CPUThread = False
|
|
80
gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch
Normal file
80
gnu/packages/patches/dolphin-emu-unbundle-tinygltf.patch
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
Upstream-status: https://github.com/dolphin-emu/dolphin/pull/13824
|
||||||
|
|
||||||
|
diff --git a/CMake/DolphinLibraryTools.cmake b/CMake/DolphinLibraryTools.cmake
|
||||||
|
index 4c395a8ef9..efa0d6a9e2 100644
|
||||||
|
--- a/CMake/DolphinLibraryTools.cmake
|
||||||
|
+++ b/CMake/DolphinLibraryTools.cmake
|
||||||
|
@@ -1,14 +1,3 @@
|
||||||
|
-# like add_library(new ALIAS old) but avoids add_library cannot create ALIAS target "new" because target "old" is imported but not globally visible. on older cmake
|
||||||
|
-# This can be replaced with a direct alias call once our minimum is cmake 3.18
|
||||||
|
-function(dolphin_alias_library new old)
|
||||||
|
- string(REPLACE "::" "" library_no_namespace ${old})
|
||||||
|
- if (NOT TARGET _alias_${library_no_namespace})
|
||||||
|
- add_library(_alias_${library_no_namespace} INTERFACE)
|
||||||
|
- target_link_libraries(_alias_${library_no_namespace} INTERFACE ${old})
|
||||||
|
- endif()
|
||||||
|
- add_library(${new} ALIAS _alias_${library_no_namespace})
|
||||||
|
-endfunction()
|
||||||
|
-
|
||||||
|
# Makes an imported target if it doesn't exist. Useful for when find scripts from older versions of cmake don't make the targets you need
|
||||||
|
function(dolphin_make_imported_target_if_missing target lib)
|
||||||
|
if(${lib}_FOUND AND NOT TARGET ${target})
|
||||||
|
@@ -85,7 +74,7 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
|
||||||
|
endif()
|
||||||
|
if(${library}_FOUND)
|
||||||
|
message(STATUS "Using system ${library}")
|
||||||
|
- dolphin_alias_library(${alias} PkgConfig::${library})
|
||||||
|
+ add_library(${alias} ALIAS PkgConfig::${library})
|
||||||
|
set(${library}_TYPE "System" PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index c277e2a10a..67b72179f3 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
########################################
|
||||||
|
# General setup
|
||||||
|
#
|
||||||
|
-cmake_minimum_required(VERSION 3.13)
|
||||||
|
+cmake_minimum_required(VERSION 3.18)
|
||||||
|
|
||||||
|
cmake_policy(SET CMP0079 NEW) # let target_link_libraries() link to a target defined in a different directory
|
||||||
|
cmake_policy(SET CMP0080 OLD) # allow using BundleUtilities at configure time
|
||||||
|
@@ -657,7 +657,11 @@ add_subdirectory(Externals/glslang)
|
||||||
|
if(WIN32 OR APPLE)
|
||||||
|
add_subdirectory(Externals/spirv_cross)
|
||||||
|
endif()
|
||||||
|
-add_subdirectory(Externals/tinygltf)
|
||||||
|
+
|
||||||
|
+dolphin_find_optional_system_library(TinyGLTF Externals/tinygltf)
|
||||||
|
+if(NOT DEFINED tinygltf)
|
||||||
|
+ add_library(tinygltf ALIAS tinygltf::tinygltf) # using system library
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
if(ENABLE_VULKAN)
|
||||||
|
add_definitions(-DHAS_VULKAN)
|
||||||
|
diff --git a/Externals/tinygltf/CMakeLists.txt b/Externals/tinygltf/CMakeLists.txt
|
||||||
|
index 0d86268bbe..9e6a99c6f8 100644
|
||||||
|
--- a/Externals/tinygltf/CMakeLists.txt
|
||||||
|
+++ b/Externals/tinygltf/CMakeLists.txt
|
||||||
|
@@ -7,5 +7,5 @@ if (NOT MSVC)
|
||||||
|
endif()
|
||||||
|
target_sources(tinygltf PRIVATE
|
||||||
|
tinygltf/tiny_gltf.cc)
|
||||||
|
-target_include_directories(tinygltf INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
+target_include_directories(tinygltf INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/tinygltf)
|
||||||
|
dolphin_disable_warnings(tinygltf)
|
||||||
|
diff --git a/Source/Core/VideoCommon/Assets/MeshAsset.cpp b/Source/Core/VideoCommon/Assets/MeshAsset.cpp
|
||||||
|
index bde8c8aab6..13eb2b4448 100644
|
||||||
|
--- a/Source/Core/VideoCommon/Assets/MeshAsset.cpp
|
||||||
|
+++ b/Source/Core/VideoCommon/Assets/MeshAsset.cpp
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
#include <array>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
-#include <tinygltf/tiny_gltf.h>
|
||||||
|
+#include <tiny_gltf.h>
|
||||||
|
|
||||||
|
#include "Common/IOFile.h"
|
||||||
|
#include "Common/Logging/Log.h"
|
50
gnu/packages/patches/dolphin-emu-unbundle-watcher.patch
Normal file
50
gnu/packages/patches/dolphin-emu-unbundle-watcher.patch
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
Upstream-status: https://github.com/dolphin-emu/dolphin/pull/13823
|
||||||
|
|
||||||
|
diff --git a/CMake/DolphinLibraryTools.cmake b/CMake/DolphinLibraryTools.cmake
|
||||||
|
index 4c395a8ef9..fb806b1b90 100644
|
||||||
|
--- a/CMake/DolphinLibraryTools.cmake
|
||||||
|
+++ b/CMake/DolphinLibraryTools.cmake
|
||||||
|
@@ -92,3 +92,30 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun
|
||||||
|
set(${library}_TYPE "Bundled" PARENT_SCOPE)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
+
|
||||||
|
+# This can be used for header-only libraries that doesn't offer a
|
||||||
|
+# pkg-config or CMake file. It uses CMake's find_file. LIBRARY is the
|
||||||
|
+# name of the library providing it, INCLUDE is the header file name
|
||||||
|
+# without its installation prefix (e.g. "wtr/watcher.hpp") while
|
||||||
|
+# BUNDLED_PATH is the root directory of the bundled library.
|
||||||
|
+function(dolphin_find_optional_system_include library include bundled_path)
|
||||||
|
+ dolphin_optional_system_library(use_system ${library})
|
||||||
|
+ string(TOUPPER ${library} upperlib)
|
||||||
|
+ if(use_system)
|
||||||
|
+ find_file(${library}_INCLUDE ${include})
|
||||||
|
+ if((NOT ${library}_INCLUDE) AND (NOT ${use_system} STREQUAL "AUTO"))
|
||||||
|
+ message(FATAL_ERROR "No system ${library} headers found. \
|
||||||
|
+Please install it or set USE_SYSTEM_${upperlib} to AUTO or OFF.")
|
||||||
|
+ endif()
|
||||||
|
+ endif()
|
||||||
|
+ if(${library}_INCLUDE)
|
||||||
|
+ message(STATUS "Using system ${library} headers")
|
||||||
|
+ set(${library}_TYPE "System" PARENT_SCOPE)
|
||||||
|
+ add_library(${library} INTERFACE IMPORTED GLOBAL)
|
||||||
|
+ set_target_properties(${library} PROPERTIES
|
||||||
|
+ INTERFACE_INCLUDE_DIRECTORIES ${${library}_INCLUDE})
|
||||||
|
+ else()
|
||||||
|
+ dolphin_add_bundled_library(${library} ${use_system} ${bundled_path})
|
||||||
|
+ set(${library}_TYPE "Bundled" PARENT_SCOPE)
|
||||||
|
+ endif()
|
||||||
|
+endfunction()
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index c277e2a10a..12b1c36ef0 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -786,7 +786,7 @@ if (USE_RETRO_ACHIEVEMENTS)
|
||||||
|
add_subdirectory(Externals/rcheevos)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-add_subdirectory(Externals/watcher)
|
||||||
|
+dolphin_find_optional_system_include(watcher wtr/watcher.hpp Externals/watcher)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# Pre-build events: Define configuration variables and write SCM info header
|
17
gnu/packages/patches/libretro-dolphin-emu-gc-font-tool.patch
Normal file
17
gnu/packages/patches/libretro-dolphin-emu-gc-font-tool.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
This patch is already merged in dolphin.
|
||||||
|
|
||||||
|
It'll appear in libretro-dolphin whenever it is rebased on top of current
|
||||||
|
dolphin source.
|
||||||
|
|
||||||
|
diff --git a/docs/gc-font-tool.cpp b/docs/gc-font-tool.cpp
|
||||||
|
index f09964609a..c43496d2fa 100644
|
||||||
|
--- a/docs/gc-font-tool.cpp
|
||||||
|
+++ b/docs/gc-font-tool.cpp
|
||||||
|
@@ -76,6 +76,7 @@
|
||||||
|
// Font data is encoded in 2 bit greyscale and in 8x8 blocks.
|
||||||
|
|
||||||
|
#include <cerrno>
|
||||||
|
+#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
|
@ -0,0 +1,33 @@
|
||||||
|
This patch is already merged in dolphin.
|
||||||
|
|
||||||
|
It'll appear in libretro-dolphin whenever it is rebased on top of current
|
||||||
|
dolphin source.
|
||||||
|
|
||||||
|
diff --git a/Source/Core/Core/LibusbUtils.cpp b/Source/Core/Core/LibusbUtils.cpp
|
||||||
|
index a4083e2d06..1ef9777e71 100644
|
||||||
|
--- a/Source/Core/Core/LibusbUtils.cpp
|
||||||
|
+++ b/Source/Core/Core/LibusbUtils.cpp
|
||||||
|
@@ -9,8 +9,8 @@
|
||||||
|
#include <libusb.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#include "Common/Assert.h"
|
||||||
|
#include "Common/Flag.h"
|
||||||
|
+#include "Common/Logging/Log.h"
|
||||||
|
#include "Common/Thread.h"
|
||||||
|
#include "Core/LibusbUtils.h"
|
||||||
|
|
||||||
|
@@ -23,9 +23,12 @@ public:
|
||||||
|
Impl()
|
||||||
|
{
|
||||||
|
const int ret = libusb_init(&m_context);
|
||||||
|
- ASSERT_MSG(IOS_USB, ret == LIBUSB_SUCCESS, "Failed to init libusb: %s", libusb_error_name(ret));
|
||||||
|
if (ret != LIBUSB_SUCCESS)
|
||||||
|
+ {
|
||||||
|
+ ERROR_LOG(IOS_USB, "Failed to init libusb: %s", libusb_error_name(ret));
|
||||||
|
return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
libusb_set_option(m_context, LIBUSB_OPTION_USE_USBDK);
|
|
@ -0,0 +1,16 @@
|
||||||
|
Partial backport from dolphin commit
|
||||||
|
8e3dbe9671afa631e7a64496f5bfcb2a8206f152 ("Vulkan: update Vulkan headers to v1.3.204.")
|
||||||
|
|
||||||
|
diff --git a/Source/Core/VideoBackends/Vulkan/SwapChain.h b/Source/Core/VideoBackends/Vulkan/SwapChain.h
|
||||||
|
index 0077a93ec1..d83ee57051 100644
|
||||||
|
--- a/Source/Core/VideoBackends/Vulkan/SwapChain.h
|
||||||
|
+++ b/Source/Core/VideoBackends/Vulkan/SwapChain.h
|
||||||
|
@@ -94,7 +94,7 @@ private:
|
||||||
|
WindowSystemInfo m_wsi;
|
||||||
|
VkSurfaceKHR m_surface = VK_NULL_HANDLE;
|
||||||
|
VkSurfaceFormatKHR m_surface_format = {};
|
||||||
|
- VkPresentModeKHR m_present_mode = VK_PRESENT_MODE_RANGE_SIZE_KHR;
|
||||||
|
+ VkPresentModeKHR m_present_mode = VK_PRESENT_MODE_IMMEDIATE_KHR;
|
||||||
|
AbstractTextureFormat m_texture_format = AbstractTextureFormat::Undefined;
|
||||||
|
bool m_vsync_enabled = false;
|
||||||
|
bool m_fullscreen_supported = false;
|
Loading…
Add table
Add a link
Reference in a new issue