diff options
| author | Andrew Wong <wongandj@runbox.com> | 2025-12-10 23:01:20 -0500 |
|---|---|---|
| committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2026-01-03 15:18:56 +0100 |
| commit | f98affddb44e5064ba768c750a32c3b3544ccf75 (patch) | |
| tree | ca17fb986496f6699fc19410f7fb27544f0e89d5 /gnu/packages/emulators.scm | |
| parent | a6b42e4a3b0a6c5405d1f20af40a2a06f76b62fa (diff) | |
gnu: pcsx2: Revise package.
* gnu/packages/emulators.scm (pcsx2) [origin] <snippet>: Force system ffmpeg
headers, set compiled-in version, and de-vendor cpuinfo, fast_float, fmt,
googletest, libzip, rapidjson, soundtouch, vulkan-headers,
vulkan-memory-allocator.
[arguments] <#:configure-flags>: Add "-DPACKAGE_MODE=ON" and
"-DUSE_LINKED_FFMPEG=ON".
<#:imported-modules>: Remove (guix build copy-build-system).
<#:parallel-build?>: Remove specification redundant with default.
[inputs]: Remove libaio, qtwayland, wayland; Add cpuinfo, fast-float, fmt-11,
libzip, rapidjson, soundtouch.
[native-inputs]: Add googletest, vulkan-memory-allocator.
[license]: Add licenses for remaining vendored libraries.
Change-Id: I17c064d2a6cf4c288cb50dfa21fda9329709afee
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/emulators.scm')
| -rw-r--r-- | gnu/packages/emulators.scm | 142 |
1 files changed, 107 insertions, 35 deletions
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index c58176f4f6b..d983f45e5fd 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm | |||
| @@ -104,6 +104,7 @@ | |||
| 104 | #:use-module (gnu packages ncurses) | 104 | #:use-module (gnu packages ncurses) |
| 105 | #:use-module (gnu packages networking) | 105 | #:use-module (gnu packages networking) |
| 106 | #:use-module (gnu packages ninja) | 106 | #:use-module (gnu packages ninja) |
| 107 | #:use-module (gnu packages parallel) | ||
| 107 | #:use-module (gnu packages pkg-config) | 108 | #:use-module (gnu packages pkg-config) |
| 108 | #:use-module (gnu packages pretty-print) | 109 | #:use-module (gnu packages pretty-print) |
| 109 | #:use-module (gnu packages pulseaudio) | 110 | #:use-module (gnu packages pulseaudio) |
| @@ -3649,27 +3650,88 @@ de-interlacing patches for use with PCSX2.") | |||
| 3649 | (file-name (git-file-name name version)) | 3650 | (file-name (git-file-name name version)) |
| 3650 | (sha256 | 3651 | (sha256 |
| 3651 | (base32 "0nr53cjifqwnz3icxsj01yd3aw1vfsfxga4zz5zi8aqr175mvq27")) | 3652 | (base32 "0nr53cjifqwnz3icxsj01yd3aw1vfsfxga4zz5zi8aqr175mvq27")) |
| 3652 | (modules '((guix build utils))) | 3653 | (modules '((guix build utils) |
| 3654 | (ice-9 ftw) | ||
| 3655 | (srfi srfi-26))) | ||
| 3653 | (snippet | 3656 | (snippet |
| 3654 | #~(begin | 3657 | #~(begin |
| 3655 | (substitute* "pcsx2/Pcsx2Config.cpp" | 3658 | (substitute* "cmake/Pcsx2Utils.cmake" |
| 3656 | (("Path::Canonicalize\\(Path::GetDirectory\\(program_path\\)\\);") | 3659 | (("(PCSX2_GIT_REV \")Unknown" _ prefix) |
| 3657 | "Path::Canonicalize( | 3660 | (string-append prefix #$version "-guix"))) |
| 3658 | ((std::string)Path::GetDirectory(program_path)).append(\"/../share/\"));")) | 3661 | (delete-file "3rdparty/include/Packet32.h") ;"not open source" |
| 3659 | (delete-file-recursively "3rdparty/d3d12memalloc") | 3662 | ;; XXX: 'delete-all-but' is copied from the turbovnc package. |
| 3660 | (delete-file-recursively "3rdparty/winpixeventruntime") | 3663 | (define (delete-all-but directory . preserve) |
| 3661 | (delete-file-recursively "3rdparty/winwil"))))) | 3664 | (with-directory-excursion directory |
| 3665 | (let* ((pred (negate (cut member <> | ||
| 3666 | (cons* "." ".." preserve)))) | ||
| 3667 | (items (scandir "." pred))) | ||
| 3668 | (for-each (cut delete-file-recursively <>) items)))) | ||
| 3669 | (delete-all-but | ||
| 3670 | "3rdparty" | ||
| 3671 | ;; asl2.0 and cc0 | ||
| 3672 | "glad" ;Is tailored. | ||
| 3673 | ;; bsd-3 | ||
| 3674 | "libchdr" ;Not packaged in guix. | ||
| 3675 | "vixl" ;Not packaged in guix. | ||
| 3676 | "xbyak" ;Just includes. | ||
| 3677 | ;; bsd-4 (pcap) and bsd-2 (xxhash) | ||
| 3678 | "include" ;Just includes. | ||
| 3679 | ;; expat | ||
| 3680 | "ccc" ;Is tailored. | ||
| 3681 | "cubeb" ;Is tailored. | ||
| 3682 | "discord-rpc" ;Not packaged in guix. | ||
| 3683 | "imgui" ;Is tailored. | ||
| 3684 | "rapidyaml" ;Not packaged in guix. | ||
| 3685 | "rcheevos" ;Does not have a linkable binary. | ||
| 3686 | "simpleini" ;Is tailored (GetKeyCount). | ||
| 3687 | "zydis" ;Could not link. | ||
| 3688 | ;; gpl2+ | ||
| 3689 | "freesurround" ;Unclear what upstream is. | ||
| 3690 | ;; lgpl2.0+ | ||
| 3691 | "demangler" ;Is tailored. | ||
| 3692 | ;; public-domain | ||
| 3693 | "lzma" ;Does not have a linkable library. | ||
| 3694 | ;; silofl1.1 | ||
| 3695 | "promptfont") ;Unclear what upstream is. | ||
| 3696 | (substitute* "CMakeLists.txt" | ||
| 3697 | (("add_subdirectory\\(3rdparty/googletest)") | ||
| 3698 | "find_package(GTest REQUIRED)")) | ||
| 3699 | (substitute* "cmake/SearchForStuff.cmake" | ||
| 3700 | (("add_subdirectory\\(3rdparty/cpuinfo EXCLUDE_FROM_ALL\\)") | ||
| 3701 | "find_package(cpuinfo REQUIRED)") | ||
| 3702 | (("disable_compiler_warnings_for_target\\(cpuinfo\\)") "") | ||
| 3703 | (("add_subdirectory\\(3rdparty/fast_float EXCLUDE_FROM_ALL\\)") | ||
| 3704 | "find_package(FastFloat REQUIRED)") | ||
| 3705 | (("add_subdirectory\\(3rdparty/fmt EXCLUDE_FROM_ALL\\)") | ||
| 3706 | "find_package(fmt REQUIRED)") | ||
| 3707 | (("disable_compiler_warnings_for_target\\(fmt\\)") "") | ||
| 3708 | (("add_subdirectory\\(3rdparty/libzip EXCLUDE_FROM_ALL\\)") | ||
| 3709 | "find_package(libzip REQUIRED)") | ||
| 3710 | (("add_subdirectory\\(3rdparty/rapidjson EXCLUDE_FROM_ALL\\)") | ||
| 3711 | "find_package(RapidJSON REQUIRED)") | ||
| 3712 | (("add_subdirectory\\(3rdparty/soundtouch EXCLUDE_FROM_ALL\\)") | ||
| 3713 | "pkg_check_modules(SoundTouch REQUIRED soundtouch)") | ||
| 3714 | (("add_subdirectory\\(3rdparty/vulkan EXCLUDE_FROM_ALL\\)") | ||
| 3715 | "find_package(VulkanMemoryAllocator REQUIRED) | ||
| 3716 | find_package(VulkanHeaders REQUIRED)")) | ||
| 3717 | ;Specifically, line 213. | ||
| 3718 | (substitute* "common/CMakeLists.txt" | ||
| 3719 | (("fast_float") "")) | ||
| 3720 | (substitute* "pcsx2/CMakeLists.txt" | ||
| 3721 | (("SoundTouch::SoundTouch") "SoundTouch") | ||
| 3722 | (("\ | ||
| 3723 | target_link_libraries\\(PCSX2_FLAGS INTERFACE vulkan-headers\\)") "")) | ||
| 3724 | (substitute* "pcsx2/Host/AudioStream.cpp" | ||
| 3725 | (("SoundTouch.h") "soundtouch/SoundTouch.h")))))) | ||
| 3662 | (build-system cmake-build-system) | 3726 | (build-system cmake-build-system) |
| 3663 | (arguments | 3727 | (arguments |
| 3664 | (list | 3728 | (list |
| 3665 | #:parallel-build? #t | ||
| 3666 | #:configure-flags | 3729 | #:configure-flags |
| 3667 | #~(list "-DCMAKE_C_COMPILER=clang" | 3730 | #~(list "-DCMAKE_C_COMPILER=clang" |
| 3668 | "-DCMAKE_CXX_COMPILER=clang++" | 3731 | "-DCMAKE_CXX_COMPILER=clang++" |
| 3669 | "-DCMAKE_PREFIX_PATH=\"$PWD/deps\"" | 3732 | "-GNinja" |
| 3670 | "-GNinja") | 3733 | "-DPACKAGE_MODE=ON" |
| 3671 | #:imported-modules `((guix build copy-build-system) | 3734 | "-DUSE_LINKED_FFMPEG=ON") |
| 3672 | ,@%cmake-build-system-modules) | ||
| 3673 | #:phases | 3735 | #:phases |
| 3674 | #~(modify-phases %standard-phases | 3736 | #~(modify-phases %standard-phases |
| 3675 | (replace 'build | 3737 | (replace 'build |
| @@ -3678,52 +3740,52 @@ de-interlacing patches for use with PCSX2.") | |||
| 3678 | (replace 'check | 3740 | (replace 'check |
| 3679 | (lambda* (#:key tests? #:allow-other-keys) | 3741 | (lambda* (#:key tests? #:allow-other-keys) |
| 3680 | (when tests? (invoke "ninja" "unittests")))) | 3742 | (when tests? (invoke "ninja" "unittests")))) |
| 3681 | (replace 'install | ||
| 3682 | (lambda* args | ||
| 3683 | (apply | ||
| 3684 | (assoc-ref (@ (guix build copy-build-system) %standard-phases) | ||
| 3685 | 'install) | ||
| 3686 | #:install-plan | ||
| 3687 | '(("bin/pcsx2-qt" "bin/") | ||
| 3688 | ("bin/resources" "share/") | ||
| 3689 | ("bin/translations" "share/") | ||
| 3690 | ("../source/.github/workflows/scripts/linux/pcsx2-qt.desktop" | ||
| 3691 | "share/applications/")) | ||
| 3692 | args))) | ||
| 3693 | (add-after 'install 'install-patches | 3743 | (add-after 'install 'install-patches |
| 3694 | (lambda* (#:key inputs #:allow-other-keys) | 3744 | (lambda _ |
| 3695 | (install-file (search-input-file %build-inputs "/patches.zip") | 3745 | (symlink |
| 3696 | (string-append #$output "/share/resources"))))))) | 3746 | (search-input-file %build-inputs "/patches.zip") |
| 3747 | (string-append | ||
| 3748 | #$output "/share/PCSX2/resources/patches.zip"))))))) | ||
| 3697 | (inputs (list (module-ref | 3749 | (inputs (list (module-ref |
| 3698 | (resolve-interface '(gnu packages debug)) 'libbacktrace) | 3750 | (resolve-interface '(gnu packages debug)) 'libbacktrace) |
| 3699 | `(,zstd-1.5.7 "lib") | 3751 | `(,zstd-1.5.7 "lib") |
| 3752 | cpuinfo | ||
| 3700 | curl | 3753 | curl |
| 3701 | dbus | 3754 | dbus |
| 3702 | eudev | 3755 | eudev |
| 3756 | fast-float | ||
| 3703 | ffmpeg | 3757 | ffmpeg |
| 3704 | freetype | 3758 | freetype |
| 3759 | fmt-11 | ||
| 3705 | kddockwidgets | 3760 | kddockwidgets |
| 3706 | libaio | ||
| 3707 | libjpeg-turbo | 3761 | libjpeg-turbo |
| 3708 | libpcap | 3762 | libpcap |
| 3709 | libpng-next | 3763 | libpng-next |
| 3710 | libwebp | 3764 | libwebp |
| 3765 | libxi | ||
| 3711 | libxrandr | 3766 | libxrandr |
| 3767 | libzip | ||
| 3712 | lz4 | 3768 | lz4 |
| 3713 | pcsx2-patches | 3769 | pcsx2-patches |
| 3714 | plutovg | ||
| 3715 | plutosvg | 3770 | plutosvg |
| 3771 | plutovg | ||
| 3716 | qtbase | 3772 | qtbase |
| 3717 | qtdeclarative | 3773 | qtdeclarative |
| 3718 | qtsvg | 3774 | qtsvg |
| 3719 | qttools | 3775 | qttools |
| 3720 | qtwayland | 3776 | rapidjson |
| 3721 | sdl3 | 3777 | sdl3 |
| 3722 | shaderc | 3778 | shaderc |
| 3779 | soundtouch | ||
| 3723 | vulkan-headers | 3780 | vulkan-headers |
| 3724 | wayland | 3781 | wayland)) |
| 3725 | libxi)) | 3782 | (native-inputs |
| 3726 | (native-inputs (list clang-17 extra-cmake-modules ninja pkg-config)) | 3783 | (list clang-17 |
| 3784 | extra-cmake-modules | ||
| 3785 | googletest | ||
| 3786 | ninja | ||
| 3787 | pkg-config | ||
| 3788 | vulkan-memory-allocator)) | ||
| 3727 | (home-page "https://pcsx2.net") | 3789 | (home-page "https://pcsx2.net") |
| 3728 | (synopsis "PlayStation 2 (PS2) emulator") | 3790 | (synopsis "PlayStation 2 (PS2) emulator") |
| 3729 | (description | 3791 | (description |
| @@ -3732,7 +3794,17 @@ emulator. Its purpose is to emulate the PS2's hardware, using a combination | |||
| 3732 | of MIPS CPU interpreters, recompilers and a virtual machine which manages | 3794 | of MIPS CPU interpreters, recompilers and a virtual machine which manages |
| 3733 | hardware states and PS2 system memory. This allows you to play PS2 games on | 3795 | hardware states and PS2 system memory. This allows you to play PS2 games on |
| 3734 | your PC, with many additional features and benefits.") | 3796 | your PC, with many additional features and benefits.") |
| 3735 | (license license:gpl3+))) | 3797 | (license (list license:gpl3+ ;main code |
| 3798 | ;; code in 3rdparty/ | ||
| 3799 | license:asl2.0 | ||
| 3800 | license:bsd-2 | ||
| 3801 | license:bsd-3 | ||
| 3802 | license:bsd-4 | ||
| 3803 | license:cc0 | ||
| 3804 | license:expat | ||
| 3805 | license:lgpl2.0+ | ||
| 3806 | license:public-domain | ||
| 3807 | license:silofl1.1)))) | ||
| 3736 | 3808 | ||
| 3737 | (define-public rpcs3 | 3809 | (define-public rpcs3 |
| 3738 | ;; NB: When updating to a new release, don't forget to check if any more | 3810 | ;; NB: When updating to a new release, don't forget to check if any more |
