summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-12-19 06:16:08 -0500
committerIonen Wolkens <ionen@gentoo.org>2023-12-19 06:43:54 -0500
commit2e5edb90105c57120f138d92e08e844506ec50e4 (patch)
treea39c35e05288c92bc5f28eaf35bf6b840c4070df
parentmedia-libs/vips: drop 8.15.0 (diff)
downloadgentoo-2e5edb90105c57120f138d92e08e844506ec50e4.tar.gz
gentoo-2e5edb90105c57120f138d92e08e844506ec50e4.tar.bz2
gentoo-2e5edb90105c57120f138d92e08e844506ec50e4.zip
games-emulation/pcsx2_patches: add 0_p20231217
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r--games-emulation/pcsx2_patches/Manifest1
-rw-r--r--games-emulation/pcsx2_patches/pcsx2_patches-0_p20231217.ebuild55
2 files changed, 56 insertions, 0 deletions
diff --git a/games-emulation/pcsx2_patches/Manifest b/games-emulation/pcsx2_patches/Manifest
index 459675564d27..a4b614cf5389 100644
--- a/games-emulation/pcsx2_patches/Manifest
+++ b/games-emulation/pcsx2_patches/Manifest
@@ -1,2 +1,3 @@
DIST pcsx2_patches-0_p20231015.tar.gz 626844 BLAKE2B cde4e81aa354839f4e49a20cbf3d375704b9a09cf30283bfe61c0b2fcd213dd0e33431875eba3d7f5fc4ca45cb779ba1916f787464a922a5cfc484e75b727205 SHA512 6a53806ff8f348946539fb3f960e91bc40d01f8c7d6acd2e07cfbea938bd5abf4d820b1c26f19b46d103438d32325c02942a879ce3f500e30a6f5fe8b776d46c
DIST pcsx2_patches-0_p20231117.tar.gz 638316 BLAKE2B 331d2ceec0c9e10d5b8cf344a432561173083a37000f8fa3f3890e001a588884e7253bf93d5ca624d36489c9e2f4c0a865de3357d415e9f25d422bedd1106b93 SHA512 7a55a70627b045fd426e88c94e72f191adf72ee01917f9963d4bbfc4a9f96e361efb7bb86487aec4067886458779b42228fd0c5c62f2f07dfada99ba89550d8c
+DIST pcsx2_patches-0_p20231217.tar.gz 647767 BLAKE2B a82211d3a31ee3475d2047ad4c25cc247003b15f8132c0e0fa1c144fff3ea59f0806409aeb9a1128697aee2453110d2da50e9577067d068879a885477b04dc3a SHA512 411431fa80a0a221c7b336ebb84ce9b0c078ff75c2cc79b5e31c9b5fc505f9ecec8b371c142a6be6802e2070ae57758c65df34d24d5392fb9f4065a276b32610
diff --git a/games-emulation/pcsx2_patches/pcsx2_patches-0_p20231217.ebuild b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20231217.ebuild
new file mode 100644
index 000000000000..7255f844e8f5
--- /dev/null
+++ b/games-emulation/pcsx2_patches/pcsx2_patches-0_p20231217.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=42d7ee72b66955e3bbd2caaeaa855f605b463722
+ 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
+}