games-rpg/daimonin-client: Port to EAPI 7

Closes: https://bugs.gentoo.org/639304
Closes: https://bugs.gentoo.org/708788
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
David Seifert 2020-11-21 21:38:17 +01:00
parent 02744bab81
commit 7075cd03fb
No known key found for this signature in database
GPG Key ID: CE36E117202E3842
2 changed files with 138 additions and 7 deletions

View File

@ -1,13 +1,14 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit autotools eutils
inherit autotools desktop
DESCRIPTION="A graphical 2D tile-based MMORPG"
HOMEPAGE="http://daimonin.sourceforge.net/"
SRC_URI="https://dev.gentoo.org/~soap/distfiles/${P}.zip
SRC_URI="
https://dev.gentoo.org/~soap/distfiles/${P}.zip
music? ( mirror://sourceforge/daimonin/daimoninMusicLQ20100827.zip )"
LICENSE="GPL-2"
@ -22,10 +23,10 @@ RDEPEND="
media-libs/sdl-mixer[vorbis]
net-misc/curl
sys-libs/zlib:="
DEPEND="${RDEPEND}
app-arch/unzip"
DEPEND="${RDEPEND}"
BDEPEND="app-arch/unzip"
S=${WORKDIR}/daimonin-code-8183-trunk/client/make/linux
S="${WORKDIR}/daimonin-code-8183-trunk/client/make/linux"
src_unpack() {
unpack ${P}.zip
@ -42,6 +43,7 @@ src_prepare() {
pushd ../../src >/dev/null || die
eapply "${FILESDIR}"/${PN}-0.10.5-datadir.patch
eapply "${FILESDIR}"/${PN}-0.10.8-fno-common.patch
popd >/dev/null || die
eapply_user
@ -64,6 +66,7 @@ src_install() {
cd ../.. || die
dodoc README*
newicon bitmaps/pentagram.png "daimonin.png"
make_desktop_entry "daimonin" "Daimonin" "daimonin" "Game;Amusement"
}

View File

@ -0,0 +1,128 @@
--- a/dialog.c
+++ b/dialog.c
@@ -581,7 +581,7 @@
/******************************************************************
draws all options for the actual page.
******************************************************************/
-inline void optwin_draw_options(int x, int y)
+void optwin_draw_options(int x, int y)
{
#define LEN_NAME 111
int i = -1, pos = 0, max = 0;
--- a/include/main.h
+++ b/include/main.h
@@ -118,7 +118,7 @@
}
_bmaptype_table;
-_bmaptype_table bmaptype_table[BMAPTABLE];
+extern _bmaptype_table bmaptype_table[BMAPTABLE];
extern int bmaptype_table_size;
@@ -306,7 +306,7 @@
double killhour;
} _statometer;
-struct statometer statometer;
+extern struct statometer statometer;
extern time_t sleeptime;
--- a/include/map.h
+++ b/include/map.h
@@ -70,7 +70,7 @@
}
_mapdata;
-struct MapCell
+typedef struct MapCell
{
short faces[MAXFACES];
short pos[MAXFACES];
@@ -85,7 +85,7 @@
}
MapCell;
-struct Map
+typedef struct Map
{
struct MapCell cells[MAP_MAX_SIZE][MAP_MAX_SIZE];
}
--- a/include/menu.h
+++ b/include/menu.h
@@ -41,15 +41,15 @@
#define MENU_ALL (MENU_NO & MENU_KEYBIND & MENU_SPELL & MENU_STATUS & MENU_OPTION & MENU_NPC & MENU_BOOK & MENU_QUEST)
#define MENU_SOUND_VOL 40
-struct _skill_list skill_list[SKILL_LIST_MAX];
+extern struct _skill_list skill_list[SKILL_LIST_MAX];
extern _dialog_list_set skill_list_set;
-struct _spell_list spell_list[SPELL_LIST_MAX]; /* skill list entries */
+extern struct _spell_list spell_list[SPELL_LIST_MAX]; /* skill list entries */
extern _dialog_list_set spell_list_set;
extern _dialog_list_set option_list_set;
-struct _bindkey_list bindkey_list[BINDKEY_LIST_MAX];
+extern struct _bindkey_list bindkey_list[BINDKEY_LIST_MAX];
extern _dialog_list_set bindkey_list_set;
extern _dialog_list_set create_list_set;
--- a/include/wrapper.h
+++ b/include/wrapper.h
@@ -118,7 +118,7 @@
extern int parse_metaserver_data(char *info);
#if defined( __WIN_32) || defined(__LINUX)
- FILE *msglog;
+ extern FILE *msglog;
#endif
#if defined(HAVE_STRNICMP)
--- a/main.c
+++ b/main.c
@@ -24,6 +24,10 @@
#include <include.h>
#include <signal.h>
+_bmaptype_table bmaptype_table[BMAPTABLE];
+
+struct statometer statometer;
+
Account account; /* account data of this player, received from the server */
_server_char *first_server_char = NULL; /* list of possible chars/race with setup when we want create a char */
@@ -33,7 +37,7 @@
SDL_Surface *ScreenSurfaceMap; /* THE map surface (backbuffer)*/
SDL_Surface *zoomed = NULL;
struct sockaddr_in insock; /* Server's attributes */
-ClientSocket csocket;
+extern ClientSocket csocket;
int SocketStatusErrorNr; /* if an socket error, this is it */
_login_step LoginInputStep;
--- a/menu.c
+++ b/menu.c
@@ -29,6 +29,7 @@
struct _spell_list spell_list[SPELL_LIST_MAX]; /* skill list entries */
struct _skill_list skill_list[SKILL_LIST_MAX]; /* skill list entries */
+struct _bindkey_list bindkey_list[BINDKEY_LIST_MAX];
struct _dialog_list_set spell_list_set;
struct _dialog_list_set skill_list_set;
--- a/wrapper.c
+++ b/wrapper.c
@@ -22,6 +22,10 @@
*/
#include <include.h>
+#if defined( __WIN_32) || defined(__LINUX)
+ FILE *msglog;
+#endif
+
/* This is because PHYSFS_isInit() was introduced in 2.0.0 and some linux
* distros are still stuck in 1.x.x. So in time we can dump this global and
* use PHYSFS_isInit(). But for now, it's a simple query we can reproduce