rpcs3: 0.0.27-14840-842edbcbe -> 0.0.28-15372-38a5313ed

* Cubeb support is unconditional now, remove the check.
* SDL is only required for FAudio, so rename the check to faudioSupport.
* Use system LLVM now that upstream supports it :tada:

authored by Zane van Iperen and committed by Anderson Torres e6ab4698 52858df9

+49 -90
-62
pkgs/applications/emulators/rpcs3/0001-llvm-ExecutionEngine-IntelJITEvents-only-use-ITTAPI_.patch
··· 1 - From 9866ce8f538e1ab1f0902408b7575013b768f365 Mon Sep 17 00:00:00 2001 2 - From: Zane van Iperen <zane@zanevaniperen.com> 3 - Date: Wed, 2 Feb 2022 23:41:59 +1000 4 - Subject: [PATCH] llvm/ExecutionEngine/IntelJITEvents: only use 5 - ITTAPI_SOURCE_DIR 6 - 7 - --- 8 - .../IntelJITEvents/CMakeLists.txt | 32 ++----------------- 9 - 1 file changed, 2 insertions(+), 30 deletions(-) 10 - 11 - diff --git a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt 12 - index 0c5017c3..d20c35f3 100644 13 - --- a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt 14 - +++ b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt 15 - @@ -1,34 +1,6 @@ 16 - include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ) 17 - 18 - -if(NOT DEFINED ITTAPI_GIT_REPOSITORY) 19 - - set(ITTAPI_GIT_REPOSITORY https://github.com/intel/ittapi.git) 20 - -endif() 21 - - 22 - -if(NOT DEFINED ITTAPI_GIT_TAG) 23 - - set(ITTAPI_GIT_TAG v3.18.12) 24 - -endif() 25 - - 26 - -if(NOT DEFINED ITTAPI_SOURCE_DIR) 27 - - set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR}) 28 - -endif() 29 - - 30 - -if(NOT EXISTS ${ITTAPI_SOURCE_DIR}/ittapi) 31 - - execute_process(COMMAND ${GIT_EXECUTABLE} clone ${ITTAPI_GIT_REPOSITORY} 32 - - WORKING_DIRECTORY ${ITTAPI_SOURCE_DIR} 33 - - RESULT_VARIABLE GIT_CLONE_RESULT) 34 - - if(NOT GIT_CLONE_RESULT EQUAL "0") 35 - - message(FATAL_ERROR "git clone ${ITTAPI_GIT_REPOSITORY} failed with ${GIT_CLONE_RESULT}, please clone ${ITTAPI_GIT_REPOSITORY}") 36 - - endif() 37 - -endif() 38 - - 39 - -execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${ITTAPI_GIT_TAG} 40 - - WORKING_DIRECTORY ${ITTAPI_SOURCE_DIR}/ittapi 41 - - RESULT_VARIABLE GIT_CHECKOUT_RESULT) 42 - -if(NOT GIT_CHECKOUT_RESULT EQUAL "0") 43 - - message(FATAL_ERROR "git checkout ${ITTAPI_GIT_TAG} failed with ${GIT_CHECKOUT_RESULT}, please checkout ${ITTAPI_GIT_TAG} at ${ITTAPI_SOURCE_DIR}/ittapi") 44 - -endif() 45 - - 46 - -include_directories( ${ITTAPI_SOURCE_DIR}/ittapi/include/ ) 47 - +include_directories( ${ITTAPI_SOURCE_DIR}/include/ ) 48 - 49 - if( HAVE_LIBDL ) 50 - set(LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS}) 51 - @@ -40,7 +12,7 @@ set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS}) 52 - add_llvm_component_library(LLVMIntelJITEvents 53 - IntelJITEventListener.cpp 54 - jitprofiling.c 55 - - ${ITTAPI_SOURCE_DIR}/ittapi/src/ittnotify/ittnotify_static.c 56 - + ${ITTAPI_SOURCE_DIR}/src/ittnotify/ittnotify_static.c 57 - 58 - LINK_LIBS ${LLVM_INTEL_JIT_LIBS} 59 - 60 - -- 61 - 2.34.1 62 -
···
+44 -24
pkgs/applications/emulators/rpcs3/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, wrapQtAppsHook, cmake, pkg-config, git 2 - , qtbase, qtquickcontrols, qtmultimedia, openal, glew, vulkan-headers, vulkan-loader, libpng 3 - , ffmpeg, libevdev, libusb1, zlib, curl, wolfssl, python3, pugixml, faudio, flatbuffers 4 - , sdl2Support ? true, SDL2 5 - , cubebSupport ? true, cubeb 6 - , waylandSupport ? true, wayland 7 }: 8 9 let 10 # Keep these separate so the update script can regex them 11 - rpcs3GitVersion = "14840-842edbcbe"; 12 - rpcs3Version = "0.0.27-14840-842edbcbe"; 13 - rpcs3Revision = "842edbcbe795941981993c667c2d8a866126b5b0"; 14 - rpcs3Sha256 = "1al4dx93f02k56k62dxjqqb46cwg0nkpjax1xnjc8v3bx4gsp6f6"; 15 - 16 - ittapi = fetchFromGitHub { 17 - owner = "intel"; 18 - repo = "ittapi"; 19 - rev = "v3.18.12"; 20 - sha256 = "0c3g30rj1y8fbd2q4kwlpg1jdy02z4w5ryhj3yr9051pdnf4kndz"; 21 - }; 22 in 23 stdenv.mkDerivation { 24 pname = "rpcs3"; ··· 29 repo = "rpcs3"; 30 rev = rpcs3Revision; 31 fetchSubmodules = true; 32 - sha256 = rpcs3Sha256; 33 }; 34 - 35 - patches = [ ./0001-llvm-ExecutionEngine-IntelJITEvents-only-use-ITTAPI_.patch ]; 36 37 passthru.updateScript = ./update.sh; 38 ··· 55 "-DUSE_SYSTEM_FAUDIO=ON" 56 "-DUSE_SYSTEM_PUGIXML=ON" 57 "-DUSE_SYSTEM_FLATBUFFERS=ON" 58 "-DUSE_NATIVE_INSTRUCTIONS=OFF" 59 - "-DITTAPI_SOURCE_DIR=${ittapi}" 60 ]; 61 62 nativeBuildInputs = [ cmake pkg-config git wrapQtAppsHook ]; 63 64 buildInputs = [ 65 qtbase qtquickcontrols qtmultimedia openal glew vulkan-headers vulkan-loader libpng ffmpeg 66 - libevdev zlib libusb1 curl wolfssl python3 pugixml faudio flatbuffers 67 - ] ++ lib.optional sdl2Support SDL2 68 - ++ lib.optionals cubebSupport cubeb.passthru.backendLibs 69 ++ lib.optional waylandSupport wayland; 70 71 postInstall = ''
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , wrapQtAppsHook 5 + , cmake 6 + , pkg-config 7 + , git 8 + , qtbase 9 + , qtquickcontrols 10 + , qtmultimedia 11 + , openal 12 + , glew 13 + , vulkan-headers 14 + , vulkan-loader 15 + , libpng 16 + , libSM 17 + , ffmpeg 18 + , libevdev 19 + , libusb1 20 + , zlib 21 + , curl 22 + , wolfssl 23 + , python3 24 + , pugixml 25 + , flatbuffers 26 + , llvm_16 27 + , cubeb 28 + , faudioSupport ? true 29 + , faudio 30 + , SDL2 31 + , waylandSupport ? true 32 + , wayland 33 }: 34 35 let 36 # Keep these separate so the update script can regex them 37 + rpcs3GitVersion = "15372-38a5313ed"; 38 + rpcs3Version = "0.0.28-15372-38a5313ed"; 39 + rpcs3Revision = "38a5313ed2c4ebb626017a4f7f28ed0c0a89f931"; 40 + rpcs3Hash = "sha256-tiByoxPf++TK/Xowo2VQ+OEojoYIpX/B8caDyaMZ3Qc="; 41 in 42 stdenv.mkDerivation { 43 pname = "rpcs3"; ··· 48 repo = "rpcs3"; 49 rev = rpcs3Revision; 50 fetchSubmodules = true; 51 + hash = rpcs3Hash; 52 }; 53 54 passthru.updateScript = ./update.sh; 55 ··· 72 "-DUSE_SYSTEM_FAUDIO=ON" 73 "-DUSE_SYSTEM_PUGIXML=ON" 74 "-DUSE_SYSTEM_FLATBUFFERS=ON" 75 + "-DUSE_SYSTEM_SDL=ON" 76 + "-DWITH_LLVM=ON" 77 + "-DBUILD_LLVM=OFF" 78 "-DUSE_NATIVE_INSTRUCTIONS=OFF" 79 + "-DUSE_FAUDIO=${if faudioSupport then "ON" else "OFF"}" 80 ]; 81 82 nativeBuildInputs = [ cmake pkg-config git wrapQtAppsHook ]; 83 84 buildInputs = [ 85 qtbase qtquickcontrols qtmultimedia openal glew vulkan-headers vulkan-loader libpng ffmpeg 86 + libevdev zlib libusb1 curl wolfssl python3 pugixml flatbuffers llvm_16 libSM 87 + ] ++ cubeb.passthru.backendLibs 88 + ++ lib.optionals faudioSupport [ faudio SDL2 ] 89 ++ lib.optional waylandSupport wayland; 90 91 postInstall = ''
+5 -4
pkgs/applications/emulators/rpcs3/update.sh
··· 1 #!/usr/bin/env nix-shell 2 - #!nix-shell -i bash --pure --keep GITHUB_TOKEN -p gnused jq nix-prefetch-git curl cacert 3 4 set -eou pipefail 5 ··· 48 echo "INFO: Latest commit is $commit_sha" 49 echo "INFO: Latest version is $final_ver" 50 51 - nix_sha256=$(nix-prefetch-git --quiet --fetch-submodules https://github.com/RPCS3/rpcs3.git "$commit_sha" | jq -r .sha256) 52 - echo "INFO: SHA256 is $nix_sha256" 53 54 sed -i -E \ 55 -e "s/rpcs3GitVersion\s*=\s*\"[\.a-z0-9-]+\";$/rpcs3GitVersion = \"${git_ver}\";/g" \ 56 -e "s/rpcs3Version\s*=\s*\"[\.a-z0-9-]+\";$/rpcs3Version = \"${final_ver}\";/g" \ 57 -e "s/rpcs3Revision\s*=\s*\"[a-z0-9]+\";$/rpcs3Revision = \"${commit_sha}\";/g" \ 58 - -e "s/rpcs3Sha256\s*=\s*\"[a-z0-9]+\";$/rpcs3Sha256 = \"${nix_sha256}\";/g" \ 59 "$ROOT/default.nix"
··· 1 #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash --pure --keep GITHUB_TOKEN -p nix gnused jq nix-prefetch-git curl cacert 3 4 set -eou pipefail 5 ··· 48 echo "INFO: Latest commit is $commit_sha" 49 echo "INFO: Latest version is $final_ver" 50 51 + nix_hash=$(nix-prefetch-git --quiet --fetch-submodules https://github.com/RPCS3/rpcs3.git "$commit_sha" | jq -r .sha256) 52 + nix_hash=$(nix hash to-sri --type sha256 "$nix_hash") 53 + echo "INFO: Hash is $nix_hash" 54 55 sed -i -E \ 56 -e "s/rpcs3GitVersion\s*=\s*\"[\.a-z0-9-]+\";$/rpcs3GitVersion = \"${git_ver}\";/g" \ 57 -e "s/rpcs3Version\s*=\s*\"[\.a-z0-9-]+\";$/rpcs3Version = \"${final_ver}\";/g" \ 58 -e "s/rpcs3Revision\s*=\s*\"[a-z0-9]+\";$/rpcs3Revision = \"${commit_sha}\";/g" \ 59 + -e "s|rpcs3Hash\s*=\s*\"sha256-.*\";$|rpcs3Hash = \"${nix_hash}\";|g" \ 60 "$ROOT/default.nix"