pkgsrc/security/zebedee/patches/patch-aa
2017-04-21 13:33:31 +00:00

169 lines
5.1 KiB
Text

$NetBSD: patch-aa,v 1.12 2017/04/21 13:33:32 jperkin Exp $
--- Makefile.orig 2005-09-06 05:59:53.000000000 +0000
+++ Makefile
@@ -20,7 +20,9 @@ CC_win32 = gcc -mno-cygwin
CC_linux = gcc -pthread
CC_linux64 = $(CC_linux) -m64
CC_solaris = gcc
+CC_dragonfly = cc
CC_freebsd = gcc -pthread
+CC_netbsd = cc
CC_tru64 = cc
CC_irix = cc -n32 -woff 1110
CC_hpux = cc -Ae +DAportable
@@ -31,7 +33,7 @@ CC = $(CC_$(OS))
# Optimise/debug compilation
#OPTIM = -Wall -g
-OPTIM = -Wall -O3
+OPTIM = -Wall
# Location of gmp include and library
#
@@ -46,19 +48,19 @@ OPTIM = -Wall -O3
# BFINC = /usr/include/openssl
# BFLIB = -lcrypto
-BFINC = -I../blowfish-0.9.5a
-BFLIB = ../blowfish-0.9.5a/libblowfish.a
+BFINC =
+BFLIB = -lcrypto
# Location of zlib include and library
-ZINC = -I../zlib-1.2.3
-ZLIB = ../zlib-1.2.3/libz.a
+ZINC =
+ZLIB = -lz
# Location of bzlib include and library
# Set these empty if you don't want bzib2 support
-BZINC = -I../bzip2-1.0.3
-BZLIB = ../bzip2-1.0.3/libbz2.a
+BZINC =
+BZLIB = -lbz2
#
# Tools needed for Perl "POD"-format documentation conversion.
@@ -74,10 +76,10 @@ POD2MAN = $(PERL) -S pod2man$(BAT_$(OS))
# Installation directories for the Linux/Solaris/*NIX World
-ROOTDIR = /usr
+ROOTDIR =$(DESTDIR)$(PREFIX)
BINDIR = $(ROOTDIR)/bin
-ZBDDIR = $(ROOTDIR)/lib/zebedee
-MANDIR = $(ROOTDIR)/man/man1
+ZBDDIR = $(ROOTDIR)/share/doc/zebedee
+MANDIR = $(ROOTDIR)/${PKGMANDIR}/man1
# This is a BSD-style install
@@ -87,12 +89,13 @@ INSTALL_linux = install -c
INSTALL_linux64 = $(INSTALL_linux)
INSTALL_solaris = /usr/ucb/install -c
INSTALL_freebsd = install -c
+INSTALL_netbsd = install -c
INSTALL_tru64 = installbsd -c
INSTALL_irix = install -c
INSTALL_hpux = install -c
INSTALL_macosx = install
INSTALL_bsdi = install -c
-INSTALL = $(INSTALL_$(OS))
+INSTALL = $(BSD_INSTALL)
# InnoSetup compiler for Win32 (see http://www.jordanr.dhs.org/)
@@ -148,12 +151,14 @@ DEFINES_linux = -DHAVE_PTHREADS
DEFINES_linux64 = $(DEFINES_linux)
DEFINES_solaris = -D_REENTRANT -DHAVE_PTHREADS
DEFINES_freebsd = -DHAVE_PTHREADS -DBUGGY_FORK_WITH_THREADS
+DEFINES_dragonfly = -DHAVE_PTHREADS -DBUGGY_FORK_WITH_THREADS
+DEFINES_netbsd =
DEFINES_tru64 = -D_REENTRANT -DHAVE_PTHREADS
DEFINES_irix = -D_REENTRANT -DHAVE_PTHREADS -Dinline=
DEFINES_hpux = -D_REENTRANT -DHAVE_PTHREADS -DDONT_HAVE_SELECT_H -Dinline=
DEFINES_macosx = -D_REENTRANT -DHAVE_PTHREADS -DTHREAD_STACK_SIZE=49152
DEFINES_bsdi =
-DEFINES = $(DEFINES_$(OS))
+DEFINES = $(DEFINES_$(OS)) $(PTHREAD_CFLAGS)
# Suffix for executables
@@ -163,14 +168,16 @@ EXE = $(EXE_$(OS))
# Extra OS-specific libraries
OSLIBS_win32 = -lwsock32 -lwinmm
-OSLIBS_linux = -lpthread
+OSLIBS_linux =
OSLIBS_linux64 = $(OSLIBS_linux)
-OSLIBS_solaris = -lsocket -lnsl -lthread
+OSLIBS_solaris = -lsocket -lnsl
OSLIBS_freebsd =
-OSLIBS_tru64 = -lpthread
-OSLIBS_irix = -lpthread
-OSLIBS_hpux = -lpthread -lnsl
-OSLIBS_macosx = -lpthread
+OSLIBS_dragonfly =
+OSLIBS_netbsd =
+OSLIBS_tru64 =
+OSLIBS_irix =
+OSLIBS_hpux = -lnsl
+OSLIBS_macosx =
OSLIBS_bsdi =
OSLIBS = $(OSLIBS_$(OS))
@@ -186,9 +193,10 @@ SERVICEOBJ = $(SERVICEOBJ_$(OS))
#### You REALLY shouldn't have to modify anything beyond here ...
####
-CFLAGS = $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
+CFLAGS += $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
-LIBS = $(GMPLIB) $(BFLIB) $(ZLIB) $(BZLIB) $(OSLIBS)
+LDFLAGS += $(PTHREAD_LDFLAGS)
+LIBS = $(GMPLIB) $(BFLIB) $(ZLIB) $(BZLIB) $(OSLIBS) $(PTHREAD_LIBS)
OBJS = zebedee.o sha_func.o huge.o $(GETOPTOBJ) $(SERVICEOBJ)
@@ -196,17 +204,17 @@ ZBDFILES = server.zbd vncviewer.zbd vncs
client1.key client2.key clients.id
TXTFILES = README.txt LICENCE.txt GPL2.txt CHANGES.txt NOTICE.txt \
- zebedee.html ftpgw.tcl.html zebedee.ja_JP.html zebedee.iss
+ zebedee.html ftpgw.tcl.html zebedee.ja_JP.html
EXTRAFILES = $(ZBDFILES) $(TXTFILES)
all : precheck zebedee$(EXE) zebedee.1 zebedee.html ftpgw.tcl.1 ftpgw.tcl.html zebedee.ja_JP.html
precheck :
- @ if test -z "$(OS)"; then echo "Use '$(MAKE) OS=xxx' where xxx is win32, linux, linux64, solaris, freebsd, tru64, irix, hpux, macosx or bsdi"; exit 1; fi
+ @ if test -z "$(OS)"; then echo "Use '$(MAKE) OS=xxx' where xxx is win32, linux, linux64, solaris, freebsd, netbsd, openbsd, tru64, irix, hpux, macosx or bsdi"; exit 1; fi
zebedee$(EXE) : $(OBJS)
- $(CC) $(CFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
+ $(CC) $(LDFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
huge.o : huge.h
@@ -236,12 +244,12 @@ ftpgw.tcl.html : ftpgw.tcl.pod
install : precheck zebedee$(EXE) zebedee.1 ftpgw.tcl.1 $(ZBDFILES) $(TXTFILES)
-mkdir -p $(BINDIR) $(MANDIR) $(ZBDDIR)
- $(INSTALL) zebedee$(EXE) $(BINDIR)
+ $(INSTALL) -s -m 755 zebedee$(EXE) $(BINDIR)
$(INSTALL) -m 0755 ftpgw.tcl $(BINDIR)
- $(INSTALL) zebedee.1 $(MANDIR)
- $(INSTALL) ftpgw.tcl.1 $(MANDIR)
- $(INSTALL) $(ZBDFILES) $(ZBDDIR)
- $(INSTALL) $(TXTFILES) $(ZBDDIR)
+ $(INSTALL) -m 0444 zebedee.1 $(MANDIR)
+ $(INSTALL) -m 0444 ftpgw.tcl.1 $(MANDIR)
+ $(INSTALL) -m 0444 $(ZBDFILES) $(ZBDDIR)
+ $(INSTALL) -m 0444 $(TXTFILES) $(ZBDDIR)
clean :
rm -f zebedee zebedee.exe *.o core *.1 *.html *.tmp *.bak