diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2024-11-01 05:25:08 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2024-11-01 05:38:14 -0400 |
commit | 2aca193c9cbfee0e8a4e6b22f3a0ae784278d6c6 (patch) | |
tree | 86b71be31ba990bd5a544d93387dd6f1787537f8 /games-emulation | |
parent | games-emulation/pcsx2: add upper bound for pcsx2 patches in 2.0.2 (diff) | |
download | gentoo-2aca193c9cbfee0e8a4e6b22f3a0ae784278d6c6.tar.gz gentoo-2aca193c9cbfee0e8a4e6b22f3a0ae784278d6c6.tar.bz2 gentoo-2aca193c9cbfee0e8a4e6b22f3a0ae784278d6c6.zip |
games-emulation/pcsx2_patches: add 0_p20241020
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r-- | games-emulation/pcsx2_patches/Manifest | 1 | ||||
-rw-r--r-- | games-emulation/pcsx2_patches/pcsx2_patches-0_p20241020.ebuild | 58 |
2 files changed, 59 insertions, 0 deletions
diff --git a/games-emulation/pcsx2_patches/Manifest b/games-emulation/pcsx2_patches/Manifest index 48445e832a07..5277b2430d70 100644 --- a/games-emulation/pcsx2_patches/Manifest +++ b/games-emulation/pcsx2_patches/Manifest @@ -1 +1,2 @@ DIST pcsx2_patches-0_p20240714.tar.gz 675035 BLAKE2B 6ed77089ba630bfd37f9eb7372855ed638b8c8c5a9788b6a6ddcdcfff4e1d53b03fe7160c8bd7780ea13b9bd63a4cc7a2e1ac0410f447b1e17a42598d19fe348 SHA512 15f89e40944d56b301aa33235236898532a888af4f3c0f3527e6c98eb38039f6b7623b60c0aadb2f4a7a7b1bc325cb60f84b6d16b3d3066c0e924ff040ed8e50 +DIST pcsx2_patches-0_p20241020.tar.gz 684434 BLAKE2B 934b0953d845cdc3e85bb99c7ec9ad8d251137d694287d487f8bfcfea048e5e572285e863b7d9e1c1650f07cd89bd69ca72259d357c92732e942aad4c975fc2f SHA512 5b4d8e545a9694966fda0aa96a1198ce0be66d163ef1d033b3ae054e01457b570f1e10b1d5f7657a54d4a6526d1f039a1a382e95531797208ea7b31b96aebbad diff --git a/games-emulation/pcsx2_patches/pcsx2_patches-0_p20241020.ebuild b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20241020.ebuild new file mode 100644 index 000000000000..db5bb273f1c2 --- /dev/null +++ b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20241020.ebuild @@ -0,0 +1,58 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# note: not "required" but should typically be bumped at same +# time as pcsx2 to match the patches.zip shipped with it + +PYTHON_COMPAT=( python3_{10..13} ) +inherit python-any-r1 + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/PCSX2/pcsx2_patches.git" +else + HASH_PCSX2_PATCHES=f193d7d41f63a8a6efa190b80096c0450c368c9b + SRC_URI=" + https://github.com/PCSX2/pcsx2_patches/archive/${HASH_PCSX2_PATCHES}.tar.gz + -> ${P}.tar.gz + " + S=${WORKDIR}/${PN}-${HASH_PCSX2_PATCHES} + KEYWORDS="~amd64" +fi + +DESCRIPTION="Collection of game patches for use with PCSX2 (e.g. widescreen hacks)" +HOMEPAGE="https://github.com/PCSX2/pcsx2_patches/" + +# these are normally distributed by upstream with PCSX2 which is GPL-3+ +LICENSE="GPL-3+" +SLOT="0" + +BDEPEND="${PYTHON_DEPS}" + +src_compile() { + # upstream uses a constantly replaced "latest" patches.zip (currently no + # real releases), and github's .zip archives cannot be used either due to + # having the patches/ subdirectory -- so we use a snapshot and repack + # (could use app-arch/zip, but python is more likely to skip a dependency) + ebegin "Creating patches.zip" + "${PYTHON}" - <<-EOF + import pathlib + from zipfile import ZipFile, ZIP_DEFLATED + + patches = pathlib.Path("patches/") + + with ZipFile("patches.zip", "w", ZIP_DEFLATED, compresslevel=9) as archive: + for file in patches.iterdir(): + archive.write(file, arcname=file.name) + EOF + eend ${?} || die +} + +src_install() { + insinto /usr/share/PCSX2/resources + doins patches.zip + + einstalldocs +} |