1 |
commit: 1697cc49c1dff7cfeff0a20faea32d197903b516 |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Sep 10 16:27:27 2020 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 8 19:31:55 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1697cc49 |
7 |
|
8 |
games-rpg/egoboo: migrate to enet-1.3 support |
9 |
|
10 |
Added patch that adapts package to use enet 1.3 API. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/628038 |
13 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
14 |
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> |
15 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
16 |
|
17 |
games-rpg/egoboo/egoboo-2.8.1-r2.ebuild | 57 ++++++++++++++++++++++ |
18 |
games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch | 21 ++++++++ |
19 |
2 files changed, 78 insertions(+) |
20 |
|
21 |
diff --git a/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild b/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild |
22 |
new file mode 100644 |
23 |
index 00000000000..0ee1e0999c4 |
24 |
--- /dev/null |
25 |
+++ b/games-rpg/egoboo/egoboo-2.8.1-r2.ebuild |
26 |
@@ -0,0 +1,57 @@ |
27 |
+# Copyright 1999-2021 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=6 |
31 |
+ |
32 |
+inherit desktop |
33 |
+ |
34 |
+DESCRIPTION="A 3d dungeon crawling adventure in the spirit of NetHack" |
35 |
+HOMEPAGE="http://egoboo.sourceforge.net/" |
36 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="GPL-2" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+ |
42 |
+DEPEND=" |
43 |
+ dev-games/physfs |
44 |
+ media-libs/libsdl[joystick,video] |
45 |
+ media-libs/sdl-image |
46 |
+ media-libs/sdl-mixer[vorbis] |
47 |
+ media-libs/sdl-ttf |
48 |
+ net-libs/enet:1.3= |
49 |
+ virtual/glu |
50 |
+ virtual/opengl" |
51 |
+RDEPEND="${DEPEND}" |
52 |
+ |
53 |
+PATCHES=( |
54 |
+ "${FILESDIR}"/${P}-gentoo.patch |
55 |
+ "${FILESDIR}"/${P}-enet-1.3.patch |
56 |
+) |
57 |
+ |
58 |
+src_prepare() { |
59 |
+ default |
60 |
+ sed -i \ |
61 |
+ -e "s:@GENTOO_CONFDIR@:/etc/${PN}:" \ |
62 |
+ -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \ |
63 |
+ src/game/platform/file_linux.c || die "sed failed" |
64 |
+ rm -rf src/enet || die |
65 |
+} |
66 |
+ |
67 |
+src_compile() { |
68 |
+ emake -C src/game PROJ_NAME=egoboo-2.x |
69 |
+} |
70 |
+ |
71 |
+src_install() { |
72 |
+ dodoc BUGS.txt Changelog.txt doc/*.txt doc/*.pdf |
73 |
+ |
74 |
+ insinto /usr/share/${PN} |
75 |
+ doins -r basicdat modules |
76 |
+ insinto /etc/${PN} |
77 |
+ doins -r controls.txt setup.txt |
78 |
+ |
79 |
+ newbin src/game/egoboo-2.x ${PN} |
80 |
+ |
81 |
+ newicon basicdat/icon.bmp ${PN}.bmp |
82 |
+ make_desktop_entry ${PN} Egoboo /usr/share/pixmaps/${PN}.bmp |
83 |
+} |
84 |
|
85 |
diff --git a/games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch b/games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch |
86 |
new file mode 100644 |
87 |
index 00000000000..dbde2db5386 |
88 |
--- /dev/null |
89 |
+++ b/games-rpg/egoboo/files/egoboo-2.8.1-enet-1.3.patch |
90 |
@@ -0,0 +1,21 @@ |
91 |
+https://bugs.gentoo.org/628038 |
92 |
+From: "Azamat H. Hackimov" <azamat.hackimov@×××××.com> |
93 |
+Date: Thu, 10 Sep 2020 18:39:45 +0300 |
94 |
+Subject: [PATCH] Add support for enet-1.3 |
95 |
+--- a/src/game/network.c |
96 |
++++ b/src/game/network.c |
97 |
+@@ -1847,3 +1847,3 @@ |
98 |
+ /// @todo Should I limit client bandwidth here? |
99 |
+- net_myHost = enet_host_create( NULL, 1, 0, 0 ); |
100 |
++ net_myHost = enet_host_create( NULL, 1, 0, 0, 0 ); |
101 |
+ if ( NULL == net_myHost ) |
102 |
+@@ -1863,3 +1863,3 @@ |
103 |
+ address.port = NET_EGOBOO_PORT; |
104 |
+- net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS ); |
105 |
++ net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS, 0 ); |
106 |
+ if ( NULL == net_gameHost ) |
107 |
+@@ -1906,3 +1906,3 @@ |
108 |
+ log_info( "sv_hostGame: Creating game on port %d\n", NET_EGOBOO_PORT ); |
109 |
+- net_myHost = enet_host_create( &address, MAX_PLAYER, 0, 0 ); |
110 |
++ net_myHost = enet_host_create( &address, MAX_PLAYER, 0, 0, 0 ); |
111 |
+ if ( NULL == net_myHost ) |