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/pingus/, games-puzzle/pingus/files/
Date: Mon, 17 Aug 2020 17:20:48
Message-Id: 1597684685.7ae3f36f6311c433ca73eaabd6bc7eed3f188c0f.pacho@gentoo
1 commit: 7ae3f36f6311c433ca73eaabd6bc7eed3f188c0f
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 17 17:18:05 2020 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 17 17:18:05 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ae3f36f
7
8 games-puzzle/pingus: Use python3 scons
9
10 Closes: https://bugs.gentoo.org/735538
11 Package-Manager: Portage-3.0.2, Repoman-2.3.23
12 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
13
14 .../pingus/files/pingus-0.7.6-python3.patch | 19 +++++++
15 games-puzzle/pingus/pingus-0.7.6-r3.ebuild | 60 ++++++++++++++++++++++
16 2 files changed, 79 insertions(+)
17
18 diff --git a/games-puzzle/pingus/files/pingus-0.7.6-python3.patch b/games-puzzle/pingus/files/pingus-0.7.6-python3.patch
19 new file mode 100644
20 index 00000000000..7df3bc9e983
21 --- /dev/null
22 +++ b/games-puzzle/pingus/files/pingus-0.7.6-python3.patch
23 @@ -0,0 +1,19 @@
24 +--- a/SConscript.bak 2019-08-01 12:45:16.937878393 -0500
25 ++++ b/SConscript 2019-08-01 12:46:13.648803035 -0500
26 +@@ -126,12 +126,12 @@
27 + def configure_end(self):
28 + self.env = self.conf.Finish()
29 +
30 +- print "Reports:"
31 +- print self.reports
32 ++ print("Reports:")
33 ++ print(self.reports)
34 +
35 + if not self.fatal_error == "":
36 +- print "Fatal Errors:"
37 +- print self.fatal_error
38 ++ print("Fatal Errors:")
39 ++ print(self.fatal_error)
40 + Exit(1)
41 +
42 + def configure_gxx(self):
43
44 diff --git a/games-puzzle/pingus/pingus-0.7.6-r3.ebuild b/games-puzzle/pingus/pingus-0.7.6-r3.ebuild
45 new file mode 100644
46 index 00000000000..466c772c357
47 --- /dev/null
48 +++ b/games-puzzle/pingus/pingus-0.7.6-r3.ebuild
49 @@ -0,0 +1,60 @@
50 +# Copyright 1999-2020 Gentoo Authors
51 +# Distributed under the terms of the GNU General Public License v2
52 +
53 +EAPI=7
54 +PYTHON_COMPAT=( python3_{6..9} )
55 +
56 +inherit desktop flag-o-matic python-any-r1 scons-utils toolchain-funcs xdg
57 +
58 +DESCRIPTION="Free Lemmings clone"
59 +HOMEPAGE="https://pingus.gitlab.io/"
60 +SRC_URI="https://pingus.googlecode.com/files/${P}.tar.bz2"
61 +
62 +LICENSE="GPL-3"
63 +SLOT="0"
64 +KEYWORDS="~amd64 ~x86"
65 +IUSE="opengl music"
66 +
67 +RDEPEND="
68 + media-libs/libsdl[joystick,opengl?,video]
69 + media-libs/sdl-image[png]
70 + media-libs/sdl-mixer
71 + music? ( media-libs/sdl-mixer[mod] )
72 + opengl? ( virtual/opengl )
73 + media-libs/libpng:0=
74 + dev-libs/boost:=
75 +"
76 +DEPEND="${RDEPEND}"
77 +BDEPEND="virtual/pkgconfig"
78 +
79 +PATCHES=(
80 + "${FILESDIR}"/${P}-noopengl.patch
81 + "${FILESDIR}"/${P}-gcc47.patch
82 + "${FILESDIR}"/${P}-echo-e.patch
83 + "${FILESDIR}"/${P}-gcc7.patch
84 + "${FILESDIR}"/${P}-boost_signals2.patch
85 + "${FILESDIR}"/${P}-python3.patch
86 +)
87 +
88 +src_prepare() {
89 + xdg_src_prepare
90 + strip-flags
91 +}
92 +
93 +src_compile() {
94 + escons \
95 + CXX="$(tc-getCXX)" \
96 + CCFLAGS="${CXXFLAGS}" \
97 + LINKFLAGS="${LDFLAGS}" \
98 + with_opengl=$(usex opengl 1 0)
99 +}
100 +
101 +src_install() {
102 + emake install-exec install-data \
103 + DESTDIR="${D}" \
104 + PREFIX="/usr"
105 + doman doc/man/pingus.6
106 + doicon data/images/icons/pingus.svg
107 + make_desktop_entry ${PN} Pingus
108 + einstalldocs
109 +}