Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-puzzle/pathological/, games-puzzle/pathological/files/
Date: Wed, 25 Dec 2019 19:59:35
Message-Id: 1577303965.e9b10eae57d8f855750fc68eb864576814483945.pacho@gentoo
1 commit: e9b10eae57d8f855750fc68eb864576814483945
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 25 19:58:53 2019 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 25 19:59:25 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9b10eae
7
8 games-puzzle/pathological: Fixes from Debian, python3 support
9
10 Package-Manager: Portage-2.3.82, Repoman-2.3.20
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12
13 games-puzzle/pathological/Manifest | 1 +
14 .../files/pathological-1.1.3-build-r1.patch | 12 +++
15 .../pathological/pathological-1.1.3_p16.ebuild | 105 +++++++++++++++++++++
16 3 files changed, 118 insertions(+)
17
18 diff --git a/games-puzzle/pathological/Manifest b/games-puzzle/pathological/Manifest
19 index 3158e4415ea..4370a404bec 100644
20 --- a/games-puzzle/pathological/Manifest
21 +++ b/games-puzzle/pathological/Manifest
22 @@ -1 +1,2 @@
23 DIST pathological-1.1.3.tar.gz 6995274 BLAKE2B 2fc891f1d0f15f68d2be3a210f04a64b73896cba92882e24fa60df09752b3235e025c4480510b7eebbf214d8ec4885ea556d76757888b85751a48432ea22709f SHA512 a64e0ca9a3bf86ade4a1abdd4f471c341838f690b2471f21c488471b7800da55f89f42c62a51c9be380cb9f265432db904a5de6f6bb3a9a7dde835da94baf566
24 +DIST pathological_1.1.3-16.debian.tar.xz 12992 BLAKE2B 3209f1d6b867f8d7baf83dda22f94829ba880a7aeff2a7587b883cac406e21b5c20d703a55599bc8692caa49553102ed1b4b0f7ac11c490b400ccbca7608d6cf SHA512 3d946a6d3c0daa4f0dac256c6e5fa053942a101aaae229836c8290dffc4556279169f71eff6bf4814d26ee30f466df9d7014b504c259aba139c3919c704db3ee
25
26 diff --git a/games-puzzle/pathological/files/pathological-1.1.3-build-r1.patch b/games-puzzle/pathological/files/pathological-1.1.3-build-r1.patch
27 new file mode 100644
28 index 00000000000..48038df0003
29 --- /dev/null
30 +++ b/games-puzzle/pathological/files/pathological-1.1.3-build-r1.patch
31 @@ -0,0 +1,12 @@
32 +--- a/Makefile.old 2019-12-25 20:55:37.932303932 +0100
33 ++++ b/Makefile 2019-12-25 20:55:58.584530808 +0100
34 +@@ -4,9 +4,6 @@
35 +
36 + all: write-highscores docs
37 +
38 +-write-highscores: write-highscores.c
39 +- gcc -s -o write-highscores write-highscores.c
40 +-
41 + docs: html/wheel.png
42 + html/wheel.png:
43 + ./makehtml
44
45 diff --git a/games-puzzle/pathological/pathological-1.1.3_p16.ebuild b/games-puzzle/pathological/pathological-1.1.3_p16.ebuild
46 new file mode 100644
47 index 00000000000..f7d5b90b628
48 --- /dev/null
49 +++ b/games-puzzle/pathological/pathological-1.1.3_p16.ebuild
50 @@ -0,0 +1,105 @@
51 +# Copyright 1999-2019 Gentoo Authors
52 +# Distributed under the terms of the GNU General Public License v2
53 +
54 +EAPI=7
55 +PYTHON_COMPAT=( python3_{6,7,8} )
56 +
57 +inherit desktop python-single-r1
58 +
59 +DESCRIPTION="An enriched clone of the game 'Logical' by Rainbow Arts"
60 +HOMEPAGE="http://pathological.sourceforge.net/"
61 +SRC_URI="
62 + mirror://sourceforge/${PN}/${P/_p*}.tar.gz
63 + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz
64 +"
65 +
66 +LICENSE="GPL-2"
67 +SLOT="0"
68 +KEYWORDS="~amd64 ~x86"
69 +
70 +IUSE="doc"
71 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
72 +
73 +RDEPEND="${PYTHON_DEPS}
74 + >=dev-python/pygame-1.5.5[${PYTHON_USEDEP}]
75 +"
76 +DEPEND="${RDEPEND}"
77 +BDEPEND="${PYTHON_DEPS}
78 + doc? ( media-libs/netpbm )
79 +"
80 +
81 +S="${WORKDIR}/${P/_p*}"
82 +
83 +src_unpack() {
84 + unpack ${A}
85 + cd "${S}" || die
86 + unpack ./${PN}.6.gz
87 +}
88 +
89 +src_prepare() {
90 + default
91 +
92 + # Debian fixes
93 + # We don't face this bug, this way we skip needing to convert the
94 + # files at build time
95 + sed -i -e '/60_use_ogg_music.patch/d' "${WORKDIR}"/debian/patches/series || die
96 +
97 + for p in $(<"${WORKDIR}"/debian/patches/series) ; do
98 + eapply -p1 "${WORKDIR}/debian/patches/${p}"
99 + done
100 +
101 + # Fix prestripped files
102 + eapply "${FILESDIR}/${PN}-1.1.3-build-r1.patch"
103 +
104 + if use doc ; then
105 + sed -i -e '5,$ s/=/ /g' makehtml || die
106 + else
107 + echo "#!/bin/sh" > makehtml
108 + fi
109 +
110 + sed -i \
111 + -e "s:/usr/share/games:/usr/share:" \
112 + -e "s:exec:exec ${EPYTHON}:" \
113 + ${PN} || die
114 +
115 + sed -i \
116 + -e 's:\xa9:(C):' \
117 + -e "s:/usr/lib/${PN}/bin:/usr/$(get_libdir)/${PN}:" \
118 + ${PN}.py || die
119 +
120 + python_fix_shebang ${PN}.py
121 +}
122 +
123 +src_install() {
124 + dobin ${PN}
125 +
126 + exeinto /usr/"$(get_libdir)"/${PN}
127 + doexe write-highscores
128 +
129 + insinto /usr/share/${PN}
130 + doins -r circuits graphics music sounds ${PN}.py
131 +
132 + insinto /var/games/
133 + doins ${PN}_scores
134 + fperms 660 /var/games/${PN}_scores
135 +
136 + dodoc changelog README TODO
137 + doman ${PN}.6
138 + use doc && dohtml -r html/*
139 +
140 + doicon ${PN}.xpm
141 + make_desktop_entry ${PN} Pathological ${PN}
142 +
143 + # remove some unneeded resource files
144 + rm -f "${ED}"/usr/share/${PN}/graphics/*.xcf
145 +}
146 +
147 +pkg_postinst() {
148 + if ! has_version "media-libs/sdl-mixer[mod]" ; then
149 + echo
150 + elog "Since you have turned off the 'mod' use flag for media-libs/sdl-mixer"
151 + elog "no background music will be played."
152 + echo
153 + fi
154 +
155 +}