- Added missing BuildRequires mingw32-dlfcn

- Reworked patches to rename *eay32.dll to lib*.dll
- Patch Configure script to use %%{_mingw32_cflags}
This commit is contained in:
Kalev Lember 2009-08-29 20:22:06 +00:00
parent 1deb3708fc
commit 1bc08028b9
10 changed files with 98 additions and 232 deletions

View File

@ -1,16 +0,0 @@
Fix global variable macros.
- RWMJ 2008-09-30
diff -ur openssl-0.9.8g.orig/e_os2.h openssl-0.9.8g.mingw/e_os2.h
--- openssl-0.9.8g.orig/e_os2.h 2005-12-18 18:57:07.000000000 +0000
+++ openssl-0.9.8g.mingw/e_os2.h 2008-09-30 14:27:53.000000000 +0100
@@ -264,7 +264,7 @@
# define OPENSSL_IMPLEMENT_GLOBAL(type,name) \
extern type _hide_##name; \
type *_shadow_##name(void) { return &_hide_##name; } \
- static type _hide_##name
+ type _hide_##name
# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
#else

View File

@ -1,14 +0,0 @@
--- openssl-0.9.8g.orig/engines/Makefile 2006-02-04 01:49:34.000000000 +0000
+++ openssl-0.9.8g.mingw/engines/Makefile 2008-09-30 20:05:30.000000000 +0100
@@ -91,7 +91,10 @@
set -e; \
for l in $(LIBNAMES); do \
( echo installing $$l; \
- if [ "$(PLATFORM)" != "Cygwin" ]; then \
+ if [ "$(PLATFORM)" = "mingw" ]; then \
+ sfx=dll; \
+ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
+ elif [ "$(PLATFORM)" != "Cygwin" ]; then \
case "$(CFLAGS)" in \
*DSO_DLFCN*) sfx="so";; \
*DSO_DL*) sfx="sl";; \

View File

@ -1,16 +0,0 @@
The 'mingw' target to Configure has some problems with cross-compilation.
- RWMJ 2008-09-30
diff -ur openssl-0.9.8g.orig/Configure openssl-0.9.8g.mingw/Configure
--- openssl-0.9.8g.orig/Configure 2008-09-30 14:16:16.000000000 +0100
+++ openssl-0.9.8g.mingw/Configure 2008-09-30 14:59:34.000000000 +0100
@@ -468,7 +468,7 @@
"BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32",
# 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", "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",

View File

@ -1,141 +0,0 @@
--- ./crypto/seed/seed_ecb.c.mingw-header-files 2007-04-24 01:50:10.000000000 +0200
+++ ./crypto/seed/seed_ecb.c 2009-02-02 18:28:55.000000000 +0100
@@ -49,7 +49,7 @@
*
*/
-#include <openssl/seed.h>
+#include "seed.h"
void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out, const SEED_KEY_SCHEDULE *ks, int enc)
{
--- ./crypto/seed/seed_locl.h.mingw-header-files 2009-02-02 18:28:48.000000000 +0100
+++ ./crypto/seed/seed_locl.h 2009-02-02 18:28:55.000000000 +0100
@@ -27,7 +27,7 @@
#define HEADER_SEED_LOCL_H
#include "openssl/e_os2.h"
-#include <openssl/seed.h>
+#include "seed.h"
#ifdef SEED_LONG /* need 32-bit type */
--- ./crypto/seed/seed.c.mingw-header-files 2007-04-24 01:50:10.000000000 +0200
+++ ./crypto/seed/seed.c 2009-02-02 18:28:55.000000000 +0100
@@ -32,7 +32,7 @@
#include <memory.h>
#endif
-#include <openssl/seed.h>
+#include "seed.h"
#include "seed_locl.h"
static seed_word SS[4][256] = { {
--- ./crypto/camellia/cmll_cbc.c.mingw-header-files 2006-12-02 13:00:27.000000000 +0100
+++ ./crypto/camellia/cmll_cbc.c 2009-02-02 18:28:54.000000000 +0100
@@ -58,7 +58,7 @@
#include <stdio.h>
#include <string.h>
-#include <openssl/camellia.h>
+#include "camellia.h"
#include "cmll_locl.h"
void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out,
--- ./crypto/camellia/cmll_cfb.c.mingw-header-files 2006-06-10 00:31:05.000000000 +0200
+++ ./crypto/camellia/cmll_cfb.c 2009-02-02 18:28:54.000000000 +0100
@@ -113,7 +113,7 @@
#include <assert.h>
#include <string.h>
-#include <openssl/camellia.h>
+#include "camellia.h"
#include "cmll_locl.h"
#include "e_os.h"
--- ./crypto/camellia/cmll_ofb.c.mingw-header-files 2006-06-10 00:31:05.000000000 +0200
+++ ./crypto/camellia/cmll_ofb.c 2009-02-02 18:28:55.000000000 +0100
@@ -111,7 +111,7 @@
# endif
#endif
#include <assert.h>
-#include <openssl/camellia.h>
+#include "camellia.h"
#include "cmll_locl.h"
/* The input and output encrypted as though 128bit ofb mode is being
--- ./crypto/camellia/cmll_misc.c.mingw-header-files 2009-02-02 18:29:19.000000000 +0100
+++ ./crypto/camellia/cmll_misc.c 2009-02-02 18:29:32.000000000 +0100
@@ -50,7 +50,7 @@
*/
#include <openssl/opensslv.h>
-#include <openssl/camellia.h>
+#include "camellia.h"
#include "cmll_locl.h"
#include <openssl/crypto.h>
#ifdef OPENSSL_FIPS
--- ./crypto/camellia/cmll_ecb.c.mingw-header-files 2006-06-10 00:31:05.000000000 +0200
+++ ./crypto/camellia/cmll_ecb.c 2009-02-02 18:28:54.000000000 +0100
@@ -56,7 +56,7 @@
#endif
#include <assert.h>
-#include <openssl/camellia.h>
+#include "camellia.h"
#include "cmll_locl.h"
void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out,
--- ./crypto/camellia/cmll_ctr.c.mingw-header-files 2006-06-10 00:31:05.000000000 +0200
+++ ./crypto/camellia/cmll_ctr.c 2009-02-02 18:28:54.000000000 +0100
@@ -56,7 +56,7 @@
#endif
#include <assert.h>
-#include <openssl/camellia.h>
+#include "camellia.h"
#include "cmll_locl.h"
/* NOTE: the IV/counter CTR mode is big-endian. The rest of the Camellia code
--- ./crypto/evp/e_seed.c.mingw-header-files 2007-07-04 14:56:32.000000000 +0200
+++ ./crypto/evp/e_seed.c 2009-02-02 18:28:55.000000000 +0100
@@ -59,7 +59,7 @@
#include <string.h>
#include <assert.h>
#ifndef OPENSSL_NO_SEED
-#include <openssl/seed.h>
+#include "../seed/seed.h"
#include "evp_locl.h"
static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc);
--- ./crypto/evp/e_camellia.c.mingw-header-files 2008-09-21 12:24:08.000000000 +0200
+++ ./crypto/evp/e_camellia.c 2009-02-02 18:28:55.000000000 +0100
@@ -59,7 +59,7 @@
#include <openssl/err.h>
#include <string.h>
#include <assert.h>
-#include <openssl/camellia.h>
+#include "../camellia/camellia.h"
#include "evp_locl.h"
static int camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
--- ./apps/speed.c.mingw-header-files 2009-01-07 11:48:22.000000000 +0100
+++ ./apps/speed.c 2009-02-02 18:28:54.000000000 +0100
@@ -165,7 +165,7 @@
#include <openssl/aes.h>
#endif
#ifndef OPENSSL_NO_CAMELLIA
-#include <openssl/camellia.h>
+#include "../crypto/camellia/camellia.h"
#endif
#ifndef OPENSSL_NO_MD2
#include <openssl/md2.h>
@@ -202,7 +202,7 @@
#include <openssl/idea.h>
#endif
#ifndef OPENSSL_NO_SEED
-#include <openssl/seed.h>
+#include "../crypto/seed/seed.h"
#endif
#ifndef OPENSSL_NO_BF
#include <openssl/blowfish.h>

View File

@ -1,20 +0,0 @@
--- ./Makefile.shared.lfarkas 2009-01-28 16:39:05.000000000 +0100
+++ ./Makefile.shared 2009-01-28 16:41:51.000000000 +0100
@@ -238,7 +238,7 @@
SHLIB=cyg$(LIBNAME); \
base=-Wl,--enable-auto-image-base; \
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
- SHLIB=$(LIBNAME)eay32; base=; \
+ SHLIB=lib$(LIBNAME); base=; \
fi; \
SHLIB_SUFFIX=.dll; \
LIBVERSION="$(LIBVERSION)"; \
@@ -253,7 +253,7 @@
SHLIB=cyg$(LIBNAME); \
base=-Wl,--enable-auto-image-base; \
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
- SHLIB=$(LIBNAME)eay32; \
+ SHLIB=lib$(LIBNAME); \
base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
fi; \
SHLIB_SUFFIX=.dll; \

View File

@ -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,

View File

@ -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; \

View File

@ -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";; \

View File

@ -1,11 +0,0 @@
--- openssl-1.0.0-beta3/Makefile.shared.orig 2009-08-29 17:02:27.496816550 +0200
+++ openssl-1.0.0-beta3/Makefile.shared 2009-08-29 17:04:54.897820373 +0200
@@ -250,7 +250,7 @@
base=-Wl,--enable-auto-image-base; \
deffile=; \
if expr $(PLATFORM) : 'mingw' > /dev/null; then \
- SHLIB=$(LIBNAME)eay32; base=; \
+ SHLIB=lib$(LIBNAME); base=; \
if test -f $(LIBNAME)eay32.def; then \
deffile=$(LIBNAME)eay32.def; \
fi; \

View File

@ -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@lists.fedoraproject.org> - 0.9.8j-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild