libggz stable port information

Package: libggz
Version: 0.0.11
Revision: 12
Description: GGZ Gaming Zone base library
License: LGPL
Maintainer: Dave Vasilevsky

BuildDependsOnly: true
BuildDepends: fink (>= 0.24.12-1)
Depends: %N-shlibs (= %v-%r)
Conflicts: libggz-crypto
Replaces: libggz-crypto

CustomMirror: <<
primary: http://ftp.ggzgamingzone.org/pub/
eur-be: http://ftp.belnet.be/packages/ggzgamingzone/
eur-dk: http://mirrors.sunsite.dk/ggzgamingzone/
eur-de: http://ftp.de.ggzgamingzone.org/pub/
eur-uk: http://uk.ggzgamingzone.org/pub/
eur-fr: http://ftp.fr.ggzgamingzone.org/pub/
<<
Source: mirror:custom:ggz/%v/%n-%v.tar.gz
Source-MD5: 6a3cac71b3b444c7b46dc27d166402e4

SetCPPFLAGS: -fsigned-char
ConfigureParams: --mandir=%p/share/man --enable-debug-gdb
PatchFile: %{Ni}.patch
PatchFile-MD5: 7f46fd0321e70ff2a652ed1ba7a092b8
InstallScript: <<
#!/bin/sh -ev
make install DESTDIR=%d
<<

DocFiles: AUTHORS ChangeLog COPYING INSTALL NEWS README README.GGZ QuickStart.GGZ

Homepage: http://www.ggzgamingzone.org/
DescDetail: <<
This is the GGZ base library libggz, used by the GGZ Gaming Zone server
(ggzd), the ggzcore library and other components.
<<

SplitOff: <<
Conflicts: libggz-crypto-shlibs
Replaces: libggz-crypto-shlibs

Package: %N-shlibs
Files: lib/*.*.dylib
Shlibs: %p/lib/libggz.3.dylib 4.0.0 %n (>= 0.0.10-1)
DocFiles: AUTHORS ChangeLog COPYING INSTALL NEWS README README.GGZ QuickStart.GGZ
<<

libggz stable port .patch

diff -Naur lib-old/src/Makefile.in lib-new/src/Makefile.in
--- lib-old/src/Makefile.in 2005-05-21 09:36:03.000000000 -0400
+++ lib-new/src/Makefile.in 2005-06-19 12:50:08.000000000 -0400
@@ -220,7 +220,7 @@
lib_LTLIBRARIES = libggz.la
include_HEADERS = ggz.h ggz_common.h
libggz_la_LIBADD = @LDADD@ $(top_builddir)/src/security/libggzsecurity.la
-libggz_la_LDFLAGS = -version-info 3:1:1
+libggz_la_LDFLAGS = -version-info 3:1:0
libggz_la_SOURCES = conf.c \
easysock.c \
ggz.h \
diff -Naur lib-old/src/easysock.c lib-new/src/easysock.c
--- lib-old/src/easysock.c 2005-05-14 15:51:48.000000000 -0400
+++ lib-new/src/easysock.c 2005-06-19 19:08:04.000000000 -0400
@@ -64,6 +64,7 @@
#include
#include
#include
+#include

#include "ggz.h"

@@ -150,6 +151,31 @@
return 0;
}

+int ggz_accept(const int sock) {
+ int newsock = accept(sock, NULL, NULL);
+ if (newsock < 0) {
+ if (_err_func)
+ (*_err_func) (strerror(errno), GGZ_IO_CREATE, sock, GGZ_DATA_NONE);
+ switch (errno) {
+ case EWOULDBLOCK:
+ case ECONNABORTED:
+ case EINTR:
+ return -1;
+ default:
+ return 2;
+ }
+ } else {
+ int flags;
+ flags = fcntl(newsock, F_GETFL, 0);
+ if (flags != -1)
+ flags = fcntl(newsock, F_SETFL, flags & ~O_NONBLOCK);
+ if (flags == -1 && _err_func)
+ (*_err_func) (strerror(errno), GGZ_IO_CREATE, sock, GGZ_DATA_NONE);
+
+ return newsock;
+ }
+}
+

static int es_bind(const char *host, int port)
{
diff -Naur lib-old/src/ggz.h lib-new/src/ggz.h
--- lib-old/src/ggz.h 2005-05-21 06:19:22.000000000 -0400
+++ lib-new/src/ggz.h 2005-06-19 17:24:13.000000000 -0400
@@ -1311,6 +1311,18 @@
GGZ_SOCK_CLIENT /**< Connect to a particular port of a server. */
} GGZSockType;

+/** @brief Accept a socket connection.
+ *
+ * This function accepts a new socket connection, on an existing socket,
+ * returning the new socket connection. It ensures that the new socket is
+ * blocking.
+ *
+ * @param sock The existing socket on which to accept a connection.
+ * @return File descriptor on success, -1 on an error where the call may be
+ * retried, -2 on other error
+ */
+int ggz_accept(const int sock);
+
/** @brief Make a socket connection.
*
* This function makes a TCP socket connection.

libggz _unstable_ port .patch