1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00

HawkNL is a free, open source, game oriented network API released under the GNU

Library General Public License (LGPL). HawkNL (NL) is a fairly low level API,
a wrapper over Berkeley/Unix Sockets and Winsock.

But NL also provides other features including support for many OSs, groups of
sockets, socket statistics, high accuracy timer, CRC functions, macros to read
and write data to packets with endian conversion, and support for multiple
network transports.

NL has been tested on Windows 9x/ME/NT/2000/XP/CE, Linux, Solaris, IRIX, AIX,
BSDs, Mac OSX.

WWW:	http://www.hawksoft.com/hawknl/

PR:		ports/94114
Submitted by:	Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
This commit is contained in:
Renato Botelho 2006-03-25 11:55:08 +00:00
parent 45fd702df3
commit 920d7855a1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=158101
11 changed files with 255 additions and 0 deletions

View File

@ -169,6 +169,7 @@
SUBDIR += gutenfetch
SUBDIR += happystats
SUBDIR += haproxy
SUBDIR += hawknl
SUBDIR += hf6to4
SUBDIR += hidentd
SUBDIR += hinfo

54
net/hawknl-devel/Makefile Normal file
View File

@ -0,0 +1,54 @@
# New ports collection makefile for: hawknl
# Date created: 2006-03-04
# Whom: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
#
# $FreeBSD$
#
PORTNAME= hawknl
PORTVERSION= 1.68
CATEGORIES= net devel
MASTER_SITES= http://www.hawksoft.com/download/files/
DISTNAME= HawkNL168src
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= acardenas@bsd.org.pe
COMMENT= Portable networking library
USE_DOS2UNIX= yes
USE_GMAKE= yes
MAKEFILE= makefile.linux
INSTALLS_SHLIB= yes
LDFLAGS= -L${LOCALBASE}/lib -L${X11BASE}/lib ${PTHREAD_LIBS}
CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include
MAKE_ENV= CC="${CC}" CFLAGS="${CFLAGS} ${OPTFLAGS}" \
LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"
WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION}
OPTIONS= OPTIMIZATION "Enable optimization" off
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
BROKEN= Doesn't build on < 5.x
.endif
.if defined(WITH_OPTIMIZATION)
CFLAGS+= -funroll-all-loops -ffast-math -fomit-frame-pointer -D_GNU_SOURCE -D_REENTRANT
.endif
post-patch:
${REINPLACE_CMD} -e 's|make -f|${GMAKE} -f|g' ${WRKSRC}/${MAKEFILE}
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' ${WRKSRC}/src/nlinternal.h
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in readme.txt nlchanges.txt
${INSTALL_DATA} ${WRKSRC}/src/${FILE} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,3 @@
MD5 (hawknl/HawkNL168src.tar.gz) = 2e4971d422b8c5cadfe2a85527ff2fcf
SHA256 (hawknl/HawkNL168src.tar.gz) = 31a2883dbfe02937c9c862bb1aac0b89e465bbab822513c06bffa3f13e4c3c2e
SIZE (hawknl/HawkNL168src.tar.gz) = 181263

View File

@ -0,0 +1,48 @@
--- src/makefile.linux Sun Mar 5 03:46:18 2006
+++ src/makefile.linux Sun Mar 5 03:51:02 2006
@@ -1,19 +1,18 @@
-CC = gcc
+CC? = ${CC}
AR = ar cru
RANLIB = ranlib
MAJOR_VERSION = 1
MINOR_VERSION = 6
PATCH_LEVEL = 8
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
-LIBDIR = /usr/local/lib
-INCDIR = /usr/local/include
+LIBDIR = ${PREFIX}/lib
+INCDIR = ${PREFIX}/include
INCLUDE = -I../include
OUTPUT = libNL.so.$(VERSION)
LIBNAME = NL
STATIC = libNL.a
-OPTFLAGS = -funroll-all-loops -ffast-math -fomit-frame-pointer -O2 -D_GNU_SOURCE -D_REENTRANT
-CFLAGS = -Wall -fPIC $(INCLUDE) $(OPTFLAGS)
-LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic -lpthread
+CFLAGS? = ${CFLAGS} -Wall -fPIC $(INCLUDE)
+LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic ${LDFLAGS}
OBJECTS = crc.o errorstr.o nl.o sock.o group.o loopback.o err.o thread.o mutex.o condition.o nltime.o
all: $(OBJECTS)
@@ -37,20 +36,11 @@
cp $(OUTPUT) $(LIBDIR)
cp $(STATIC) $(LIBDIR)
chmod 755 $(LIBDIR)/$(OUTPUT)
- ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION)
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/$(LIBNAME).so
cp ../include/nl.h $(INCDIR)/nl.h
chmod 644 $(INCDIR)/nl.h
- @echo ""
- @echo "*************************************************"
- @echo "* Installed HawkNL. *"
- @echo "* Remember to run /sbin/ldconfig before using *"
- @echo "* the library, you may also want to check that *"
- @echo "* $(LIBDIR) is included in /etc/ld.so.conf *"
- @echo "* You must be root to run ldconfig. *"
- @echo "*************************************************"
uninstall:
rm -f $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)

View File

@ -0,0 +1,13 @@
HawkNL is a free, open source, game oriented network API released under the GNU
Library General Public License (LGPL). HawkNL (NL) is a fairly low level API,
a wrapper over Berkeley/Unix Sockets and Winsock.
But NL also provides other features including support for many OSs, groups of
sockets, socket statistics, high accuracy timer, CRC functions, macros to read
and write data to packets with endian conversion, and support for multiple
network transports.
NL has been tested on Windows 9x/ME/NT/2000/XP/CE, Linux, Solaris, IRIX, AIX,
BSDs, Mac OSX.
WWW: http://www.hawksoft.com/hawknl/

View File

@ -0,0 +1,9 @@
include/nl.h
lib/libNL.a
lib/libNL.so.1.6.8
lib/libNL.so.1
lib/libNL.so
lib/NL.so
%%PORTDOCS%%%%DOCSDIR%%/readme.txt
%%PORTDOCS%%%%DOCSDIR%%/nlchanges.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%

54
net/hawknl/Makefile Normal file
View File

@ -0,0 +1,54 @@
# New ports collection makefile for: hawknl
# Date created: 2006-03-04
# Whom: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
#
# $FreeBSD$
#
PORTNAME= hawknl
PORTVERSION= 1.68
CATEGORIES= net devel
MASTER_SITES= http://www.hawksoft.com/download/files/
DISTNAME= HawkNL168src
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= acardenas@bsd.org.pe
COMMENT= Portable networking library
USE_DOS2UNIX= yes
USE_GMAKE= yes
MAKEFILE= makefile.linux
INSTALLS_SHLIB= yes
LDFLAGS= -L${LOCALBASE}/lib -L${X11BASE}/lib ${PTHREAD_LIBS}
CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include
MAKE_ENV= CC="${CC}" CFLAGS="${CFLAGS} ${OPTFLAGS}" \
LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"
WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION}
OPTIONS= OPTIMIZATION "Enable optimization" off
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
BROKEN= Doesn't build on < 5.x
.endif
.if defined(WITH_OPTIMIZATION)
CFLAGS+= -funroll-all-loops -ffast-math -fomit-frame-pointer -D_GNU_SOURCE -D_REENTRANT
.endif
post-patch:
${REINPLACE_CMD} -e 's|make -f|${GMAKE} -f|g' ${WRKSRC}/${MAKEFILE}
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' ${WRKSRC}/src/nlinternal.h
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in readme.txt nlchanges.txt
${INSTALL_DATA} ${WRKSRC}/src/${FILE} ${DOCSDIR}
.endfor
.endif
.include <bsd.port.post.mk>

3
net/hawknl/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (hawknl/HawkNL168src.tar.gz) = 2e4971d422b8c5cadfe2a85527ff2fcf
SHA256 (hawknl/HawkNL168src.tar.gz) = 31a2883dbfe02937c9c862bb1aac0b89e465bbab822513c06bffa3f13e4c3c2e
SIZE (hawknl/HawkNL168src.tar.gz) = 181263

View File

@ -0,0 +1,48 @@
--- src/makefile.linux Sun Mar 5 03:46:18 2006
+++ src/makefile.linux Sun Mar 5 03:51:02 2006
@@ -1,19 +1,18 @@
-CC = gcc
+CC? = ${CC}
AR = ar cru
RANLIB = ranlib
MAJOR_VERSION = 1
MINOR_VERSION = 6
PATCH_LEVEL = 8
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
-LIBDIR = /usr/local/lib
-INCDIR = /usr/local/include
+LIBDIR = ${PREFIX}/lib
+INCDIR = ${PREFIX}/include
INCLUDE = -I../include
OUTPUT = libNL.so.$(VERSION)
LIBNAME = NL
STATIC = libNL.a
-OPTFLAGS = -funroll-all-loops -ffast-math -fomit-frame-pointer -O2 -D_GNU_SOURCE -D_REENTRANT
-CFLAGS = -Wall -fPIC $(INCLUDE) $(OPTFLAGS)
-LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic -lpthread
+CFLAGS? = ${CFLAGS} -Wall -fPIC $(INCLUDE)
+LIBFLAGS = -shared -Wl,-soname,NL.so.$(MAJOR_VERSION).$(MINOR_VERSION) -rdynamic ${LDFLAGS}
OBJECTS = crc.o errorstr.o nl.o sock.o group.o loopback.o err.o thread.o mutex.o condition.o nltime.o
all: $(OBJECTS)
@@ -37,20 +36,11 @@
cp $(OUTPUT) $(LIBDIR)
cp $(STATIC) $(LIBDIR)
chmod 755 $(LIBDIR)/$(OUTPUT)
- ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION)
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so
ln -s $(LIBDIR)/$(OUTPUT) $(LIBDIR)/$(LIBNAME).so
cp ../include/nl.h $(INCDIR)/nl.h
chmod 644 $(INCDIR)/nl.h
- @echo ""
- @echo "*************************************************"
- @echo "* Installed HawkNL. *"
- @echo "* Remember to run /sbin/ldconfig before using *"
- @echo "* the library, you may also want to check that *"
- @echo "* $(LIBDIR) is included in /etc/ld.so.conf *"
- @echo "* You must be root to run ldconfig. *"
- @echo "*************************************************"
uninstall:
rm -f $(LIBDIR)/$(OUTPUT) $(LIBDIR)/lib$(LIBNAME).so.$(MAJOR_VERSION).$(MINOR_VERSION)

13
net/hawknl/pkg-descr Normal file
View File

@ -0,0 +1,13 @@
HawkNL is a free, open source, game oriented network API released under the GNU
Library General Public License (LGPL). HawkNL (NL) is a fairly low level API,
a wrapper over Berkeley/Unix Sockets and Winsock.
But NL also provides other features including support for many OSs, groups of
sockets, socket statistics, high accuracy timer, CRC functions, macros to read
and write data to packets with endian conversion, and support for multiple
network transports.
NL has been tested on Windows 9x/ME/NT/2000/XP/CE, Linux, Solaris, IRIX, AIX,
BSDs, Mac OSX.
WWW: http://www.hawksoft.com/hawknl/

9
net/hawknl/pkg-plist Normal file
View File

@ -0,0 +1,9 @@
include/nl.h
lib/libNL.a
lib/libNL.so.1.6.8
lib/libNL.so.1
lib/libNL.so
lib/NL.so
%%PORTDOCS%%%%DOCSDIR%%/readme.txt
%%PORTDOCS%%%%DOCSDIR%%/nlchanges.txt
%%PORTDOCS%%@dirrm %%DOCSDIR%%