Package: egoboo Version: 1:2.8.1-1 Severity: normal Dear Maintainer, Egoboo uses an out-dated bundled version of the Enet library. As per Debian best-practice it should make use of the libraries already available in Debian.
I have prepared a patch which makes egoboo pick up Debian's Enet and not use the bundled version, please consider applying it (and adding a dependencies on libenet as appropriate).
>From bb73278a87646308a42d9c68727d623beadcce76 Mon Sep 17 00:00:00 2001 From: Martin Erik Werner <martinerikwer...@gmail.com> Date: Mon, 5 Mar 2012 01:32:24 +0100 Subject: [PATCH] Debundle and use Debian's Enet --- src/Makefile | 5 ++--- src/game/Makefile | 6 +++--- src/game/Makefile.lua | 2 +- src/game/network.c | 8 ++++---- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/Makefile b/src/Makefile index 57d0df2..58c237f 100755 --- a/src/Makefile +++ b/src/Makefile @@ -14,10 +14,9 @@ PROJ_NAME := egoboo-2.x .PHONY: all clean -all: enet egoboo +all: egoboo clean: - make -C ./enet clean make -C ./game clean ./enet/lib/libenet.a: @@ -25,7 +24,7 @@ clean: enet: ./enet/lib/libenet.a -egoboo: enet +egoboo: make -C ./game all PREFIX=$(PREFIX) PROJ_NAME=$(PROJ_NAME) egoboo_lua: enet diff --git a/src/game/Makefile b/src/game/Makefile index f8ac07f..21828db 100755 --- a/src/game/Makefile +++ b/src/game/Makefile @@ -33,8 +33,8 @@ SDLCONF_L := $(shell ${SDL_CONF} --libs) # the compiler options CC := gcc -INC := -I. -I.. -I../enet/include ${SDLCONF_I} -I./extensions -I./file_formats -I./platform -LDFLAGS := ${SDLCONF_L} -L../enet/lib -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet +INC := -I. -I.. ${SDLCONF_I} -I./extensions -I./file_formats -I./platform +LDFLAGS := ${SDLCONF_L} -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -lenet # use different options if the environmental variable PREFIX is defined ifdef ($(PREFIX),"") @@ -43,7 +43,7 @@ else OPT := -Os -Wall -DPREFIX=\"${PREFIX}\" -D_NIX_PREFIX endif -CFLAGS := ${OPT} ${INC} +CFLAGS := ${OPT} -DENET11 ${INC} #------------------------------------ # definitions of the target projects diff --git a/src/game/Makefile.lua b/src/game/Makefile.lua index 537c788..01ae58d 100755 --- a/src/game/Makefile.lua +++ b/src/game/Makefile.lua @@ -24,7 +24,7 @@ SDLCONF_L := $(shell ${SDL_CONF} --libs) CC := gcc OPT := -Os -Wall -DPREFIX=\"${PREFIX}\" -INC := -I. -I.. -I../enet/include -I/usr/include/lua5.1 ${SDLCONF_I} -I./extensions -I./file_formats -I./platform +INC := -I. -I.. -I/usr/include/lua5.1 ${SDLCONF_I} -I./extensions -I./file_formats -I./platform CFLAGS := ${OPT} ${INC} -DUSE_LUA_CONSOLE LDFLAGS := ${SDLCONF_L} -lSDL_ttf -lSDL_mixer -lGL -lGLU -lSDL_image -lphysfs -llua5.1 diff --git a/src/game/network.c b/src/game/network.c index 9d48114..33e3d37 100755 --- a/src/game/network.c +++ b/src/game/network.c @@ -1845,7 +1845,7 @@ int cl_joinGame( const char* hostname ) log_info( "cl_joinGame: Creating client network connection... " ); // Create my host thingamabober /// @todo Should I limit client bandwidth here? - net_myHost = enet_host_create( NULL, 1, 0, 0 ); + net_myHost = enet_host_create( NULL, 1, 2, 0, 0 ); if ( NULL == net_myHost ) { // can't create a network connection at all @@ -1861,7 +1861,7 @@ int cl_joinGame( const char* hostname ) log_info( "cl_joinGame: Attempting to connect to %s:%d\n", hostname, NET_EGOBOO_PORT ); enet_address_set_host( &address, hostname ); address.port = NET_EGOBOO_PORT; - net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS ); + net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS, 0 ); if ( NULL == net_gameHost ) { log_info( "cl_joinGame: No available peers to create a connection!\n" ); @@ -1904,7 +1904,7 @@ int sv_hostGame() address.port = NET_EGOBOO_PORT; log_info( "sv_hostGame: Creating game on port %d\n", NET_EGOBOO_PORT ); - net_myHost = enet_host_create( &address, MAX_PLAYER, 0, 0 ); + net_myHost = enet_host_create( &address, MAX_PLAYER, 2, 0, 0 ); if ( NULL == net_myHost ) { log_info( "sv_hostGame: Could not create network connection!\n" ); @@ -2180,4 +2180,4 @@ player_t* chr_get_ppla( const CHR_REF ichr ) if ( !VALID_PLA( iplayer ) ) return NULL; return PlaStack.lst + iplayer; -} \ No newline at end of file +} -- 1.7.9.1