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-rpg/egoboo/files/, games-rpg/egoboo/
Date: Tue, 08 Jun 2021 19:42:51
Message-Id: 1623181227.7964ef4f59218cdca029662389efe8e6343f9944.ionen@gentoo
1 commit: 7964ef4f59218cdca029662389efe8e6343f9944
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 8 19:13:11 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 8 19:40:27 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7964ef4f
7
8 games-rpg/egoboo: EAPI-7 bump, fix inputs
9
10 Also:
11 - prefix support
12 - don't call CC directly
13 - tighten sdl deps (game can't start without png/opengl)
14 - remove .bmp icon, format not supported by xdg
15
16 Closes: https://bugs.gentoo.org/654574
17 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
18
19 games-rpg/egoboo/egoboo-2.8.1-r2.ebuild | 40 +++++++++++-----------
20 .../files/egoboo-2.8.1-keyboard-inputs.patch | 12 +++++++
21 2 files changed, 32 insertions(+), 20 deletions(-)
22
23 diff --git a/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild b/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild
24 index 0ee1e0999c4..e3b415e57a8 100644
25 --- a/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild
26 +++ b/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild
27 @@ -1,57 +1,57 @@
28 # Copyright 1999-2021 Gentoo Authors
29 # Distributed under the terms of the GNU General Public License v2
30
31 -EAPI=6
32 +EAPI=7
33
34 -inherit desktop
35 +inherit desktop toolchain-funcs
36
37 -DESCRIPTION="A 3d dungeon crawling adventure in the spirit of NetHack"
38 +DESCRIPTION="3D dungeon crawling adventure in the spirit of NetHack"
39 HOMEPAGE="http://egoboo.sourceforge.net/"
40 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
41
42 -LICENSE="GPL-2"
43 +LICENSE="GPL-3+"
44 SLOT="0"
45 KEYWORDS="~amd64 ~x86"
46
47 -DEPEND="
48 +RDEPEND="
49 dev-games/physfs
50 - media-libs/libsdl[joystick,video]
51 - media-libs/sdl-image
52 + media-libs/libsdl[joystick,opengl,video]
53 + media-libs/sdl-image[png]
54 media-libs/sdl-mixer[vorbis]
55 media-libs/sdl-ttf
56 net-libs/enet:1.3=
57 virtual/glu
58 virtual/opengl"
59 -RDEPEND="${DEPEND}"
60 +DEPEND="${RDEPEND}"
61
62 PATCHES=(
63 "${FILESDIR}"/${P}-gentoo.patch
64 "${FILESDIR}"/${P}-enet-1.3.patch
65 + "${FILESDIR}"/${P}-keyboard-inputs.patch
66 )
67
68 src_prepare() {
69 default
70 - sed -i \
71 - -e "s:@GENTOO_CONFDIR@:/etc/${PN}:" \
72 - -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \
73 - src/game/platform/file_linux.c || die "sed failed"
74 - rm -rf src/enet || die
75 +
76 + sed -e "s|@GENTOO_CONFDIR@|${EPREFIX}/etc/${PN}|" \
77 + -e "s|@GENTOO_DATADIR@|${EPREFIX}/usr/share/${PN}|" \
78 + -i src/game/platform/file_linux.c || die
79 }
80
81 src_compile() {
82 - emake -C src/game PROJ_NAME=egoboo-2.x
83 + emake -C src/game PROJ_NAME=egoboo-2.x CC="$(tc-getCC)"
84 }
85
86 src_install() {
87 - dodoc BUGS.txt Changelog.txt doc/*.txt doc/*.pdf
88 + newbin src/game/egoboo-2.x ${PN}
89 +
90 + dodoc BUGS.txt Changelog.txt doc/*.{txt,pdf}
91
92 insinto /usr/share/${PN}
93 doins -r basicdat modules
94 - insinto /etc/${PN}
95 - doins -r controls.txt setup.txt
96
97 - newbin src/game/egoboo-2.x ${PN}
98 + insinto /etc/${PN}
99 + doins controls.txt setup.txt
100
101 - newicon basicdat/icon.bmp ${PN}.bmp
102 - make_desktop_entry ${PN} Egoboo /usr/share/pixmaps/${PN}.bmp
103 + make_desktop_entry ${PN} Egoboo applications-games "Game;"
104 }
105
106 diff --git a/games-rpg/egoboo/files/egoboo-2.8.1-keyboard-inputs.patch b/games-rpg/egoboo/files/egoboo-2.8.1-keyboard-inputs.patch
107 new file mode 100644
108 index 00000000000..5df3af7c1c5
109 --- /dev/null
110 +++ b/games-rpg/egoboo/files/egoboo-2.8.1-keyboard-inputs.patch
111 @@ -0,0 +1,12 @@
112 +Fix being only able move down and right when using keyboard.
113 +https://bugs.gentoo.org/654574
114 +http://egoboo.sourceforge.net/phpBB3/viewtopic.php?p=61333#p61333
115 +--- a/src/game/game.c
116 ++++ b/src/game/game.c
117 +@@ -2054,4 +2054,4 @@
118 + {
119 +- joy_pos.x = ( control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_RIGHT ) - control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_LEFT ) );
120 +- joy_pos.y = ( control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_DOWN ) - control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_UP ) );
121 ++ joy_pos.x = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_RIGHT ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_LEFT ) );
122 ++ joy_pos.y = ( (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_DOWN ) - (int)control_is_pressed( INPUT_DEVICE_KEYBOARD, CONTROL_UP ) );
123 +