From 083f6c1b0f4e842a3dcdad4fde95c0652c4e6f2f Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Sun, 4 Jan 2026 21:31:00 -0500 Subject: [PATCH] games-emulation/pcsx2_patches: add 0_p20251228 Signed-off-by: Ionen Wolkens --- games-emulation/pcsx2_patches/Manifest | 1 + .../pcsx2_patches-0_p20251228.ebuild | 58 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 games-emulation/pcsx2_patches/pcsx2_patches-0_p20251228.ebuild diff --git a/games-emulation/pcsx2_patches/Manifest b/games-emulation/pcsx2_patches/Manifest index e57d4ec291147..a940c69aa3d9f 100644 --- a/games-emulation/pcsx2_patches/Manifest +++ b/games-emulation/pcsx2_patches/Manifest @@ -1 +1,2 @@ DIST pcsx2_patches-0_p20241020.tar.gz 684434 BLAKE2B 934b0953d845cdc3e85bb99c7ec9ad8d251137d694287d487f8bfcfea048e5e572285e863b7d9e1c1650f07cd89bd69ca72259d357c92732e942aad4c975fc2f SHA512 5b4d8e545a9694966fda0aa96a1198ce0be66d163ef1d033b3ae054e01457b570f1e10b1d5f7657a54d4a6526d1f039a1a382e95531797208ea7b31b96aebbad +DIST pcsx2_patches-0_p20251228.tar.gz 794428 BLAKE2B 75e11a81ea7b80896a330d6d2b94f3eaf7d6ccc50e7c91d1083c8a42fa63a3b9a5cd6dff19a80cd74b9f5a12affc8fd9ba9c8501f7a252e905592b65516cc864 SHA512 d4d975dbb23ee09c67161338bb4c48f1da55d84a325fe6df388b049976f673f2b55b1f42b0848cfeec597cb7ed092c94f07e25864917d998e035f17bc1e723b1 diff --git a/games-emulation/pcsx2_patches/pcsx2_patches-0_p20251228.ebuild b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20251228.ebuild new file mode 100644 index 0000000000000..737779db4ce60 --- /dev/null +++ b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20251228.ebuild @@ -0,0 +1,58 @@ +# Copyright 2023-2026 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_{11..14} ) +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=37b2b6b85dd8a02f3adf5282a7d1aaa3ab493836 + 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 +}