games-puzzle/brainworkshop: Bump to 20200310 snapshot, drop old
authorJames Le Cuirot <chewi@gentoo.org>
Mon, 20 Apr 2020 08:33:06 +0000 (09:33 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Mon, 20 Apr 2020 08:36:12 +0000 (09:36 +0100)
Closes: https://bugs.gentoo.org/718314
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
games-puzzle/brainworkshop/Manifest
games-puzzle/brainworkshop/brainworkshop-5_beta20200310.ebuild [moved from games-puzzle/brainworkshop/brainworkshop-5_beta20180712.ebuild with 61% similarity]
games-puzzle/brainworkshop/files/brainworkshop-5-fix-paths.patch

index 347f37c382356bf099ea6fbf3c14ddc3f999a61a..c74a1f08c48113cbcdbdfbc05e8a4972dbe6c5e5 100644 (file)
@@ -1 +1 @@
-DIST brainworkshop-5_beta20180712.tar.gz 8001699 BLAKE2B 0bf6114d89ab39a79e7659f6fb76d1e1cb21624a014381fc73bf6ca56f2bd721c192bc89e42b147666dd6fb7d0f6df12c60230dc3bf17b75d68f3fba1ea58b99 SHA512 5733daefd79f77c0eadcf7cec03d1cd3658ca8f79b23705f763ba5b15cf44d2f67861852287a3998c101072a7dfae20304508bf68cd728f27e2051271a16464f
+DIST brainworkshop-5_beta20200310.tar.gz 8001718 BLAKE2B ec3ef92d169956cb9334230e60b5e2c370154c11640daa3201b56654cd402ecba37d3bd1e3ff95339b351bd8984fb84a6bab72bf9f752175d0fb3ae1d989ba10 SHA512 f061ef005ac5f1c8b3fe1f23d847852730a9402bfa6be83946b2cd1f3a352a7a6eb67b73c81506f082fe2ae590598435736a36c87513a11b87f3e8237a296669
similarity index 61%
rename from games-puzzle/brainworkshop/brainworkshop-5_beta20180712.ebuild
rename to games-puzzle/brainworkshop/brainworkshop-5_beta20200310.ebuild
index 2783a034d990a093cd16f40dbdad981a09b5c8ec..145e5021f07f4179da55200ce70d0840f8ada874 100644 (file)
@@ -1,12 +1,13 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-PYTHON_COMPAT=( python3_6 )
-inherit eutils gnome2-utils python-r1
+PYTHON_COMPAT=( python3_{7,8} )
 
-COMMIT="c5343cb3d828e8181ffff8249f683fce2fcca6db"
+inherit desktop eutils python-single-r1 xdg
+
+COMMIT="ea817f7e163c4fb07a60b2066c694cba92d23818"
 DESCRIPTION="Short-term-memory training N-Back game"
 HOMEPAGE="https://github.com/samcv/brainworkshop"
 SRC_URI="https://github.com/samcv/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
@@ -15,9 +16,16 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-RDEPEND="${PYTHON_DEPS}
-       || ( >=dev-python/pyglet-1.1.4[${PYTHON_USEDEP},openal]
-                >=dev-python/pyglet-1.1.4[${PYTHON_USEDEP},alsa] )"
+RDEPEND="
+       ${PYTHON_DEPS}
+       $(python_gen_cond_dep '
+               >=dev-python/pyglet-1.5[${PYTHON_USEDEP},sound]
+       ')
+"
+
+BDEPEND="
+       ${PYTHON_DEPS}
+"
 
 S="${WORKDIR}/${PN}-${COMMIT}"
 
@@ -35,8 +43,7 @@ src_prepare() {
 }
 
 src_install() {
-       newbin ${PN}.pyw ${PN}
-       python_replicate_script "${ED}"usr/bin/${PN}
+       python_newscript ${PN}.pyw ${PN}
 
        insinto /usr/share/${PN}
        doins -r res/*
@@ -46,7 +53,3 @@ src_install() {
        newicon -s 48 res/misc/brain/brain.png ${PN}.png
        make_desktop_entry ${PN} "Brain Workshop"
 }
-
-pkg_preinst() { gnome2_icon_savelist; }
-pkg_postinst() { gnome2_icon_cache_update; }
-pkg_postrm() { gnome2_icon_cache_update; }
index 0ecf099ff6b977d133ce1c9cf2195d909a4e69d0..5e720d5cf8baffd59705790edbaeba2319778368 100644 (file)
@@ -1,15 +1,6 @@
 diff -Naur a/brainworkshop.pyw b/brainworkshop.pyw
 --- a/brainworkshop.pyw        2018-07-14 19:11:17.536581902 +0100
 +++ b/brainworkshop.pyw        2018-07-14 19:12:07.582695292 +0100
-@@ -41,7 +41,7 @@
-             error_msg("Expected an argument following %s" % arg)
-             exit(1)
--import random, os, sys, imp, socket, webbrowser, time, math, traceback, datetime
-+import random, os, sys, imp, socket, webbrowser, time, math, traceback, datetime, errno
- if sys.version_info >= (3,0):
-     import urllib.request, configparser as ConfigParser
-     from io import StringIO
 @@ -173,7 +173,7 @@
      if rtrn:
          return rtrn
@@ -19,20 +10,3 @@ diff -Naur a/brainworkshop.pyw b/brainworkshop.pyw
  def edit_config_ini():
      if sys.platform == 'win32':
          cmd = 'notepad'
-@@ -823,7 +823,15 @@
-         f = open(os.path.join(get_data_dir(), STATS_BINARY), 'w')
-         f.close()
--check_and_move_user_data()
-+try:
-+    path = get_data_dir()
-+    os.makedirs(path)
-+except OSError as exc:
-+    if exc.errno == errno.EEXIST and os.path.isdir(path):
-+        pass
-+    else:
-+        raise
-+
- load_last_user('defaults.ini')
- cfg = parse_config(CONFIGFILE)