public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-puzzle/brainworkshop/, games-puzzle/brainworkshop/files/
@ 2018-07-24 21:38 James Le Cuirot
  0 siblings, 0 replies; 3+ messages in thread
From: James Le Cuirot @ 2018-07-24 21:38 UTC (permalink / raw
  To: gentoo-commits

commit:     7f87002c10580ef0fcee3b71dffffa31db296250
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 24 21:37:10 2018 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jul 24 21:37:10 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f87002c

games-puzzle/brainworkshop: Drop old and broken 4.8.4

Package-Manager: Portage-2.3.43, Repoman-2.3.10

 games-puzzle/brainworkshop/Manifest                |  1 -
 .../brainworkshop/brainworkshop-4.8.4.ebuild       | 59 ----------------------
 .../files/brainworkshop-4.8.4-fix-paths.patch      | 15 ------
 3 files changed, 75 deletions(-)

diff --git a/games-puzzle/brainworkshop/Manifest b/games-puzzle/brainworkshop/Manifest
index 8f3e9e3b8c3..347f37c3823 100644
--- a/games-puzzle/brainworkshop/Manifest
+++ b/games-puzzle/brainworkshop/Manifest
@@ -1,2 +1 @@
-DIST brainworkshop-4.8.4.zip 9373980 BLAKE2B 85af1f17755f0007f01c1684f4d746de6bab6580ed29c717e9462f8dd57115ce8ed7d2d61a411523e2d92191abe5a49d29b2598e937b014e68b3e1cb9ac3e059 SHA512 d3819036fef98fab9a89637ba01b2d844146babc7cb34b6ec6f4a589c18a7532fd23cf083c867ea1c917df9d7a6507ab51a5942e745d3ab9d01d938812486936
 DIST brainworkshop-5_beta20180712.tar.gz 8001699 BLAKE2B 0bf6114d89ab39a79e7659f6fb76d1e1cb21624a014381fc73bf6ca56f2bd721c192bc89e42b147666dd6fb7d0f6df12c60230dc3bf17b75d68f3fba1ea58b99 SHA512 5733daefd79f77c0eadcf7cec03d1cd3658ca8f79b23705f763ba5b15cf44d2f67861852287a3998c101072a7dfae20304508bf68cd728f27e2051271a16464f

diff --git a/games-puzzle/brainworkshop/brainworkshop-4.8.4.ebuild b/games-puzzle/brainworkshop/brainworkshop-4.8.4.ebuild
deleted file mode 100644
index e454d7dd344..00000000000
--- a/games-puzzle/brainworkshop/brainworkshop-4.8.4.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-inherit eutils gnome2-utils python-r1 games
-
-DESCRIPTION="Short-term-memory training N-Back game"
-HOMEPAGE="http://brainworkshop.sourceforge.net/"
-SRC_URI="mirror://sourceforge/brainworkshop/${P}.zip"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="${PYTHON_DEPS}
-	dev-python/pyopenal
-	|| ( >=dev-python/pyglet-1.1.4[openal]
-		 >=dev-python/pyglet-1.1.4[alsa] )"
-DEPEND="app-arch/unzip"
-
-S=${WORKDIR}/${PN}
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-fix-paths.patch
-	edos2unix ${PN}.pyw
-
-	sed -i \
-		-e 's#@GENTOO_DATADIR@#'${GAMES_DATADIR}'#' \
-		${PN}.pyw || die
-}
-
-src_install() {
-	newgamesbin ${PN}.pyw ${PN}
-	python_replicate_script "${D}${GAMES_BINDIR}"/${PN}
-	insinto "${GAMES_DATADIR}"/${PN}
-	doins -r res/*
-	dodoc Readme.txt data/Readme-stats.txt
-	newicon -s 48 res/misc/brain/brain.png ${PN}.png
-	make_desktop_entry ${PN} "Brain Workshop"
-	prepgamesdirs
-}
-
-pkg_preinst() {
-	games_pkg_preinst
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	games_pkg_postinst
-	gnome2_icon_cache_update
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-}

diff --git a/games-puzzle/brainworkshop/files/brainworkshop-4.8.4-fix-paths.patch b/games-puzzle/brainworkshop/files/brainworkshop-4.8.4-fix-paths.patch
deleted file mode 100644
index 061187b7cfe..00000000000
--- a/games-puzzle/brainworkshop/files/brainworkshop-4.8.4-fix-paths.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/brainworkshop.pyw	2010-10-15 19:06:16.529006906 +0200
-+++ b/brainworkshop.pyw	2010-10-15 19:08:17.095632136 +0200
-@@ -35,8 +35,10 @@
- NOVBO = True
- VSYNC = False
- DEBUG = False
--FOLDER_RES = 'res'
--FOLDER_DATA = 'data'
-+FOLDER_RES = '@GENTOO_DATADIR@/brainworkshop'
-+FOLDER_DATA = os.path.expanduser('~/.brainworkshop')
-+if not os.path.isdir(FOLDER_DATA):
-+	os.mkdir(FOLDER_DATA)
- CONFIGFILE = 'config.ini'
- STATS_BINARY = 'logfile.dat'
- USER = 'default'


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-puzzle/brainworkshop/, games-puzzle/brainworkshop/files/
@ 2020-04-20  8:36 James Le Cuirot
  0 siblings, 0 replies; 3+ messages in thread
From: James Le Cuirot @ 2020-04-20  8:36 UTC (permalink / raw
  To: gentoo-commits

commit:     d35c389cb69b52580d0fde2920e558c236d18d3c
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 20 08:33:06 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Apr 20 08:36:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d35c389c

games-puzzle/brainworkshop: Bump to 20200310 snapshot, drop old

Closes: https://bugs.gentoo.org/718314
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-puzzle/brainworkshop/Manifest                |  2 +-
 ....ebuild => brainworkshop-5_beta20200310.ebuild} | 31 ++++++++++++----------
 .../files/brainworkshop-5-fix-paths.patch          | 26 ------------------
 3 files changed, 18 insertions(+), 41 deletions(-)

diff --git a/games-puzzle/brainworkshop/Manifest b/games-puzzle/brainworkshop/Manifest
index 347f37c3823..c74a1f08c48 100644
--- a/games-puzzle/brainworkshop/Manifest
+++ b/games-puzzle/brainworkshop/Manifest
@@ -1 +1 @@
-DIST brainworkshop-5_beta20180712.tar.gz 8001699 BLAKE2B 0bf6114d89ab39a79e7659f6fb76d1e1cb21624a014381fc73bf6ca56f2bd721c192bc89e42b147666dd6fb7d0f6df12c60230dc3bf17b75d68f3fba1ea58b99 SHA512 5733daefd79f77c0eadcf7cec03d1cd3658ca8f79b23705f763ba5b15cf44d2f67861852287a3998c101072a7dfae20304508bf68cd728f27e2051271a16464f
+DIST brainworkshop-5_beta20200310.tar.gz 8001718 BLAKE2B ec3ef92d169956cb9334230e60b5e2c370154c11640daa3201b56654cd402ecba37d3bd1e3ff95339b351bd8984fb84a6bab72bf9f752175d0fb3ae1d989ba10 SHA512 f061ef005ac5f1c8b3fe1f23d847852730a9402bfa6be83946b2cd1f3a352a7a6eb67b73c81506f082fe2ae590598435736a36c87513a11b87f3e8237a296669

diff --git a/games-puzzle/brainworkshop/brainworkshop-5_beta20180712.ebuild b/games-puzzle/brainworkshop/brainworkshop-5_beta20200310.ebuild
similarity index 61%
rename from games-puzzle/brainworkshop/brainworkshop-5_beta20180712.ebuild
rename to games-puzzle/brainworkshop/brainworkshop-5_beta20200310.ebuild
index 2783a034d99..145e5021f07 100644
--- a/games-puzzle/brainworkshop/brainworkshop-5_beta20180712.ebuild
+++ b/games-puzzle/brainworkshop/brainworkshop-5_beta20200310.ebuild
@@ -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; }

diff --git a/games-puzzle/brainworkshop/files/brainworkshop-5-fix-paths.patch b/games-puzzle/brainworkshop/files/brainworkshop-5-fix-paths.patch
index 0ecf099ff6b..5e720d5cf8b 100644
--- a/games-puzzle/brainworkshop/files/brainworkshop-5-fix-paths.patch
+++ b/games-puzzle/brainworkshop/files/brainworkshop-5-fix-paths.patch
@@ -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)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-puzzle/brainworkshop/, games-puzzle/brainworkshop/files/
@ 2021-06-02  8:53 Ionen Wolkens
  0 siblings, 0 replies; 3+ messages in thread
From: Ionen Wolkens @ 2021-06-02  8:53 UTC (permalink / raw
  To: gentoo-commits

commit:     a32137f8745defaf706509cc984c3beccdf6e310
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  2 08:30:21 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jun  2 08:50:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a32137f8

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 <AT> gentoo.org>

 games-puzzle/brainworkshop/Manifest                |  1 +
 .../brainworkshop/brainworkshop-5.0.2.ebuild       | 48 ++++++++++++++++++++++
 .../files/brainworkshop-5.0.2-datadir.patch        |  7 ++++
 3 files changed, 56 insertions(+)

diff --git a/games-puzzle/brainworkshop/Manifest b/games-puzzle/brainworkshop/Manifest
index c74a1f08c48..880950cbd91 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 00000000000..aeddd40b56c
--- /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 00000000000..1b54317b29c
--- /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():


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-02  8:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20  8:36 [gentoo-commits] repo/gentoo:master commit in: games-puzzle/brainworkshop/, games-puzzle/brainworkshop/files/ James Le Cuirot
  -- strict thread matches above, loose matches on Subject: below --
2021-06-02  8:53 Ionen Wolkens
2018-07-24 21:38 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox