aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-03-16 17:24:14 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-03-16 20:33:11 +0000
commitb3eaf193ab33ffd43c8a1d6c3338f6b3049ba933 (patch)
tree5f4ea2ea508de9e0d1989b05ce0ba8b27d2d0669
parent5dfe8ca053809210c6e865515ee9d31bb1a3f446 (diff)
downloadports-b3eaf193ab33ffd43c8a1d6c3338f6b3049ba933.tar.gz
ports-b3eaf193ab33ffd43c8a1d6c3338f6b3049ba933.zip
games/brainworkshop: update 5.0.git20191222 → 5.0.2
- Switch to latest pyglet
-rw-r--r--games/brainworkshop/Makefile15
-rw-r--r--games/brainworkshop/distinfo6
-rw-r--r--games/brainworkshop/files/patch-brainworkshop.py39
-rw-r--r--games/brainworkshop/files/patch-brainworkshop.pyw25
4 files changed, 49 insertions, 36 deletions
diff --git a/games/brainworkshop/Makefile b/games/brainworkshop/Makefile
index 96f8dc0a4ece..66d1d11f16a2 100644
--- a/games/brainworkshop/Makefile
+++ b/games/brainworkshop/Makefile
@@ -1,6 +1,6 @@
PORTNAME= brainworkshop
-PORTVERSION= 5.0.git20191222
-PORTREVISION= 1
+DISTVERSIONPREFIX= v
+DISTVERSION= 5.0.2
CATEGORIES= games python
MAINTAINER= amdmi3@FreeBSD.org
@@ -8,14 +8,13 @@ COMMENT= Dual N-Back mental exercise
LICENSE= GPLv1+ # version not specified
-RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyglet/__init__.py:graphics/py-pyglet150@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyglet/__init__.py:graphics/py-pyglet@${PY_FLAVOR}
USE_GITHUB= yes
-GH_ACCOUNT= samcv
-GH_TAGNAME= f1e28d0
+GH_ACCOUNT= brain-workshop
USES= shebangfix python:run
-SHEBANG_FILES= brainworkshop.pyw
+SHEBANG_FILES= brainworkshop.py
NO_BUILD= yes
NO_ARCH= yes
@@ -33,10 +32,10 @@ DESKTOP_ENTRIES="Brain Workshop" \
OPTIONS_DEFINE= DOCS
post-patch:
- @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/brainworkshop.pyw
+ @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/brainworkshop.py
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/brainworkshop.pyw ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ ${INSTALL_SCRIPT} ${WRKSRC}/brainworkshop.py ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@cd ${WRKSRC} && ${COPYTREE_SHARE} "res data" ${STAGEDIR}${DATADIR}/
do-install-DOCS-on:
diff --git a/games/brainworkshop/distinfo b/games/brainworkshop/distinfo
index c6e5f24445e7..cc59e17f3886 100644
--- a/games/brainworkshop/distinfo
+++ b/games/brainworkshop/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1576179420
-SHA256 (samcv-brainworkshop-5.0.git20191222-f1e28d0_GH0.tar.gz) = cca9dde0780f2ba9eb59a6b64f690a27a15ddca37c30ea46dc88b1e1edcd5c2d
-SIZE (samcv-brainworkshop-5.0.git20191222-f1e28d0_GH0.tar.gz) = 7998600
+TIMESTAMP = 1647450762
+SHA256 (brain-workshop-brainworkshop-v5.0.2_GH0.tar.gz) = 32e5e06908203d8de4353f8837830e583c2c94db4f6f33c33145b5875323561b
+SIZE (brain-workshop-brainworkshop-v5.0.2_GH0.tar.gz) = 7998711
diff --git a/games/brainworkshop/files/patch-brainworkshop.py b/games/brainworkshop/files/patch-brainworkshop.py
new file mode 100644
index 000000000000..236dd803a690
--- /dev/null
+++ b/games/brainworkshop/files/patch-brainworkshop.py
@@ -0,0 +1,39 @@
+--- brainworkshop.py.orig 2021-05-08 11:38:01 UTC
++++ brainworkshop.py
+@@ -41,7 +41,7 @@ def get_argv(arg):
+ error_msg("Expected an argument following %s" % arg)
+ exit(1)
+
+-import random, os, sys, imp, socket, webbrowser, time, math, traceback, datetime, errno
++import random, os, sys, socket, webbrowser, time, math, traceback, datetime, errno
+ if sys.version_info >= (3,0):
+ import urllib.request, configparser as ConfigParser
+ from io import StringIO
+@@ -56,9 +56,9 @@ from datetime import date
+ import gettext
+ if sys.version_info >= (3,0):
+ # TODO check if this is right
+- gettext.install('messages', localedir='res/i18n')
++ gettext.install('messages', localedir='%%DATADIR%%/res/i18n')
+ else:
+- gettext.install('messages', localedir='res/i18n', unicode=True)
++ gettext.install('messages', localedir='%%DATADIR%%/res/i18n', unicode=True)
+
+ # Clinical mode? Clinical mode sets cfg.JAEGGI_MODE = True, enforces a minimal user
+ # interface, and saves results into a binary file (default 'logfile.dat') which
+@@ -137,14 +137,8 @@ def get_pyglet_media_Player():
+ return my_player
+
+ # some functions to assist in path determination
+-def main_is_frozen():
+- return (hasattr(sys, "frozen") or # new py2exe
+- hasattr(sys, "importers") # old py2exe
+- or imp.is_frozen("__main__")) # tools/freeze
+ def get_main_dir():
+- if main_is_frozen():
+- return os.path.dirname(sys.executable)
+- return sys.path[0]
++ return '%%DATADIR%%'
+
+ def get_settings_path(name):
+ '''Get a directory to save user preferences.
diff --git a/games/brainworkshop/files/patch-brainworkshop.pyw b/games/brainworkshop/files/patch-brainworkshop.pyw
deleted file mode 100644
index c907f03c726a..000000000000
--- a/games/brainworkshop/files/patch-brainworkshop.pyw
+++ /dev/null
@@ -1,25 +0,0 @@
---- brainworkshop.pyw.orig 2019-11-18 21:08:09 UTC
-+++ brainworkshop.pyw
-@@ -56,9 +56,9 @@ from datetime import date
- import gettext
- if sys.version_info >= (3,0):
- # TODO check if this is right
-- gettext.install('messages', localedir='res/i18n')
-+ gettext.install('messages', localedir='%%DATADIR%%/i18n')
- else:
-- gettext.install('messages', localedir='res/i18n', unicode=True)
-+ gettext.install('messages', localedir='%%DATADIR%%/i18n', unicode=True)
-
- # Clinical mode? Clinical mode sets cfg.JAEGGI_MODE = True, enforces a minimal user
- # interface, and saves results into a binary file (default 'logfile.dat') which
-@@ -142,9 +142,7 @@ def main_is_frozen():
- hasattr(sys, "importers") # old py2exe
- or imp.is_frozen("__main__")) # tools/freeze
- def get_main_dir():
-- if main_is_frozen():
-- return os.path.dirname(sys.executable)
-- return sys.path[0]
-+ return '%%DATADIR%%'
-
- def get_settings_path(name):
- '''Get a directory to save user preferences.