Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2001 03:35:56 -0700 (PDT)
From:      Heiko Schaefer <hschaefer@fto.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/28272: Update port: net/libsocket++
Message-ID:  <200106191035.f5JAZub71726@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         28272
>Category:       ports
>Synopsis:       Update port: net/libsocket++
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 19 03:40:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Heiko Schaefer
>Release:        FreeBSD-4.3 stable
>Organization:
>Environment:
FreeBSD daneel.foundation.hs 4.3-STABLE FreeBSD 4.3-STABLE #3: Tue Jun 12 14:14:45 CEST 2001     heiko@daneel.foundation.hs:/usr/src/sys/compile/DANEEL  i386
>Description:
there is a newer version of libsocket++ (1.11) than the one in net/libsocket++ (1.10). Lauri Nurmi has done a cleanup of 1.11 and provides his version at http://www.kauhajoki.fi/~lanurmi/socket++/. The library now supports exception handling, but the interface has subtly changed since the 1.10 version.
additionally i fixed a freebsd-specific problem with bind() that's present in the port for 1.10 already.
(open problem: for an unknown to me reason the shared version of the library that gets built is not ok...).

attached is the port i am using - hoped it might be useful for other people as well :)
(if the attached .shar is damaged by the webform, i will gladly email it to whomever wants to look into this...)
>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	net/libsocket++-1.11/
#	net/libsocket++-1.11/files
#	net/libsocket++-1.11/files/patch-aa
#	net/libsocket++-1.11/files/patch-ab
#	net/libsocket++-1.11/files/patch-ac
#	net/libsocket++-1.11/files/patch-ad
#	net/libsocket++-1.11/files/patch-ae
#	net/libsocket++-1.11/files/Makefile.lib
#	net/libsocket++-1.11/pkg-comment
#	net/libsocket++-1.11/pkg-descr
#	net/libsocket++-1.11/pkg-plist
#	net/libsocket++-1.11/distinfo
#	net/libsocket++-1.11/Makefile
#
echo c - net/libsocket++-1.11/
mkdir -p net/libsocket++-1.11/ > /dev/null 2>&1
echo c - net/libsocket++-1.11/files
mkdir -p net/libsocket++-1.11/files > /dev/null 2>&1
echo x - net/libsocket++-1.11/files/patch-aa
sed 's/^X//' >net/libsocket++-1.11/files/patch-aa << 'END-of-net/libsocket++-1.11/files/patch-aa'
X*** local.h   Sun Apr 22 15:17:04 2001
X--- local.h       Fri Jun 15 15:01:37 2001
X***************
X*** 86,92 ****
X--- 86,94 ----
X  
X  #if !defined (__linux__)
X    extern "C" int gethostname (char* hostname, int len);
X+ #if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__))
X    extern char* SYS_SIGLIST [];
X+ #endif
X  #endif
X  
X  #ifdef __osf__
END-of-net/libsocket++-1.11/files/patch-aa
echo x - net/libsocket++-1.11/files/patch-ab
sed 's/^X//' >net/libsocket++-1.11/files/patch-ab << 'END-of-net/libsocket++-1.11/files/patch-ab'
X*** sig.h     Sun Apr 22 15:17:04 2001
X--- sig.h Fri Jun 15 15:12:09 2001
X***************
X*** 10,16 ****
X  #define SIG_H
X  
X  #include <stl.h>
X! #include <sys/signal.h>
X  
X  // all signal handlers must be derived from
X  // class sig::hnd. class signal will
X--- 10,22 ----
X  #define SIG_H
X  
X  #include <stl.h>
X! //#include <sys/signal.h>
X! #include <signal.h>
X! 
X! #if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__))
X! // this is some linux thing - doesn't do anything on linux, so it can't hurt here, i hope.
X! #define SA_INTERRUPT    0x20000000 /* dummy -- ignored */
X! #endif
X  
X  // all signal handlers must be derived from
X  // class sig::hnd. class signal will
END-of-net/libsocket++-1.11/files/patch-ab
echo x - net/libsocket++-1.11/files/patch-ac
sed 's/^X//' >net/libsocket++-1.11/files/patch-ac << 'END-of-net/libsocket++-1.11/files/patch-ac'
X*** sockinet.C	Sun Apr 22 19:03:32 2001
X--- sockinet.C	Sun Jun 17 23:49:00 2001
X***************
X*** 28,33 ****
X--- 28,34 ----
X    sin_family	  = sockinetbuf::af_inet;
X    sin_addr.s_addr = htonl(INADDR_ANY);
X    sin_port	  = 0;
X+   bzero(&(sin_zero), sizeof(sin_zero));
X  }
X  
X  sockinetaddr::sockinetaddr(unsigned long addr, int port_no)
X***************
X*** 36,41 ****
X--- 37,43 ----
X    sin_family      = sockinetbuf::af_inet;
X    sin_addr.s_addr = htonl(addr);
X    sin_port	  = htons(port_no);
X+   bzero(&(sin_zero), sizeof(sin_zero));
X  }
X  
X  sockinetaddr::sockinetaddr(unsigned long addr, const char* sn, const char* pn)
X***************
X*** 44,49 ****
X--- 46,52 ----
X    sin_family      = sockinetbuf::af_inet;
X    sin_addr.s_addr = htonl (addr); // Added by cgay@cs.uoregon.edu May 29, 1993
X    setport(sn, pn);
X+   bzero(&(sin_zero), sizeof(sin_zero));
X  }
X  
X  sockinetaddr::sockinetaddr (const char* host_name, int port_no)
X***************
X*** 51,56 ****
X--- 54,60 ----
X  {
X    setaddr(host_name);
X    sin_port = htons(port_no);
X+   bzero(&(sin_zero), sizeof(sin_zero));
X  }
X  
X  sockinetaddr::sockinetaddr(const char* hn, const char* sn, const char* pn)
X***************
X*** 64,69 ****
X--- 68,74 ----
X    sin_family      = sockinetbuf::af_inet;
X    sin_addr.s_addr = sina.sin_addr.s_addr;
X    sin_port	  = sina.sin_port;
X+   bzero(&(sin_zero), sizeof(sin_zero));
X  }   
X  
X  void sockinetaddr::setport(const char* sn, const char* pn)
END-of-net/libsocket++-1.11/files/patch-ac
echo x - net/libsocket++-1.11/files/patch-ad
sed 's/^X//' >net/libsocket++-1.11/files/patch-ad << 'END-of-net/libsocket++-1.11/files/patch-ad'
X*** sockstream.C      Sun Apr 22 16:00:41 2001
X--- sockstream.C  Sun Jun 17 23:20:09 2001
X***************
X*** 163,169 ****
X    switch (err) {
X    case EINTR:
X    case EWOULDBLOCK:
X! #if !defined(__linux__) // LN
X    case EAGAIN:
X  #endif
X      return true;
X--- 163,169 ----
X    switch (err) {
X    case EINTR:
X    case EWOULDBLOCK:
X! #if !(defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)) // LN
X    case EAGAIN:
X  #endif
X      return true;
END-of-net/libsocket++-1.11/files/patch-ad
echo x - net/libsocket++-1.11/files/patch-ae
sed 's/^X//' >net/libsocket++-1.11/files/patch-ae << 'END-of-net/libsocket++-1.11/files/patch-ae'
X*** /home/heiko/x/socket++-1.11ln/sockstream.h	Sun Apr 22 15:17:05 2001
X--- ./sockstream.h	Sun Jun 17 23:20:16 2001
X***************
X*** 94,102 ****
X    enum msgflag {
X      msg_oob		= MSG_OOB,
X      msg_peek	        = MSG_PEEK,
X!     msg_dontroute	= MSG_DONTROUTE,
X  	
X!     msg_maxiovlen	= MSG_MAXIOVLEN
X    };
X    enum shuthow {
X      shut_read,
X--- 94,104 ----
X    enum msgflag {
X      msg_oob		= MSG_OOB,
X      msg_peek	        = MSG_PEEK,
X!     msg_dontroute	= MSG_DONTROUTE
X  	
X! #if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__))
X!     ,msg_maxiovlen	= MSG_MAXIOVLEN
X! #endif
X    };
X    enum shuthow {
X      shut_read,
END-of-net/libsocket++-1.11/files/patch-ae
echo x - net/libsocket++-1.11/files/Makefile.lib
sed 's/^X//' >net/libsocket++-1.11/files/Makefile.lib << 'END-of-net/libsocket++-1.11/files/Makefile.lib'
XSHLIB_MAJOR=	1
XSHLIB_MINOR=	11
XLIB=		socket++
XLIBDIR= 	${PREFIX}/lib
XINCDIR=		${PREFIX}/include
XINFODIR=	${PREFIX}/info
XCXXFLAGS+=	-I.
X
XSRCS=	sockstream.C sockinet.C sockunix.C pipestream.C Fork.C \
X	echo.C smtp.C ftp.C
X
XHEADERS=Fork.h echo.h ftp.h pipestream.h protocol.h smtp.h \
X	sockinet.h sockstream.h sockunix.h
X
Xafterinstall:
X	${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
X		${HEADERS} ${INCDIR}
X	makeinfo --no-split socket++.texi
X	${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} \
X		socket++.info ${INFODIR}
X
X.include <bsd.lib.mk>
END-of-net/libsocket++-1.11/files/Makefile.lib
echo x - net/libsocket++-1.11/pkg-comment
sed 's/^X//' >net/libsocket++-1.11/pkg-comment << 'END-of-net/libsocket++-1.11/pkg-comment'
XA C++ wrapper library to the sockets
END-of-net/libsocket++-1.11/pkg-comment
echo x - net/libsocket++-1.11/pkg-descr
sed 's/^X//' >net/libsocket++-1.11/pkg-descr << 'END-of-net/libsocket++-1.11/pkg-descr'
XSocket++ is a iostream like C++ class library for the UNIX and INET
Xdomains of sockets and protocols.
X
XWrappers are also provided for pipe(), socketpair(), popen() and 
Xfork().
X
XIncluded are also "protocol" classes with two examples - echo and 
Xsmtp (client only).
X
XSocket++ is covered by the GPL.
X
X-Sander
Xsander@haldjas.folklore.ee
END-of-net/libsocket++-1.11/pkg-descr
echo x - net/libsocket++-1.11/pkg-plist
sed 's/^X//' >net/libsocket++-1.11/pkg-plist << 'END-of-net/libsocket++-1.11/pkg-plist'
Xlib/libsocket++.a
Xlib/libsocket++_p.a
Xlib/libsocket++.so.1.11
Xlib/libsocket++.so
Xinclude/Fork.h
Xinclude/echo.h
Xinclude/ftp.h
Xinclude/pipestream.h
Xinclude/protocol.h
Xinclude/smtp.h
Xinclude/sockinet.h
Xinclude/sockstream.h
Xinclude/sockunix.h
X@unexec install-info --delete %D/info/socket++.info %D/info/dir
Xinfo/socket++.info
X@exec install-info %D/info/socket++.info %D/info/dir
Xshare/doc/libsocket++/README
Xshare/doc/libsocket++/socket++.ps
X@dirrm share/doc/libsocket++
END-of-net/libsocket++-1.11/pkg-plist
echo x - net/libsocket++-1.11/distinfo
sed 's/^X//' >net/libsocket++-1.11/distinfo << 'END-of-net/libsocket++-1.11/distinfo'
XMD5 (socket++-1.11ln.tar.gz) = 30981affae988d5f9bcb86b506c0358b
END-of-net/libsocket++-1.11/distinfo
echo x - net/libsocket++-1.11/Makefile
sed 's/^X//' >net/libsocket++-1.11/Makefile << 'END-of-net/libsocket++-1.11/Makefile'
X# Ports collection makefile for:  libsocket++
X# Date created:			  Sun Jan 19, 1997
X# Whom:				  Narvi <narvi@haldjas.folklore.ee>
X#				  David O'Brien (obrien@FreeBSD.org)
X#
X# $FreeBSD: ports/net/libsocket++/Makefile,v 1.13 2001/01/16 17:31:52 sobomax Exp $
X#
X
XPORTNAME=	libsocket++
XPORTVERSION=	1.11
XCATEGORIES=	net
XMASTER_SITES=	http://www.kauhajoki.fi/~lanurmi/socket++/files/
XDISTNAME=	socket++-1.11ln
X
XMAINTAINER=	hschaefer@fto.de
X
XGNU_CONFIGURE=	yes
XINSTALLS_SHLIB=	yes
XNOPROFILE=	true
X
Xpost-configure:
X	@${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}/Makefile
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${PREFIX}/share/doc/libsocket++
X	${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/libsocket++
X	${INSTALL_MAN} ${WRKSRC}/socket++.ps ${PREFIX}/share/doc/libsocket++
X.endif
X	@install-info ${PREFIX}/info/socket++.info ${PREFIX}/info/dir
X
X.include <bsd.port.mk>
END-of-net/libsocket++-1.11/Makefile
exit


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106191035.f5JAZub71726>