diff options
author | 2023-10-19 08:27:23 -0400 | |
---|---|---|
committer | 2023-10-19 09:35:01 -0400 | |
commit | 0e82b20ba23d2500ac970913a4620e943691d763 (patch) | |
tree | 7271d8260bf207166ce403037e6c1a9094ac69c8 /games-emulation | |
parent | games-emulation/pcsx2_patches: drop 0_p20230822 (diff) | |
download | gentoo-0e82b20ba23d2500ac970913a4620e943691d763.tar.gz gentoo-0e82b20ba23d2500ac970913a4620e943691d763.tar.bz2 gentoo-0e82b20ba23d2500ac970913a4620e943691d763.zip |
games-emulation/pcsx2_patches: add 0_p20231015
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_p20231015.ebuild | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/games-emulation/pcsx2_patches/Manifest b/games-emulation/pcsx2_patches/Manifest index 0b5830d41210..022e46934325 100644 --- a/games-emulation/pcsx2_patches/Manifest +++ b/games-emulation/pcsx2_patches/Manifest @@ -1 +1,2 @@ DIST pcsx2_patches-0_p20230917.tar.gz 622275 BLAKE2B 1c9bb048ae46d454e723828d762c1d084da17777c391b0fdb40a0d3b376560f3d67336cb50f6d65efe1c1b3ff3e2079c6fbca1de00ebbe62ff97d47d6b63a294 SHA512 35eacac2ab230d645b860f79be39b9f312a23b28c4fa69c67b710a89a78343e56dc1f0c1c4a128bc73dd57b6bec0438c1561e5277c6daad4dc4000d0123f91cb +DIST pcsx2_patches-0_p20231015.tar.gz 626844 BLAKE2B cde4e81aa354839f4e49a20cbf3d375704b9a09cf30283bfe61c0b2fcd213dd0e33431875eba3d7f5fc4ca45cb779ba1916f787464a922a5cfc484e75b727205 SHA512 6a53806ff8f348946539fb3f960e91bc40d01f8c7d6acd2e07cfbea938bd5abf4d820b1c26f19b46d103438d32325c02942a879ce3f500e30a6f5fe8b776d46c diff --git a/games-emulation/pcsx2_patches/pcsx2_patches-0_p20231015.ebuild b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20231015.ebuild new file mode 100644 index 000000000000..76995605c664 --- /dev/null +++ b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20231015.ebuild @@ -0,0 +1,55 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +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=4a843d2fb7d9e44532e496b8968bbcf28673b99a + 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/lib/pcsx2/resources + doins patches.zip + + einstalldocs +} |