You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
56 lines
1.5 KiB
4 months ago
|
# Copyright 2023-2024 Gentoo Authors
|
||
9 months ago
|
# 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
|
||
1 month ago
|
HASH_PCSX2_PATCHES=0f52d8a5eb1cefea8b416532ce6ba225271e267f
|
||
9 months ago
|
SRC_URI="
|
||
|
https://github.com/PCSX2/pcsx2_patches/archive/${HASH_PCSX2_PATCHES}.tar.gz
|
||
7 months ago
|
-> ${P}.tar.gz
|
||
|
"
|
||
9 months ago
|
S=${WORKDIR}/${PN}-${HASH_PCSX2_PATCHES}
|
||
1 month ago
|
KEYWORDS="~amd64"
|
||
9 months ago
|
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() {
|
||
7 months ago
|
insinto /usr/lib/pcsx2/resources
|
||
9 months ago
|
doins patches.zip
|
||
|
|
||
|
einstalldocs
|
||
|
}
|