Attached are two diffs. The first one brings enet up to version 1.3.3
which is needed for a new port coming soon. Enigma needs a minor patch
to make it work with enet 1.3. I believe it's the only port in the tree
currently using enet, please let me know if I am wrong.

Both diffs tested on amd64.
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/enet/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile    12 Jul 2010 22:07:38 -0000      1.3
+++ Makefile    29 Jun 2011 00:27:29 -0000
@@ -1,8 +1,9 @@
 # $OpenBSD: Makefile,v 1.3 2010/07/12 22:07:38 sthen Exp $
 
 COMMENT =              network library for games
-DISTNAME =             enet-1.2
-REVISION =             1
+DISTNAME =             enet-1.3.3
+
+SHARED_LIBS +=         enet 0.0 # 1.3
 
 CATEGORIES =           net
 
@@ -16,6 +17,8 @@ PERMIT_DISTFILES_CDROM =Yes
 PERMIT_DISTFILES_FTP = Yes
 
 MASTER_SITES =         ${HOMEPAGE}/download/
+
+USE_LIBTOOL =          Yes
 
 CONFIGURE_STYLE =      gnu
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/enet/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo    24 Jul 2008 12:25:21 -0000      1.2
+++ distinfo    29 Jun 2011 00:27:29 -0000
@@ -1,5 +1,5 @@
-MD5 (enet-1.2.tar.gz) = 4Nn0aNjG9r/QcIOztA9eaQ==
-RMD160 (enet-1.2.tar.gz) = G2jOt5Huz+67mXYvM06srCRh6xk=
-SHA1 (enet-1.2.tar.gz) = jaPRZl5kufA3o+TUjTR3qEa6ROc=
-SHA256 (enet-1.2.tar.gz) = cEWseYRvK1RrvXlI8dHqA6AZzB4wy9LacfrenUDUPqA=
-SIZE (enet-1.2.tar.gz) = 125631
+MD5 (enet-1.3.3.tar.gz) = SwtpN3/UUR6C5fCSGpQuWQ==
+RMD160 (enet-1.3.3.tar.gz) = bBCMHm6RNJhxMSMa9zYDT0Qf4RM=
+SHA1 (enet-1.3.3.tar.gz) = Dzw8b/ndwenKISJh/KfDVp4hFYc=
+SHA256 (enet-1.3.3.tar.gz) = XIn+XEveqaMjhqRkp9+2lIIWWfaem6g9ampUnlo2h3U=
+SIZE (enet-1.3.3.tar.gz) = 433240
Index: pkg/PFRAG.shared
===================================================================
RCS file: pkg/PFRAG.shared
diff -N pkg/PFRAG.shared
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.shared    29 Jun 2011 00:27:29 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@lib lib/libenet.so.${LIBenet_VERSION}
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/enet/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST   24 Jul 2008 12:25:21 -0000      1.2
+++ pkg/PLIST   29 Jun 2011 00:27:29 -0000
@@ -1,7 +1,8 @@
 @comment $OpenBSD: PLIST,v 1.2 2008/07/24 12:25:21 laurent Exp $
+%%SHARED%%
 include/enet/
 include/enet/callbacks.h
-include/e${BASE_PKGPATH}.h
+include/enet/enet.h
 include/enet/list.h
 include/enet/protocol.h
 include/enet/time.h
@@ -10,3 +11,6 @@ include/enet/unix.h
 include/enet/utility.h
 include/enet/win32.h
 lib/libenet.a
+lib/libenet.la
+lib/pkgconfig/
+lib/pkgconfig/libenet.pc
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/enigma/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile    16 Nov 2010 11:23:26 -0000      1.19
+++ Makefile    29 Jun 2011 00:25:55 -0000
@@ -5,7 +5,7 @@ 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 \
                graphics/png \
                archivers/zipios \
                textproc/xerces-c
@@ -45,6 +46,6 @@ CONFIGURE_ENV=        CPPFLAGS="-I${LOCALBASE}/
                        -I${X11BASE}/include" \
                LDFLAGS="-L${X11BASE}/lib \
                        -L${LOCALBASE}/lib" \
-               LIBS="-lm -lz -pthread"
+               LIBS="-lm -lz -lenet -pthread"
 
 .include <bsd.port.mk>
Index: patches/patch-src_client_cc
===================================================================
RCS file: patches/patch-src_client_cc
diff -N patches/patch-src_client_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_client_cc 29 Jun 2011 00:25:55 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+--- 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, 
Index: patches/patch-src_netgame_cc
===================================================================
RCS file: patches/patch-src_netgame_cc
diff -N patches/patch-src_netgame_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_netgame_cc        29 Jun 2011 00:25:55 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+--- 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, 

Reply via email to