aboutsummaryrefslogtreecommitdiff
path: root/net/hawknl-devel
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2006-03-25 11:55:08 +0000
committerRenato Botelho <garga@FreeBSD.org>2006-03-25 11:55:08 +0000
commit920d7855a11e145654ecb73fecbd8f02c6107828 (patch)
treecc2c8d09774ef82ced24e41974423c72f8725866 /net/hawknl-devel
parent45fd702df374125646c2d2f51e152866c095411b (diff)
downloadports-920d7855a11e145654ecb73fecbd8f02c6107828.tar.gz
ports-920d7855a11e145654ecb73fecbd8f02c6107828.zip
Notes
Diffstat (limited to 'net/hawknl-devel')
-rw-r--r--net/hawknl-devel/Makefile54
-rw-r--r--net/hawknl-devel/distinfo3
-rw-r--r--net/hawknl-devel/files/patch-src_makefile.linux48
-rw-r--r--net/hawknl-devel/pkg-descr13
-rw-r--r--net/hawknl-devel/pkg-plist9
5 files changed, 127 insertions, 0 deletions
diff --git a/net/hawknl-devel/Makefile b/net/hawknl-devel/Makefile
new file mode 100644
index 000000000000..dd286fceb1bb
--- /dev/null
+++ b/net/hawknl-devel/Makefile
@@ -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>
diff --git a/net/hawknl-devel/distinfo b/net/hawknl-devel/distinfo
new file mode 100644
index 000000000000..25824c8b8379
--- /dev/null
+++ b/net/hawknl-devel/distinfo
@@ -0,0 +1,3 @@
+MD5 (hawknl/HawkNL168src.tar.gz) = 2e4971d422b8c5cadfe2a85527ff2fcf
+SHA256 (hawknl/HawkNL168src.tar.gz) = 31a2883dbfe02937c9c862bb1aac0b89e465bbab822513c06bffa3f13e4c3c2e
+SIZE (hawknl/HawkNL168src.tar.gz) = 181263
diff --git a/net/hawknl-devel/files/patch-src_makefile.linux b/net/hawknl-devel/files/patch-src_makefile.linux
new file mode 100644
index 000000000000..bd7a29c87acb
--- /dev/null
+++ b/net/hawknl-devel/files/patch-src_makefile.linux
@@ -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)
diff --git a/net/hawknl-devel/pkg-descr b/net/hawknl-devel/pkg-descr
new file mode 100644
index 000000000000..52b63de24c03
--- /dev/null
+++ b/net/hawknl-devel/pkg-descr
@@ -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/
diff --git a/net/hawknl-devel/pkg-plist b/net/hawknl-devel/pkg-plist
new file mode 100644
index 000000000000..3a19be533229
--- /dev/null
+++ b/net/hawknl-devel/pkg-plist
@@ -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%%