diff options
Diffstat (limited to 'games-puzzle/brainworkshop')
-rw-r--r-- | games-puzzle/brainworkshop/Manifest | 4 | ||||
-rw-r--r-- | games-puzzle/brainworkshop/brainworkshop-4.8.4.ebuild | 59 | ||||
-rw-r--r-- | games-puzzle/brainworkshop/files/brainworkshop-4.8.4-fix-paths.patch | 15 | ||||
-rw-r--r-- | games-puzzle/brainworkshop/metadata.xml | 11 |
4 files changed, 89 insertions, 0 deletions
diff --git a/games-puzzle/brainworkshop/Manifest b/games-puzzle/brainworkshop/Manifest new file mode 100644 index 000000000000..02da8edfd58c --- /dev/null +++ b/games-puzzle/brainworkshop/Manifest @@ -0,0 +1,4 @@ +AUX brainworkshop-4.8.4-fix-paths.patch 473 BLAKE2B 703ef1f87fe646b361fb9cb4e783cb33ebe1338a88c5c3cd464675a3a39cda954f7ac7396a3e6844bbce78d93d7d83f7f87a66e971ddee8feee0176e8660a5fb SHA512 858e837e001db04efd9a3c420860821e02ca9b7ef7197a8fe69221d0135f11a05cb6f2f9b4c19cd9eeec84c84ec5842c7e8126f08dc94f9ff79569f580f9d515 +DIST brainworkshop-4.8.4.zip 9373980 BLAKE2B 85af1f17755f0007f01c1684f4d746de6bab6580ed29c717e9462f8dd57115ce8ed7d2d61a411523e2d92191abe5a49d29b2598e937b014e68b3e1cb9ac3e059 SHA512 d3819036fef98fab9a89637ba01b2d844146babc7cb34b6ec6f4a589c18a7532fd23cf083c867ea1c917df9d7a6507ab51a5942e745d3ab9d01d938812486936 +EBUILD brainworkshop-4.8.4.ebuild 1238 BLAKE2B 2eb5ac9efd7a04445b1893ba33e3e7efc29777079c048a93f8827238964576b46724acb6f5edc09a7ec5c9dabf2cc4f9a372fac5fd785ec59eb9f6da71656974 SHA512 2a0b06c445c5da235da3da51672b2377c0a94b58ff1d7b2299f7763d8ed3f498a6593747b2203f8757319e27ad5230fd56670b11c0070fe013c68074e4ec1d05 +MISC metadata.xml 336 BLAKE2B 23696671d75d4a994a40ad18a57fdf4551932540ab62d153cfa0d41dafb59bec11466e0d8c14b3ff25ca1ed085e71f86d74aea672b56d9c53fa01d8d35243b7e SHA512 75e98aaef9436c2e488b304a19cfcaa1659748c97209ad217708046516aa4a76d9ac18c3c4762db08c496efe21a7ed5006bd4b2100989adb2b7fa0b9a8372b12 diff --git a/games-puzzle/brainworkshop/brainworkshop-4.8.4.ebuild b/games-puzzle/brainworkshop/brainworkshop-4.8.4.ebuild new file mode 100644 index 000000000000..e454d7dd3448 --- /dev/null +++ b/games-puzzle/brainworkshop/brainworkshop-4.8.4.ebuild @@ -0,0 +1,59 @@ +# 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 new file mode 100644 index 000000000000..061187b7cfe0 --- /dev/null +++ b/games-puzzle/brainworkshop/files/brainworkshop-4.8.4-fix-paths.patch @@ -0,0 +1,15 @@ +--- 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'
diff --git a/games-puzzle/brainworkshop/metadata.xml b/games-puzzle/brainworkshop/metadata.xml new file mode 100644 index 000000000000..c0fd59a21391 --- /dev/null +++ b/games-puzzle/brainworkshop/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">brainworkshop</remote-id> + </upstream> +</pkgmetadata> |