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/fbg/files/, games-puzzle/fbg/
Date: Tue, 28 Sep 2021 19:38:29
Message-Id: 1632857787.b7deab8b7bc7d1579ee883d855a1cbcd0627b787.ionen@gentoo
1 commit: b7deab8b7bc7d1579ee883d855a1cbcd0627b787
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 28 19:32:05 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 28 19:36:27 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7deab8b
7
8 games-puzzle/fbg: EAPI6->8, fix runtime
9
10 Haven't tried with it, but this likely been
11 broken since gcc-8 or so.
12
13 Also added --without-x so it doesn't try to
14 link with libXt that it does not actually use.
15
16 Closes: https://bugs.gentoo.org/815259
17 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
18
19 .../fbg/{fbg-0.9-r2.ebuild => fbg-0.9-r3.ebuild} | 36 +++++++++++++---------
20 .../fbg/files/fbg-0.9-missing-return.patch | 8 +++++
21 2 files changed, 29 insertions(+), 15 deletions(-)
22
23 diff --git a/games-puzzle/fbg/fbg-0.9-r2.ebuild b/games-puzzle/fbg/fbg-0.9-r3.ebuild
24 similarity index 52%
25 rename from games-puzzle/fbg/fbg-0.9-r2.ebuild
26 rename to games-puzzle/fbg/fbg-0.9-r3.ebuild
27 index b0c84fa8eec..5da0c050885 100644
28 --- a/games-puzzle/fbg/fbg-0.9-r2.ebuild
29 +++ b/games-puzzle/fbg/fbg-0.9-r3.ebuild
30 @@ -1,41 +1,47 @@
31 -# Copyright 1999-2018 Gentoo Foundation
32 +# Copyright 1999-2021 Gentoo Authors
33 # Distributed under the terms of the GNU General Public License v2
34
35 -EAPI=6
36 +EAPI=8
37 +
38 inherit desktop
39
40 -DESCRIPTION="A Tetris clone written in OpenGL"
41 +DESCRIPTION="Tetris clone written in OpenGL"
42 HOMEPAGE="http://fbg.sourceforge.net/"
43 SRC_URI="mirror://sourceforge/fbg/${P}.tar.gz"
44
45 LICENSE="GPL-2"
46 SLOT="0"
47 KEYWORDS="~amd64 ~x86"
48 -IUSE=""
49
50 -DEPEND="virtual/opengl
51 - virtual/glu
52 +RDEPEND="
53 dev-games/physfs
54 - media-libs/libsdl[opengl,video]
55 media-libs/libmikmod
56 - x11-libs/libXt"
57 -RDEPEND="${DEPEND}"
58 + media-libs/libsdl[opengl,video]
59 + virtual/glu
60 + virtual/opengl"
61 +DEPEND="${RDEPEND}"
62 +
63 +PATCHES=(
64 + "${FILESDIR}"/${P}-missing-return.patch
65 +)
66
67 src_prepare() {
68 default
69 - sed -i \
70 - -e "/FBGDATADIR=/s:\".*\":\"/usr/share/${PN}\":" \
71 +
72 + sed -e "/FBGDATADIR=/s|=.*|=\"${EPREFIX}/usr/share/${PN}\"|" \
73 -e '/^datadir=/d' \
74 - configure || die
75 + -i configure || die
76 }
77
78 src_configure() {
79 - econf --disable-fbglaunch
80 + econf --disable-fbglaunch --without-x
81 }
82
83 src_install() {
84 default
85 +
86 newicon startfbg/icon.xpm ${PN}.xpm
87 - make_desktop_entry ${PN} "Falling Block Game" ${PN}
88 - rm -rf "${ED}/usr/doc"
89 + make_desktop_entry ${PN} "Falling Block Game"
90 +
91 + rm -r "${ED}"/usr/doc || die
92 }
93
94 diff --git a/games-puzzle/fbg/files/fbg-0.9-missing-return.patch b/games-puzzle/fbg/files/fbg-0.9-missing-return.patch
95 new file mode 100644
96 index 00000000000..86b0b551957
97 --- /dev/null
98 +++ b/games-puzzle/fbg/files/fbg-0.9-missing-return.patch
99 @@ -0,0 +1,8 @@
100 +Lack of return leads to segmentation fault on startup.
101 +https://bugs.gentoo.org/815259
102 +--- a/src/glTGAImage.cc
103 ++++ b/src/glTGAImage.cc
104 +@@ -180,2 +180,3 @@
105 + glTexImage2D(GL_TEXTURE_2D, 0, type, getWidth(), getHeight(), 0, type, GL_UNSIGNED_BYTE, getImageData());
106 ++ return true;
107 + }