summaryrefslogtreecommitdiff
path: root/games-puzzle/4stattack
diff options
context:
space:
mode:
Diffstat (limited to 'games-puzzle/4stattack')
-rw-r--r--games-puzzle/4stattack/4stattack-2.1.4-r1.ebuild45
-rw-r--r--games-puzzle/4stattack/Manifest4
-rw-r--r--games-puzzle/4stattack/files/4stattack-2.1.4-gentoo.diff21
-rw-r--r--games-puzzle/4stattack/metadata.xml11
4 files changed, 81 insertions, 0 deletions
diff --git a/games-puzzle/4stattack/4stattack-2.1.4-r1.ebuild b/games-puzzle/4stattack/4stattack-2.1.4-r1.ebuild
new file mode 100644
index 000000000000..d04ec26a8f3f
--- /dev/null
+++ b/games-puzzle/4stattack/4stattack-2.1.4-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils python-single-r1
+
+DESCRIPTION="Connect-4 game, single or network multiplayer"
+HOMEPAGE="http://forcedattack.sourceforge.net/"
+SRC_URI="mirror://sourceforge/forcedattack/4stAttack-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND=""
+RDEPEND="${PYTHON_DEPS}
+ dev-python/pygame[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}/4stAttack-${PV}"
+
+src_prepare() {
+ default
+
+ # move the doc files aside so it's easier to install the game files
+ mv README.txt credits.txt changelog.txt ..
+ rm -f GPL version~
+
+ # This patch makes the game save settings in $HOME
+ eapply "${FILESDIR}"/${P}-gentoo.diff
+}
+
+src_install() {
+ make_wrapper ${PN} "python2 ${PN}.py" /usr/share/${PN}
+ insinto /usr/share/${PN}
+ doins -r *
+ newicon kde/icons/64x64/forcedattack2.png ${PN}.png
+ make_desktop_entry ${PN} "4st Attack 2"
+ dodoc ../{README.txt,credits.txt,changelog.txt}
+}
diff --git a/games-puzzle/4stattack/Manifest b/games-puzzle/4stattack/Manifest
new file mode 100644
index 000000000000..d16e4839ca28
--- /dev/null
+++ b/games-puzzle/4stattack/Manifest
@@ -0,0 +1,4 @@
+AUX 4stattack-2.1.4-gentoo.diff 513 BLAKE2B 9cf9396347fb40d23bf89516653eaca79af24e20137228021a02679dd965a7d6a9db42f4c669cbbfe8da773fa279a3509a7ae3a55b17b57e6ff44d30b0b8d153 SHA512 def42479c82d4a5bce910028b5726602b2d07b97afdabf2cb464ae24bc8d081136c81e437fa8d997e171bda14a0af91e14b8d2f1f1b12d5264ebbb1e96fa727d
+DIST 4stAttack-2.1.4.tar.gz 1828247 BLAKE2B 82575adaa8994939f978a0ae796c6a57d64eacf715465ee3ea9614dda28b1543c199d2776408b989e82bf9e4b28cd90cf7b57dc7c21be1329aac2295043f8a57 SHA512 4819c0915bfe47bb965ea39d49fa007fb18cfa965b15e5e72a4b0ac3be8a03c616d9438c8dedd960ee257e44b48f98f75ced6bed5bfc77f3366328c797b30f3c
+EBUILD 4stattack-2.1.4-r1.ebuild 1070 BLAKE2B 27bc1a5465bf2191adbf28c2ff6ce29bbfda912e8f68ba594898c4e8c116498d9bcffc65b015b5b167ac4b826976436b5ec48258858df2cd460c1e987f4cb7bc SHA512 dfbad8200b667ac60167305922db97fc1730072f37c059a3857cc0d70371498e8dd76b3641b6e1d5eb3d8d5f85fece3a34ff90045cb92fe67701545b8e7c405a
+MISC metadata.xml 335 BLAKE2B 558a9365482fa1fec17fec2f638b22f02bbcdfa90529f0bc1524c611f7f90e192583f344105a9e619b009278f130e0c58a13a74d68860760486486aa84606a74 SHA512 eff7c6df19ba9adc535fcc0e33216dcbdad8a04a8a09544263c120ee6185842709c0d08065b64d89be09c37afa270f6736216e78ef779e3a13ac8b82ca0fa299
diff --git a/games-puzzle/4stattack/files/4stattack-2.1.4-gentoo.diff b/games-puzzle/4stattack/files/4stattack-2.1.4-gentoo.diff
new file mode 100644
index 000000000000..9cb5be53b793
--- /dev/null
+++ b/games-puzzle/4stattack/files/4stattack-2.1.4-gentoo.diff
@@ -0,0 +1,21 @@
+--- a/4stattack.py
++++ b/4stattack.py
+@@ -28,6 +28,9 @@
+ images = None
+ screen = None
+
++f = os.path.expanduser('~/.4stattackrc')
++if not os.path.exists(f):
++ os.system('cp settings.ini %s' % f)
+
+ def playMusic(datadir):
+ if pygame.mixer.get_init():
+@@ -78,7 +81,7 @@
+ if options.has_key('-ini'):
+ ini_settings = IniSettings(options['-ini'])
+ else:
+- ini_settings = IniSettings('settings.ini')
++ ini_settings = IniSettings(os.path.expanduser('~/.4stattackrc'))
+
+ settings = ini_settings.settings
+
diff --git a/games-puzzle/4stattack/metadata.xml b/games-puzzle/4stattack/metadata.xml
new file mode 100644
index 000000000000..ddef1505ee47
--- /dev/null
+++ b/games-puzzle/4stattack/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">forcedattack</remote-id>
+ </upstream>
+</pkgmetadata>