Farkas Levente wrote:
> hi,
> it a few fix for the original openssl package.
> of course after this applied we'd have to update to the latest openssl
> security fix too.
> 

ops. it seems i forget the attachment, but no one complains!?
can you apply it?

-- 
  Levente                               "Si vis pacem para bellum!"
diff -r ba1970b75898 openssl/mingw32-openssl-0.9.8g-configure.patch
--- a/openssl/mingw32-openssl-0.9.8g-configure.patch    Fri Dec 19 10:11:50 
2008 +0000
+++ b/openssl/mingw32-openssl-0.9.8g-configure.patch    Fri Jan 09 14:18:00 
2009 +0100
@@ -10,7 +10,7 @@ diff -ur openssl-0.9.8g.orig/Configure o
  
  # MinGW
 -"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall -D_WIN32_WINNT=0x333:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-mno-cygwin -shared:.dll.a",
-+"mingw", "i686-pc-mingw32-gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
-Wall -D_WIN32_WINNT=0x333 -DMK1MF_BUILD:::MINGW32:-lwsock32 -lgdi32:BN_LLONG 
${x86_gcc_des} ${x86_gcc_opts} 
EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-shared:.dll.a:i686-pc-mingw32-ranlib",
++"mingw", "MINGW32_CC:-DL_ENDIAN -Wall MINGW32_CFLAGS -D_WIN32_WINNT=0x333 
-DMK1MF_BUILD:::MINGW32:-lwsock32 -lgdi32:BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
-DOPENSSL_USE_APPLINK:-shared:.dll.a:MINGW32_RANLIB",
  
  # UWIN 
  "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} 
${x86_gcc_opts}:${no_asm}:win32",
diff -r ba1970b75898 openssl/mingw32-openssl.spec
--- a/openssl/mingw32-openssl.spec      Fri Dec 19 10:11:50 2008 +0000
+++ b/openssl/mingw32-openssl.spec      Fri Jan 09 14:22:17 2009 +0100
@@ -8,11 +8,11 @@
 # These only work some of the time, but fail randomly at other times
 # (although I have had them complete a few times, so I don't think
 # there is any actual problem with the binaries).
-%define with_tests 0
+%define run_tests 0
 
 Name:           mingw32-openssl
 Version:        0.9.8g
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        MinGW port of the OpenSSL toolkit
 
 License:        OpenSSL
@@ -65,11 +65,12 @@ BuildRoot:      %{_tmppath}/%{name}-%{ve
 
 BuildArch:      noarch
 
-BuildRequires:  mingw32-filesystem >= 26
+BuildRequires:  mingw32-filesystem >= 40
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
 
 BuildRequires:  mingw32-zlib
+BuildRequires:  mingw32-pthreads
 
 BuildRequires:  mktemp
 #BuildRequires:  krb5-devel
@@ -82,12 +83,12 @@ BuildRequires:  /usr/bin/rename
 # /usr/bin/makedepend which comes from imake.
 BuildRequires:  imake
 
+%if %{run_tests}
 # Required both to build, and to run the tests.
 # XXX This needs to be fixed - cross-compilation should not
 # require running executables.
 BuildRequires:  wine
 
-%if %{with_tests}
 # Required to run the tests.
 BuildRequires:  xorg-x11-server-Xvfb
 %endif
@@ -151,14 +152,16 @@ make TABLE PERL=%{__perl}
 
 %build
 
-cat > gcc <<EOS
-#!/bin/sh -
-%{_bindir}/i686-pc-mingw32-gcc -m32 "$@"
-EOS
-export PATH=.:$PATH
+#cat > gcc <<EOS
+##!/bin/sh -
+#%{_bindir}/i686-pc-mingw32-gcc -m32 "$@"
+#EOS
+#export PATH=.:$PATH
 
 # NB: 'no-hw' is vital.  MinGW cannot build the hardware drivers
 # and if you don't have this you'll get an obscure link error.
+%{_mingw32_env}; \
+sed -i -e "s/MINGW32_CC/%{_mingw32_cc}/" -e 
"s/MINGW32_CFLAGS/%{_mingw32_cflags}/" -e 
"s/MINGW32_RANLIB/%{_mingw32_ranlib}/" Configure; \
 ./Configure \
   --prefix=%{_mingw32_prefix} \
   --openssldir=%{_mingw32_sysconfdir}/pki/tls \
@@ -168,11 +171,11 @@ export PATH=.:$PATH
   mingw
 #  --with-krb5-flavor=MIT
 #  -I%{_mingw32_prefix}/kerberos/include -L%{_mingw32_prefix}/kerberos/%{_lib}
-make depend
-make all build-shared
-make rehash build-shared
-
-%if %{with_tests}
+%{_mingw32_make} depend
+%{_mingw32_make} all build-shared
+%{_mingw32_make} rehash build-shared
+
+%if %{run_tests}
 #----------------------------------------------------------------------
 # Run some tests.  I don't know why this isn't in a %-check section
 # but this is how it is in the native RPM.
@@ -204,21 +207,21 @@ DISPLAY=$display
 DISPLAY=$display
 export DISPLAY
 
-make LDCMD=%{_mingw32_cc} -C test apps tests
+%{_mingw32_make} LDCMD=%{_mingw32_cc} -C test apps tests
 
 # Disable this thread test, because we don't have pthread on Windows.
-#%-{_mingw32_cc} -o openssl-thread-test \
-#  -I./include \
-#  %-{_mingw32_cflags} \
-#  %-{SOURCE8} \
-#  -L. \
-#  -lssl -lcrypto \
-#  -lpthread -lz -ldl
-#
+%{_mingw32_cc} -o openssl-thread-test \
+  -I./include \
+  %-{_mingw32_cflags} \
+  %-{SOURCE8} \
+  -L. \
+  -lssl -lcrypto \
+  -lpthread -lz -ldl
+
 ## `krb5-config --cflags`
 ## `krb5-config --libs`
 #
-#./openssl-thread-test --threads %{thread_test_threads}
+./openssl-thread-test --threads %{thread_test_threads}
 
 #----------------------------------------------------------------------
 %endif
@@ -277,5 +280,8 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Dec 29 2008 Levente Farkas <[email protected]> - 0.9.8g-2
+- minor cleanup
+
 * Tue Sep 30 2008 Richard W.M. Jones <[email protected]> - 0.9.8g-1
 - Initial RPM release.
_______________________________________________
fedora-mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/fedora-mingw

Reply via email to