Date: Thu, 12 Dec 2019 19:59:17 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r519945 - in head/games/brainworkshop: . files Message-ID: <201912121959.xBCJxHiP017531@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Thu Dec 12 19:59:17 2019 New Revision: 519945 URL: https://svnweb.freebsd.org/changeset/ports/519945 Log: - Update to 5.0.git20191222 PR: 219955 Modified: head/games/brainworkshop/Makefile head/games/brainworkshop/distinfo head/games/brainworkshop/files/patch-brainworkshop.pyw head/games/brainworkshop/pkg-descr Modified: head/games/brainworkshop/Makefile ============================================================================== --- head/games/brainworkshop/Makefile Thu Dec 12 19:54:45 2019 (r519944) +++ head/games/brainworkshop/Makefile Thu Dec 12 19:59:17 2019 (r519945) @@ -2,43 +2,47 @@ # $FreeBSD$ PORTNAME= brainworkshop -PORTVERSION= 4.4 -PORTREVISION= 2 -CATEGORIES= games -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/Brain%20Workshop%20${PORTVERSION} +PORTVERSION= 5.0.git20191222 +CATEGORIES= games python MAINTAINER= amdmi3@FreeBSD.org -COMMENT= Free open-source version of the Dual N-Back mental exercise +COMMENT= Dual N-Back mental exercise +LICENSE= GPLv1+ # version not specified + RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyglet/__init__.py:graphics/py-pyglet@${PY_FLAVOR} -USES= dos2unix python:2.7,run shebangfix zip -NO_BUILD= yes -DOS2UNIX_FILES= brainworkshop.pyw +USE_GITHUB= yes +GH_ACCOUNT= samcv +GH_TAGNAME= f1e28d0 + +USES= shebangfix python:run SHEBANG_FILES= brainworkshop.pyw +NO_BUILD= yes +NO_ARCH= yes -WRKSRC= ${WRKDIR}/${PORTNAME} - -PORTSCOUT= skipv:4.22 - PLIST_FILES= bin/${PORTNAME} PORTDATA= * +PORTDOCS= * DESKTOP_ENTRIES="Brain Workshop" \ - "Dual N-Back mental exercise" \ - "${DATADIR}/brain.png" \ + "" \ + "${DATADIR}/res/misc/brain/brain.png" \ "brainworkshop" \ "Game;LogicGame;" \ false +OPTIONS_DEFINE= DOCS + post-patch: - @${REINPLACE_CMD} -e '/^FOLDER_RES = / s|res|${DATADIR}|; \ - /^FOLDER_DATA = / s|.data.|os.environ["HOME"]+"/.brainworkshop"|' \ - ${WRKSRC}/brainworkshop.pyw + @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/brainworkshop.pyw do-install: ${INSTALL_SCRIPT} ${WRKSRC}/brainworkshop.pyw ${STAGEDIR}${PREFIX}/bin/${PORTNAME} - ${MKDIR} ${STAGEDIR}${DATADIR} - ${INSTALL_DATA} ${WRKSRC}/res/* ${STAGEDIR}${DATADIR}/ + @cd ${WRKSRC} && ${COPYTREE_SHARE} "res data" ${STAGEDIR}${DATADIR}/ + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/Readme* ${WRKSRC}/data/Readme* ${STAGEDIR}${DOCSDIR}/ .include <bsd.port.mk> Modified: head/games/brainworkshop/distinfo ============================================================================== --- head/games/brainworkshop/distinfo Thu Dec 12 19:54:45 2019 (r519944) +++ head/games/brainworkshop/distinfo Thu Dec 12 19:59:17 2019 (r519945) @@ -1,2 +1,3 @@ -SHA256 (brainworkshop-4.4.zip) = f3bdee10499f02d8d3505690172bf540f9e70b32b9ae8117464a9b02a874b505 -SIZE (brainworkshop-4.4.zip) = 11829491 +TIMESTAMP = 1576179420 +SHA256 (samcv-brainworkshop-5.0.git20191222-f1e28d0_GH0.tar.gz) = cca9dde0780f2ba9eb59a6b64f690a27a15ddca37c30ea46dc88b1e1edcd5c2d +SIZE (samcv-brainworkshop-5.0.git20191222-f1e28d0_GH0.tar.gz) = 7998600 Modified: head/games/brainworkshop/files/patch-brainworkshop.pyw ============================================================================== --- head/games/brainworkshop/files/patch-brainworkshop.pyw Thu Dec 12 19:54:45 2019 (r519944) +++ head/games/brainworkshop/files/patch-brainworkshop.pyw Thu Dec 12 19:59:17 2019 (r519945) @@ -1,42 +1,25 @@ ---- brainworkshop.pyw.orig 2009-01-17 21:01:40.000000000 +0300 -+++ brainworkshop.pyw 2009-01-19 22:41:15.000000000 +0300 -@@ -49,9 +49,7 @@ +--- 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 '/' - def get_data_dir(): - try: - return sys.argv[sys.argv.index('--datadir') + 1] -@@ -355,6 +353,9 @@ - except: - pass +- return sys.path[0] ++ return '%%DATADIR%%' -+if not os.path.exists(FOLDER_DATA): -+ os.mkdir(FOLDER_DATA) -+ - if not os.path.isfile(os.path.join(get_data_dir(), CONFIGFILE)): - newconfigfile = open(os.path.join(os.path.join(get_data_dir(), CONFIGFILE)), 'w') - newconfigfile.write(CONFIGFILE_DEFAULT_CONTENTS) -@@ -643,17 +644,7 @@ - print >> sys.stderr, ''.join(str_list) - sys.exit(1) - --if USE_MUSIC: -- 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) - # + def get_settings_path(name): + '''Get a directory to save user preferences. Modified: head/games/brainworkshop/pkg-descr ============================================================================== --- head/games/brainworkshop/pkg-descr Thu Dec 12 19:54:45 2019 (r519944) +++ head/games/brainworkshop/pkg-descr Thu Dec 12 19:59:17 2019 (r519945) @@ -15,4 +15,4 @@ optional extended game modes such as Triple N-Back and N-Back. It also includes features such as statistics tracking, graphs and easy configurability. -WWW: http://brainworkshop.sourceforge.net/ +WWW: https://github.com/samcv/brainworkshop
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912121959.xBCJxHiP017531>