- fix segfault when playing with pkcs12; from gentoo; from upstream
[packages/openssl.git] / openssl-libvar.patch
1 diff -ur openssl-0.9.8b/apps/Makefile openssl-0.9.8b.varLIB/apps/Makefile
2 --- openssl-0.9.8b/apps/Makefile        2005-07-05 20:41:28.000000000 +0200
3 +++ openssl-0.9.8b.varLIB/apps/Makefile 2006-07-14 21:37:55.000000000 +0200
4 @@ -102,16 +102,12 @@
5         @set -e; for i in $(EXE); \
6         do  \
7         (echo installing $$i; \
8 -        cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
9 -        chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
10 -        mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
11 +        install $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
12          done;
13         @set -e; for i in $(SCRIPTS); \
14         do  \
15         (echo installing $$i; \
16 -        cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
17 -        chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new; \
18 -        mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i.new $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
19 +        install $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \
20          done
21         @cp openssl.cnf $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
22         chmod 644 $(INSTALL_PREFIX)$(OPENSSLDIR)/openssl.cnf.new; \
23 Nom├ęs a openssl-0.9.8b.varLIB/apps: Makefile~
24 diff -ur openssl-0.9.8b/Configure openssl-0.9.8b.varLIB/Configure
25 --- openssl-0.9.8b/Configure    2006-07-14 21:12:31.000000000 +0200
26 +++ openssl-0.9.8b.varLIB/Configure     2006-07-14 21:21:09.000000000 +0200
27 @@ -561,6 +561,7 @@
28  my $idx_arflags = $idx++;
29  
30  my $prefix="";
31 +my $lib="lib";
32  my $openssldir="";
33  my $exe_ext="";
34  my $install_prefix="";
35 @@ -737,6 +738,10 @@
36                                 {
37                                 $prefix=$1;
38                                 }
39 +                       elsif (/^--lib=(.*)$/)
40 +                               {
41 +                               $lib=$1;
42 +                               }
43                         elsif (/^--openssldir=(.*)$/)
44                                 {
45                                 $openssldir=$1;
46 @@ -1283,6 +1288,7 @@
47         s/^SHLIB_MINOR=.*/SHLIB_MINOR=$shlib_minor/;
48         s/^SHLIB_EXT=.*/SHLIB_EXT=$shared_extension/;
49         s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/;
50 +       s/^LIBD=.*$/LIBD=$lib/;
51         s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
52         s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
53         s/^PLATFORM=.*$/PLATFORM=$target/;
54 diff -ur openssl-0.9.8b/engines/Makefile openssl-0.9.8b.varLIB/engines/Makefile
55 --- openssl-0.9.8b/engines/Makefile     2006-02-04 02:49:34.000000000 +0100
56 +++ openssl-0.9.8b.varLIB/engines/Makefile      2006-07-14 21:34:48.000000000 +0200
57 @@ -97,13 +97,12 @@
58                                 *DSO_DL*)       sfx="sl";;      \
59                                 *)              sfx="bad";;     \
60                                 esac; \
61 -                               cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
62 +                               install lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/engines/lib$$l.$$sfx; \
63                           else \
64                                 sfx="so"; \
65 -                               cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
66 +                               install cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/engines/lib$$l.$$sfx; \
67                           fi; \
68 -                         chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
69 -                         mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
70 +                       ); \
71                 done; \
72         fi
73  
74 diff -ur openssl-0.9.8b/Makefile.org openssl-0.9.8b.varLIB/Makefile.org
75 --- openssl-0.9.8b/Makefile.org 2006-07-14 21:12:31.000000000 +0200
76 +++ openssl-0.9.8b.varLIB/Makefile.org  2006-07-14 21:32:12.000000000 +0200
77 @@ -25,6 +25,7 @@
78  # Normally it is left empty.
79  INSTALL_PREFIX=
80  INSTALLTOP=/usr/local/ssl
81 +LIBD=lib
82  
83  # Do not edit this manually. Use Configure --openssldir=DIR do change this!
84  OPENSSLDIR=/usr/local/ssl
85 @@ -172,7 +173,7 @@
86                 CC='${CC}' CFLAG='${CFLAG}'                     \
87                 AS='${CC}' ASFLAG='${CFLAG} -c'                 \
88                 AR='${AR}' PERL='${PERL}' RANLIB='${RANLIB}'    \
89 -               SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/lib'   \
90 +               SDIRS='${SDIRS}' LIBRPATH='${INSTALLTOP}/$(LIBD)' LIBD='$(LIBD)' \
91                 INSTALL_PREFIX='${INSTALL_PREFIX}'              \
92                 INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}'   \
93                 MAKEDEPEND='$$$${TOP}/util/domd $$$${TOP} -MD ${MAKEDEPPROG}' \
94 @@ -301,7 +302,7 @@
95  libcrypto.pc: Makefile
96         @ ( echo 'prefix=$(INSTALLTOP)'; \
97             echo 'exec_prefix=$${prefix}'; \
98 -           echo 'libdir=$${exec_prefix}/lib'; \
99 +           echo 'libdir=$${exec_prefix}/$(LIBD)'; \
100             echo 'includedir=$${prefix}/include'; \
101             echo ''; \
102             echo 'Name: OpenSSL-libcrypto'; \
103 @@ -314,7 +315,7 @@
104  libssl.pc: Makefile
105         @ ( echo 'prefix=$(INSTALLTOP)'; \
106             echo 'exec_prefix=$${prefix}'; \
107 -           echo 'libdir=$${exec_prefix}/lib'; \
108 +           echo 'libdir=$${exec_prefix}/$(LIBD)'; \
109             echo 'includedir=$${prefix}/include'; \
110             echo ''; \
111             echo 'Name: OpenSSL'; \
112 @@ -327,7 +328,7 @@
113  openssl.pc: Makefile
114         @ ( echo 'prefix=$(INSTALLTOP)'; \
115             echo 'exec_prefix=$${prefix}'; \
116 -           echo 'libdir=$${exec_prefix}/lib'; \
117 +           echo 'libdir=$${exec_prefix}/$(LIBD)'; \
118             echo 'includedir=$${prefix}/include/openssl'; \
119             echo ''; \
120             echo 'Name: OpenSSL'; \
121 @@ -477,9 +478,9 @@
122  
123  install_sw:
124         @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
125 -               $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
126 -               $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
127 -               $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
128 +               $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD) \
129 +               $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/engines \
130 +               $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/pkgconfig \
131                 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
132                 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
133                 $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \
134 @@ -494,10 +495,9 @@
135         do \
136                 if [ -f "$$i" ]; then \
137                 (       echo installing $$i; \
138 -                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
139 -                       $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
140 -                       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
141 -                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
142 +                       install $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/$$i; \
143 +                       $(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/$$i; \
144 +               ); \
145                 fi; \
146         done;
147         @set -e; if [ -n "$(SHARED_LIBS)" ]; then \
148 @@ -507,36 +507,30 @@
149                         if [ -f "$$i" -o -f "$$i.a" ]; then \
150                         (       echo installing $$i; \
151                                 if [ "$(PLATFORM)" != "Cygwin" ]; then \
152 -                                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
153 -                                       chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
154 -                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
155 +                                       install $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/$$i; \
156                                 else \
157                                         c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
158 -                                       cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
159 -                                       chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
160 -                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
161 -                                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
162 -                                       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
163 -                                       mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
164 +                                       install $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
165 +                                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/$$i; \
166                                 fi ); \
167                         fi; \
168                 done; \
169                 (       here="`pwd`"; \
170 -                       cd $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
171 +                       cd $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD); \
172                         $(MAKE) -f $$here/Makefile HERE="$$here" link-shared ); \
173                 if [ "$(INSTALLTOP)" != "/usr" ]; then \
174                         echo 'OpenSSL shared libraries have been installed in:'; \
175 -                       echo '  $(INSTALLTOP)'; \
176 +                       echo '  $(INSTALLTOP)/$(LIBD)'; \
177                         echo ''; \
178                         sed -e '1,/^$$/d' doc/openssl-shared.txt; \
179                 fi; \
180         fi
181 -       cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
182 -       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libcrypto.pc
183 -       cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
184 -       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/libssl.pc
185 -       cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig
186 -       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig/openssl.pc
187 +       cp libcrypto.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/pkgconfig
188 +       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/pkgconfig/libcrypto.pc
189 +       cp libssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/pkgconfig
190 +       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/pkgconfig/libssl.pc
191 +       cp openssl.pc $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/pkgconfig
192 +       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBD)/pkgconfig/openssl.pc
193  
194  install_docs:
195         @$(PERL) $(TOP)/util/mkdir-p.pl \
This page took 0.048569 seconds and 3 git commands to generate.