- adjust after recent enet update
from james turner with a tweak by me
This commit is contained in:
parent
3667ced123
commit
12068675d7
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.19 2010/11/16 11:23:26 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.20 2011/06/29 09:06:32 jasper Exp $
|
||||
|
||||
COMMENT= Oxyd/Rock'n'Roll clone
|
||||
|
||||
V= 1.01
|
||||
DISTNAME= enigma-${V}-64bit
|
||||
PKGNAME= enigma-${V}
|
||||
REVISION = 0
|
||||
REVISION = 1
|
||||
|
||||
CATEGORIES= games x11
|
||||
|
||||
@ -17,8 +17,9 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB= SDL c m pthread stdc++ z SDL_image>=1 SDL_mixer>=2 \
|
||||
SDL_ttf>=7 png>=8 zipios>=1 xerces-c
|
||||
WANTLIB= SDL c m enet pthread stdc++ z SDL_image>=1 \
|
||||
SDL_mixer>=2 SDL_ttf>=7 png>=8 zipios>=1 \
|
||||
xerces-c
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_BERLIOS:=enigma-game/}
|
||||
|
||||
@ -27,10 +28,10 @@ WRKDIST= ${WRKDIR}/enigma-${V}
|
||||
MODULES= devel/gettext
|
||||
|
||||
RUN_DEPENDS= devel/desktop-file-utils
|
||||
BUILD_DEPENDS= net/enet
|
||||
LIB_DEPENDS= devel/sdl-image \
|
||||
devel/sdl-mixer \
|
||||
devel/sdl-ttf \
|
||||
net/enet>=1.3.3 \
|
||||
graphics/png \
|
||||
archivers/zipios \
|
||||
textproc/xerces-c
|
||||
@ -45,6 +46,6 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \
|
||||
-I${X11BASE}/include" \
|
||||
LDFLAGS="-L${X11BASE}/lib \
|
||||
-L${LOCALBASE}/lib" \
|
||||
LIBS="-lm -lz -pthread"
|
||||
LIBS="-lm -lz -lenet -pthread"
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
23
games/enigma/patches/patch-src_client_cc
Normal file
23
games/enigma/patches/patch-src_client_cc
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-src_client_cc,v 1.1 2011/06/29 09:06:32 jasper Exp $
|
||||
|
||||
Adjust to libenet > 1.3 API.
|
||||
|
||||
--- src/client.cc.orig Tue Jun 28 19:39:06 2011
|
||||
+++ src/client.cc Tue Jun 28 19:41:18 2011
|
||||
@@ -128,6 +128,7 @@ bool Client::network_start()
|
||||
|
||||
m_network_host = enet_host_create (NULL,
|
||||
1 /* only allow 1 outgoing connection */,
|
||||
+ 1 /* only allow 1 outgoing connection */,
|
||||
57600 / 8 /* 56K modem with 56 Kbps downstream bandwidth */,
|
||||
14400 / 8 /* 56K modem with 14 Kbps upstream bandwidth */);
|
||||
|
||||
@@ -148,7 +149,7 @@ bool Client::network_start()
|
||||
sv_address.port = 12345;
|
||||
|
||||
/* Initiate the connection, allocating the two channels 0 and 1. */
|
||||
- m_server = enet_host_connect (m_network_host, &sv_address, 2);
|
||||
+ m_server = enet_host_connect (m_network_host, &sv_address, 2, 57600);
|
||||
|
||||
if (m_server == NULL) {
|
||||
fprintf (stderr,
|
32
games/enigma/patches/patch-src_netgame_cc
Normal file
32
games/enigma/patches/patch-src_netgame_cc
Normal file
@ -0,0 +1,32 @@
|
||||
$OpenBSD: patch-src_netgame_cc,v 1.1 2011/06/29 09:06:32 jasper Exp $
|
||||
|
||||
Adjust to libenet > 1.3 API.
|
||||
|
||||
--- src/netgame.cc.orig Tue Jun 28 19:36:09 2011
|
||||
+++ src/netgame.cc Tue Jun 28 19:41:09 2011
|
||||
@@ -155,7 +155,7 @@ void netgame::Start ()
|
||||
network_address.host = ENET_HOST_ANY;
|
||||
network_address.port = 12345;
|
||||
|
||||
- network_host = enet_host_create (&network_address, 1, 0, 0);
|
||||
+ network_host = enet_host_create (&network_address, 1, 0, 0, 0);
|
||||
if (network_host == NULL) {
|
||||
fprintf (stderr,
|
||||
"SV: An error occurred while trying to create an ENet server host.\n");
|
||||
@@ -240,6 +240,7 @@ void netgame::Join (std::string hostname, int port)
|
||||
ENetHost *m_network_host;
|
||||
m_network_host = enet_host_create (NULL,
|
||||
1 /* only allow 1 outgoing connection */,
|
||||
+ 1 /* only allow 1 outgoing connection */,
|
||||
57600 / 8 /* 56K modem with 56 Kbps downstream bandwidth */,
|
||||
14400 / 8 /* 56K modem with 14 Kbps upstream bandwidth */);
|
||||
|
||||
@@ -260,7 +261,7 @@ void netgame::Join (std::string hostname, int port)
|
||||
|
||||
/* Initiate the connection, allocating the two channels 0 and 1. */
|
||||
int numchannels = 2;
|
||||
- m_server = enet_host_connect (m_network_host, &sv_address, numchannels);
|
||||
+ m_server = enet_host_connect (m_network_host, &sv_address, numchannels, 57600);
|
||||
|
||||
if (m_server == NULL) {
|
||||
fprintf (stderr,
|
Loading…
Reference in New Issue
Block a user