From 83c3e9277bbf53bc7eb714b7b100a0b9786a717f Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Wed, 2 Jun 2021 00:58:03 -0400 Subject: games-puzzle/pathological: add python3_9, require --- .../pathological/pathological-1.1.3_p16-r1.ebuild | 110 -------------------- .../pathological/pathological-1.1.3_p16-r2.ebuild | 112 +++++++++++++++++++++ 2 files changed, 112 insertions(+), 110 deletions(-) delete mode 100644 games-puzzle/pathological/pathological-1.1.3_p16-r1.ebuild create mode 100644 games-puzzle/pathological/pathological-1.1.3_p16-r2.ebuild (limited to 'games-puzzle') diff --git a/games-puzzle/pathological/pathological-1.1.3_p16-r1.ebuild b/games-puzzle/pathological/pathological-1.1.3_p16-r1.ebuild deleted file mode 100644 index c41cdb26e8ec..000000000000 --- a/games-puzzle/pathological/pathological-1.1.3_p16-r1.ebuild +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -PYTHON_COMPAT=( python3_{7,8} ) - -inherit desktop python-single-r1 toolchain-funcs - -DESCRIPTION="An enriched clone of the game 'Logical' by Rainbow Arts" -HOMEPAGE="http://pathological.sourceforge.net/" -SRC_URI=" - mirror://sourceforge/${PN}/${P/_p*}.tar.gz - mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz -" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="doc" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="${PYTHON_DEPS} - $(python_gen_cond_dep ' - >=dev-python/pygame-1.5.5[${PYTHON_MULTI_USEDEP}] - ') -" -DEPEND="${RDEPEND}" -BDEPEND="${PYTHON_DEPS} - doc? ( media-libs/netpbm ) -" - -S="${WORKDIR}/${P/_p*}" - -src_unpack() { - unpack ${A} - cd "${S}" || die - unpack ./${PN}.6.gz -} - -src_prepare() { - default - - # Debian fixes - # We don't face this bug, this way we skip needing to convert the - # files at build time - sed -i -e '/60_use_ogg_music.patch/d' "${WORKDIR}"/debian/patches/series || die - - for p in $(<"${WORKDIR}"/debian/patches/series) ; do - eapply -p1 "${WORKDIR}/debian/patches/${p}" - done - - # Fix prestripped files - eapply "${FILESDIR}/${PN}-1.1.3-build-r1.patch" - - if use doc ; then - sed -i -e '5,$ s/=/ /g' makehtml || die - else - echo "#!/bin/sh" > makehtml - fi - - sed -i \ - -e "s:/usr/share/games:/usr/share:" \ - -e "s:exec:exec ${EPYTHON}:" \ - ${PN} || die - - sed -i \ - -e 's:\xa9:(C):' \ - -e "s:/usr/lib/${PN}/bin:/usr/$(get_libdir)/${PN}:" \ - ${PN}.py || die - - python_fix_shebang ${PN}.py - - tc-export CC -} - -src_install() { - dobin ${PN} - - exeinto /usr/"$(get_libdir)"/${PN} - doexe write-highscores - - insinto /usr/share/${PN} - doins -r circuits graphics music sounds ${PN}.py - - insinto /var/games/ - doins ${PN}_scores - fperms 660 /var/games/${PN}_scores - - doman ${PN}.6 - use doc && local HTML_DOCS=( html/. ) - einstalldocs - dodoc changelog - - doicon ${PN}.xpm - make_desktop_entry ${PN} Pathological ${PN} - - # remove some unneeded resource files - rm -f "${ED}"/usr/share/${PN}/graphics/*.xcf -} - -pkg_postinst() { - if ! has_version "media-libs/sdl-mixer[mod]" ; then - echo - elog "Since you have turned off the 'mod' use flag for media-libs/sdl-mixer" - elog "no background music will be played." - echo - fi - -} diff --git a/games-puzzle/pathological/pathological-1.1.3_p16-r2.ebuild b/games-puzzle/pathological/pathological-1.1.3_p16-r2.ebuild new file mode 100644 index 000000000000..9a41e9a28b0f --- /dev/null +++ b/games-puzzle/pathological/pathological-1.1.3_p16-r2.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{8,9} ) + +inherit desktop python-single-r1 toolchain-funcs + +DESCRIPTION="An enriched clone of the game 'Logical' by Rainbow Arts" +HOMEPAGE="http://pathological.sourceforge.net/" +SRC_URI=" + mirror://sourceforge/${PN}/${P/_p*}.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="doc" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# Note: locks up at start with >=pygame-2 (debian uses pygame-1, fix needed) +RDEPEND="${PYTHON_DEPS} + $(python_gen_cond_dep ' + >=dev-python/pygame-1.5.5[${PYTHON_USEDEP}] + makehtml + fi + + sed -i \ + -e "s:/usr/share/games:/usr/share:" \ + -e "s:exec:exec ${EPYTHON}:" \ + ${PN} || die + + sed -i \ + -e 's:\xa9:(C):' \ + -e "s:/usr/lib/${PN}/bin:/usr/$(get_libdir)/${PN}:" \ + ${PN}.py || die + + python_fix_shebang ${PN}.py + + tc-export CC +} + +src_install() { + dobin ${PN} + + exeinto /usr/"$(get_libdir)"/${PN} + doexe write-highscores + + insinto /usr/share/${PN} + doins -r circuits graphics music sounds ${PN}.py + + insinto /var/games/ + doins ${PN}_scores + fperms 660 /var/games/${PN}_scores + + doman ${PN}.6 + use doc && local HTML_DOCS=( html/. ) + einstalldocs + dodoc changelog + + doicon ${PN}.xpm + make_desktop_entry ${PN} Pathological ${PN} + + # remove some unneeded resource files + rm -f "${ED}"/usr/share/${PN}/graphics/*.xcf +} + +pkg_postinst() { + if ! has_version "media-libs/sdl-mixer[mod]" ; then + echo + elog "Since you have turned off the 'mod' use flag for media-libs/sdl-mixer" + elog "no background music will be played." + echo + fi + +} -- cgit v1.2.3-65-gdbad