summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-06-22 05:33:26 -0400
committerIonen Wolkens <ionen@gentoo.org>2024-06-22 05:33:57 -0400
commit41ccfbc21d8bfe5293b5a10a9ce1cdf3c4806bfe (patch)
tree3a0a9426feddfd947bf87dd7b07c51a9dab32e67 /games-emulation
parentgames-emulation/pcsx2_patches: drop 0_p20240312, 0_p20240416 (diff)
downloadgentoo-41ccfbc21d8bfe5293b5a10a9ce1cdf3c4806bfe.tar.gz
gentoo-41ccfbc21d8bfe5293b5a10a9ce1cdf3c4806bfe.tar.bz2
gentoo-41ccfbc21d8bfe5293b5a10a9ce1cdf3c4806bfe.zip
games-emulation/pcsx2_patches: add 0_p20240610
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/pcsx2_patches/Manifest1
-rw-r--r--games-emulation/pcsx2_patches/pcsx2_patches-0_p20240610.ebuild55
2 files changed, 56 insertions, 0 deletions
diff --git a/games-emulation/pcsx2_patches/Manifest b/games-emulation/pcsx2_patches/Manifest
index 6e67afc97ead..6366ffa0650c 100644
--- a/games-emulation/pcsx2_patches/Manifest
+++ b/games-emulation/pcsx2_patches/Manifest
@@ -1 +1,2 @@
DIST pcsx2_patches-0_p20240522.tar.gz 671478 BLAKE2B c3e38009783620aca91539c383694a056c2866e4c6f9360ceea980c341c5b75a653b75780a667f32c332011190a123f0228f6f21539f8ffcd7088e11df74c1ec SHA512 53a36f60ce6de36a9acad52a4913e50c00ad2bfc773d692c9ccdd4cdbaf5342f8a2ff118b1df632a79bc6c4142c6c0ac6e6092d627942521c55af8e1d9ec9850
+DIST pcsx2_patches-0_p20240610.tar.gz 674606 BLAKE2B 2b05728e0a2114fba1c12a2c075854a771127b87ba430d653c2a7e2ab85b9c30d67f14034717b75fe229b1a3f8b90cae63c840dec32665cebad9ae841a084764 SHA512 8db514d0677cdaa2d6c9fddae2fd8975a8af5d222544ec12ceb97a0da54a87ebeaad09989bd36c9a0ef2ac7a370f229c813f7a769ede8027e1c4b9b3ea928b66
diff --git a/games-emulation/pcsx2_patches/pcsx2_patches-0_p20240610.ebuild b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20240610.ebuild
new file mode 100644
index 000000000000..7f340156087c
--- /dev/null
+++ b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20240610.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..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=fcb11f6b699fd68e41977bffe53b8e8031ccb578
+ 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
+}