Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / net / pppd / patches / patch-aj
blobf547a6b34acada7605991ef243ca638487bc52a0
1 $NetBSD: patch-aj,v 1.1.1.1 2005/01/02 02:51:42 cube Exp $
3 --- pppd/Makefile.netbsd.orig   2008-12-19 11:48:24 +0200
4 +++ pppd/Makefile.netbsd        2008-12-19 12:14:52 +0200
5 @@ -0,0 +1,226 @@
6 +#
7 +# pppd makefile for NetBSD
8 +#
10 +# Default installation locations
11 +DESTDIR = @DESTDIR@
12 +BINDIR = $(DESTDIR)/sbin
13 +MANDIR = $(DESTDIR)/man/man8
14 +INCDIR = $(DESTDIR)/include
16 +TARGETS = pppd
18 +PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap-new.c md5.c ccp.c \
19 +          ecp.c ipxcp.c auth.c options.c sys-bsd.c chap_ms.c \
20 +          demand.c utils.c tty.c eap.c chap-md5.c
22 +HEADERS = ccp.h chap-new.h ecp.h fsm.h ipcp.h \
23 +       ipxcp.h lcp.h magic.h md5.h patchlevel.h pathnames.h pppd.h \
24 +       upap.h eap.h
26 +MANPAGES = pppd.8
27 +PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap-new.o md5.o ccp.o \
28 +          ecp.o auth.o options.o demand.o utils.o sys-bsd.o ipxcp.o tty.o \
29 +          eap.o chap-md5.o
32 +# include dependencies if present
33 +ifeq (.depend,$(wildcard .depend))
34 +include .depend
35 +endif
37 +# CC = gcc
39 +COPTS = -O2 -pipe -Wall -g
40 +LIBS = -lutil
42 +ifeq ($(shell /usr/bin/uname -s),DragonFly)
43 +LIBS += -lcipher -lmd
44 +endif
46 +# Uncomment the next 2 lines to include support for Microsoft's
47 +# MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
48 +CHAPMS=y
49 +USE_CRYPT=y
50 +# Don't use MSLANMAN unless you really know what you're doing.
51 +#MSLANMAN=y
52 +# Uncomment the next line to include support for MPPE.  CHAPMS (above) must
53 +# also be enabled.  Also, edit plugins/radius/Makefile.linux.
54 +MPPE=y
56 +# Uncomment the next line to include support for PPP packet filtering.
57 +# This requires that the libpcap library and headers be installed
58 +# and that the kernel driver support PPP packet filtering.
59 +FILTER=y
61 +# Uncomment the next line to enable multilink PPP (enabled by default)
62 +# Linux distributions: Please leave multilink ENABLED in your builds
63 +# of pppd!
64 +HAVE_MULTILINK=y
66 +# Uncomment the next line to enable the TDB database (enabled by default.)
67 +# If you enable multilink, then TDB is automatically enabled also.
68 +# Linux distributions: Please leave TDB ENABLED in your builds.
69 +USE_TDB=y
71 +#HAS_SHADOW=y
72 +#USE_PAM=y
73 +#HAVE_INET6=y
75 +# Enable plugins
76 +PLUGIN=y
78 +# Enable Microsoft proprietary Callback Control Protocol
79 +#CBCP=y
81 +# Enable EAP SRP-SHA1 authentication (requires libsrp)
82 +#USE_SRP=y
84 +MAXOCTETS=y
86 +INCLUDE_DIRS= -I../include
88 +COMPILE_FLAGS= -DHAVE_PATHS_H -DHAVE_MMAP -DHAS_STRLFUNCS
90 +CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
92 +ifdef CHAPMS
93 +CFLAGS   += -DCHAPMS=1
94 +NEEDDES=y
95 +PPPDOBJS += chap_ms.o
96 +HEADERS        += chap_ms.h
97 +ifdef MSLANMAN
98 +CFLAGS   += -DMSLANMAN=1
99 +endif
100 +ifdef MPPE
101 +CFLAGS   += -DMPPE=1
102 +endif
103 +endif
105 +# EAP SRP-SHA1
106 +ifdef USE_SRP
107 +CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
108 +LIBS   += -lsrp -L/usr/local/ssl/lib -lcrypto
109 +TARGETS        += srp-entry
110 +EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
111 +MANPAGES += srp-entry.8
112 +EXTRACLEAN += srp-entry.o
113 +NEEDDES=y
114 +else
115 +# OpenSSL has an integrated version of SHA-1, and its implementation
116 +# is incompatible with this local SHA-1 implementation.  We must use
117 +# one or the other, not both.
118 +PPPDSRCS += sha1.c
119 +HEADERS += sha1.h
120 +PPPDOBJS += sha1.o
121 +endif
123 +ifdef HAS_SHADOW
124 +CFLAGS   += -DHAS_SHADOW
125 +#LIBS     += -lshadow $(LIBS)
126 +endif
128 +ifneq ($(wildcard /usr/include/crypt.h),)
129 +CFLAGS   += -DHAVE_CRYPT_H=1
130 +endif
131 +ifneq ($(wildcard /usr/lib/libcrypt.*),)
132 +LIBS   += -lcrypt
133 +endif
135 +ifdef NEEDDES
136 +ifndef USE_CRYPT
137 +LIBS     += -ldes $(LIBS)
138 +else
139 +CFLAGS   += -DUSE_CRYPT=1
140 +endif
141 +PPPDOBJS += pppcrypt.o
142 +HEADERS += pppcrypt.h
143 +endif
145 +# For "Pluggable Authentication Modules", see ftp.redhat.com:/pub/pam/.
146 +ifdef USE_PAM
147 +CFLAGS   += -DUSE_PAM
148 +LIBS     += -lpam
149 +endif
151 +# Multi-linnk
152 +ifdef HAVE_MULTILINK
153 +       # Multilink implies the use of TDB
154 +       USE_TDB=y
156 +       CFLAGS += -DHAVE_MULTILINK
157 +       PPPDSRCS += multilink.c
158 +       PPPDOBJS += multilink.o
159 +endif
161 +# TDB
162 +ifdef USE_TDB
163 +       CFLAGS += -DUSE_TDB=1
164 +       PPPDSRCS += tdb.c spinlock.c
165 +       PPPDOBJS += tdb.o spinlock.o
166 +       HEADERS += tdb.h spinlock.h
167 +endif
169 +# Lock library binary for Linux is included in 'linux' subdirectory.
170 +ifdef LOCKLIB
171 +LIBS     += -llock
172 +CFLAGS   += -DLOCKLIB=1
173 +endif
175 +ifdef PLUGIN
176 +CFLAGS += -DPLUGIN
177 +LDFLAGS        += -Wl,-E
178 +endif
180 +ifdef FILTER
181 +ifneq ($(wildcard /usr/include/pcap-bpf.h),)
182 +LIBS    += -lpcap
183 +CFLAGS  += -DPPP_FILTER
184 +endif
185 +endif
187 +ifdef HAVE_INET6
188 +     PPPDSRCS += ipv6cp.c eui64.c
189 +     HEADERS  += ipv6cp.h eui64.h
190 +     PPPDOBJS += ipv6cp.o eui64.o
191 +     CFLAGS   += -DINET6=1
192 +endif
194 +ifdef CBCP
195 +     PPPDSRCS += cbcp.c
196 +     PPPDOBJS += cbcp.o
197 +     CFLAGS += -DCBCP_SUPPORT
198 +     HEADERS += cbcp.h
199 +endif
201 +ifdef MAXOCTETS
202 +     CFLAGS += -DMAXOCTETS
203 +endif
205 +INSTALL= install
207 +all: $(TARGETS)
209 +install: pppd
210 +       mkdir -p $(BINDIR) $(MANDIR)
211 +       $(EXTRAINSTALL)
212 +       $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
213 +       if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
214 +         chmod o-rx,u+s $(BINDIR)/pppd; fi
215 +       $(INSTALL) -c -m 444 pppd.8 $(MANDIR)
217 +pppd: $(PPPDOBJS)
218 +       $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
220 +srp-entry:     srp-entry.c
221 +       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
223 +install-devel:
224 +       mkdir -p $(INCDIR)/pppd
225 +       $(INSTALL) -c -m 644 $(HEADERS) $(INCDIR)/pppd
227 +clean:
228 +       rm -f $(PPPDOBJS) $(EXTRACLEAN) $(TARGETS) *~ #* core
230 +depend:
231 +       $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend