aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2008-10-31 12:37:08 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2008-10-31 12:37:08 +0000
commitbdad8b88ec4583cc8b9366cffa9ecc6879329259 (patch)
tree9497c06b26a08867c7373569725af1f2bf29551b /games
parent3aca875aca523f2f22a01a46ba13713aa4eefe33 (diff)
downloadports-bdad8b88ec4583cc8b9366cffa9ecc6879329259.tar.gz
ports-bdad8b88ec4583cc8b9366cffa9ecc6879329259.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/brainworkshop/Makefile37
-rw-r--r--games/brainworkshop/distinfo3
-rw-r--r--games/brainworkshop/files/patch-brainworkshop.pyw41
-rw-r--r--games/brainworkshop/pkg-descr18
-rw-r--r--games/brainworkshop/pkg-plist101
6 files changed, 201 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 778e6c0c4450..955d5b7c93c5 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -95,6 +95,7 @@
SUBDIR += bomns
SUBDIR += boswars
SUBDIR += braincurses
+ SUBDIR += brainworkshop
SUBDIR += brickshooter
SUBDIR += briquolo
SUBDIR += brutalchess
diff --git a/games/brainworkshop/Makefile b/games/brainworkshop/Makefile
new file mode 100644
index 000000000000..0cc6d5c398fa
--- /dev/null
+++ b/games/brainworkshop/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: brainworkshop
+# Date created: 27 Oct 2008
+# Whom: Dmitry Marakasov <amdmi3@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= brainworkshop
+PORTVERSION= 4.1
+CATEGORIES= games
+MASTER_SITES= SF
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Free open-source version of the Dual N-Back mental exercise
+
+RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyglet/__init__.py:${PORTSDIR}/graphics/py-pyglet
+
+USE_ZIP= yes
+NO_BUILD= yes
+USE_DOS2UNIX= brainworkshop.pyw
+
+USE_PYTHON= yes
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+post-patch:
+ @${REINPLACE_CMD} -e '/^FOLDER_RES = / s|res|${DATADIR}|' \
+ ${WRKSRC}/brainworkshop.pyw
+ @${REINPLACE_CMD} -e '/^FOLDER_DATA = / s|.data.|os.environ["HOME"]+"/.brainworkshop"|' \
+ ${WRKSRC}/brainworkshop.pyw
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/brainworkshop.pyw ${PREFIX}/bin/${PORTNAME}
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/res/* ${DATADIR}/
+
+.include <bsd.port.mk>
diff --git a/games/brainworkshop/distinfo b/games/brainworkshop/distinfo
new file mode 100644
index 000000000000..67ee20846f26
--- /dev/null
+++ b/games/brainworkshop/distinfo
@@ -0,0 +1,3 @@
+MD5 (brainworkshop-4.1.zip) = 1d9630bc40af821740ba1a4b1bf05f57
+SHA256 (brainworkshop-4.1.zip) = 4829186e48d8fa8e75b46f7cd22d62c3b6456807b6f445b6a758d3961c4a9048
+SIZE (brainworkshop-4.1.zip) = 9222360
diff --git a/games/brainworkshop/files/patch-brainworkshop.pyw b/games/brainworkshop/files/patch-brainworkshop.pyw
new file mode 100644
index 000000000000..cf1fb55a20ae
--- /dev/null
+++ b/games/brainworkshop/files/patch-brainworkshop.pyw
@@ -0,0 +1,41 @@
+--- brainworkshop.pyw.orig 2008-10-29 02:52:28.000000000 +0300
++++ brainworkshop.pyw 2008-10-29 02:53:14.000000000 +0300
+@@ -52,9 +52,7 @@
+ 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 '/'
+
+ CONFIGFILE_DEFAULT_CONTENTS = """
+ ######################################################################
+@@ -242,6 +240,9 @@
+ try: CONFIGFILE = sys.argv[sys.argv.index('--configfile') + 1]
+ except: pass
+
++if not os.path.exists(FOLDER_DATA):
++ os.mkdir(FOLDER_DATA)
++
+ if not os.path.isfile(os.path.join(get_main_dir(), FOLDER_DATA, CONFIGFILE)):
+ newconfigfile = open(os.path.join(os.path.join(get_main_dir(), FOLDER_DATA, CONFIGFILE)), 'w')
+ newconfigfile.write(CONFIGFILE_DEFAULT_CONTENTS)
+@@ -425,16 +426,7 @@
+ print >> sys.stderr, ''.join(str_list)
+ sys.exit(1)
+
+-try:
+- from pyglet.media import avbin
+-except:
+- USE_MUSIC = False
+- str_list = []
+- str_list.append('\nAVBin not detected. Music disabled.\n')
+- str_list.append('Download AVBin from: http://code.google.com/p/avbin/\n\n')
+- str_list.append(str(sys.exc_info()))
+- #print >> sys.stderr, ''.join(str_list)
+- print ''.join(str_list)
++USE_MUSIC = False
+
+ # Initialize resources (sounds and images)
+ #
diff --git a/games/brainworkshop/pkg-descr b/games/brainworkshop/pkg-descr
new file mode 100644
index 000000000000..afb88e27f0c2
--- /dev/null
+++ b/games/brainworkshop/pkg-descr
@@ -0,0 +1,18 @@
+What if a simple mental exercise could improve your memory and
+intelligence?
+
+A recent study published in PNAS, an important scientific journal,
+shows that a particular memory task called Dual N-Back actually
+improves working memory (short term memory) and fluid intelligence.
+This finding is important because fluid intelligence was previously
+thought to be unchangeable. The game involves remembering a sequence
+of spoken letters and a sequence of positions of a square at the
+same time.
+
+In addition to its ability to closely replicate the conditions of
+the original study by Jaeggi et al. (2008), Brain Workshop includes
+optional extended game modes such as Triple N-Back and Arithmetic
+N-Back. It also includes features such as statistics tracking,
+graphs and easy configurability.
+
+WWW: http://brainworkshop.sourceforge.net/
diff --git a/games/brainworkshop/pkg-plist b/games/brainworkshop/pkg-plist
new file mode 100644
index 000000000000..977307352e20
--- /dev/null
+++ b/games/brainworkshop/pkg-plist
@@ -0,0 +1,101 @@
+bin/brainworkshop
+%%DATADIR%%/applause.wav
+%%DATADIR%%/areyouawake.ogg
+%%DATADIR%%/autumnleaves.ogg
+%%DATADIR%%/bbydhyonchord.ogg
+%%DATADIR%%/biggeorge.ogg
+%%DATADIR%%/blueberryrhyme.ogg
+%%DATADIR%%/bluerondo.ogg
+%%DATADIR%%/brain.png
+%%DATADIR%%/brandenburg.ogg
+%%DATADIR%%/c.wav
+%%DATADIR%%/caribe.ogg
+%%DATADIR%%/cornerpocket.ogg
+%%DATADIR%%/dinah.ogg
+%%DATADIR%%/elubechango.ogg
+%%DATADIR%%/frevorasgado.ogg
+%%DATADIR%%/glassworks.ogg
+%%DATADIR%%/h.wav
+%%DATADIR%%/harvestbreed.ogg
+%%DATADIR%%/joyfulnoise.ogg
+%%DATADIR%%/k.wav
+%%DATADIR%%/l.wav
+%%DATADIR%%/linusandlucy.ogg
+%%DATADIR%%/lithia.ogg
+%%DATADIR%%/mamaguela.ogg
+%%DATADIR%%/nato_LICENSE.txt
+%%DATADIR%%/nato_a.wav
+%%DATADIR%%/nato_b.wav
+%%DATADIR%%/nato_c.wav
+%%DATADIR%%/nato_d.wav
+%%DATADIR%%/nato_e.wav
+%%DATADIR%%/nato_f.wav
+%%DATADIR%%/nato_g.wav
+%%DATADIR%%/nato_h.wav
+%%DATADIR%%/nato_i.wav
+%%DATADIR%%/nato_j.wav
+%%DATADIR%%/nato_k.wav
+%%DATADIR%%/nato_l.wav
+%%DATADIR%%/nato_m.wav
+%%DATADIR%%/nato_n.wav
+%%DATADIR%%/nato_o.wav
+%%DATADIR%%/nato_p.wav
+%%DATADIR%%/nato_q.wav
+%%DATADIR%%/nato_r.wav
+%%DATADIR%%/nato_s.wav
+%%DATADIR%%/nato_t.wav
+%%DATADIR%%/nato_u.wav
+%%DATADIR%%/nato_v.wav
+%%DATADIR%%/nato_w.wav
+%%DATADIR%%/nato_x.wav
+%%DATADIR%%/nato_y.wav
+%%DATADIR%%/nato_z.wav
+%%DATADIR%%/number-0.wav
+%%DATADIR%%/number-1.wav
+%%DATADIR%%/number-10.wav
+%%DATADIR%%/number-11.wav
+%%DATADIR%%/number-12.wav
+%%DATADIR%%/number-13.wav
+%%DATADIR%%/number-2.wav
+%%DATADIR%%/number-3.wav
+%%DATADIR%%/number-4.wav
+%%DATADIR%%/number-5.wav
+%%DATADIR%%/number-6.wav
+%%DATADIR%%/number-7.wav
+%%DATADIR%%/number-8.wav
+%%DATADIR%%/number-9.wav
+%%DATADIR%%/onamistynight.ogg
+%%DATADIR%%/operation_divide.wav
+%%DATADIR%%/operation_minus.wav
+%%DATADIR%%/operation_plus.wav
+%%DATADIR%%/operation_times.wav
+%%DATADIR%%/perisscope.ogg
+%%DATADIR%%/piano-1.wav
+%%DATADIR%%/piano-2.wav
+%%DATADIR%%/piano-3.wav
+%%DATADIR%%/piano-4.wav
+%%DATADIR%%/piano-5.wav
+%%DATADIR%%/piano-6.wav
+%%DATADIR%%/piano-7.wav
+%%DATADIR%%/piano-8.wav
+%%DATADIR%%/q.wav
+%%DATADIR%%/quartetno1.ogg
+%%DATADIR%%/queenbee.ogg
+%%DATADIR%%/quieroserpoeta.ogg
+%%DATADIR%%/r.wav
+%%DATADIR%%/s.wav
+%%DATADIR%%/sarahmencken.ogg
+%%DATADIR%%/spr_square_blue.png
+%%DATADIR%%/spr_square_cyan.png
+%%DATADIR%%/spr_square_green.png
+%%DATADIR%%/spr_square_grey.png
+%%DATADIR%%/spr_square_magenta.png
+%%DATADIR%%/spr_square_red.png
+%%DATADIR%%/spr_square_white.png
+%%DATADIR%%/spr_square_yellow.png
+%%DATADIR%%/stlouisblues.ogg
+%%DATADIR%%/streetlife.ogg
+%%DATADIR%%/suspensionbridge.ogg
+%%DATADIR%%/t.wav
+%%DATADIR%%/timbacubana.ogg
+@dirrm %%DATADIR%%