diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2005-01-16 05:04:44 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2005-01-16 05:04:44 +0000 |
commit | 758b6a8fe39c2ca45ab9d7e33bf98ac9f5979113 (patch) | |
tree | 76084517eebd0d15621db1b4840a05ef58fcb790 /net/Sockets | |
parent | e7f5b677c78de8fec69cf98f450f817a239403f2 (diff) | |
download | ports-758b6a8fe39c2ca45ab9d7e33bf98ac9f5979113.tar.gz ports-758b6a8fe39c2ca45ab9d7e33bf98ac9f5979113.zip |
Notes
Diffstat (limited to 'net/Sockets')
-rw-r--r-- | net/Sockets/Makefile | 45 | ||||
-rw-r--r-- | net/Sockets/distinfo | 2 | ||||
-rw-r--r-- | net/Sockets/files/patch-ListenSocket.h | 10 | ||||
-rw-r--r-- | net/Sockets/files/patch-Makefile | 18 | ||||
-rw-r--r-- | net/Sockets/files/patch-MinderHandler.cpp | 22 | ||||
-rw-r--r-- | net/Sockets/files/patch-Sockets-config.cpp | 23 | ||||
-rw-r--r-- | net/Sockets/files/patch-Uid.cpp | 36 | ||||
-rw-r--r-- | net/Sockets/files/patch-socket_include.h | 34 | ||||
-rw-r--r-- | net/Sockets/pkg-descr | 12 | ||||
-rw-r--r-- | net/Sockets/pkg-plist | 34 |
10 files changed, 236 insertions, 0 deletions
diff --git a/net/Sockets/Makefile b/net/Sockets/Makefile new file mode 100644 index 000000000000..6fce882d5d58 --- /dev/null +++ b/net/Sockets/Makefile @@ -0,0 +1,45 @@ +# New ports collection makefile for: C++ Sockets +# Date created: Sat Jan 15 16:17:20 UTC 2005 +# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= Sockets +PORTVERSION= 1.7.1 +CATEGORIES= net ipv6 +MASTER_SITES= http://www.alhem.net/Sockets/ + +MAINTAINER= lioux@FreeBSD.org +COMMENT= A C++ wrapper for BSD-style sockets + +USE_GMAKE= yes +USE_OPENSSL= yes +WITH_OPENSSL_BASE= yes +MAKE_ENV= CXX="${CXX}" +USE_REINPLACE= yes + +post-patch: +# PREFIX safeness +# CXX safeness +# CXXFLAGS safeness + @${REINPLACE_CMD} -E \ + -e 's|-O2||' \ + -e 's|^PREFIX.+$$|PREFIX=${PREFIX}|' \ + -e 's|^INCLUDE.+$$|INCLUDE=-I. -I${OPENSSLINC}|' \ + -e 's|g\+\+|${CXX}|' \ + ${BUILD_WRKSRC}/${MAKEFILE} +# fix StdLog.h location + @${FIND} ${WRKSRC} -type f | \ + ${XARGS} -n 5 -x \ + ${REINPLACE_CMD} -E \ + -e 's|"StdLog.h"|<StdLog.h>|' + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +IGNORE= FreeBSD prior to 500000 does not support uuid(3) required\ + for building +.endif + +.include <bsd.port.post.mk> diff --git a/net/Sockets/distinfo b/net/Sockets/distinfo new file mode 100644 index 000000000000..13fe1ed5070b --- /dev/null +++ b/net/Sockets/distinfo @@ -0,0 +1,2 @@ +MD5 (Sockets-1.7.1.tar.gz) = 8f3ac8d40c65f7545e358e03ea3eead4 +SIZE (Sockets-1.7.1.tar.gz) = 46255 diff --git a/net/Sockets/files/patch-ListenSocket.h b/net/Sockets/files/patch-ListenSocket.h new file mode 100644 index 000000000000..e0468c1f10de --- /dev/null +++ b/net/Sockets/files/patch-ListenSocket.h @@ -0,0 +1,10 @@ +--- ListenSocket.h.orig Sat Jan 15 23:40:23 2005 ++++ ListenSocket.h Sat Jan 15 23:41:10 2005 +@@ -31,6 +31,7 @@ + + #include "Socket.h" + ++#include <StdLog.h> + + template <class X> + class ListenSocket : public Socket diff --git a/net/Sockets/files/patch-Makefile b/net/Sockets/files/patch-Makefile new file mode 100644 index 000000000000..e3f8911db7a0 --- /dev/null +++ b/net/Sockets/files/patch-Makefile @@ -0,0 +1,18 @@ +--- Makefile.orig Sat Jan 15 23:06:28 2005 ++++ Makefile Sat Jan 15 23:07:15 2005 +@@ -59,11 +59,11 @@ + ranlib $@ + + install: all +- cp libSockets.a $(PREFIX)/lib +- cp libSocketsEx.a $(PREFIX)/lib ++ @${BSD_INSTALL_DATA} libSockets.a $(PREFIX)/lib ++ @${BSD_INSTALL_DATA} libSocketsEx.a $(PREFIX)/lib + mkdir -p $(PREFIX)/include/Sockets +- cp -a *.h $(PREFIX)/include/Sockets +- install Sockets-config $(PREFIX)/bin ++ @${BSD_INSTALL_DATA} *.h $(PREFIX)/include/Sockets ++ @${BSD_INSTALL_PROGRAM} Sockets-config $(PREFIX)/bin + + clean: + rm -f *.o *~ slask *.d $(PROGS) *.a diff --git a/net/Sockets/files/patch-MinderHandler.cpp b/net/Sockets/files/patch-MinderHandler.cpp new file mode 100644 index 000000000000..ec527d254b23 --- /dev/null +++ b/net/Sockets/files/patch-MinderHandler.cpp @@ -0,0 +1,22 @@ +--- MinderHandler.cpp.orig Sun Jan 16 02:22:51 2005 ++++ MinderHandler.cpp Sun Jan 16 02:26:52 2005 +@@ -20,6 +20,10 @@ + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include <sys/param.h> ++#endif ++ + #ifdef _WIN32 + #pragma warning(disable:4786) + #endif +@@ -428,6 +432,8 @@ + msg += ":" + tmp; + #ifdef _WIN32 + msg += ":Win32"; ++#elif defined __FreeBSD__ ++ msg += ":FreeBSD"; + #else + msg += ":Linux"; + #endif diff --git a/net/Sockets/files/patch-Sockets-config.cpp b/net/Sockets/files/patch-Sockets-config.cpp new file mode 100644 index 000000000000..c53e3270e418 --- /dev/null +++ b/net/Sockets/files/patch-Sockets-config.cpp @@ -0,0 +1,23 @@ +--- Sockets-config.cpp.orig Sun Jan 16 02:23:14 2005 ++++ Sockets-config.cpp Sun Jan 16 02:26:07 2005 +@@ -3,6 +3,10 @@ + CFLAGS = -Wall -g -O2 $(INCLUDE) -MD -D_VERSION='"$(VERSION)"' + # manual autoconf .... + ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include <sys/param.h> ++#endif ++ + # uncomment if your operating system is linux, mac os x, or solaris + #CFLAGS += -DLINUX + #CFLAGS += -DMACOSX +@@ -19,6 +23,9 @@ + printf(" -D_VERSION='\"%s\"'", _VERSION); + #ifdef LINUX + printf(" -DLINUX"); ++#endif ++#if defined __FreeBSD__ ++ printf(" -DFREEBSD"); + #endif + #ifdef MACOSX + printf(" -DMACOSX"); diff --git a/net/Sockets/files/patch-Uid.cpp b/net/Sockets/files/patch-Uid.cpp new file mode 100644 index 000000000000..6066b39928ea --- /dev/null +++ b/net/Sockets/files/patch-Uid.cpp @@ -0,0 +1,36 @@ +--- Uid.cpp.orig Sat Jan 15 21:36:02 2005 ++++ Uid.cpp Sat Jan 15 22:41:30 2005 +@@ -20,12 +20,22 @@ + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include <sys/param.h> ++#endif ++ + #include <stdio.h> + #include <assert.h> + #ifdef _WIN32 + #include <objbase.h> + #elif defined MACOSX + #include "uuid.h" ++#elif defined __FreeBSD__ ++# if __FreeBSD_version >= 500000 ++# include <uuid.h> ++# else ++# error FreeBSD versions prior to 500000 does not support uuid(3) ++# endif + #else + #include <uuid/uuid.h> + #endif +@@ -49,6 +59,10 @@ + exit(-1); + } + memcpy(m_bufuid, &randomGuid, 16); ++#elif defined __FreeBSD__ ++ uuid_t uid; ++ uuid_create(&uid, NULL); ++ memcpy(m_bufuid, &uid, 16); + #else + uuid_t uid; + uuid_generate(uid); diff --git a/net/Sockets/files/patch-socket_include.h b/net/Sockets/files/patch-socket_include.h new file mode 100644 index 000000000000..87aa06ecb7cc --- /dev/null +++ b/net/Sockets/files/patch-socket_include.h @@ -0,0 +1,34 @@ +--- socket_include.h.orig Sat Jan 15 14:48:57 2005 ++++ socket_include.h Sat Jan 15 22:31:09 2005 +@@ -1,10 +1,31 @@ + #ifndef _SOCKET_INCLUDE_H + #define _SOCKET_INCLUDE_H + ++#if (defined(__unix__) || defined(unix)) && !defined(USG) ++#include <sys/param.h> ++#endif ++ + #ifdef SOLARIS + // ---------------------------------------- + // Solaris + typedef unsigned short port_t; ++ ++#elif defined __FreeBSD__ ++// ---------------------------------------- ++// FreeBSD ++# if __FreeBSD_version >= 400014 ++# define s6_addr16 __u6_addr.__u6_addr16 ++# if !defined(MSG_NOSIGNAL) ++# define MSG_NOSIGNAL 0 ++# endif ++# include <netinet/in.h> ++typedef in_addr_t ipaddr_t; ++typedef in_port_t port_t; ++# define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP ++# define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP ++# else ++# error FreeBSD versions prior to 400014 does not support ipv6 ++# endif + + #elif defined MACOSX + // ---------------------------------------- diff --git a/net/Sockets/pkg-descr b/net/Sockets/pkg-descr new file mode 100644 index 000000000000..6be4156b8fdb --- /dev/null +++ b/net/Sockets/pkg-descr @@ -0,0 +1,12 @@ +[ excerpt from developer's web site ] + +This is a GPL licensed C++ class library wrapping the berkeley +sockets C API, and therefore works on most unixes and also win32. +Features include, but are not limited to, SSL support, IPv6 support, +tcp and udp sockets, encrypted tcp, http protocol, highly customizable +error handling. Testing has been done on Linux and Windows 2000, +and to some part on Solaris and Mac OS X. + +WWW: http://www.alhem.net/Sockets/index.html + +-- lioux@FreeBSD.org diff --git a/net/Sockets/pkg-plist b/net/Sockets/pkg-plist new file mode 100644 index 000000000000..cec6ff22295b --- /dev/null +++ b/net/Sockets/pkg-plist @@ -0,0 +1,34 @@ +bin/Sockets-config +include/Sockets/Base64.h +include/Sockets/CTcpSocket.h +include/Sockets/CircularBuffer.h +include/Sockets/HTTPSocket.h +include/Sockets/HttpDebugSocket.h +include/Sockets/HttpGetSocket.h +include/Sockets/HttpPostSocket.h +include/Sockets/HttpPutSocket.h +include/Sockets/HttpsGetSocket.h +include/Sockets/HttpsSocket.h +include/Sockets/ICrypt.h +include/Sockets/ListenSocket.h +include/Sockets/MinderHandler.h +include/Sockets/MinderSocket.h +include/Sockets/MinionSocket.h +include/Sockets/NullCrypt.h +include/Sockets/Parse.h +include/Sockets/PoolSocket.h +include/Sockets/SSLSocket.h +include/Sockets/Socket.h +include/Sockets/SocketHandler.h +include/Sockets/SocketThread.h +include/Sockets/StdLog.h +include/Sockets/StdoutLog.h +include/Sockets/TcpSocket.h +include/Sockets/Thread.h +include/Sockets/UdpSocket.h +include/Sockets/Uid.h +include/Sockets/Utility.h +include/Sockets/socket_include.h +lib/libSockets.a +lib/libSocketsEx.a +@dirrm include/Sockets |