From 4627b7b2cf64916feed3981d6658d896965ed32c Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 5 May 2009 09:55:16 +0000 Subject: [PATCH] added djb ucspi-tcp patch provided by Johnny Halfmoon git-svn-id: svn://svn.openwrt.org/openwrt/packages@15616 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/ucspi-tcp/Makefile | 55 +++++++++ net/ucspi-tcp/patches/crosscompile.patch | 200 +++++++++++++++++++++++++++++++ 2 files changed, 255 insertions(+) create mode 100644 net/ucspi-tcp/Makefile create mode 100644 net/ucspi-tcp/patches/crosscompile.patch diff --git a/net/ucspi-tcp/Makefile b/net/ucspi-tcp/Makefile new file mode 100644 index 000000000..9acc1c314 --- /dev/null +++ b/net/ucspi-tcp/Makefile @@ -0,0 +1,55 @@ +# +# Copyright (C) 2007 OpenWrt.org +# Original port by FreeWRT project. +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# Alexander Tsvyashchenko Created OpenWRT package as per Trac ticket 2497 +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=ucspi-tcp +PKG_VERSION:=0.88 +PKG_RELEASE:=1 + +PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz +PKG_SOURCE_URL:=http://cr.yp.to/ucspi-tcp/ +PKG_MD5SUM:=39b619147db54687c4a583a7a94c9163 + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/ucspi-tcp + SECTION:=net + CATEGORY:=Network + DEPENDS:= + TITLE:=UNIX Client-Server Program Interface for TCP + URL:=http://cr.yp.to/ucspi-tcp.html +endef + +define Package/PKG_NAME/description. + tcpserver and tcpclient are command-line tools for building + TCP client-server applications. +endef + +define Build/Compile + TARGET_CC="$(TARGET_CC)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + $(MAKE) -C $(PKG_BUILD_DIR) +endef + +define Package/ucspi-tcp/install + $(INSTALL_DIR) $(1)/usr/bin + (cd $(PKG_BUILD_DIR); \ + $(INSTALL_BIN) tcpserver tcprules tcprulescheck argv0 recordio \ + tcpclient who@ date@ finger@ http@ tcpcat mconnect mconnect-io \ + addcr delcr fixcrio rblsmtpd \ + $(1)/usr/bin) +endef + +$(eval $(call BuildPackage,ucspi-tcp)) + diff --git a/net/ucspi-tcp/patches/crosscompile.patch b/net/ucspi-tcp/patches/crosscompile.patch new file mode 100644 index 000000000..1e1b1a74f --- /dev/null +++ b/net/ucspi-tcp/patches/crosscompile.patch @@ -0,0 +1,200 @@ +diff -urN ucspi-tcp-0.88/Makefile ucspi-tcp-0.88.new/Makefile +--- ucspi-tcp-0.88/Makefile 2000-03-18 17:18:42.000000000 +0200 ++++ ucspi-tcp-0.88.new/Makefile 2007-09-30 16:32:55.000000000 +0300 +@@ -36,10 +36,6 @@ + compile auto-str.c buffer.h readwrite.h exit.h + ./compile auto-str.c + +-auto_home.c: \ +-auto-str conf-home +- ./auto-str auto_home `head -1 conf-home` > auto_home.c +- + auto_home.o: \ + compile auto_home.c + ./compile auto_home.c +@@ -305,10 +301,6 @@ + compile fmt_ulong.c fmt.h + ./compile fmt_ulong.c + +-fork.h: \ +-choose compile load tryvfork.c fork.h1 fork.h2 +- ./choose cl tryvfork fork.h1 fork.h2 > fork.h +- + getln.o: \ + compile getln.c byte.h getln.h buffer.h stralloc.h gen_alloc.h + ./compile getln.c +@@ -317,24 +309,6 @@ + compile getln2.c byte.h getln.h buffer.h stralloc.h gen_alloc.h + ./compile getln2.c + +-hassgact.h: \ +-choose compile load trysgact.c hassgact.h1 hassgact.h2 +- ./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h +- +-hassgprm.h: \ +-choose compile load trysgprm.c hassgprm.h1 hassgprm.h2 +- ./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h +- +-hasshsgr.h: \ +-choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \ +-warn-shsgr +- ./chkshsgr || ( cat warn-shsgr; exit 1 ) +- ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h +- +-haswaitp.h: \ +-choose compile load trywaitp.c haswaitp.h1 haswaitp.h2 +- ./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h +- + hier.o: \ + compile hier.c auto_home.h + ./compile hier.c +@@ -362,10 +336,6 @@ + compile instcheck.c strerr.h error.h readwrite.h exit.h + ./compile instcheck.c + +-iopause.h: \ +-choose compile trypoll.c iopause.h1 iopause.h2 +- ./choose clr trypoll iopause.h1 iopause.h2 > iopause.h +- + iopause.o: \ + compile iopause.c taia.h tai.h uint64.h select.h iopause.h taia.h + ./compile iopause.c +@@ -521,10 +491,6 @@ + compile seek_set.c seek.h + ./compile seek_set.c + +-select.h: \ +-choose compile trysysel.c select.h1 select.h2 +- ./choose c trysysel select.h1 select.h2 > select.h +- + setup: \ + it install + ./install +@@ -791,10 +757,6 @@ + compile uint32_unpack.c uint32.h + ./compile uint32_unpack.c + +-uint64.h: \ +-choose compile load tryulong64.c uint64.h1 uint64.h2 +- ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h +- + unix.a: \ + makelib alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \ + buffer_copy.o buffer_get.o buffer_put.o env.o error.o error_str.o \ +diff -urN ucspi-tcp-0.88/auto_home.c ucspi-tcp-0.88.new/auto_home.c +--- ucspi-tcp-0.88/auto_home.c 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/auto_home.c 2007-09-30 16:33:13.000000000 +0300 +@@ -0,0 +1,3 @@ ++const char auto_home[] = "\ ++\057\165\163\162\ ++"; +diff -urN ucspi-tcp-0.88/conf-cc ucspi-tcp-0.88.new/conf-cc +--- ucspi-tcp-0.88/conf-cc 2007-09-30 14:17:05.000000000 +0300 ++++ ucspi-tcp-0.88.new/conf-cc 2007-09-30 15:13:43.000000000 +0300 +@@ -1,3 +1,3 @@ +-gcc -O2 ++$TARGET_CC $TARGET_CFLAGS -include errno.h + + This will be used to compile .c files. +diff -urN ucspi-tcp-0.88/conf-home ucspi-tcp-0.88.new/conf-home +--- ucspi-tcp-0.88/conf-home 2000-03-18 17:18:42.000000000 +0200 ++++ ucspi-tcp-0.88.new/conf-home 2007-09-30 14:12:46.000000000 +0300 +@@ -1,4 +1,4 @@ +-/usr/local ++/usr + + This is the ucspi-tcp home directory. Programs will be installed in + .../bin. +diff -urN ucspi-tcp-0.88/conf-ld ucspi-tcp-0.88.new/conf-ld +--- ucspi-tcp-0.88/conf-ld 2000-03-18 17:18:42.000000000 +0200 ++++ ucspi-tcp-0.88.new/conf-ld 2007-09-30 15:13:53.000000000 +0300 +@@ -1,3 +1,3 @@ +-gcc -s ++$TARGET_CC -s $TARGET_LDFLAGS + + This will be used to link .o files into an executable. +diff -urN ucspi-tcp-0.88/fork.h ucspi-tcp-0.88.new/fork.h +--- ucspi-tcp-0.88/fork.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/fork.h 2007-09-30 14:09:38.000000000 +0300 +@@ -0,0 +1,9 @@ ++#ifndef FORK_H ++#define FORK_H ++ ++/* sysdep: +vfork */ ++ ++extern int fork(); ++extern int vfork(); ++ ++#endif +diff -urN ucspi-tcp-0.88/hassgact.h ucspi-tcp-0.88.new/hassgact.h +--- ucspi-tcp-0.88/hassgact.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/hassgact.h 2007-09-30 14:09:38.000000000 +0300 +@@ -0,0 +1,2 @@ ++/* sysdep: +sigaction */ ++#define HASSIGACTION 1 +diff -urN ucspi-tcp-0.88/hassgprm.h ucspi-tcp-0.88.new/hassgprm.h +--- ucspi-tcp-0.88/hassgprm.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/hassgprm.h 2007-09-30 14:09:38.000000000 +0300 +@@ -0,0 +1,2 @@ ++/* sysdep: +sigprocmask */ ++#define HASSIGPROCMASK 1 +diff -urN ucspi-tcp-0.88/hasshsgr.h ucspi-tcp-0.88.new/hasshsgr.h +--- ucspi-tcp-0.88/hasshsgr.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/hasshsgr.h 2007-09-30 14:09:38.000000000 +0300 +@@ -0,0 +1 @@ ++/* sysdep: -shortsetgroups */ +diff -urN ucspi-tcp-0.88/haswaitp.h ucspi-tcp-0.88.new/haswaitp.h +--- ucspi-tcp-0.88/haswaitp.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/haswaitp.h 2007-09-30 14:09:38.000000000 +0300 +@@ -0,0 +1,2 @@ ++/* sysdep: +waitpid */ ++#define HASWAITPID 1 +diff -urN ucspi-tcp-0.88/iopause.h ucspi-tcp-0.88.new/iopause.h +--- ucspi-tcp-0.88/iopause.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/iopause.h 2007-09-30 14:09:38.000000000 +0300 +@@ -0,0 +1,18 @@ ++#ifndef IOPAUSE_H ++#define IOPAUSE_H ++ ++/* sysdep: +poll */ ++#define IOPAUSE_POLL ++ ++#include ++#include ++ ++typedef struct pollfd iopause_fd; ++#define IOPAUSE_READ POLLIN ++#define IOPAUSE_WRITE POLLOUT ++ ++#include "taia.h" ++ ++extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *); ++ ++#endif +diff -urN ucspi-tcp-0.88/select.h ucspi-tcp-0.88.new/select.h +--- ucspi-tcp-0.88/select.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/select.h 2007-09-30 14:09:38.000000000 +0300 +@@ -0,0 +1,11 @@ ++#ifndef SELECT_H ++#define SELECT_H ++ ++/* sysdep: +sysselect */ ++ ++#include ++#include ++#include ++extern int select(); ++ ++#endif +diff -urN ucspi-tcp-0.88/uint64.h ucspi-tcp-0.88.new/uint64.h +--- ucspi-tcp-0.88/uint64.h 1970-01-01 03:00:00.000000000 +0300 ++++ ucspi-tcp-0.88.new/uint64.h 2007-09-30 14:16:22.000000000 +0300 +@@ -0,0 +1,8 @@ ++#ifndef UINT64_H ++#define UINT64_H ++ ++/* sysdep: -ulong64 */ ++ ++typedef unsigned long long uint64; ++ ++#endif -- 2.11.0