Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-puzzle/amoebax/files/, games-puzzle/amoebax/
Date: Tue, 21 Sep 2021 17:22:06
Message-Id: 1632244846.8e5d90444babaf69b763788860ace913b55bc872.ionen@gentoo
1 commit: 8e5d90444babaf69b763788860ace913b55bc872
2 Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
3 AuthorDate: Sun Sep 19 16:25:48 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 21 17:20:46 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e5d9044
7
8 games-puzzle/amoebax: EAPI8, fix clang build, minor improvements
9
10 Package-Manager: Portage-3.0.23, Repoman-3.0.3
11 Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
12 Closes: https://bugs.gentoo.org/739286
13 Closes: https://github.com/gentoo/gentoo/pull/22334
14 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
15
16 games-puzzle/amoebax/amoebax-0.2.1-r2.ebuild | 32 +++++++++++-----------
17 .../amoebax/files/amoebax-0.2.1-clang.patch | 14 ++++++++++
18 2 files changed, 30 insertions(+), 16 deletions(-)
19
20 diff --git a/games-puzzle/amoebax/amoebax-0.2.1-r2.ebuild b/games-puzzle/amoebax/amoebax-0.2.1-r2.ebuild
21 index a0b1fdd1e35..8a53eb31d76 100644
22 --- a/games-puzzle/amoebax/amoebax-0.2.1-r2.ebuild
23 +++ b/games-puzzle/amoebax/amoebax-0.2.1-r2.ebuild
24 @@ -1,40 +1,40 @@
25 # Copyright 1999-2021 Gentoo Authors
26 # Distributed under the terms of the GNU General Public License v2
27
28 -EAPI=6
29 +EAPI=8
30 +
31 inherit autotools
32
33 -DESCRIPTION="A cute and addictive action-puzzle game, similar to tetris"
34 -HOMEPAGE="http://www.emma-soft.com/games/amoebax/"
35 -SRC_URI="http://www.emma-soft.com/games/amoebax/download/${P}.tar.bz2"
36 +DESCRIPTION="Cute and addictive action-puzzle game, similar to tetris"
37 +HOMEPAGE="https://www.emma-soft.com/games/amoebax/"
38 +SRC_URI="https://www.emma-soft.com/games/amoebax/download/${P}.tar.bz2"
39
40 LICENSE="Free-Art-1.2 GPL-2+"
41 SLOT="0"
42 KEYWORDS="~amd64 ~x86"
43 -IUSE=""
44
45 -DEPEND="media-libs/libsdl[sound,joystick,video]
46 +DEPEND="
47 + media-libs/libsdl[sound,joystick,video]
48 media-libs/sdl-image[png]
49 media-libs/sdl-mixer[vorbis]"
50 -RDEPEND=${DEPEND}
51 +RDEPEND="${DEPEND}"
52 +
53 +PATCHES=(
54 + "${FILESDIR}"/${P}-aclocal.patch
55 + "${FILESDIR}"/${P}-clang.patch
56 + "${FILESDIR}"/${P}-compile.patch
57 +)
58
59 src_prepare() {
60 default
61
62 - eapply \
63 - "${FILESDIR}"/${P}-aclocal.patch \
64 - "${FILESDIR}"/${P}-compile.patch
65 -
66 sed -i \
67 - -e "/^SUBDIRS/s:doc ::" \
68 + -e "/^SUBDIRS/s|doc ||" \
69 Makefile.am || die
70 - sed -i \
71 - -e "/^iconsdir/s:=.*:=/usr/share/pixmaps:" \
72 - -e "/^desktopdir/s:=.*:=/usr/share/applications:" \
73 - data/Makefile.am || die
74 sed -i \
75 -e '/Encoding/d' \
76 -e '/Icon/s/.svg//' \
77 data/amoebax.desktop || die
78 +
79 AT_M4DIR=m4 eautoreconf
80 }
81
82 diff --git a/games-puzzle/amoebax/files/amoebax-0.2.1-clang.patch b/games-puzzle/amoebax/files/amoebax-0.2.1-clang.patch
83 new file mode 100644
84 index 00000000000..b649640691b
85 --- /dev/null
86 +++ b/games-puzzle/amoebax/files/amoebax-0.2.1-clang.patch
87 @@ -0,0 +1,14 @@
88 +Fixes building with clang:
89 +Gentoo-Bug: https://bugs.gentoo.org/739286
90 +
91 +--- a/src/NewHighScoreState.cxx
92 ++++ b/src/NewHighScoreState.cxx
93 +@@ -396,7 +396,7 @@ NewHighScoreState::unicodeCharacterPress
94 + // FIXME: We are only interessted with ASCII values.
95 + if ( 0 == (code & 0xff80) )
96 + {
97 +- char character[2] = {toupper (static_cast<char>(code & 0x7f)), '\0'};
98 ++ char character[2] = {static_cast<char>(toupper (static_cast<char>(code & 0x7f)), '\0')};
99 + std::string::size_type characterPos =
100 + m_CursorValues.find (std::string (character));
101 + if ( std::string::npos != characterPos )