]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/openssl/openssl-0.9.7b/debian.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / openssl / openssl-0.9.7b / debian.patch
1 --- openssl-0.9.7b.orig/apps/der_chop
2 +++ openssl-0.9.7b/apps/der_chop
3 @@ -1,4 +1,4 @@
4 -#!/usr/local/bin/perl
5 +#!/usr/bin/perl
6  #
7  # der_chop ... this is one total hack that Eric is really not proud of
8  #              so don't look at it and don't ask for support
9 --- openssl-0.9.7b.orig/apps/Makefile.ssl
10 +++ openssl-0.9.7b/apps/Makefile.ssl
11 @@ -3,7 +3,7 @@
12  #
13  
14  DIR=           apps
15 -TOP=           ..
16 +TOP=           $(shell pwd)/..
17  CC=            cc
18  INCLUDES=      -I$(TOP) -I../include $(KRB5_INCLUDES)
19  CFLAG=         -g -static
20 @@ -30,9 +30,14 @@
21  
22  GENERAL=Makefile makeapps.com install.com
23  
24 +TOP=$(shell pwd)/..
25 +#DLIBCRYPTO=../crypto/.libs/libcrypto.a
26  DLIBCRYPTO=../libcrypto.a
27 +#DLIBSSL=../ssl/.libs/libssl.a
28  DLIBSSL=../libssl.a
29 +#LIBCRYPTO=-L$(TOP)/crypto/.libs -lcrypto
30  LIBCRYPTO=-L.. -lcrypto
31 +#LIBSSL=-L$(TOP)/ssl/.libs -lssl
32  LIBSSL=-L.. -lssl
33  
34  PROGRAM= openssl
35 @@ -136,6 +141,8 @@
36  clean:
37         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
38         rm -f req
39 +       rm -f *.lo
40 +       rm -fr .libs
41  
42  $(DLIBSSL):
43         (cd ..; $(MAKE) DIRS=ssl all)
44 --- openssl-0.9.7b.orig/apps/progs.h
45 +++ openssl-0.9.7b/apps/progs.h
46 @@ -35,9 +35,7 @@
47  extern int spkac_main(int argc,char *argv[]);
48  extern int smime_main(int argc,char *argv[]);
49  extern int rand_main(int argc,char *argv[]);
50 -#ifndef OPENSSL_NO_ENGINE
51  extern int engine_main(int argc,char *argv[]);
52 -#endif
53  extern int ocsp_main(int argc,char *argv[]);
54  
55  #define FUNC_TYPE_GENERAL      1
56 @@ -94,9 +92,7 @@
57  #if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
58         {FUNC_TYPE_GENERAL,"s_client",s_client_main},
59  #endif
60 -#ifndef OPENSSL_NO_SPEED
61         {FUNC_TYPE_GENERAL,"speed",speed_main},
62 -#endif
63  #if !defined(OPENSSL_NO_SOCK) && !(defined(OPENSSL_NO_SSL2) && defined(OPENSSL_NO_SSL3))
64         {FUNC_TYPE_GENERAL,"s_time",s_time_main},
65  #endif
66 @@ -115,9 +111,7 @@
67         {FUNC_TYPE_GENERAL,"spkac",spkac_main},
68         {FUNC_TYPE_GENERAL,"smime",smime_main},
69         {FUNC_TYPE_GENERAL,"rand",rand_main},
70 -#ifndef OPENSSL_NO_ENGINE
71         {FUNC_TYPE_GENERAL,"engine",engine_main},
72 -#endif
73         {FUNC_TYPE_GENERAL,"ocsp",ocsp_main},
74  #ifndef OPENSSL_NO_MD2
75         {FUNC_TYPE_MD,"md2",dgst_main},
76 --- openssl-0.9.7b.orig/Configure
77 +++ openssl-0.9.7b/Configure
78 @@ -1,4 +1,4 @@
79 -:
80 +#!/usr/bin/perl
81  eval 'exec perl -S $0 ${1+"$@"}'
82      if $running_under_some_shell;
83  ##
84 @@ -1257,7 +1290,8 @@
85         elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
86                 {
87                 my $sotmp = $1;
88 -               s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
89 +#              s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
90 +               s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
91                 }
92         elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
93                 {
94 --- openssl-0.9.7b.orig/crypto/asn1/charmap.pl
95 +++ openssl-0.9.7b/crypto/asn1/charmap.pl
96 @@ -1,4 +1,4 @@
97 -#!/usr/local/bin/perl -w
98 +#!/usr/bin/perl
99  
100  use strict;
101  
102 --- openssl-0.9.7b.orig/crypto/Makefile.ssl
103 +++ openssl-0.9.7b/crypto/Makefile.ssl
104 @@ -34,6 +34,7 @@
105  
106  GENERAL=Makefile README crypto-lib.com install.com
107  
108 +#LIB= libcrypto.la
109  LIB= $(TOP)/libcrypto.a
110  SHARED_LIB= libcrypto$(SHLIB_EXT)
111  LIBSRC=        cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c tmdiff.c cpt_err.c ebcdic.c uid.c o_time.c
112 @@ -69,8 +70,9 @@
113         @for i in $(SDIRS) ;\
114         do \
115         (cd $$i && echo "making all in crypto/$$i..." && \
116 -       $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \
117 +       $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='true' all ) || exit 1; \
118         done;
119 +#      $(AR) $(LIB) *.lo */*.lo
120  
121  files:
122         $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
123 @@ -145,7 +147,9 @@
124         done;
125  
126  clean:
127 -       rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
128 +       rm -f buildinf.h *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff date.h
129 +       $(RM) -f *.lo */*.lo *.la
130 +       $(RM) -rf .libs
131         @for i in $(SDIRS) ;\
132         do \
133         (cd $$i && echo "making clean in crypto/$$i..." && \
134 --- openssl-0.9.7b.orig/crypto/md5/asm/md5-sparcv9.S
135 +++ openssl-0.9.7b/crypto/md5/asm/md5-sparcv9.S
136 @@ -72,14 +72,14 @@
137  #define Dval   R8
138  
139  #if defined(MD5_BLOCK_DATA_ORDER)
140 -# if defined(OPENSSL_SYSNAME_ULTRASPARC)
141 +/*# if defined(OPENSSL_SYSNAME_ULTRASPARC)*/
142  #  define      LOAD                    lda
143  #  define      X(i)                    [%i1+i*4]%asi
144  #  define      md5_block               md5_block_asm_data_order_aligned
145  #  define      ASI_PRIMARY_LITTLE      0x88
146 -# else
147 +/*# else
148  #  error "MD5_BLOCK_DATA_ORDER is supported only on UltraSPARC!"
149 -# endif
150 +# endif*/
151  #else
152  # define       LOAD                    ld
153  # define       X(i)                    [%i1+i*4]
154 --- openssl-0.9.7b.orig/crypto/opensslconf.h
155 +++ openssl-0.9.7b/crypto/opensslconf.h
156 @@ -4,17 +4,38 @@
157  /* OpenSSL was configured with the following options: */
158  #ifndef OPENSSL_DOING_MAKEDEPEND
159  
160 +#ifndef OPENSSL_NO_IDEA
161 +# define OPENSSL_NO_IDEA
162 +#endif
163 +#ifndef OPENSSL_NO_MDC2
164 +# define OPENSSL_NO_MDC2
165 +#endif
166 +#ifndef OPENSSL_NO_RC5
167 +# define OPENSSL_NO_RC5
168 +#endif
169  #ifndef OPENSSL_NO_KRB5
170  # define OPENSSL_NO_KRB5
171  #endif
172  
173  #endif /* OPENSSL_DOING_MAKEDEPEND */
174 +#ifndef OPENSSL_THREADS
175 +# define OPENSSL_THREADS
176 +#endif
177  
178  /* The OPENSSL_NO_* macros are also defined as NO_* if the application
179     asks for it.  This is a transient feature that is provided for those
180     who haven't had the time to do the appropriate changes in their
181     applications.  */
182  #ifdef OPENSSL_ALGORITHM_DEFINES
183 +# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
184 +#  define NO_IDEA
185 +# endif
186 +# if defined(OPENSSL_NO_MDC2) && !defined(NO_MDC2)
187 +#  define NO_MDC2
188 +# endif
189 +# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
190 +#  define NO_RC5
191 +# endif
192  # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
193  #  define NO_KRB5
194  # endif
195 @@ -27,7 +48,7 @@
196  
197  #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
198  #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
199 -#define OPENSSLDIR "/usr/local/ssl"
200 +#define OPENSSLDIR "/usr/lib/ssl"
201  #endif
202  #endif
203  
204 @@ -79,7 +100,7 @@
205  
206  #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
207  #define CONFIG_HEADER_BN_H
208 -#undef BN_LLONG
209 +#define BN_LLONG
210  
211  /* Should we define BN_DIV2W here? */
212  
213 @@ -98,7 +119,7 @@
214  #define CONFIG_HEADER_RC4_LOCL_H
215  /* if this is defined data[i] is used instead of *data, this is a %20
216   * speedup on x86 */
217 -#undef RC4_INDEX
218 +#define RC4_INDEX
219  #endif
220  
221  #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
222 @@ -112,14 +133,14 @@
223  /* the following is tweaked from a config script, that is why it is a
224   * protected undef/define */
225  #ifndef DES_PTR
226 -#undef DES_PTR
227 +#define DES_PTR
228  #endif
229  
230  /* This helps C compiler generate the correct code for multiple functional
231   * units.  It reduces register dependancies at the expense of 2 more
232   * registers */
233  #ifndef DES_RISC1
234 -#undef DES_RISC1
235 +#define DES_RISC1
236  #endif
237  
238  #ifndef DES_RISC2
239 @@ -133,7 +154,7 @@
240  /* Unroll the inner loop, this sometimes helps, sometimes hinders.
241   * Very mucy CPU dependant */
242  #ifndef DES_UNROLL
243 -#undef DES_UNROLL
244 +#define DES_UNROLL
245  #endif
246  
247  /* These default values were supplied by
248 --- openssl-0.9.7b.orig/demos/tunala/configure.in
249 +++ openssl-0.9.7b/demos/tunala/configure.in
250 @@ -1,4 +1,4 @@
251 -dnl Process this file with autoconf to produce a configure script.
252 +#!/usr/local/bin/perl
253  AC_INIT(tunala.c)
254  AM_CONFIG_HEADER(config.h)
255  AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
256 --- openssl-0.9.7b.orig/doc/crypto/RAND_add.pod
257 +++ openssl-0.9.7b/doc/crypto/RAND_add.pod
258 @@ -2,8 +2,7 @@
259  
260  =head1 NAME
261  
262 -RAND_add, RAND_seed, RAND_status, RAND_event, RAND_screen - add
263 -entropy to the PRNG
264 +RAND_add, RAND_seed, RAND_status, RAND_event, RAND_screen - add entropy to the PRNG
265  
266  =head1 SYNOPSIS
267  
268 --- openssl-0.9.7b.orig/doc/Makefile.ssl
269 +++ openssl-0.9.7b/doc/Makefile.ssl
270 @@ -0,0 +1,40 @@
271 +VERSION =
272 +
273 +#PODS = $(wildcard *.pod)
274 +#MANS = $(addsuffix .man, $(basename $(PODS)))
275 +
276 +MANS = openssl.1 ssl.3 crypto.3
277 +
278 +P2M = pod2man --center='OpenSSL Documentation' --release="OpenSSL $(VERSION)"
279 +
280 +all: manpages
281 +
282 +.PHONY: manpages 
283 +
284 +manpages: openssl.1 crypto.3 ssl.3
285 +
286 +openssl.1:
287 +       $(P2M) --section=1 openssl.pod > openssl.1
288 +
289 +crypto.3:
290 +       $(P2M) --section=3 crypto.pod > crypto.3
291 +
292 +ssl.3:
293 +       $(P2M) --section=3 ssl.pod > ssl.3
294 +
295 +.PHONY: install
296 +install:
297 +       mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
298 +       mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
299 +       install -m 644 -p openssl.1 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
300 +       install -m 644 -p crypto.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
301 +       install -m 644 -p ssl.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
302 +       rm -f $(MANS)
303 +
304 +.PHONY: clean
305 +clean:
306 +       rm -f $(MANS)
307 +
308 +.PHONY: realclean
309 +realclean:
310 +       -$(MAKE) clean
311 --- openssl-0.9.7b.orig/Makefile.org
312 +++ openssl-0.9.7b/Makefile.org
313 @@ -57,6 +57,7 @@
314  # equal 4.
315  # PKCS1_CHECK - pkcs1 tests.
316  
317 +#TOP=$(shell pwd)
318  CC= gcc
319  #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
320  CFLAG= -DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
321 @@ -173,7 +174,7 @@
322  # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
323  SHLIB_MARK=
324  
325 -DIRS=   crypto ssl $(SHLIB_MARK) apps test tools
326 +DIRS=   crypto ssl $(SHLIB_MARK) apps doc tools
327  SHLIBDIRS= crypto ssl
328  
329  # dirs in crypto to build
330 @@ -191,7 +192,8 @@
331  MAKEFILE= Makefile.ssl
332  MAKE=     make -f Makefile.ssl
333  
334 -MANDIR=$(OPENSSLDIR)/man
335 +MANDIR=/usr/share/man
336 +MANSUF=ssl
337  MAN1=1
338  MAN3=3
339  SHELL=/bin/sh
340 @@ -792,7 +794,7 @@
341         do \
342                 if [ -f "$$i" ]; then \
343                 (       echo installing $$i; \
344 -                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
345 +                       cp -d $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
346                         $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
347                         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
348                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
349 @@ -847,33 +849,35 @@
350         for i in doc/apps/*.pod; do \
351                 fn=`basename $$i .pod`; \
352                 if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
353 -               echo "installing man$$sec/$$fn.$$sec"; \
354 +               secsuf=`echo -n $$sec; echo $(MANSUF)`; \
355 +               echo "installing man$$sec/$$fn.$$secsuf"; \
356                 (cd `$(PERL) util/dirname.pl $$i`; \
357                 sh -c "$$pod2man \
358 -                       --section=$$sec --center=OpenSSL \
359 +                       --section=$$secsuf --center=OpenSSL \
360                         --release=$(VERSION) `basename $$i`") \
361 -                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
362 +                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$secsuf; \
363                 $(PERL) util/extract-names.pl < $$i | \
364                         grep -v $$filecase "^$$fn\$$" | \
365                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
366                          while read n; do \
367 -                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
368 +                               $$here/util/point.sh $$fn.$$secsuf $$n.$$secsuf; \
369                          done); \
370         done; \
371         for i in doc/crypto/*.pod doc/ssl/*.pod; do \
372                 fn=`basename $$i .pod`; \
373                 if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
374 -               echo "installing man$$sec/$$fn.$$sec"; \
375 +               secsuf=`echo -n $$sec; echo $(MANSUF)`; \
376 +               echo "installing man$$sec/$$fn.$$secsuf"; \
377                 (cd `$(PERL) util/dirname.pl $$i`; \
378                 sh -c "$$pod2man \
379 -                       --section=$$sec --center=OpenSSL \
380 +                       --section=$$secsuf --center=OpenSSL \
381                         --release=$(VERSION) `basename $$i`") \
382 -                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
383 +                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$secsuf; \
384                 $(PERL) util/extract-names.pl < $$i | \
385                         grep -v $$filecase "^$$fn\$$" | \
386                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
387                          while read n; do \
388 -                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
389 +                               $$here/util/point.sh $$fn.$$secsuf $$n.$$secsuf; \
390                          done); \
391         done
392  
393 --- openssl-0.9.7b.orig/Makefile.ssl
394 +++ openssl-0.9.7b/Makefile.ssl
395 @@ -11,11 +11,11 @@
396  SHLIB_VERSION_HISTORY=
397  SHLIB_MAJOR=0
398  SHLIB_MINOR=9.7
399 -SHLIB_EXT=
400 -PLATFORM=dist
401 -OPTIONS= no-krb5
402 -CONFIGURE_ARGS=dist
403 -SHLIB_TARGET=
404 +SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
405 +PLATFORM=debian-i386
406 +OPTIONS=--prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 no-krb5
407 +CONFIGURE_ARGS=--prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 debian-i386
408 +SHLIB_TARGET=linux-shared
409  
410  # HERE indicates where this Makefile lives.  This can be used to indicate
411  # where sub-Makefiles are expected to be.  Currently has very limited usage,
412 @@ -26,10 +26,10 @@
413  # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
414  # Normally it is left empty.
415  INSTALL_PREFIX=
416 -INSTALLTOP=/usr/local/ssl
417 +INSTALLTOP=/usr
418  
419  # Do not edit this manually. Use Configure --openssldir=DIR do change this!
420 -OPENSSLDIR=/usr/local/ssl
421 +OPENSSLDIR=/usr/lib/ssl
422  
423  # NO_IDEA - Define to build without the IDEA algorithm
424  # NO_RC4  - Define to build without the RC4 algorithm
425 @@ -59,20 +59,21 @@
426  # equal 4.
427  # PKCS1_CHECK - pkcs1 tests.
428  
429 -CC= cc
430 +#TOP=$(shell pwd)
431 +CC= gcc
432  #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
433 -CFLAG= -DOPENSSL_NO_KRB5 -O
434 -DEPFLAG= 
435 +CFLAG= -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
436 +DEPFLAG= -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 
437  PEX_LIBS= 
438 -EX_LIBS= 
439 +EX_LIBS= -ldl
440  EXE_EXT= 
441  ARFLAGS= 
442  AR=ar $(ARFLAGS) r
443  RANLIB= /usr/bin/ranlib
444 -PERL= /usr/local/bin/perl
445 +PERL= /usr/bin/perl
446  TAR= tar
447  TARFLAGS= --no-recursion
448 -MAKEDEPPROG=makedepend
449 +MAKEDEPPROG= gcc
450  
451  # We let the C compiler driver to take care of .s files. This is done in
452  # order to be excused from maintaining a separate set of architecture
453 @@ -175,13 +176,13 @@
454  # we might set SHLIB_MARK to '$(SHARED_LIBS)'.
455  SHLIB_MARK=
456  
457 -DIRS=   crypto ssl $(SHLIB_MARK) apps test tools
458 +DIRS=   crypto ssl $(SHLIB_MARK) apps doc tools
459  SHLIBDIRS= crypto ssl
460  
461  # dirs in crypto to build
462  SDIRS=  \
463 -       md2 md4 md5 sha mdc2 hmac ripemd \
464 -       des rc2 rc4 rc5 idea bf cast \
465 +       md2 md4 md5 sha hmac ripemd \
466 +       des rc2 rc4 bf cast \
467         bn ec rsa dsa dh dso engine aes \
468         buffer bio stack lhash rand err objects \
469         evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5
470 @@ -193,7 +194,8 @@
471  MAKEFILE= Makefile.ssl
472  MAKE=     make -f Makefile.ssl
473  
474 -MANDIR=$(OPENSSLDIR)/man
475 +MANDIR=/usr/share/man
476 +MANSUF=ssl
477  MAN1=1
478  MAN3=3
479  SHELL=/bin/sh
480 @@ -206,7 +208,7 @@
481  SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
482  SHARED_SSL=libssl$(SHLIB_EXT)
483  SHARED_LIBS=
484 -SHARED_LIBS_LINK_EXTS=
485 +SHARED_LIBS_LINK_EXTS=.so
486  SHARED_LDFLAGS=
487  
488  GENERAL=        Makefile
489 @@ -794,7 +796,7 @@
490         do \
491                 if [ -f "$$i" ]; then \
492                 (       echo installing $$i; \
493 -                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
494 +                       cp -d $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
495                         $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
496                         chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
497                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
498 @@ -849,33 +851,35 @@
499         for i in doc/apps/*.pod; do \
500                 fn=`basename $$i .pod`; \
501                 if [ "$$fn" = "config" ]; then sec=5; else sec=1; fi; \
502 -               echo "installing man$$sec/$$fn.$$sec"; \
503 +               secsuf=`echo -n $$sec; echo $(MANSUF)`; \
504 +               echo "installing man$$sec/$$fn.$$secsuf"; \
505                 (cd `$(PERL) util/dirname.pl $$i`; \
506                 sh -c "$$pod2man \
507 -                       --section=$$sec --center=OpenSSL \
508 +                       --section=$$secsuf --center=OpenSSL \
509                         --release=$(VERSION) `basename $$i`") \
510 -                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
511 +                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$secsuf; \
512                 $(PERL) util/extract-names.pl < $$i | \
513                         grep -v $$filecase "^$$fn\$$" | \
514                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
515                          while read n; do \
516 -                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
517 +                               $$here/util/point.sh $$fn.$$secsuf $$n.$$secsuf; \
518                          done); \
519         done; \
520         for i in doc/crypto/*.pod doc/ssl/*.pod; do \
521                 fn=`basename $$i .pod`; \
522                 if [ "$$fn" = "des_modes" ]; then sec=7; else sec=3; fi; \
523 -               echo "installing man$$sec/$$fn.$$sec"; \
524 +               secsuf=`echo -n $$sec; echo $(MANSUF)`; \
525 +               echo "installing man$$sec/$$fn.$$secsuf"; \
526                 (cd `$(PERL) util/dirname.pl $$i`; \
527                 sh -c "$$pod2man \
528 -                       --section=$$sec --center=OpenSSL \
529 +                       --section=$$secsuf --center=OpenSSL \
530                         --release=$(VERSION) `basename $$i`") \
531 -                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$sec; \
532 +                       >  $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$$secsuf; \
533                 $(PERL) util/extract-names.pl < $$i | \
534                         grep -v $$filecase "^$$fn\$$" | \
535                         (cd $(INSTALL_PREFIX)$(MANDIR)/man$$sec/; \
536                          while read n; do \
537 -                               $$here/util/point.sh $$fn.$$sec $$n.$$sec; \
538 +                               $$here/util/point.sh $$fn.$$secsuf $$n.$$secsuf; \
539                          done); \
540         done
541  
542 --- openssl-0.9.7b.orig/ssl/Makefile.ssl
543 +++ openssl-0.9.7b/ssl/Makefile.ssl
544 @@ -24,6 +24,7 @@
545  TEST=ssltest.c
546  APPS=
547  
548 +#LIB=libssl.la
549  LIB=$(TOP)/libssl.a
550  SHARED_LIB= libssl$(SHLIB_EXT)
551  LIBSRC=        \
552 @@ -58,6 +59,7 @@
553  all:   lib shared
554  
555  lib:   $(LIBOBJ)
556 +#      $(AR) $(LIB) *.lo
557         $(AR) $(LIB) $(LIBOBJ)
558         $(RANLIB) $(LIB) || echo Never mind.
559         @touch lib
560 @@ -100,6 +102,8 @@
561  
562  clean:
563         rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
564 +       rm -f *.lo *.la
565 +       rm -rf .libs
566  
567  # DO NOT DELETE THIS LINE -- make depend depends on it.
568  
569 --- openssl-0.9.7b.orig/ssl/ssl_algs.c
570 +++ openssl-0.9.7b/ssl/ssl_algs.c
571 @@ -109,3 +109,8 @@
572         return(1);
573         }
574  
575 +#undef SSLeay_add_ssl_algorithms
576 +int SSLeay_add_ssl_algorithms(void)
577 +    {
578 +         return SSL_library_init();
579 +    }
580 --- openssl-0.9.7b.orig/test/Makefile.ssl
581 +++ openssl-0.9.7b/test/Makefile.ssl
582 @@ -3,7 +3,7 @@
583  #
584  
585  DIR=           test
586 -TOP=           ..
587 +TOP=           $(shell pwd)/..
588  CC=            cc
589  INCLUDES=      -I$(TOP) -I../include $(KRB5_INCLUDES)
590  CFLAG=         -g
591 @@ -29,6 +29,10 @@
592         tpkcs7.com tpkcs7d.com tverify.com testgen.com testss.com testssl.com \
593         testca.com VMSca-response.1 VMSca-response.2
594  
595 +#DLIBCRYPTO= ../crypto/.libs/libcrypto.a
596 +#DLIBSSL= ../ssl/.libs/libssl.a
597 +#LIBCRYPTO= -L$(TOP)/crypto/.libs -lcrypto
598 +#LIBSSL= -L$(TOP)/ssl/.libs -lssl
599  DLIBCRYPTO= ../libcrypto.a
600  DLIBSSL= ../libssl.a
601  LIBCRYPTO= -L.. -lcrypto
602 --- openssl-0.9.7b.orig/tools/c_rehash
603 +++ openssl-0.9.7b/tools/c_rehash
604 @@ -1,4 +1,4 @@
605 -#!/usr/local/bin/perl
606 +#!/usr/bin/perl
607  
608  
609  # Perl c_rehash script, scan all files in a directory
610 @@ -6,7 +6,7 @@
611  
612  my $openssl;
613  
614 -my $dir = "/usr/local/ssl";
615 +my $dir = "/usr/lib/ssl";
616  
617  if(defined $ENV{OPENSSL}) {
618         $openssl = $ENV{OPENSSL};
619 --- openssl-0.9.7b.orig/tools/c_rehash.in
620 +++ openssl-0.9.7b/tools/c_rehash.in
621 @@ -1,4 +1,4 @@
622 -#!/usr/local/bin/perl
623 +#!/usr/bin/perl
624  
625  
626  # Perl c_rehash script, scan all files in a directory
627 --- openssl-0.9.7b.orig/util/clean-depend.pl
628 +++ openssl-0.9.7b/util/clean-depend.pl
629 @@ -1,4 +1,4 @@
630 -#!/usr/local/bin/perl -w
631 +#!/usr/local/bin/perl
632  # Clean the dependency list in a makefile of standard includes...
633  # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
634  
635 --- openssl-0.9.7b.orig/util/extract-names.pl
636 +++ openssl-0.9.7b/util/extract-names.pl
637 @@ -1,4 +1,4 @@
638 -#!/usr/bin/perl
639 +#!/usr/local/bin/perl
640  
641  $/ = "";                       # Eat a paragraph at once.
642  while(<STDIN>) {
643 --- openssl-0.9.7b.orig/util/mkdef.pl
644 +++ openssl-0.9.7b/util/mkdef.pl
645 @@ -1,4 +1,4 @@
646 -#!/usr/local/bin/perl -w
647 +#!/usr/local/bin/perl
648  #
649  # generate a .def file
650  #
651 --- openssl-0.9.7b.orig/util/mkerr.pl
652 +++ openssl-0.9.7b/util/mkerr.pl
653 @@ -1,4 +1,4 @@
654 -#!/usr/local/bin/perl -w
655 +#!/usr/local/bin/perl
656  
657  my $config = "crypto/err/openssl.ec";
658  my $debug = 0;
659 --- openssl-0.9.7b.orig/util/mkstack.pl
660 +++ openssl-0.9.7b/util/mkstack.pl
661 @@ -1,4 +1,4 @@
662 -#!/usr/local/bin/perl -w
663 +#!/usr/local/bin/perl
664  
665  # This is a utility that searches out "DECLARE_STACK_OF()"
666  # declarations in .h and .c files, and updates/creates/replaces
667 --- openssl-0.9.7b.orig/util/pod2man.pl
668 +++ openssl-0.9.7b/util/pod2man.pl
669 @@ -1,4 +1,4 @@
670 -: #!/usr/bin/perl-5.005
671 +#!/usr/local/bin/perl
672      eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
673         if $running_under_some_shell;
674  
675 --- openssl-0.9.7b.orig/util/selftest.pl
676 +++ openssl-0.9.7b/util/selftest.pl
677 @@ -1,4 +1,4 @@
678 -#!/usr/local/bin/perl -w
679 +#!/usr/local/bin/perl
680  #
681  # Run the test suite and generate a report
682  #