fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / openssl / opensslmingw.patch
blob81dc95318914c8c475c538c399f589499921ff96
1 --- misc/openssl-0.9.8v/Makefile.shared 2008-09-17 17:56:40.000000000 +0200
2 +++ misc/build/openssl-0.9.8v/Makefile.shared 2009-03-30 11:52:53.684538000 +0200
3 @@ -278,7 +278,7 @@
4 link_a.cygwin:
5 @ $(CALC_VERSIONS); \
6 INHIBIT_SYMLINKS=yes; \
7 - SHLIB=cyg$(LIBNAME); SHLIB_SOVER=-$(LIBVERSION); SHLIB_SUFFIX=.dll; \
8 + SHLIB=cyg$(LIBNAME); SHLIB_SOVER=; SHLIB_SUFFIX=.dll; \
9 dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; extras=; \
10 base=-Wl,--enable-auto-image-base; \
11 if expr $(PLATFORM) : 'mingw' > /dev/null; then \
12 @@ -289,7 +289,11 @@
13 SHLIB_SOVER=32; \
14 extras="$(LIBNAME).def"; \
15 $(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \
16 - base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
17 + base=; \
18 + if test $(LIBNAME) = "crypto"; then \
19 + SHLIB=libeay32; \
20 + base=-Wl,--image-base,0x63000000; \
21 + fi; \
22 fi; \
23 dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
24 $(PERL) util/mkrc.pl $$dll_name | \
25 @@ -297,7 +301,7 @@
26 extras="$$extras rc.o"; \
27 ALLSYMSFLAGS='-Wl,--whole-archive'; \
28 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
29 - SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-s,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a $$extras"; \
30 + SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-s,-Bsymbolic -Wl,--export-all-symbols -Wl,--out-implib,lib$(LIBNAME).dll.a $$extras"; \
31 [ -f apps/$$dll_name ] && rm apps/$$dll_name; \
32 [ -f test/$$dll_name ] && rm test/$$dll_name; \
33 $(LINK_SO_A) || exit 1; \
34 --- misc/openssl-0.9.8v/e_os2.h 2005-12-19 03:57:07.000000000 +0900
35 +++ misc/build/openssl-0.9.8v/e_os2.h 2009-04-04 23:07:15.324250000 +0900
36 @@ -287,7 +287,7 @@
37 # ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
38 # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \
39 type *_shadow_##name(void) \
40 - { static type _hide_##name=value; return &_hide_##name; }
41 + { type _hide_##name=value; return &_hide_##name; }
42 # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
43 # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
44 # else
45 --- misc/openssl-0.9.8v/ms/mingw32.bat 2006-05-05 15:19:32.000000000 +0200
46 +++ misc/build/openssl-0.9.8v/ms/mingw32.bat 2009-03-30 11:54:10.000000000 +0200
47 @@ -79,15 +79,41 @@
48 rem copy ms\tlhelp32.h outinc
50 echo Building the libraries
51 -mingw32-make -f ms/mingw32a.mak
52 +make -f ms/mingw32a.mak
53 if errorlevel 1 goto end
55 echo Generating the DLLs and input libraries
56 -dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32
57 +mv out/libcrypto.a out/libcrypto_static.a
58 +mv out/libssl.a out/libssl_static.a
59 +dlltool --dllname libeay32.dll --output-lib out/libcrypto.a --input-def ms/libeay32.def
60 if errorlevel 1 goto end
61 -dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
62 +gcc --shared --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32
63 if errorlevel 1 goto end
64 +dlltool --dllname ssleay32.dll --output-lib out/libssl.a --input-def ms/ssleay32.def
65 +if errorlevel 1 goto end
66 +if "%MINGW_SHARED_GXXLIB%"=="TRUE" goto shared_gxxlib
67 +if "%MINGW_SHARED_GCCLIB%"=="TRUE" goto shared_gcclib
68 +gcc --shared --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32
69 +if errorlevel 1 goto end
70 +gcc --shared --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto
71 +if errorlevel 1 goto end
72 +goto finished
74 +:shared_gcclib
75 +gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32
76 +if errorlevel 1 goto end
77 +gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto
78 +if errorlevel 1 goto end
79 +goto finished
81 +:shared_gxxlib
82 +gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32 %MINGW_SHARED_LIBSTDSPP%
83 +if errorlevel 1 goto end
84 +gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto %MINGW_SHARED_LIBSTDSPP%
85 +if errorlevel 1 goto end
86 +goto finished
88 +:finished
89 echo Done compiling OpenSSL
91 :end
92 --- misc/openssl-0.9.8v/util/pl/Mingw32.pl 2006-05-05 15:19:34.000000000 +0200
93 +++ misc/build/openssl-0.9.8v/util/pl/Mingw32.pl 2009-03-30 11:55:04.000000000 +0200
94 @@ -6,11 +6,11 @@
95 $o='/';
96 $cp='cp';
97 $rm='rm -f';
98 -$mkdir='gmkdir';
99 +#$mkdir='gmkdir';
101 -$o='\\';
102 -$cp='copy';
103 -$rm='del';
104 +#$o='\\';
105 +#$cp='copy';
106 +#$rm='del';
107 $mkdir='mkdir';
109 # C compiler stuff
110 @@ -87,7 +87,8 @@
111 ($Name=$name) =~ tr/a-z/A-Z/;
113 $ret.="$target: \$(${Name}OBJ)\n";
114 - $ret.="\tif exist $target \$(RM) $target\n";
115 + $ret.="\t\$(RM) $target\n";
116 +# $ret.="\tif exist $target \$(RM) $target\n";
117 $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
118 $ret.="\t\$(RANLIB) $target\n\n";