diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-01-19 18:21:42 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-01-19 18:21:42 +0000 |
commit | e350dc300bdb7efe4c5619f72e12468cf0fe885f (patch) | |
tree | 58b671ddc53feeacd290d18482a2b8d91ff0afbf /games-util | |
parent | 36e7abcc749601798372e0d4589ee522f2973064 (diff) |
games-util/lutris : import from gentoo, cherry-pick fix for https://github.com/lutris/lutris/issues/2488
Diffstat (limited to 'games-util')
-rw-r--r-- | games-util/lutris/Manifest | 1 | ||||
-rw-r--r-- | games-util/lutris/files/df3a041458d3f128f2b23837b52edbbafeec0bd2.diff | 39 | ||||
-rw-r--r-- | games-util/lutris/files/lutris-0.5.4-gtk.patch | 29 | ||||
-rw-r--r-- | games-util/lutris/lutris-0.5.4-r10.ebuild | 80 |
4 files changed, 149 insertions, 0 deletions
diff --git a/games-util/lutris/Manifest b/games-util/lutris/Manifest new file mode 100644 index 00000000..fe1e837c --- /dev/null +++ b/games-util/lutris/Manifest @@ -0,0 +1 @@ +DIST lutris_0.5.4.tar.xz 1843880 BLAKE2B f286d62df3bf5a5eadd634d2d177a5b69b5fa5d897e70f58a19be4148609e56ba33c29ce4218ae833dbdf9dded1e9be869f9ed4d84ba2b435a09981219d74438 SHA512 81669f2021063229bad78ebc49b54075058266716279695c53c43a5a06a8c1d4e5a9dcbcb20a1becfe0d243aa6e812f5a30b4d90f418d4cffcff18daefb09c50 diff --git a/games-util/lutris/files/df3a041458d3f128f2b23837b52edbbafeec0bd2.diff b/games-util/lutris/files/df3a041458d3f128f2b23837b52edbbafeec0bd2.diff new file mode 100644 index 00000000..019010fe --- /dev/null +++ b/games-util/lutris/files/df3a041458d3f128f2b23837b52edbbafeec0bd2.diff @@ -0,0 +1,39 @@ +diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py +index 97126726a..f792451f2 100644 +--- a/lutris/runners/wine.py ++++ b/lutris/runners/wine.py +@@ -743,6 +743,7 @@ def toggle_dxvk(self, enable, version=None, dxvk_manager: dxvk.DXVKManager = Non + if version.lower() != "manual": + if enable: + if not dxvk_manager.is_available(): ++ logger.info("DXVK %s is not available yet, downloading...") + dxvk_manager.download() + dxvk_manager.enable() + else: +diff --git a/lutris/util/downloader.py b/lutris/util/downloader.py +index da8038cfd..8b96af80f 100644 +--- a/lutris/util/downloader.py ++++ b/lutris/util/downloader.py +@@ -113,6 +113,9 @@ def async_download(self, stop_request=None): + if self.referer: + headers["Referer"] = self.referer + response = requests.get(self.url, headers=headers, stream=True) ++ if response.status_code != 200: ++ logger.info("%s returned a %s error" % (self.url, response.status_code)) ++ response.raise_for_status() + self.full_size = int(response.headers.get("Content-Length", "").strip() or 0) + for chunk in response.iter_content(chunk_size=1024 * 1024): + if not self.file_pointer: +diff --git a/lutris/util/extract.py b/lutris/util/extract.py +index 4e05d9bdf..3bd78e5f3 100644 +--- a/lutris/util/extract.py ++++ b/lutris/util/extract.py +@@ -113,7 +113,7 @@ def extract_archive(path, to_directory=".", merge_single=True, extractor=None): + try: + _do_extract(path, temp_path, opener, mode, extractor) + except (OSError, zlib.error, tarfile.ReadError, EOFError) as ex: +- logger.exception("Extraction failed: %s", ex) ++ logger.error("Extraction failed: %s", ex) + raise ExtractFailure(str(ex)) + if merge_single: + extracted = os.listdir(temp_path) diff --git a/games-util/lutris/files/lutris-0.5.4-gtk.patch b/games-util/lutris/files/lutris-0.5.4-gtk.patch new file mode 100644 index 00000000..a2c5d71d --- /dev/null +++ b/games-util/lutris/files/lutris-0.5.4-gtk.patch @@ -0,0 +1,29 @@ +From a97150b78954e176cb0f825f0c201f54d5da613e Mon Sep 17 00:00:00 2001 +From: Stefan Strogin <steils@gentoo.org> +Date: Tue, 31 Dec 2019 03:22:26 +0200 +Subject: [PATCH] Call the correct method for creating TreeModelSort (Closes + #2554) + +Upstream-Status: Accepted +[https://github.com/lutris/lutris/commit/a99b17f00dfc4cdab80c237752cc3167d64194eb] +Signed-off-by: Stefan Strogin <steils@gentoo.org> +--- + lutris/gui/views/store.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lutris/gui/views/store.py b/lutris/gui/views/store.py +index ba331313..4d5f372e 100644 +--- a/lutris/gui/views/store.py ++++ b/lutris/gui/views/store.py +@@ -130,7 +130,7 @@ class GameStore(GObject.Object): + self.prevent_sort_update = False # prevent recursion with signals + self.modelfilter = self.store.filter_new() + self.modelfilter.set_visible_func(self.filter_view) +- self.modelsort = Gtk.TreeModelSort.sort_new_with_model(self.modelfilter) ++ self.modelsort = Gtk.TreeModelSort.new_with_model(self.modelfilter) + self.modelsort.connect("sort-column-changed", self.on_sort_column_changed) + self.modelsort.set_sort_func(sort_col, sort_func, sort_col) + self.sort_view(sort_key, sort_ascending) +-- +2.24.1 + diff --git a/games-util/lutris/lutris-0.5.4-r10.ebuild b/games-util/lutris/lutris-0.5.4-r10.ebuild new file mode 100644 index 00000000..a58ce9f9 --- /dev/null +++ b/games-util/lutris/lutris-0.5.4-r10.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_REQ_USE="sqlite,threads(+)" + +inherit distutils-r1 virtualx xdg + +DESCRIPTION="An open source gaming platform for GNU/Linux" +HOMEPAGE="https://lutris.net/" + +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://github.com/lutris/lutris.git" + inherit git-r3 +else + SRC_URI="https://lutris.net/releases/${P/-/_}.tar.xz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${PN}" +fi + +LICENSE="GPL-3" +SLOT="0" + +RESTRICT="!test? ( test )" + +BDEPEND=" + test? ( dev-python/nose[${PYTHON_USEDEP}] ) +" +RDEPEND=" + app-arch/cabextract + app-arch/p7zip + app-arch/unrar + app-arch/unzip + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/pygobject:3[${PYTHON_USEDEP}] + dev-python/python-evdev[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + gnome-base/gnome-desktop:3[introspection] + media-sound/fluid-soundfont + net-libs/libsoup + net-libs/webkit-gtk:4[introspection] + x11-apps/mesa-progs + x11-apps/xgamma + x11-apps/xrandr + x11-libs/gtk+:3[introspection] + x11-libs/libnotify +" + +PATCHES=( "${FILESDIR}/${P}-gtk.patch" + "${FILESDIR}/df3a041458d3f128f2b23837b52edbbafeec0bd2.diff" ) + +python_install_all() { + local DOCS=( AUTHORS README.rst docs/installers.rst ) + distutils-r1_python_install_all +} + +python_test() { + virtx nosetests -v +} + +pkg_preinst() { + xdg_pkg_preinst +} + +pkg_postinst() { + xdg_pkg_postinst + + # Quote README.rst + elog "Lutris installations are fully automated through scripts, which can" + elog "be written in either JSON or YAML. The scripting syntax is described" + elog "in ${EROOT}/usr/share/doc/${PF}/installers.rst.bz2, and is also" + elog "available online at lutris.net." +} + +pkg_postrm() { + xdg_pkg_postrm +} |