diff options
author | kenshen112 | 2023-03-24 09:28:22 -0700 |
---|---|---|
committer | kenshen112 | 2023-03-24 09:28:22 -0700 |
commit | 4d43022a48af8b622aaff92aeb563f2503faa1ae (patch) | |
tree | 22806b5dec89fa7fc567f300cada7b7f0d0361d3 | |
parent | 37561f2bb15910242def06a3b6fa3d1b9e5dae39 (diff) | |
download | aur-4d43022a48af8b622aaff92aeb563f2503faa1ae.tar.gz |
Further PKGBUILD work
-rw-r--r-- | .SRCINFO | 46 | ||||
-rw-r--r-- | 0001-Fix-resources-Fix-CMake.patch | 95 | ||||
-rw-r--r-- | PKGBUILD | 177 | ||||
-rw-r--r-- | pcsx2-git.install | 9 | ||||
-rw-r--r-- | pcsx2-qt.sh | 3 |
5 files changed, 120 insertions, 210 deletions
@@ -1,6 +1,6 @@ pkgbase = pcsx2-git pkgdesc = A Sony PlayStation 2 emulator - pkgver = 1.7.4269.r0.g72b38ce71 + pkgver = 1.7.4272.r0.g42155dd11 pkgrel = 1 url = https://www.pcsx2.net install = pcsx2-git.install @@ -14,38 +14,33 @@ pkgbase = pcsx2-git makedepends = lld makedepends = llvm makedepends = git - makedepends = xorgproto makedepends = ninja - makedepends = swig - makedepends = python - makedepends = vulkan-headers + makedepends = libpulse + makedepends = p7zip + makedepends = qt6-wayland + makedepends = qt6-tools depends = libaio - depends = libjpeg-turbo depends = libpcap - depends = libzip - depends = libgl - depends = xorg-xrandr - depends = libxrender - depends = linux-api-headers - depends = libpulse + depends = libglvnd + depends = libxrandr + depends = alsa-lib depends = ffmpeg - depends = portaudio - depends = libsamplerate depends = sdl2 - depends = rapidyaml depends = qt6-base - depends = qt6-wayland - depends = qt6-tools depends = qt6-svg depends = soundtouch depends = wayland - depends = zstd + depends = libpng + depends = hicolor-icon-theme + optdepends = qt6-wayland: Wayland support + optdepends = libpulse: Pulseaudio support provides = pcsx2 - provides = pcsx2-qt conflicts = pcsx2 + options = !lto source = git+https://github.com/PCSX2/pcsx2.git - source = git+https://github.com/PCSX2/xz.git - source = gtest::git+https://github.com/google/googletest.git + source = git+https://github.com/PCSX2/pcsx2_patches.git + source = xz-pcsx2::git+https://github.com/PCSX2/xz.git + source = git+https://github.com/google/googletest.git source = git+https://github.com/fmtlib/fmt.git source = git+https://github.com/microsoft/wil.git source = git+https://github.com/rtissera/libchdr.git @@ -53,14 +48,13 @@ pkgbase = pcsx2-git source = git+https://github.com/biojppm/cmake.git source = git+https://github.com/biojppm/c4core.git source = git+https://github.com/biojppm/debugbreak.git - source = git+https://github.com/KhronosGroup/glslang.git source = git+https://github.com/fastfloat/fast_float.git - source = vulkan-headers::git+https://github.com/KhronosGroup/Vulkan-Headers.git - source = git+https://github.com/libsdl-org/SDL.git + source = git+https://github.com/KhronosGroup/glslang.git + source = git+https://github.com/KhronosGroup/Vulkan-Headers.git source = git+https://github.com/nih-at/libzip.git source = git+https://github.com/facebook/zstd.git source = git+https://github.com/RetroAchievements/rcheevos.git - source = 0001-Fix-resources-Fix-CMake.patch + source = pcsx2-qt.sh b2sums = SKIP b2sums = SKIP b2sums = SKIP @@ -78,6 +72,6 @@ pkgbase = pcsx2-git b2sums = SKIP b2sums = SKIP b2sums = SKIP - b2sums = db0e71c76fc59f8e07684d032a3ab145eaff8964900a1690010ac1963513a050be438f651209b0cb160559c16d50d2cf5b0b8035f40c5f82e4c199d459dcec9d + b2sums = 20a92373a9434f285f8d51d7e615bf53843a59abf40f2e2a22464fe1680fb077ed4a5d97cf8ecb0fca3b5a0a4d2b5e2864af656052c2dc55cc6f54eea16d4449 pkgname = pcsx2-git diff --git a/0001-Fix-resources-Fix-CMake.patch b/0001-Fix-resources-Fix-CMake.patch deleted file mode 100644 index a79c2bdeb866..000000000000 --- a/0001-Fix-resources-Fix-CMake.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 00251d1894fcd819768a3a6fe276a98148cfa86b Mon Sep 17 00:00:00 2001 -From: kenshen112 <finalfantasytimothy@gmail.com> -Date: Sat, 24 Dec 2022 10:00:03 -0700 -Subject: [PATCH] Fix resources, Fix CMake - -S ---- - CMakeLists.txt | 5 +++++ - cmake/BuildParameters.cmake | 9 +++++++++ - pcsx2-qt/CMakeLists.txt | 6 ++++++ - pcsx2/Frontend/CommonHost.cpp | 8 +++++--- - 4 files changed, 25 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 35622ee3c..bcdca1954 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -25,6 +25,9 @@ endif() - # include some generic functions to ensure correctness of the env - include(Pcsx2Utils) - -+set(EXECUTEABLE "pcsx2-qt") -+set(PCSX2_MENU_CATEGORIES "Game;Emulator;") -+ - check_no_parenthesis_in_path() - detectOperatingSystem() - check_compiler_version("7.0" "7.0") -@@ -63,3 +66,5 @@ if(ACTUALLY_ENABLE_TESTS) - add_subdirectory(tests/ctest) - endif() - -+INSTALL(DIRECTORY "${CMAKE_BINARY_DIR}/bin/resources" DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2) -+INSTALL(FILES "${CMAKE_BINARY_DIR}/bin/PCSX2.desktop" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) -diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake -index a402ab883..abb4b228f 100644 ---- a/cmake/BuildParameters.cmake -+++ b/cmake/BuildParameters.cmake -@@ -36,6 +36,15 @@ if(UNIX AND NOT APPLE) - option(WAYLAND_API "Enable Wayland support" ON) - endif() - -+if(PACKAGE_MODE) -+ file(RELATIVE_PATH relative_datadir ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2) -+ file(RELATIVE_PATH relative_docdir ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_DOCDIR}) -+ # Compile all source codes with those defines -+ list(APPEND PCSX2_DEFS -+ PCSX2_APP_DATADIR="${relative_datadir}" -+ PCSX2_APP_DOCDIR="${relative_docdir}") -+endif() -+ - if(APPLE) - option(OSX_USE_DEFAULT_SEARCH_PATH "Don't prioritize system library paths" OFF) - option(SKIP_POSTPROCESS_BUNDLE "Skip postprocessing bundle for redistributability" OFF) -diff --git a/pcsx2-qt/CMakeLists.txt b/pcsx2-qt/CMakeLists.txt -index 20590de61..10bf6583c 100644 ---- a/pcsx2-qt/CMakeLists.txt -+++ b/pcsx2-qt/CMakeLists.txt -@@ -4,6 +4,12 @@ set(CMAKE_AUTOUIC ON) - - add_executable(pcsx2-qt) - -+if(PACKAGE_MODE) -+ install(TARGETS pcsx2-qt DESTINATION ${CMAKE_INSTALL_BINDIR}) -+ else() -+ install(TARGETS pcsx2-qt DESTINATION ${CMAKE_SOURCE_DIR}/bin) -+endif() -+ - target_sources(pcsx2-qt PRIVATE - AboutDialog.cpp - AboutDialog.h -diff --git a/pcsx2/Frontend/CommonHost.cpp b/pcsx2/Frontend/CommonHost.cpp -index 9da1dafd9..d948ac704 100644 ---- a/pcsx2/Frontend/CommonHost.cpp -+++ b/pcsx2/Frontend/CommonHost.cpp -@@ -128,12 +128,14 @@ void CommonHost::SetAppRoot() - - void CommonHost::SetResourcesDirectory() - { --#ifndef __APPLE__ -+#ifdef __APPLE__ -+ // On macOS, this is in the bundle resources directory. -+ EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources")); -+#elif !defined(PCSX2_APP_DATADIR) - // On Windows/Linux, these are in the binary directory. - EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources"); - #else -- // On macOS, this is in the bundle resources directory. -- EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources")); -+ EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, PCSX2_APP_DATADIR "/resources")); - #endif - } - --- -2.39.0 - @@ -4,7 +4,7 @@ # Contributor: Themaister <maister@archlinux.us> pkgname=pcsx2-git -pkgver=1.7.4269.r0.g72b38ce71 +pkgver=1.7.4272.r0.g42155dd11 pkgrel=1 pkgdesc='A Sony PlayStation 2 emulator' arch=(x86_64) @@ -18,26 +18,18 @@ license=( depends=( libaio - libjpeg-turbo libpcap - libzip - libgl # For Steam Deck - xorg-xrandr # For Steam Deck - libxrender # For Steam Deck - linux-api-headers # For Steam Deck - libpulse + libglvnd + libxrandr + alsa-lib ffmpeg - portaudio - libsamplerate sdl2 - rapidyaml qt6-base - qt6-wayland - qt6-tools qt6-svg soundtouch wayland - zstd + libpng + hicolor-icon-theme ) makedepends=( cmake @@ -45,20 +37,24 @@ makedepends=( lld llvm git - xorgproto ninja - swig - python - vulkan-headers + libpulse + p7zip + qt6-wayland + qt6-tools ) -install=pcsx2-git.install -provides=(pcsx2 pcsx2-qt) -conflicts=(pcsx2) - +optdepends=( + 'qt6-wayland: Wayland support' + 'libpulse: Pulseaudio support' +) +provides=(${pkgname%-git}) +conflicts=(${pkgname%-git}) +options=(!lto) source=( git+https://github.com/PCSX2/pcsx2.git - git+https://github.com/PCSX2/xz.git - gtest::git+https://github.com/google/googletest.git + git+https://github.com/PCSX2/pcsx2_patches.git + xz-pcsx2::git+https://github.com/PCSX2/xz.git + git+https://github.com/google/googletest.git git+https://github.com/fmtlib/fmt.git git+https://github.com/microsoft/wil.git git+https://github.com/rtissera/libchdr.git @@ -66,67 +62,45 @@ source=( git+https://github.com/biojppm/cmake.git git+https://github.com/biojppm/c4core.git git+https://github.com/biojppm/debugbreak.git - git+https://github.com/KhronosGroup/glslang.git git+https://github.com/fastfloat/fast_float.git - vulkan-headers::git+https://github.com/KhronosGroup/Vulkan-Headers.git - git+https://github.com/libsdl-org/SDL.git + git+https://github.com/KhronosGroup/glslang.git + git+https://github.com/KhronosGroup/Vulkan-Headers.git git+https://github.com/nih-at/libzip.git git+https://github.com/facebook/zstd.git git+https://github.com/RetroAchievements/rcheevos.git - 0001-Fix-resources-Fix-CMake.patch + pcsx2-qt.sh ) -b2sums=('SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'SKIP' - 'db0e71c76fc59f8e07684d032a3ab145eaff8964900a1690010ac1963513a050be438f651209b0cb160559c16d50d2cf5b0b8035f40c5f82e4c199d459dcec9d') +install=pcsx2-git.install -prepare() -{ +prepare() { cd pcsx2 - git apply -3 ../0001-Fix-resources-Fix-CMake.patch - local submodule _pcsx2_submodules=( - 3rdparty/xz/xz - 3rdparty/gtest - 3rdparty/fmt/fmt - 3rdparty/libchdr/libchdr - 3rdparty/wil - 3rdparty/rapidyaml/rapidyaml - 3rdparty/glslang/glslang - 3rdparty/vulkan-headers - 3rdparty/sdl2/SDL - 3rdparty/libzip/libzip - 3rdparty/zstd/zstd - 3rdparty/rcheevos/rcheevos + xz-pcsx2::3rdparty/xz/xz + googletest::3rdparty/gtest + fmt::3rdparty/fmt/fmt + wil::3rdparty/wil + libchdr::3rdparty/libchdr/libchdr + rapidyaml::3rdparty/rapidyaml/rapidyaml + glslang::3rdparty/glslang/glslang + Vulkan-Headers::3rdparty/vulkan-headers + libzip::3rdparty/libzip/libzip + zstd::3rdparty/zstd/zstd + rcheevos::3rdparty/rcheevos/rcheevos ) for submodule in ${_pcsx2_submodules[@]}; do - git submodule init ${submodule} - git submodule set-url ${submodule} "${srcdir}/${submodule##*/}" - git -c protocol.file.allow=always submodule update ${submodule} + git submodule init "${submodule#*::}" + git submodule set-url "${submodule#*::}" "$srcdir"/"${submodule%::*}" + git -c protocol.file.allow=always submodule update "${submodule#*::}" done - + cd 3rdparty/rapidyaml/rapidyaml for submodule in ext/c4core; do git submodule init ${submodule} git submodule set-url ${submodule} "${srcdir}/${submodule##*/}" git -c protocol.file.allow=always submodule update ${submodule} done - + cd ext/c4core for submodule in cmake src/c4/ext/{debugbreak,fast_float}; do git submodule init ${submodule} @@ -135,38 +109,67 @@ prepare() done } -pkgver() -{ +pkgver() { cd pcsx2 git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' } -build() -{ - cmake -B build -S pcsx2 \ +build() { + cmake -S pcsx2 -B build \ + -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" \ -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" \ - -DWAYLAND_API=ON \ + -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \ -DQT_BUILD=ON \ - -DUSE_VULKAN=ON \ + -DCUBEB_API=ON \ + -DX11_API=ON \ + -DWAYLAND_API=ON \ + -DENABLE_SETCAP=OFF \ + -DUSE_SYSTEM_LIBS=OFF \ + -DUSE_SYSTEM_FMT=OFF \ + -DUSE_SYSTEM_LIBZIP=OFF \ + -DUSE_SYSTEM_RYML=OFF \ + -DUSE_SYSTEM_SDL2=ON \ + -DUSE_SYSTEM_ZSTD=OFF \ -DDISABLE_ADVANCE_SIMD=ON \ - -GNinja \ - -DPACKAGE_MODE=ON - - ninja -C build - - cp pcsx2/.github/workflows/scripts/linux/pcsx2-qt.desktop build/bin/PCSX2.desktop + -DDISABLE_BUILD_DATE=ON + ninja -C build -v + + 7z a -r cheats_ni.zip pcsx2_patches/cheats_ni/* + 7z a -r cheats_ws.zip pcsx2_patches/cheats_ws/* } -package() -{ - DESTDIR="${pkgdir}" cmake --install build - install -Dm644 pcsx2/pcsx2/Resources/AppIcon64.png "$pkgdir/usr/share/icons/hicolor/64x64/apps/PCSX2.png" +package() { + install -dm755 "${pkgdir}"/opt/ + cp -r build/bin "${pkgdir}"/opt/"${pkgname%-git}" + install -Dm755 pcsx2-qt.sh "$pkgdir"/usr/bin/pcsx2-qt + install -Dm644 pcsx2/.github/workflows/scripts/linux/pcsx2-qt.desktop \ + "${pkgdir}"/usr/share/applications/PCSX2.desktop + install -Dm644 pcsx2/pcsx2/Resources/AppIcon64.png \ + "${pkgdir}"/usr/share/icons/hicolor/64x64/apps/PCSX2.png + install -Dm644 -t "${pkgdir}"/opt/"${pkgname%-git}"/resources/ cheats_ni.zip + install -Dm644 -t "${pkgdir}"/opt/"${pkgname%-git}"/resources/ cheats_ws.zip } -# vim: ts=2 sw=2 et: +b2sums=('SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' +'20a92373a9434f285f8d51d7e615bf53843a59abf40f2e2a22464fe1680fb077ed4a5d97cf8ecb0fca3b5a0a4d2b5e2864af656052c2dc55cc6f54eea16d4449') diff --git a/pcsx2-git.install b/pcsx2-git.install index 83bfd015205d..d2158ea3ce81 100644 --- a/pcsx2-git.install +++ b/pcsx2-git.install @@ -1,10 +1,15 @@ # For DEV9 netplay support post_install() { - setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' usr/bin/pcsx2-qt + setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /opt/pcsx2/pcsx2-qt } post_upgrade() { - setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' usr/bin/pcsx2-qt + setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /opt/pcsx2/pcsx2-qt +} + +pre_remove() +{ + setcap -r /opt/pcsx2/pcsx2-qt } diff --git a/pcsx2-qt.sh b/pcsx2-qt.sh new file mode 100644 index 000000000000..8bc2a6d19839 --- /dev/null +++ b/pcsx2-qt.sh @@ -0,0 +1,3 @@ +#/usr/bin/bash +/opt/pcsx2/pcsx2-qt $@ + |