summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2013-07-02 21:26:26 -0500
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>2013-07-02 21:26:26 -0500
commitd395584948ed9442c7ae3be688e548c29e7f5c86 (patch)
tree0968f32899eab46eac10b397049a45b85b7f62e0
parent716b0401897e4ac3492486234a1c758ddbfc5f9d (diff)
downloadcygwin-openssl-d395584948ed9442c7ae3be688e548c29e7f5c86.tar.gz
cygwin-openssl-d395584948ed9442c7ae3be688e548c29e7f5c86.tar.xz
cygwin-openssl-d395584948ed9442c7ae3be688e548c29e7f5c86.zip
Rebuilt for cygwin64
-rw-r--r--cygwin-openssl.spec157
-rw-r--r--openssl-1.0.0-beta5-enginesdir.patch52
-rw-r--r--openssl-1.0.1-cygwin64.patch126
3 files changed, 285 insertions, 50 deletions
diff --git a/cygwin-openssl.spec b/cygwin-openssl.spec
index f653ac5..782ff91 100644
--- a/cygwin-openssl.spec
+++ b/cygwin-openssl.spec
@@ -1,106 +1,163 @@
-%global __strip %{_cygwin_strip}
-%global __objdump %{_cygwin_objdump}
-%global _use_internal_dependency_generator 0
-%global __find_requires %{_cygwin_findrequires}
-%global __find_provides %{_cygwin_findprovides}
+%{?cygwin_package_header}
%define soversion 1.0.0
Name: cygwin-openssl
Version: 1.0.1e
-Release: 1
+Release: 2
Summary: Cygwin port of the OpenSSL toolkit
Group: Development/Libraries
License: OpenSSL
URL: http://www.openssl.org/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Source0: http://www.openssl.org/source/openssl-%{version}.tar.gz
+Patch0: openssl-1.0.0-beta5-enginesdir.patch
+Patch1: openssl-1.0.1-cygwin64.patch
+
+BuildRequires: cygwin32-filesystem
+BuildRequires: cygwin32-binutils
+BuildRequires: cygwin32-gcc
+BuildRequires: cygwin32
+BuildRequires: cygwin32-zlib
+
+BuildRequires: cygwin64-filesystem
+BuildRequires: cygwin64-binutils
+BuildRequires: cygwin64-gcc
+BuildRequires: cygwin64
+BuildRequires: cygwin64-zlib
-BuildRequires: cygwin-filesystem
-BuildRequires: cygwin-binutils
-BuildRequires: cygwin-gcc
-BuildRequires: cygwin
-BuildRequires: cygwin-zlib
BuildRequires: mktemp
BuildRequires: perl
BuildRequires: sed
BuildRequires: /usr/bin/cmp
BuildRequires: /usr/bin/rename
# The build script uses /usr/bin/makedepend which comes from imake.
+# We also use lndir below to set up duplicate build trees
BuildRequires: imake
-Requires: pkgconfig
-
%description
-The OpenSSL toolkit provides support for secure communications between
-machines. OpenSSL includes a certificate management tool and shared
-libraries which provide various cryptographic algorithms and
-protocols.
+OpenSSL encryption toolkit for Cygwin toolchains.
+
+%package -n cygwin32-openssl
+Summary: Cygwin32 OpenSSL libraries
+Group: Development/Libraries
+Provides: %{name} = %{version}-%{release}
+Obsoletes: %{name} < %{version}-%{release}
+
+%description -n cygwin32-openssl
+OpenSSL encryption toolkit for the Cygwin i686 toolchain.
+
+%package -n cygwin64-openssl
+Summary: Cygwin64 OpenSSL libraries
+Group: Development/Libraries
-This package contains Cygwin libraries and development tools.
+%description -n cygwin64-openssl
+OpenSSL encryption toolkit for the Cygwin x86_64 toolchain.
+
+%{?cygwin_debug_package}
%prep
%setup -q -n openssl-%{version}
+%patch0 -p1
+%patch1 -p2
+
+if ! iconv -f UTF-8 -t ASCII//TRANSLIT CHANGES >/dev/null 2>&1 ; then
+ iconv -f ISO-8859-1 -t UTF-8 -o CHANGES.utf8 CHANGES && \
+ mv -f CHANGES.utf8 CHANGES
+fi
%build
+# openssl must be built in-tree
+mkdir -p ../build_32bit ../build_64bit
+lndir -silent `pwd` ../build_32bit
+lndir -silent `pwd` ../build_64bit
+mv ../build_32bit ../build_64bit .
+
+pushd build_32bit
./Configure \
- --prefix=%{_cygwin_prefix} \
- --cross-compile-prefix=%{_cygwin_target}- \
- zlib no-hw no-camellia no-capieng no-cms no-gmp no-idea no-jpake \
- no-krb5 no-mdc2 no-rc5 no-rfc3779 no-seed \
- shared Cygwin
+ --prefix=%{cygwin32_prefix} \
+ --cross-compile-prefix=%{cygwin32_target}- \
+ shared zlib no-idea no-rc5 Cygwin
make depend
make all build-shared
+popd
-if ! iconv -f UTF-8 -t ASCII//TRANSLIT CHANGES >/dev/null 2>&1 ; then
- iconv -f ISO-8859-1 -t UTF-8 -o CHANGES.utf8 CHANGES && \
- mv -f CHANGES.utf8 CHANGES
-fi
+
+mkdir -p build_64bit
+pushd build_64bit
+./Configure \
+ --prefix=%{cygwin64_prefix} \
+ --cross-compile-prefix=%{cygwin64_target}- \
+ shared zlib no-idea no-rc5 no-asm Cygwin-x86_64
+
+make depend
+make all build-shared
+popd
%install
-rm -rf $RPM_BUILD_ROOT
+pushd build_32bit
+make INSTALL_PREFIX=$RPM_BUILD_ROOT install_sw
+popd
+pushd build_64bit
make INSTALL_PREFIX=$RPM_BUILD_ROOT install_sw
+popd
# Remove unnecessary static libraries
-rm -f $RPM_BUILD_ROOT%{_cygwin_libdir}/lib{crypto,ssl}.a
+rm -f $RPM_BUILD_ROOT%{cygwin32_libdir}/lib{crypto,ssl}.a
+rm -f $RPM_BUILD_ROOT%{cygwin64_libdir}/lib{crypto,ssl}.a
# Remove unnecessary Cygwin native binaries and runtime files
-rm -f $RPM_BUILD_ROOT%{_cygwin_bindir}/c_rehash
-rm -f $RPM_BUILD_ROOT%{_cygwin_bindir}/*.exe
-rm -rf $RPM_BUILD_ROOT%{_cygwin_libdir}/engines/
-rm -rf $RPM_BUILD_ROOT%{_cygwin_prefix}/ssl
-
-# Documentation already provided by Fedora native package
-rm -rf $RPM_BUILD_ROOT%{_cygwin_mandir}
+rm -f $RPM_BUILD_ROOT%{cygwin32_bindir}/c_rehash
+rm -f $RPM_BUILD_ROOT%{cygwin32_bindir}/*.exe
+rm -rf $RPM_BUILD_ROOT%{cygwin32_libdir}/engines/
+rm -rf $RPM_BUILD_ROOT%{cygwin32_prefix}/ssl
+rm -f $RPM_BUILD_ROOT%{cygwin64_bindir}/c_rehash
+rm -f $RPM_BUILD_ROOT%{cygwin64_bindir}/*.exe
+rm -rf $RPM_BUILD_ROOT%{cygwin64_libdir}/engines/
+rm -rf $RPM_BUILD_ROOT%{cygwin64_prefix}/ssl
-%clean
-rm -rf $RPM_BUILD_ROOT
+# Documentation already provided by Fedora native package
+rm -rf $RPM_BUILD_ROOT%{cygwin32_mandir}
+rm -rf $RPM_BUILD_ROOT%{cygwin64_mandir}
-%files
-%defattr(-,root,root,-)
+%files -n cygwin32-openssl
+%doc CHANGES LICENSE NEWS
+%{cygwin32_bindir}/cygcrypto-%{soversion}.dll
+%{cygwin32_bindir}/cygssl-%{soversion}.dll
+%{cygwin32_includedir}/openssl
+%{cygwin32_libdir}/libcrypto.dll.a
+%{cygwin32_libdir}/libssl.dll.a
+%{cygwin32_libdir}/pkgconfig/libcrypto.pc
+%{cygwin32_libdir}/pkgconfig/libssl.pc
+%{cygwin32_libdir}/pkgconfig/openssl.pc
+
+%files -n cygwin64-openssl
%doc CHANGES LICENSE NEWS
-%{_cygwin_bindir}/cygcrypto-%{soversion}.dll
-%{_cygwin_bindir}/cygssl-%{soversion}.dll
-%{_cygwin_includedir}/openssl
-%{_cygwin_libdir}/libcrypto.dll.a
-%{_cygwin_libdir}/libssl.dll.a
-%{_cygwin_libdir}/pkgconfig/libcrypto.pc
-%{_cygwin_libdir}/pkgconfig/libssl.pc
-%{_cygwin_libdir}/pkgconfig/openssl.pc
+%{cygwin64_bindir}/cygcrypto-%{soversion}.dll
+%{cygwin64_bindir}/cygssl-%{soversion}.dll
+%{cygwin64_includedir}/openssl
+%{cygwin64_libdir}/libcrypto.dll.a
+%{cygwin64_libdir}/libssl.dll.a
+%{cygwin64_libdir}/pkgconfig/libcrypto.pc
+%{cygwin64_libdir}/pkgconfig/libssl.pc
+%{cygwin64_libdir}/pkgconfig/openssl.pc
%changelog
-* Sun Feb 16 2013 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.0.1e-1
+* Tue Jul 02 2013 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.0.1e-2
+- Rebuild for new Cygwin packaging scheme.
+- Add cygwin64 package.
+
+* Sun Feb 17 2013 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.0.1e-1
- Version bump.
* Thu May 24 2012 Yaakov Selkowitz <cygwin-ports-general@lists.sourceforge.net> - 1.0.1c-1
diff --git a/openssl-1.0.0-beta5-enginesdir.patch b/openssl-1.0.0-beta5-enginesdir.patch
new file mode 100644
index 0000000..d942d6e
--- /dev/null
+++ b/openssl-1.0.0-beta5-enginesdir.patch
@@ -0,0 +1,52 @@
+diff -up openssl-1.0.0-beta5/Configure.enginesdir openssl-1.0.0-beta5/Configure
+--- openssl-1.0.0-beta5/Configure.enginesdir 2010-01-20 18:07:05.000000000 +0100
++++ openssl-1.0.0-beta5/Configure 2010-01-20 18:10:48.000000000 +0100
+@@ -622,6 +622,7 @@ my $idx_multilib = $idx++;
+ my $prefix="";
+ my $libdir="";
+ my $openssldir="";
++my $enginesdir="";
+ my $exe_ext="";
+ my $install_prefix= "$ENV{'INSTALL_PREFIX'}";
+ my $cross_compile_prefix="";
+@@ -833,6 +834,10 @@ PROCESS_ARGS:
+ {
+ $openssldir=$1;
+ }
++ elsif (/^--enginesdir=(.*)$/)
++ {
++ $enginesdir=$1;
++ }
+ elsif (/^--install.prefix=(.*)$/)
+ {
+ $install_prefix=$1;
+@@ -1053,7 +1058,7 @@ chop $prefix if $prefix =~ /.\/$/;
+
+ $openssldir=$prefix . "/ssl" if $openssldir eq "";
+ $openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/;
+-
++$enginesdir="$prefix/lib/engines" if $enginesdir eq "";
+
+ print "IsMK1MF=$IsMK1MF\n";
+
+@@ -1673,7 +1678,7 @@ while (<IN>)
+ }
+ elsif (/^#define\s+ENGINESDIR/)
+ {
+- my $foo = "$prefix/$libdir/engines";
++ my $foo = "$enginesdir";
+ $foo =~ s/\\/\\\\/g;
+ print OUT "#define ENGINESDIR \"$foo\"\n";
+ }
+diff -up openssl-1.0.0-beta5/engines/Makefile.enginesdir openssl-1.0.0-beta5/engines/Makefile
+--- openssl-1.0.0-beta5/engines/Makefile.enginesdir 2010-01-16 21:06:09.000000000 +0100
++++ openssl-1.0.0-beta5/engines/Makefile 2010-01-20 18:07:05.000000000 +0100
+@@ -124,7 +124,7 @@ install:
+ sfx=".so"; \
+ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+ fi; \
+- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
++ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+ done; \
+ fi
diff --git a/openssl-1.0.1-cygwin64.patch b/openssl-1.0.1-cygwin64.patch
new file mode 100644
index 0000000..c94f2b6
--- /dev/null
+++ b/openssl-1.0.1-cygwin64.patch
@@ -0,0 +1,126 @@
+--- origsrc/openssl-1.0.1e/Configure 2013-02-17 17:06:18.682058900 -0600
++++ src/openssl-1.0.1e/Configure 2013-02-17 16:38:08.000000000 -0600
+@@ -550,6 +550,7 @@ my %table=(
+ "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
+ "Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:coff:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
+ "debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
++"Cygwin-x86_64", "gcc:-DTERMIOS -DL_ENDIAN -O3 -Wall:::CYGWIN32::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:mingw64:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
+
+ # NetWare from David Ward (dsward@novell.com)
+ # requires either MetroWerks NLM development tools, or gcc / nlmconv
+@@ -1127,7 +1128,7 @@ foreach (sort @experimental)
+
+ my $IsMK1MF=scalar grep /^$target$/,@MK1MF_Builds;
+
+-$exe_ext=".exe" if ($target eq "Cygwin" || $target eq "DJGPP" || $target =~ /^mingw/);
++$exe_ext=".exe" if ($target =~ /^Cygwin/ || $target eq "DJGPP" || $target =~ /^mingw/);
+ $exe_ext=".nlm" if ($target =~ /netware/);
+ $exe_ext=".pm" if ($target =~ /vos/);
+ $openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
+--- origsrc/openssl-1.0.1e/Makefile.org 2013-02-11 09:26:04.000000000 -0600
++++ src/openssl-1.0.1e/Makefile.org 2013-02-17 16:38:08.000000000 -0600
+@@ -325,9 +325,9 @@ clean-shared:
+ done; \
+ fi; \
+ ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
+- if [ "$(PLATFORM)" = "Cygwin" ]; then \
++ case "$(PLATFORM)" in Cygwin*) \
+ ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
+- fi; \
++ esac; \
+ done
+
+ link-shared:
+@@ -570,11 +570,7 @@ install_sw:
+ do \
+ if [ -f "$$i" -o -f "$$i.a" ]; then \
+ ( echo installing $$i; \
+- if [ "$(PLATFORM)" != "Cygwin" ]; then \
+- cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
+- else \
++ case "$(PLATFORM)" in Cygwin*) \
+ c=`echo $$i | sed 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
+ cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
+ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
+@@ -582,7 +578,12 @@ install_sw:
+ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+ chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
+- fi ); \
++ ;; \
++ *) \
++ cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new; \
++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/$$i; \
++ esac ); \
+ if expr $(PLATFORM) : 'mingw' > /dev/null; then \
+ ( case $$i in \
+ *crypto*) i=libeay32.dll;; \
+@@ -642,9 +643,9 @@ install_docs:
+ @pod2man="`cd ./util; ./pod2mantest $(PERL)`"; \
+ here="`pwd`"; \
+ filecase=; \
+- if [ "$(PLATFORM)" = "DJGPP" -o "$(PLATFORM)" = "Cygwin" -o "$(PLATFORM)" = "mingw" ]; then \
++ case "$(PLATFORM)" in DJGPP|Cygwin*|mingw*) \
+ filecase=-i; \
+- fi; \
++ esac; \
+ set -e; for i in doc/apps/*.pod; do \
+ fn=`basename $$i .pod`; \
+ sec=`$(PERL) util/extract-section.pl 1 < $$i`; \
+--- origsrc/openssl-1.0.1e/engines/Makefile 2013-02-17 17:06:18.685059000 -0600
++++ src/openssl-1.0.1e/engines/Makefile 2013-02-17 17:00:13.799188800 -0600
+@@ -111,7 +111,11 @@ install:
+ for l in $(LIBNAMES); do \
+ ( echo installing $$l; \
+ pfx=lib; \
+- if [ "$(PLATFORM)" != "Cygwin" ]; then \
++ case "$(PLATFORM)" in Cygwin*) \
++ sfx=".so"; \
++ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
++ ;; \
++ *) \
+ case "$(CFLAGS)" in \
+ *DSO_BEOS*) sfx=".so";; \
+ *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
+@@ -120,10 +124,7 @@ install:
+ *) sfx=".bad";; \
+ esac; \
+ cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+- else \
+- sfx=".so"; \
+- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+- fi; \
++ esac; \
+ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+ done; \
+--- origsrc/openssl-1.0.1e/engines/ccgost/Makefile 2013-02-11 09:26:04.000000000 -0600
++++ src/openssl-1.0.1e/engines/ccgost/Makefile 2013-02-17 17:05:47.759290200 -0600
+@@ -45,7 +45,11 @@ install:
+ set -e; \
+ echo installing $(LIBNAME); \
+ pfx=lib; \
+- if [ "$(PLATFORM)" != "Cygwin" ]; then \
++ case "$(PLATFORM)" in Cygwin*) \
++ sfx=".so"; \
++ cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
++ ;; \
++ *) \
+ case "$(CFLAGS)" in \
+ *DSO_BEOS*) sfx=".so";; \
+ *DSO_DLFCN*) sfx=`expr "$(SHLIB_EXT)" : '.*\(\.[a-z][a-z]*\)' \| ".so"`;; \
+@@ -54,10 +58,7 @@ install:
+ *) sfx=".bad";; \
+ esac; \
+ cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+- else \
+- sfx=".so"; \
+- cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+- fi; \
++ esac; \
+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \
+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \
+ fi