1 |
commit: 212ac9aca5c2de1ad9cfe8160a1e98f48422d600 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 22 16:12:08 2021 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 22 16:51:13 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=212ac9ac |
7 |
|
8 |
app-emulation/protontricks: add 1.5.0 |
9 |
|
10 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
11 |
|
12 |
app-emulation/protontricks/Manifest | 1 + |
13 |
.../protontricks-1.5.0_no-setuptools-scm.patch | 36 ++++++++++++++ |
14 |
.../protontricks/protontricks-1.5.0.ebuild | 57 ++++++++++++++++++++++ |
15 |
3 files changed, 94 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/protontricks/Manifest b/app-emulation/protontricks/Manifest |
18 |
index 219f70b9867..8171f3b99e4 100644 |
19 |
--- a/app-emulation/protontricks/Manifest |
20 |
+++ b/app-emulation/protontricks/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST protontricks-1.4.3.tar.gz 43573 BLAKE2B 3a3050ba6e940182d81d98498a5558433ceaa4282f5a23fb93b3cfc299699381493eb2912c5f03bb6a8092be5c50b94bf7181208cda3d4c0f4c90c0f438f7f1b SHA512 7ca8c7c273d92f7c4526caaa8c9db6988c642913c33c6b6188d285d5cfbe30924533a9f024135865cdc1a25bd867ac00bd915b0a61417d17fe0e5ee451417e64 |
23 |
DIST protontricks-1.4.4.tar.gz 45204 BLAKE2B 3fc66acae79a39e8dc7a5d507e4abcdad24da13a03e10954b667769a801ac42addb55980e3de413e71ad5395e773b065f8f1dca2e694c835a07b8993b4fb5f0e SHA512 4c61da27e97f1b46150f2808c27d1fcf7394f2cc4f272eada54abc4fdd9229443405f7466d3a1ba5603e3c40a025dbbd8fde512334c6007a64687867625abc4c |
24 |
+DIST protontricks-1.5.0.tar.gz 46957 BLAKE2B 622affd9a1bfff3a5cd76fa8e279f25b5c91a6f040b6cc4e5f42e58be08a232fad2be179a47e063b45b1b1bb11b6ae9ce26cce499f4c1dae460be0bb8247e619 SHA512 6df3e0dd638684e70a8d40b7440e2340765109e31dd47fa5e33e4959bc34d3ff4cfa70c8689cafdcce82f1d97ba6d25de724ca7439e5d1ffd634b729ab222716 |
25 |
|
26 |
diff --git a/app-emulation/protontricks/files/protontricks-1.5.0_no-setuptools-scm.patch b/app-emulation/protontricks/files/protontricks-1.5.0_no-setuptools-scm.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..a19d8494657 |
29 |
--- /dev/null |
30 |
+++ b/app-emulation/protontricks/files/protontricks-1.5.0_no-setuptools-scm.patch |
31 |
@@ -0,0 +1,36 @@ |
32 |
+Since version 1.4.1 upstream has used setuptools-scm to determine the |
33 |
+current version number. Unfortunately the package in question does not |
34 |
+support GitHub release archives, using GitHub VCS snapshots would require |
35 |
+retrieving and updating commit hashes corresponding to release tags, and |
36 |
+PyPI tarballs do not contain tests. setuptools_scm_git_archive does not |
37 |
+help because it requires extra files to be included in the repository, |
38 |
+which upstream has not done. |
39 |
+ |
40 |
+Seeing as we already know the version number, bypass setuptools_scm |
41 |
+altogether and create the version file ourselves. For obvious reasons the |
42 |
+latter has to be done in ebuilds themselves. |
43 |
+ |
44 |
+--- a/setup.py |
45 |
++++ b/setup.py |
46 |
+@@ -16,9 +16,6 @@ |
47 |
+ |
48 |
+ setup( |
49 |
+ name="protontricks", |
50 |
+- use_scm_version={ |
51 |
+- "write_to": "src/protontricks/_version.py" |
52 |
+- }, |
53 |
+ description=DESCRIPTION, |
54 |
+ long_description=LONG_DESCRIPTION, |
55 |
+ author=AUTHOR, |
56 |
+@@ -28,11 +25,6 @@ |
57 |
+ packages=["protontricks"], |
58 |
+ package_data={"": ["LICENSE"]}, |
59 |
+ package_dir={"protontricks": "src/protontricks"}, |
60 |
+- setup_requires=[ |
61 |
+- # setuptools-scm v6 requires Python 3.6+ |
62 |
+- "setuptools_scm<6 ; python_version <= '3.5'", |
63 |
+- "setuptools_scm ; python_version > '3.5'" |
64 |
+- ], |
65 |
+ install_requires=["vdf>=3.2"], |
66 |
+ entry_points={ |
67 |
+ "console_scripts": [ |
68 |
|
69 |
diff --git a/app-emulation/protontricks/protontricks-1.5.0.ebuild b/app-emulation/protontricks/protontricks-1.5.0.ebuild |
70 |
new file mode 100644 |
71 |
index 00000000000..2540f44fa28 |
72 |
--- /dev/null |
73 |
+++ b/app-emulation/protontricks/protontricks-1.5.0.ebuild |
74 |
@@ -0,0 +1,57 @@ |
75 |
+# Copyright 1999-2021 Gentoo Authors |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+ |
78 |
+EAPI=7 |
79 |
+ |
80 |
+PYTHON_COMPAT=( python3_{7..9} pypy3 ) |
81 |
+DISTUTILS_SINGLE_IMPL=1 |
82 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
83 |
+ |
84 |
+inherit distutils-r1 |
85 |
+ |
86 |
+DESCRIPTION="app-emulation/winetricks wrapper for Proton (Steam Play) games" |
87 |
+HOMEPAGE="https://github.com/Matoking/protontricks" |
88 |
+SRC_URI="https://github.com/Matoking/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
89 |
+ |
90 |
+LICENSE="GPL-3" |
91 |
+SLOT="0" |
92 |
+KEYWORDS="~amd64" |
93 |
+IUSE="+gui" |
94 |
+ |
95 |
+RDEPEND="app-emulation/winetricks |
96 |
+ $(python_gen_cond_dep ' |
97 |
+ dev-python/vdf[${PYTHON_USEDEP}] |
98 |
+ ') |
99 |
+ gui? ( gnome-extra/zenity |
100 |
+ || ( |
101 |
+ app-emulation/winetricks[gtk] |
102 |
+ app-emulation/winetricks[kde] |
103 |
+ ) |
104 |
+ )" |
105 |
+ |
106 |
+PATCHES=( |
107 |
+ "${FILESDIR}"/${PN}-1.5.0_no-setuptools-scm.patch |
108 |
+) |
109 |
+ |
110 |
+DOCS=( CHANGELOG.md README.md ) |
111 |
+ |
112 |
+distutils_enable_tests pytest |
113 |
+ |
114 |
+python_prepare_all() { |
115 |
+ distutils-r1_python_prepare_all |
116 |
+ echo "version = '${PV}'" > "${S}"/src/${PN}/_version.py || die "Failed to generate the version file" |
117 |
+} |
118 |
+ |
119 |
+pkg_postinst() { |
120 |
+ elog |
121 |
+ |
122 |
+ if ! use gui; then |
123 |
+ ewarn "Please note that disabling USE=gui does *not* presently remove the --gui command-line option," |
124 |
+ ewarn "it just means using this option will fail unless gnome-extra/zenity happens to be installed." |
125 |
+ ewarn |
126 |
+ fi |
127 |
+ |
128 |
+ elog "Protontricks can only find games for which a Proton prefix already exists." |
129 |
+ elog "Make sure to run a Proton game at least once before trying to use protontricks on it." |
130 |
+ elog |
131 |
+} |