commit:     f69eeaec8d7d981bbca4acb6a489073aa64a6543
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 13 21:18:21 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Nov 14 00:44:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f69eeaec

games-puzzle/monsterz: add 0.7.1_p12, revamp ebuild, enable py3.10

p12 fixes the '"is" with a literal' runtime warnings with >=python-3.8

Notable ebuild changes:
* switch to single impl python
* have datadir use EPREFIX and drop datadir gentoo patch
* use sdl2 deps for pygame-2, prevents crash if missing sdl2-mixer[mod]

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-puzzle/monsterz/Manifest                  |  1 +
 games-puzzle/monsterz/monsterz-0.7.1_p12.ebuild | 52 +++++++++++++++++++++++++
 2 files changed, 53 insertions(+)

diff --git a/games-puzzle/monsterz/Manifest b/games-puzzle/monsterz/Manifest
index dc3d0158282..5bddc541b67 100644
--- a/games-puzzle/monsterz/Manifest
+++ b/games-puzzle/monsterz/Manifest
@@ -1,2 +1,3 @@
 DIST monsterz-0.7.1.tar.gz 1879537 BLAKE2B 
e1ad9f17a64bcbb07005eb61d951dbf756997a6e6bd76c48d88bb634c9b3167c9fd41ef32032925b219153eb607dc238af76b44c3ef6c47aab753d59c61958e1
 SHA512 
62de125251a74e7ff237c90ad88e10a4953b8841251dfec45cc6b77f416677ef6d68cf4308c3190f65896b5bb1312934abd5e438f0341f08c02884585f0e4787
 DIST monsterz_0.7.1-11.debian.tar.xz 13688 BLAKE2B 
2274b6d18b2f03200e09468243bae7ede94b81bd7595f65a73fd33bc9ccc7302fbea3a4876b5bbf6cf98735652742b1cf76b3c288fc6c005f9566c04b4a4f277
 SHA512 
c172355667db29de949de07745469552d62dc226120f38ff76a288b14018424338f27b6a562de215b7194b8b09c6346d29e9088c8a0edb0fe915f915b8577a4b
+DIST monsterz_0.7.1-12.debian.tar.xz 14196 BLAKE2B 
ec4f425da3502afa175e0e3772a47ed24cd5d5857a04e4627cbcc7491df70f3aa718b82aae25f36a67868ba114075dabb215cc9d1ecd3b97ad2d7ab401cdd528
 SHA512 
3111363010ee10952fa93c456ce2db015ef1a516bde8bba55b5cd3f2ea4c50d71bb1a81c0207cd89960c47b4e2eb10693782bdc72d7439163720bf686e389cb3

diff --git a/games-puzzle/monsterz/monsterz-0.7.1_p12.ebuild 
b/games-puzzle/monsterz/monsterz-0.7.1_p12.ebuild
new file mode 100644
index 00000000000..9e90e2b47bb
--- /dev/null
+++ b/games-puzzle/monsterz/monsterz-0.7.1_p12.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit desktop python-single-r1
+
+DESCRIPTION="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/_p*}.tar.gz
+       
mirror://debian/pool/main/${P::1}/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz"
+S="${WORKDIR}/${P/_p*}"
+
+LICENSE="GPL-1+ LGPL-2+ WTFPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+       ${PYTHON_DEPS}
+       $(python_gen_cond_dep 'dev-python/pygame[${PYTHON_USEDEP}]')
+       media-libs/sdl2-image[png]
+       media-libs/sdl2-mixer[mod]"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+       "${WORKDIR}"/debian/patches
+)
+
+src_prepare() {
+       default
+
+       sed "/sharedir/s|= dirname.*|= \"${EPREFIX}/usr/share/${PN}\"|" \
+               -i monsterz.py || die
+       python_fix_shebang monsterz.py
+
+       rm Makefile || die
+}
+
+src_install() {
+       newbin ${PN}{.py,}
+
+       insinto /usr/share/${PN}
+       doins -r graphics sound
+
+       newicon graphics/icon.png ${PN}.png
+       make_desktop_entry ${PN} ${PN^}
+
+       einstalldocs
+}

Reply via email to