[mingw-openssl: 9/32] - Added missing BuildRequires mingw32-dlfcn - Reworked patches to rename *eay32.dll to lib*.dll - Pa

Kalev Lember kalev at fedoraproject.org
Tue Mar 6 20:06:59 UTC 2012


commit 1bc08028b930644c2830280fa113ed836894da87
Author: Kalev Lember <kalev at fedoraproject.org>
Date:   Sat Aug 29 20:22:06 2009 +0000

    - Added missing BuildRequires mingw32-dlfcn
    - Reworked patches to rename *eay32.dll to lib*.dll
    - Patch Configure script to use %%{_mingw32_cflags}

 mingw32-openssl-0.9.8g-global.patch          |   16 ---
 mingw32-openssl-0.9.8g-sfx.patch             |   14 ---
 mingw32-openssl-0.9.8j-configure.patch       |   16 ---
 mingw32-openssl-0.9.8j-header-files.patch    |  141 --------------------------
 mingw32-openssl-0.9.8j-shared.patch          |   20 ----
 mingw32-openssl-1.0.0-beta3-configure.patch  |   12 ++
 mingw32-openssl-1.0.0-beta3-libversion.patch |   55 ++++++++++
 mingw32-openssl-1.0.0-beta3-sfx.patch        |   15 +++
 mingw32-openssl-1.0.0-beta3-shared.patch     |   11 --
 mingw32-openssl.spec                         |   30 +++---
 10 files changed, 98 insertions(+), 232 deletions(-)
---
diff --git a/mingw32-openssl-1.0.0-beta3-configure.patch b/mingw32-openssl-1.0.0-beta3-configure.patch
new file mode 100644
index 0000000..8f4679e
--- /dev/null
+++ b/mingw32-openssl-1.0.0-beta3-configure.patch
@@ -0,0 +1,12 @@
+diff -up openssl-1.0.0-beta3/Configure.mingw-configure openssl-1.0.0-beta3/Configure
+--- openssl-1.0.0-beta3/Configure.mingw-configure	2009-08-29 21:20:14.000000000 +0300
++++ openssl-1.0.0-beta3/Configure	2009-08-29 21:23:14.000000000 +0300
+@@ -498,7 +498,7 @@ my %table=(
+ "BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32",
+ 
+ # MinGW
+-"mingw", "gcc:-mno-cygwin -DL_ENDIAN -DOPENSSL_NO_CAPIENG -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
++"mingw", "gcc:-DL_ENDIAN -DOPENSSL_NO_CAPIENG -Wall \$(MINGW32_CFLAGS) -DMK1MF_BUILD:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:\$(MINGW32_CFLAGS):.dll.a",
+ # As for OPENSSL_USE_APPLINK. Applink makes it possible to use .dll
+ # compiled with one compiler with application compiled with another
+ # compiler. It's possible to engage Applink support in mingw64 build,
diff --git a/mingw32-openssl-1.0.0-beta3-libversion.patch b/mingw32-openssl-1.0.0-beta3-libversion.patch
new file mode 100644
index 0000000..98da3b6
--- /dev/null
+++ b/mingw32-openssl-1.0.0-beta3-libversion.patch
@@ -0,0 +1,55 @@
+diff -up openssl-1.0.0-beta3/Makefile.org.mingw-libversion openssl-1.0.0-beta3/Makefile.org
+--- openssl-1.0.0-beta3/Makefile.org.mingw-libversion	2009-08-29 22:44:10.000000000 +0300
++++ openssl-1.0.0-beta3/Makefile.org	2009-08-29 22:45:42.000000000 +0300
+@@ -542,8 +542,8 @@ install_sw:
+ 				fi ); \
+ 				if expr $(PLATFORM) : 'mingw' > /dev/null; then \
+ 				(	case $$i in \
+-						*crypto*) i=libeay32.dll;; \
+-						*ssl*)    i=ssleay32.dll;; \
++						*crypto*) i=libcrypto-$(SHLIB_SONAMEVER).dll;; \
++						*ssl*)    i=libssl-$(SHLIB_SONAMEVER).dll;; \
+ 					esac; \
+ 					echo installing $$i; \
+ 	 				cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
+diff -up openssl-1.0.0-beta3/Makefile.shared.mingw-libversion openssl-1.0.0-beta3/Makefile.shared
+--- openssl-1.0.0-beta3/Makefile.shared.mingw-libversion	2009-08-29 22:33:22.000000000 +0300
++++ openssl-1.0.0-beta3/Makefile.shared	2009-08-29 22:33:22.000000000 +0300
+@@ -47,7 +47,7 @@ LIBEXTRAS=
+ # LIBVERSION contains the current version of the library.
+ # For example, to build libfoo.so.1.2, you need to do the following:
+ #LIBVERSION=1.2
+-LIBVERSION=
++LIBVERSION=10
+ 
+ # LIBCOMPATVERSIONS contains the compatibility versions (a list) of
+ # the library.  They MUST be in decreasing order.
+@@ -250,9 +250,9 @@ link_o.cygwin:
+ 	base=-Wl,--enable-auto-image-base; \
+ 	deffile=; \
+ 	if expr $(PLATFORM) : 'mingw' > /dev/null; then \
+-		SHLIB=$(LIBNAME)eay32; base=; \
+-		if test -f $(LIBNAME)eay32.def; then \
+-			deffile=$(LIBNAME)eay32.def; \
++		SHLIB=lib$(LIBNAME); base=; \
++		if test -f $(LIBNAME).def; then \
++			deffile=$(LIBNAME).def; \
+ 		fi; \
+ 	fi; \
+ 	SHLIB_SUFFIX=.dll; \
+@@ -270,13 +270,9 @@ link_a.cygwin:
+ 	dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; extras=; \
+ 	base=-Wl,--enable-auto-image-base; \
+ 	if expr $(PLATFORM) : 'mingw' > /dev/null; then \
+-		case $(LIBNAME) in \
+-			crypto) SHLIB=libeay;; \
+-			ssl) SHLIB=ssleay;; \
+-		esac; \
+-		SHLIB_SOVER=32; \
++		SHLIB=lib$(LIBNAME); \
+ 		extras="$(LIBNAME).def"; \
+-		$(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \
++		$(PERL) util/mkdef.pl 32 $(LIBNAME) > $$extras; \
+ 		base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
+ 	fi; \
+ 	dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
diff --git a/mingw32-openssl-1.0.0-beta3-sfx.patch b/mingw32-openssl-1.0.0-beta3-sfx.patch
new file mode 100644
index 0000000..05e0a3c
--- /dev/null
+++ b/mingw32-openssl-1.0.0-beta3-sfx.patch
@@ -0,0 +1,15 @@
+diff -up openssl-1.0.0-beta3/engines/Makefile.mingw-libversion openssl-1.0.0-beta3/engines/Makefile
+--- openssl-1.0.0-beta3/engines/Makefile.mingw-libversion	2009-08-29 22:33:22.000000000 +0300
++++ openssl-1.0.0-beta3/engines/Makefile	2009-08-29 22:34:15.000000000 +0300
+@@ -110,7 +110,10 @@ install:
+ 		for l in $(LIBNAMES); do \
+ 			( echo installing $$l; \
+ 			  pfx=lib; \
+-			  if [ "$(PLATFORM)" != "Cygwin" ]; then \
++			  if [ "$(PLATFORM)" = "mingw" ]; then \
++				sfx=.dll; \
++				cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l$$sfx.new; \
++			  elif [ "$(PLATFORM)" != "Cygwin" ]; then \
+ 				case "$(CFLAGS)" in \
+ 				*DSO_BEOS*)	sfx=".so";;	\
+ 				*DSO_DLFCN*)	sfx=".so";;	\
diff --git a/mingw32-openssl.spec b/mingw32-openssl.spec
index e6be878..c49f7cb 100644
--- a/mingw32-openssl.spec
+++ b/mingw32-openssl.spec
@@ -78,17 +78,17 @@ Patch48:        openssl-0.9.8j-bad-mime.patch
 Patch49:        openssl-0.9.8k-algo-doc.patch
 Patch50:        openssl-1.0.0-beta3-curl.patch
 Patch51:        openssl-1.0.0-beta3-const.patch
-
 # Backported fixes including security fixes
 Patch60:        openssl-1.0.0-beta3-namingstr.patch
 Patch61:        openssl-1.0.0-beta3-namingblk.patch
 
 # MinGW-specific patches.
-Patch100:       mingw32-openssl-0.9.8j-header-files.patch
-Patch101:       mingw32-openssl-0.9.8j-configure.patch
-Patch102:       mingw32-openssl-0.9.8j-shared.patch
-Patch103:       mingw32-openssl-0.9.8g-global.patch
-Patch104:       mingw32-openssl-0.9.8g-sfx.patch
+# Use MINGW32_CFLAGS (set below) in Configure script
+Patch100:       mingw32-openssl-1.0.0-beta3-configure.patch
+# Rename *eay32.dll to lib*.dll
+Patch101:       mingw32-openssl-1.0.0-beta3-libversion.patch
+# Fix engines/ install target after lib rename
+Patch102:       mingw32-openssl-1.0.0-beta3-sfx.patch
 Patch105:       mingw32-openssl-1.0.0-beta3-linker-fix.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -101,6 +101,7 @@ BuildRequires:  mingw32-binutils
 
 BuildRequires:  mingw32-zlib
 BuildRequires:  mingw32-pthreads
+BuildRequires:  mingw32-dlfcn
 
 BuildRequires:  mktemp
 #BuildRequires:  krb5-devel
@@ -182,11 +183,9 @@ Static version of the MinGW port of the OpenSSL toolkit.
 %patch60 -p1 -b .namingstr
 %patch61 -p1 -b .namingblk
 
-#%patch100 -p1 -b .mingw-header-files
-#%patch101 -p1 -b .mingw-configure
-#%patch102 -p1 -b .mingw-shared
-#%patch103 -p1 -b .mingw-global
-#%patch104 -p1 -b .mingw-sfx
+%patch100 -p1 -b .mingw-configure
+%patch101 -p1 -b .mingw-libversion
+%patch102 -p1 -b .mingw-sfx
 %patch105 -p0 -b .mingw-linker-fix
 
 # Modify the various perl scripts to reference perl in the right location.
@@ -199,7 +198,7 @@ make TABLE PERL=%{__perl}
 %build
 # 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.
-sed -i -e "s/MINGW32_CFLAGS/%{_mingw32_cflags}/" Configure; \
+export MINGW32_CFLAGS="%{_mingw32_cflags}"; \
 ./Configure \
   --prefix=%{_mingw32_prefix} \
   --openssldir=%{_mingw32_sysconfdir}/pki/tls \
@@ -328,8 +327,8 @@ rm -rf $RPM_BUILD_ROOT
 %doc LICENSE
 %{_mingw32_bindir}/openssl.exe
 %{_mingw32_bindir}/c_rehash
-%{_mingw32_bindir}/libeay32.dll
-%{_mingw32_bindir}/ssleay32.dll
+%{_mingw32_bindir}/libcrypto-%{soversion}.dll
+%{_mingw32_bindir}/libssl-%{soversion}.dll
 #{_mingw32_bindir}/.libcrypto*.hmac
 %{_mingw32_libdir}/libcrypto.dll.a
 %{_mingw32_libdir}/libssl.dll.a
@@ -352,6 +351,9 @@ rm -rf $RPM_BUILD_ROOT
 - Automatically generate debuginfo subpackage
 - Merged various changes from the native Fedora package (up to 1.0.0-0.5.beta3)
 - Don't use the %%{_mingw32_make} macro anymore as it's ugly and causes side-effects
+- Added missing BuildRequires mingw32-dlfcn (Kalev Lember)
+- Reworked patches to rename *eay32.dll to lib*.dll (Kalev Lember)
+- Patch Configure script to use %%{_mingw32_cflags} (Kalev Lember)
 
 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.8j-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild


More information about the scm-commits mailing list