summaryrefslogtreecommitdiff
path: root/games-puzzle/monsterz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-puzzle/monsterz
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-puzzle/monsterz')
-rw-r--r--games-puzzle/monsterz/Manifest6
-rw-r--r--games-puzzle/monsterz/files/monsterz-0.7.1-64bit.patch26
-rw-r--r--games-puzzle/monsterz/files/monsterz-0.7.1-blit.patch32
-rw-r--r--games-puzzle/monsterz/files/monsterz-0.7.1-gentoo.patch20
-rw-r--r--games-puzzle/monsterz/metadata.xml8
-rw-r--r--games-puzzle/monsterz/monsterz-0.7.1-r4.ebuild47
6 files changed, 139 insertions, 0 deletions
diff --git a/games-puzzle/monsterz/Manifest b/games-puzzle/monsterz/Manifest
new file mode 100644
index 000000000000..7f42c1695386
--- /dev/null
+++ b/games-puzzle/monsterz/Manifest
@@ -0,0 +1,6 @@
+AUX monsterz-0.7.1-64bit.patch 1093 BLAKE2B a27d602e4087926e053abd4f1cefb22a88fa37f8a3a773e13ea2f5db0914d6589db5fb09c78551da2f6f5b78d5cfd6c46bf08b9d77e6cfed99a451ffb9311c24 SHA512 3098e5a287c2b3e5e415a06e9e671fb4e56ebd4405a4580c5bb3529c1708ada9efdb40b1369040c7dba50ee1e0c33b6f088da898a8eec7f2997e4d376b67dea4
+AUX monsterz-0.7.1-blit.patch 1298 BLAKE2B ef1c5961a0a1c48ab01a289f7504355b445beae6f7387f68a901b75d403c2422b53fd1c7a4923d954320de73555fd649ff913ddd68336fc1233f94655fb34b8b SHA512 682542801240d7b32497105774ed240b08eefd9a92dfd20caf66d00fb1d77ec563c97262ed323c96a71fa19e5c2f9a13cffd7a8698aae92b2dfd858d35d8ed98
+AUX monsterz-0.7.1-gentoo.patch 970 BLAKE2B 658224adbc150cf01dfe72a3f1ea5fd14d0122eb1ac3b55f1d52c1f89ecbefeafa88e3aff08d4d832f8b2b6b2922890514609652e0c8f3cee26889f66b0ca5bc SHA512 1dc1994cb03f794b9f015d8d812b8519c826b0a0d02ecb3a9f4bb0e25d69aeb8f3784dcf1fbc1624ca18f645b55e0889f0d2ce8f1339639e8ed55d305af0f3e1
+DIST monsterz-0.7.1.tar.gz 1879537 BLAKE2B e1ad9f17a64bcbb07005eb61d951dbf756997a6e6bd76c48d88bb634c9b3167c9fd41ef32032925b219153eb607dc238af76b44c3ef6c47aab753d59c61958e1 SHA512 62de125251a74e7ff237c90ad88e10a4953b8841251dfec45cc6b77f416677ef6d68cf4308c3190f65896b5bb1312934abd5e438f0341f08c02884585f0e4787
+EBUILD monsterz-0.7.1-r4.ebuild 1100 BLAKE2B 9eee9e6e0cb08ac23cc78abea1981877d017046ea3dbe3136bc3ac2ff1c6ce53752729a5b53ee2ca12bd6853dc930154954596621e2f6ce9f147f34a8a44a8ab SHA512 6d83c1ad052d362b6e364fec40eb321696e68a70fdeb2138018f1a316dd9c2d4b528bea8e54777022d50ab6ed82274af4d2106bba0ae634bce30b3995ad96808
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-puzzle/monsterz/files/monsterz-0.7.1-64bit.patch b/games-puzzle/monsterz/files/monsterz-0.7.1-64bit.patch
new file mode 100644
index 000000000000..64d6527768f8
--- /dev/null
+++ b/games-puzzle/monsterz/files/monsterz-0.7.1-64bit.patch
@@ -0,0 +1,26 @@
+Index: monsterz-0.7.1/monsterz.py
+===================================================================
+--- monsterz-0.7.1.orig/monsterz.py 2008-05-09 16:35:25.000000000 +0000
++++ monsterz-0.7.1/monsterz.py 2008-05-09 16:35:33.000000000 +0000
+@@ -108,7 +108,9 @@
+ M = int(max(r, g, b))
+ m = int(min(r, g, b))
+ val = (2 * M + r + g + b) / 5
+- p[:] = (val + r) / 2, (val + g) / 2, (val + b) / 2
++ p[0] = (val + r) / 2
++ p[1] = (val + g) / 2
++ p[2] = (val + b) / 2
+ if alpha[y][x] >= 250:
+ alpha[y][x] = 255 - (M - m) * 3 / 4
+ del pixels
+@@ -129,7 +131,9 @@
+ r, g, b = p
+ M = int(max(r, g, b))
+ m = int(min(r, g, b))
+- p[:] = (m + r) / 2, (m + g) / 2, (m + b) / 2
++ p[0] = (m + r) / 2
++ p[1] = (m + g) / 2
++ p[2] = (m + b) / 2
+ if alpha[y][x] >= 250:
+ alpha[y][x] = 255 - M * 2 / 3
+ del pixels
diff --git a/games-puzzle/monsterz/files/monsterz-0.7.1-blit.patch b/games-puzzle/monsterz/files/monsterz-0.7.1-blit.patch
new file mode 100644
index 000000000000..d0847d6c2c10
--- /dev/null
+++ b/games-puzzle/monsterz/files/monsterz-0.7.1-blit.patch
@@ -0,0 +1,32 @@
+--- a/monsterz.py
++++ b/monsterz.py
+@@ -829,10 +829,10 @@
+ pass
+ else:
+ for x in range(4):
+- for y, p in enumerate(alpha[x]):
+- alpha[x][y] = p * x / 4
+- for y, p in enumerate(alpha[406 - x - 1]):
+- alpha[406 - x - 1][y] = p * x / 4
++ for y in range(len(alpha[x])):
++ alpha[x][y] = alpha[x][y] * x / 4
++ for y in range(len(alpha[406 - x - 1])):
++ alpha[406 - x - 1][y] = alpha[406 - x - 1][y] * x / 4
+ for col in alpha:
+ l = len(col)
+ for y in range(4):
+@@ -1287,10 +1287,10 @@
+ pass
+ else:
+ for x in range(10):
+- for y, p in enumerate(alpha[x]):
+- alpha[x][y] = p * x / 12
+- for y, p in enumerate(alpha[406 - x - 1]):
+- alpha[406 - x - 1][y] = p * x / 12
++ for y in range(len(alpha[x])):
++ alpha[x][y] = alpha[x][y] * x / 12
++ for y in range(len(alpha[406 - x - 1])):
++ alpha[406 - x - 1][y] = alpha[406 - x - 1][y] * x / 12
+ del alpha
+ scroll.unlock()
+ system.blit(scroll, (13, 437))
diff --git a/games-puzzle/monsterz/files/monsterz-0.7.1-gentoo.patch b/games-puzzle/monsterz/files/monsterz-0.7.1-gentoo.patch
new file mode 100644
index 000000000000..6920e0e36971
--- /dev/null
+++ b/games-puzzle/monsterz/files/monsterz-0.7.1-gentoo.patch
@@ -0,0 +1,20 @@
+--- a/monsterz.py.orig 2006-05-12 18:55:51.000000000 -0400
++++ b/monsterz.py 2006-05-12 18:57:44.000000000 -0400
+@@ -1907,7 +1906,7 @@
+ print ' (C) Mike Kershaw <dragorn@kismetwireless.net>'
+
+ print 'This program is free software; you can redistribute it and/or modify it under'
+- print 'the terms of the Do What The Fuck You Want To Public License, Version 2, as'
++ print 'the terms of the WTFPL, Version 2, as'
+ print 'published by Sam Hocevar. See http://sam.zoy.org/wtfpl/ for more details.'
+ print 'The sound effects are released under their own licences: applause.wav and'
+ print 'pop.wav are covered by the LGPL, the others are covered by the GPL.'
+@@ -1932,7 +1931,7 @@
+ global system, data, settings, fonter, monsterz
+ override = {}
+ scorefile = None
+- sharedir = dirname(argv[0])
++ sharedir = "GENTOO_DATADIR"
+ outfd = None
+ try:
+ long = ['help', 'version', 'music', 'sound', 'fullscreen',
diff --git a/games-puzzle/monsterz/metadata.xml b/games-puzzle/monsterz/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-puzzle/monsterz/metadata.xml
@@ -0,0 +1,8 @@
+<?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>
+</pkgmetadata>
diff --git a/games-puzzle/monsterz/monsterz-0.7.1-r4.ebuild b/games-puzzle/monsterz/monsterz-0.7.1-r4.ebuild
new file mode 100644
index 000000000000..4cff31b75f8c
--- /dev/null
+++ b/games-puzzle/monsterz/monsterz-0.7.1-r4.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit desktop python-r1
+
+DESCRIPTION="A little puzzle game, similar to the famous Bejeweled or Zookeeper"
+HOMEPAGE="http://sam.zoy.org/projects/monsterz/"
+SRC_URI="http://sam.zoy.org/projects/monsterz/${P}.tar.gz"
+
+LICENSE="GPL-1+ LGPL-2+ WTFPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/pygame[${PYTHON_USEDEP}]
+ media-libs/sdl-image[png]
+ media-libs/sdl-mixer[mod]
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ eapply \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-64bit.patch \
+ "${FILESDIR}"/${P}-blit.patch
+ sed -i \
+ -e "s:GENTOO_DATADIR:/usr/share/${PN}:" \
+ monsterz.py || die "sed failed"
+ rm Makefile || die
+}
+
+src_install() {
+ insinto /usr/share/${PN}
+ doins -r graphics sound
+ newbin monsterz.py ${PN}
+ newicon graphics/icon.png ${PN}.png
+ make_desktop_entry ${PN} Monsterz
+ einstalldocs
+ python_replicate_script "${ED%/}"/usr/bin/monsterz
+}