diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-20 13:00:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-20 13:00:15 +0000 |
commit | e937ca8df21d3186f65edc11c872706c80eb8a61 (patch) | |
tree | 6758813cd0a8bd1da09045a9171ff389b1b39718 /games-emulation/pcsx2_patches/pcsx2_patches-0_p20240312.ebuild | |
parent | 1b5d79237a144dcb8753c783941843d879a906e2 (diff) |
gentoo auto-resync : 20:03:2024 - 13:00:14
Diffstat (limited to 'games-emulation/pcsx2_patches/pcsx2_patches-0_p20240312.ebuild')
-rw-r--r-- | games-emulation/pcsx2_patches/pcsx2_patches-0_p20240312.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/games-emulation/pcsx2_patches/pcsx2_patches-0_p20240312.ebuild b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20240312.ebuild new file mode 100644 index 000000000000..305c741d6a4a --- /dev/null +++ b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20240312.ebuild @@ -0,0 +1,55 @@ +# Copyright 2023-2024 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=f15daef9e6a7044c55f3d7b2deccbb2e9928feb0 + 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 +} |