the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: netcat
Version: 1.10
Revision: 4
Source: http://www.phreak.org/archives/exploits/unix/network-scanners/nc110.tgz
Source-MD5: 402632f2fe01c169ff19a0ad6e9d608c
NoSourceDirectory: true
BuildDepends: fink (>= 0.24.12-1)
PatchFile: %n-%v.patch
PatchFile-MD5: 9a71a6ad1e52072b80c7345ebabaa1ae
CompileScript: make darwin
InstallScript: <<
mkdir -p %i/bin
install nc %i/bin/
<<
DocFiles: README
Description: TCP/IP swiss army knife
DescDetail: <<
A simple Unix utility which reads and writes data across network
connections using TCP or UDP protocol. It is designed to be a reliable
"back-end" tool that can be used directly or easily driven by other
programs and scripts. At the same time it is a feature-rich network
debugging and exploration tool, since it can create almost any kind of
connection you would need and has several interesting built-in
capabilities.
<<
DescPort: <<
The include file
included first on Mac OS X 10.1. Fixed by changing the order. We also
patch a 'darwin' target into the Makefile which is basically a clone
of the 'next' target.
<<
License: Public Domain
Maintainer: Paul Swenson
Homepage: http://www.l0pht.com/~weld/netcat/
diff -ru nc/Makefile nc-patched/Makefile
--- nc/Makefile Wed Mar 20 04:16:06 1996
+++ nc-patched/Makefile Thu Sep 20 13:53:32 2001
@@ -109,6 +109,10 @@
next:
make -e $(ALL) $(MFLAGS) XFLAGS='-DNEXT' STATIC=-Bstatic
+# Darwin / Mac OS X: Modernized NeXT, no fully static linking, no stripping
+darwin:
+ make -e $(ALL) $(MFLAGS) LD='$(CC)' XFLAGS='-DNEXT' STATIC=
+
# start with this for a new architecture, and see what breaks.
generic:
make -e $(ALL) $(MFLAGS) XFLAGS='-DGENERIC' STATIC=
diff -ru nc/netcat.c nc-patched/netcat.c
--- nc/netcat.c Thu Mar 21 01:38:04 1996
+++ nc-patched/netcat.c Thu Sep 20 13:44:03 2001
@@ -40,9 +40,6 @@
#else
#include
#endif
-#ifdef HAVE_SELECT_H /* random SV variants need this */
-#include
-#endif
/* have to do this *before* including types.h. xxx: Linux still has it wrong */
#ifdef FD_SETSIZE /* should be in types.h, butcha never know. */
@@ -50,6 +47,10 @@
#endif /* fd's, something is horribly wrong! */
#define FD_SETSIZE 16 /* <-- this'll give us a long anyways, wtf */
#include
+
+#ifdef HAVE_SELECT_H /* random SV variants need this */
+#include
+#endif
#ifdef HAVE_RANDOM /* aficionados of ?rand48() should realize */
#define SRAND srandom /* that this doesn't need *strong* random */