summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2021-06-02 04:30:21 -0400
committerIonen Wolkens <ionen@gentoo.org>2021-06-02 04:50:41 -0400
commita32137f8745defaf706509cc984c3beccdf6e310 (patch)
tree48fee5837e9187e032ede8db675ee87633fd9031 /games-puzzle
parentgames-puzzle/brainworkshop: update github remote-id (diff)
downloadgentoo-a32137f8745defaf706509cc984c3beccdf6e310.tar.gz
gentoo-a32137f8745defaf706509cc984c3beccdf6e310.tar.bz2
gentoo-a32137f8745defaf706509cc984c3beccdf6e310.zip
games-puzzle/brainworkshop: add 5.0.2
- add python3_9 - update HOMEPAGE/SRC_URI - update LICENSE (upstream clarified they use GPL-2+) - use upstream's newly provided .desktop edos2unix no longer needed, .py is provided over .pyw Closes: https://bugs.gentoo.org/776814 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/brainworkshop/Manifest1
-rw-r--r--games-puzzle/brainworkshop/brainworkshop-5.0.2.ebuild48
-rw-r--r--games-puzzle/brainworkshop/files/brainworkshop-5.0.2-datadir.patch7
3 files changed, 56 insertions, 0 deletions
diff --git a/games-puzzle/brainworkshop/Manifest b/games-puzzle/brainworkshop/Manifest
index c74a1f08c481..880950cbd91b 100644
--- a/games-puzzle/brainworkshop/Manifest
+++ b/games-puzzle/brainworkshop/Manifest
@@ -1 +1,2 @@
+DIST brainworkshop-5.0.2.tar.gz 7998711 BLAKE2B d2662d2e565b576b441a41ec9177c3bd17f30d0f671d67ee7497bc2a983ba193e977a0d4cb4bfcd684cc46fe918159ffa5181a141e591adf819b28e744437222 SHA512 07ab0b30cef92b3c5ac0476a1baa5afb8f57afb557b266169a7f72fe4cbe8c0afbf0db491a23106da6c61f055c24c5f0c4268ead41d92101e5a8284a7dc80265
DIST brainworkshop-5_beta20200310.tar.gz 8001718 BLAKE2B ec3ef92d169956cb9334230e60b5e2c370154c11640daa3201b56654cd402ecba37d3bd1e3ff95339b351bd8984fb84a6bab72bf9f752175d0fb3ae1d989ba10 SHA512 f061ef005ac5f1c8b3fe1f23d847852730a9402bfa6be83946b2cd1f3a352a7a6eb67b73c81506f082fe2ae590598435736a36c87513a11b87f3e8237a296669
diff --git a/games-puzzle/brainworkshop/brainworkshop-5.0.2.ebuild b/games-puzzle/brainworkshop/brainworkshop-5.0.2.ebuild
new file mode 100644
index 000000000000..aeddd40b56cd
--- /dev/null
+++ b/games-puzzle/brainworkshop/brainworkshop-5.0.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9} )
+
+inherit desktop python-single-r1
+
+DESCRIPTION="Short-term-memory training N-Back game"
+HOMEPAGE="https://github.com/brain-workshop/brainworkshop"
+SRC_URI="https://github.com/brain-workshop/brainworkshop/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="CC-Sampling-Plus-1.0 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ >=dev-python/pyglet-1.5[${PYTHON_USEDEP},sound]
+ ')"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.2-datadir.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i "s|@GENTOO_DATADIR@|${EPREFIX}/usr/share/${PN}|" ${PN}.py || die
+
+ python_fix_shebang ${PN}.py
+}
+
+src_install() {
+ newbin ${PN}.py ${PN}
+
+ insinto /usr/share/${PN}
+ doins -r res/.
+
+ dodoc Readme.md Readme-{instructions,resources}.txt data/Readme-stats.txt
+
+ domenu ${PN}.desktop
+ newicon res/misc/brain/brain.png ${PN}.png
+}
diff --git a/games-puzzle/brainworkshop/files/brainworkshop-5.0.2-datadir.patch b/games-puzzle/brainworkshop/files/brainworkshop-5.0.2-datadir.patch
new file mode 100644
index 000000000000..1b54317b29c9
--- /dev/null
+++ b/games-puzzle/brainworkshop/files/brainworkshop-5.0.2-datadir.patch
@@ -0,0 +1,7 @@
+--- a/brainworkshop.py
++++ b/brainworkshop.py
+@@ -173,3 +173,3 @@
+ else:
+- return os.path.join(get_main_dir(), FOLDER_RES)
++ return '@GENTOO_DATADIR@'
+ def edit_config_ini():