From 705e859c83e33e39bed40f21e0454e86f2d1f0a8 Mon Sep 17 00:00:00 2001 From: techchud Date: Wed, 3 Sep 2025 00:26:58 -0500 Subject: they finally fixed dolphin upstream --- backport.scm | 307 ----------------------------------------------------------- 1 file changed, 307 deletions(-) (limited to 'backport.scm') diff --git a/backport.scm b/backport.scm index 492ff6e..4f2fdae 100644 --- a/backport.scm +++ b/backport.scm @@ -85,313 +85,6 @@ #:use-module (ice-9 match) ) -(define-public dolphin-emu-next - (package - (inherit dolphin-emu) - (name "dolphin-emu-next") - (version "2503") - ;(version "ad3650abfcae6432338ba976123958ee67a4106c") - (inputs - (list alsa-lib - ao - bluez - bzip2 - cubeb - curl - enet-1.3.18 - eudev - ffmpeg-4 - fmt-10 - font-wqy-microhei - freetype - git-minimal - glew - glib - glu - gtk+-2 - hidapi - libevdev - libpng - libusb - libx11 - libxi - libxrandr - lzo - mbedtls-lts - mesa - miniupnpc - minizip-ng - openal - pugixml - pulseaudio - qtbase - qtsvg - sdl2-2.30.9 - sfml-3 - soil - soundtouch-1/integer-samples - vulkan-loader - xxhash - zlib - libxcursor - libxi - `(,zstd "lib"))) - - (arguments - (list - #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'set-scm-desc-str - (lambda _ - (substitute* "Source/Core/Common/scmrev.h.in" (("#define SCM_REV_STR \"\\$\\{DOLPHIN_WC_REVISION\\}\"") "#define SCM_REV_STR \"9763c0a1e2b9db0c3861d25bc2f5a0ace6a15ee3\"")) - )) - (add-before 'configure 'remove-unittests-target-post-build-command - (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) - (let ((fontfile - (search-input-file inputs - "/share/fonts/truetype/wqy-microhei.ttc")) - (libvulkan - (search-input-file inputs "/lib/libvulkan.so"))) - (chdir "docs") - (invoke "bash" "-c" "g++ -O2 $(freetype-config \ - --cflags --libs) gc-font-tool.cpp -o gc-font-tool") - (invoke "./gc-font-tool" "a" fontfile "font_western.bin") - (invoke "./gc-font-tool" "s" fontfile "font_japanese.bin") - (copy-file "font_japanese.bin" "../Data/Sys/GC/font_japanese.bin") - (copy-file "font_western.bin" "../Data/Sys/GC/font_western.bin") - (chdir "..") - (substitute* "Source/Core/VideoBackends/Vulkan/VulkanLoader.cpp" - (("\"vulkan\", 1") (string-append "\"vulkan\"")) - (("\"vulkan\"") (string-append "\"" libvulkan "\"")) - (("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 - (lambda _ - (with-directory-excursion "../source/docs" - ;; The following command-line is adapted from the example in - ;; codehandler.s. - (invoke "powerpc-linux-gnu-gcc" "-mpowerpc" "-mbig" - "codehandler.s" "-nostartfiles" "-nodefaultlibs" - "-nostdlib" "-T" "codehandler.ld" - "-o" "codehandler.bin") - (copy-file "codehandler.bin" "../Data/Sys/codehandler.bin")))) - (add-before 'install 'build-dsp_rom.bin - (lambda _ - ;; Ensure dsptool is on PATH. - (setenv "PATH" (string-append (getenv "PATH") ":" - (getcwd) "/Binaries")) - (with-directory-excursion "../source" - (invoke "dsptool" "-o" "Data/Sys/GC/dsp_rom.bin" - "docs/DSP/free_dsp_rom/dsp_rom.ds")))) - (add-before 'install 'build-dsp_coefs.bin - (lambda _ - (with-directory-excursion "../source" - (invoke "python3" "docs/DSP/free_dsp_rom/generate_coefs.py") - (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 - #~(list (string-append "-DCMAKE_CXX_FLAGS=" - "-I" (search-input-directory - %build-inputs "include/soundtouch")) - "-DDSPTOOL=ON" - (string-append "-DX11_INCLUDE_DIR=" - #$(this-package-input "libx11") - "/include") - (string-append "-DOLPHIN_WC_DESCRIBE=2503") - (string-append "-DOLPHIN_WC_REVISION=9763c0a1e2b9db0c3861d25bc2f5a0ace6a15ee3") - (string-append "-DOLPHIN_WC_BRANCH=HEAD") - (string-append "-DCMAKE_BUILD_TYPE=Release") - (string-append "-DX11_LIBRARIES=" - (search-input-file %build-inputs - "lib/libX11.so")) - "-DX11_FOUND=1") - )) - - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/dolphin-emu/dolphin") - (recursive? #t) - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0yyl91sb8w422zfdml9hmwwn3088gxv977aailc0l5icaxf4m8m2")) - (modules '((guix build utils) - (ice-9 regex))) - (snippet - '(begin - ;; Remove external stuff we don't need. - (for-each (lambda (dir) - (delete-file-recursively - (string-append "Externals/" dir))) - '( - ;"LZO" "OpenAL" "Qt" "SFML" "bzip2" - "LZO" "OpenAL" "Qt" "bzip2" - ;; XXX: Attempting to use the vulkan-headers package - ;; results in "error: - ;; ‘VK_PRESENT_MODE_RANGE_SIZE_KHR’ was not declared - ;; in this scope". - ;;"Vulkan" - "cubeb" "curl" "enet" - ;"ffmpeg" "fmt" "gettext" - "fmt" "gettext" - ;; XXX: Attempting to use an unbundled glslang at the - ;; exact commit used by Dolphin still results in - ;; "error: ‘DefaultTBuiltInResource’ is not a member - ;; of ‘glslang’". - ;;"glslang" - ;; XXX: Googletest cannot currently easily be - ;; unbundled, as there are missing linking - ;; directives. - ;;"gtest" - ;"hidapi" "libpng" "libusb" "mbedtls" - "hidapi" "libusb" "mbedtls" - ;"miniupnpc" "minizip" "MoltenVK" "pugixml" - "miniupnpc" "MoltenVK" "pugixml" - ;"soundtouch" - ;"xxhash" "zlib" "zstd" - "xxhash" "zstd" - )) - ;; Clean up the source. - (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"))))))) - ;; Do not attempt to include now-missing directories. - (substitute* "CMakeLists.txt" - ((".*add_subdirectory.*Externals/enet.*") "") - ((".*add_subdirectory.*Externals/soundtouch.*") "") - ((".*add_subdirectory.*Externals/xxhash.*") "")))) - ;(patches (search-patches "dolphin-emu-data.patch") - )))) - -(define-public sdl2-2.30.9 - (package - (inherit sdl2) - (name "sdl2-2.30.9") - (version "2.30.9") - (source (origin - (method url-fetch) - (uri - (string-append "https://libsdl.org/release/SDL2-" - version ".tar.gz")) - (sha256 - (base32 - "197bdcfnnsd4k7q91y518kari0p3rcqbdfq40zsn79w73kvp9d94")))) - )) - -(define-public enet-1.3.18 - (package - (inherit enet) - (name "enet-1.3.18") - (version "1.3.18") - (source - (origin - (method url-fetch) - (uri (string-append "http://enet.bespin.org/download/" - "enet-" version ".tar.gz")) - (sha256 - (base32 "0djxz2j8248bsvbrs42vr39fhxlrqr3lqbhzs7yb92ync19hr2ia")))) - )) - -(define-public sfml-3 - (package - (inherit sfml) - (name "sfml-3") - (version "3.0.0") - (inputs (modify-inputs (package-inputs sfml) - (prepend libxcursor libxi miniaudio))) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/SFML/SFML") - (recursive? #t) - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0y37cmpp490gcibajigxsbjc6icggqv40jrhzj2kwygpc0ppzb3v")) - (modules '((guix build utils))) - ;(snippet - ; '(begin - ; ;; Ensure system libraries are used. - ; (delete-file-recursively "extlibs") - ; #t)) - )) - )) - -(define-public miniaudio - (package - (name "miniaudio") - (version "0.11.22") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/mackron/miniaudio") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1pjaiq71x24n9983vkhjxrsbraa24053h727db22b1rb2xyfrzm3")))) - (build-system cmake-build-system) - (arguments - (list - #:tests? #f - #:phases - #~(modify-phases %standard-phases - (replace 'install - (lambda _ - (let ((out #$output)) - ;; Ensure the output directory exists - (mkdir-p (string-append out "/lib")) - ;; Copy the static libraries to the output directory - (for-each (lambda (file) - (copy-file file (string-append out "/lib/" file))) ; Ensure the destination is a file - '("libminiaudio.a" - "libminiaudio_channel_combiner_node.a" - "libminiaudio_channel_separator_node.a" - "libminiaudio_ltrim_node.a" - "libminiaudio_reverb_node.a" - "libminiaudio_vocoder_node.a")))))))) - (synopsis "Audio playback and capture library written in C, in a single source file.") - (description "miniaudio is written in C with no dependencies except the standard library and should compile clean on all major compilers without the need to install any additional development packages. All major desktop and mobile platforms are supported.") - (home-page "https://miniaud.io/") - (license license:expat))) - (define-public openbox-patched (package (inherit openbox) -- cgit v1.2.3