pkgsrc/net/socks4/patches/patch-aa
2005-12-27 13:48:56 +00:00

140 lines
4 KiB
Text

$NetBSD: patch-aa,v 1.8 2005/12/27 13:48:56 joerg Exp $
--- Makefile.orig 1995-09-07 02:24:02.000000000 +0000
+++ Makefile
@@ -3,9 +3,11 @@
SHELL=/bin/sh
+OPSYS!= uname -s
+
#SOCKS=-DSOCKS
# or
-SOCKS=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect
+SOCKS=-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect -Dunix=1
# If the second definition of SOCKS is used, you MUST also
# define SHORTENED_RBIND
@@ -19,7 +21,7 @@ SHORTENED_RBIND=-DSHORTENED_RBIND
# It should be this current directory.
# If your system has getcwd() but no getwd(), uncomment the next line:
-#GETCWD=-DGETCWD
+GETCWD=-DGETCWD
#If your system doesn't have waitpid(), uncomment the nextline:
#NO_WAITPID=-DNO_WAITPID
@@ -43,15 +45,15 @@ TRY_PASV=-DTRY_PASV
# Define RCMD and SUPPORT_RCMD if you want to support Rrcmd, which is required
# for SOCKSified rlogin, rsh, and rcp.
-#RCMD=Rrcmd.o
-#SUPPORT_RCMD=-DSUPPORT_RCMD
+RCMD=Rrcmd.o
+SUPPORT_RCMD=-DSUPPORT_RCMD
# Define FOR_PS if your system is not SYSV and you want to have the
# command 'ps' show some details of sockd's activity.
#FOR_PS=-DFOR_PS
# optimization flag for cc
-OPTIMIZE=-g
+#OPTIMIZE=-g
#OPTIMIZE=-O
# Be careful with the OPTIMIZE flag. SunPro's SC2.0.1, for example, is
# knwon to produce incorrect code when -O is used.
@@ -73,13 +75,13 @@ OPTIMIZE=-g
#BIND_RESOLVER=-DBIND_RESOLVER
# Directory into which to install the man pages
-MAN_DEST_DIR = /usr/local/man
+MAN_DEST_DIR = ${PREFIX}/man
# Directory into which the SOCKS server should be installed
-SERVER_BIN_DIR = /usr/etc
+SERVER_BIN_DIR = ${PREFIX}/libexec
# Directory into the client programs should be installed
-CLIENTS_BIN_DIR = /usr/local/bin
+CLIENTS_BIN_DIR = ${PREFIX}/bin
# SunOS 4.1.x should use
#CC=cc
@@ -103,13 +105,13 @@ CLIENTS_BIN_DIR = /usr/local/bin
#GETPASS=getpass.o
# IRIX 5 should use
-CC=cc
-RESOLV_LIB=-lsun
-OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT -DSVR3 -DNCARGS=`sysconf ARG_MAX` -D_BSD_SIGNALS $(TRY_PASV)
-RANLIB=/bin/true
-OS=irix5
-INSTALL=bsdinstall
-GETPASS=getpass.o
+#CC=cc
+#RESOLV_LIB=-lsun
+#OTHER_CFLAGS=-cckr $(GETCWD) $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT -DSVR3 -DNCARGS=`sysconf ARG_MAX` -D_BSD_SIGNALS $(TRY_PASV)
+#RANLIB=/bin/true
+#OS=irix5
+#INSTALL=bsdinstall
+#GETPASS=getpass.o
# Ultrix 4.0 should use
#CC=cc
@@ -156,13 +158,15 @@ GETPASS=getpass.o
#GETPASS=
# SOLARIS should use
+.if ${OPSYS} == "SunOS"
#CC=cc
-#RESOLV_LIB=-lresolv -lnsl -lsocket
-#OTHER_CFLAGS=-DSOLARIS -Dindex=strchr -Drindex=strrchr $(SHORTENED_RBIND) -DUSE_DIRENT $(GETCWD) $(FASCIST) -DCOMPAT $(TRY_PASV)
-#RANLIB=/bin/true
-#OS=solaris2.2
-#INSTALL=install
-#GETPASS=getpass.o
+RESOLV_LIB=-lresolv -lnsl -lsocket
+OTHER_CFLAGS=-DSOLARIS -Dindex=strchr -Drindex=strrchr $(SHORTENED_RBIND) -DUSE_DIRENT $(GETCWD) $(FASCIST) -DCOMPAT $(TRY_PASV)
+RANLIB=/bin/true
+OS=solaris2.2
+INSTALL=install
+GETPASS=getpass.o
+.endif
# Interactive Systems Unix should use
#OTHER_CFLAGS = -DISC -DSVR3 -Dindex=strchr -Drindex=strrchr -D_XOPEN_SOURCE -DGETCWD $(FASCIST) $(SHORTENED_RBIND) -DCOMPAT $(TRY_PASV)
@@ -174,13 +178,15 @@ GETPASS=getpass.o
#RESOLV_LIB=-linet -lc_s
# netBSD should use
-#OTHER_CFLAGS = $(GETCWD) $(SHORTENED_RBIND) $(FASCIST) $(TRY_PASV)
-#CC=cc
-#RANLIB=ranlib
-#OS=netbsd0.9
-#INSTALL=install
-#GETPASS=
-#RESOLV_LIB=
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "DragonFly"
+OTHER_CFLAGS = $(GETCWD) $(SHORTENED_RBIND) $(FASCIST) $(TRY_PASV) -Dunix=1
+CC=cc
+RANLIB=ranlib
+OS=netbsd0.9
+INSTALL=install -c
+GETPASS=
+RESOLV_LIB=
+.endif
# FreeBSD should use:
#CC=cc
@@ -413,3 +419,11 @@ clean:
( cd $$i ; $(MAKE) clean) done
+install.conf:
+ ${INSTALL} -m 0644 socks.conf ${PREFIX}/share/examples/socks4
+
+install.lib:
+ ${INSTALL} -m 0644 lib/libsocks.a ${PREFIX}/lib/libsocks4.a
+ ${RANLIB} ${PREFIX}/lib/libsocks4.a
+
+install: install.server install.clients install.man install.conf install.lib