From 3088075574e26c2299ccd7bb44604d27259efd5c Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Wed, 23 Jun 2010 14:01:05 +0000 Subject: [PATCH] -wssl feature for makedist. git-svn-id: file:///svn/unbound/trunk@2166 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 2 ++ makedist.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index a5bcfb672..1e0d1e3ec 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,7 @@ 23 June 2010: Wouter - iana portlist updated. + - makedist upgraded cross compile openssl option, like this: + ./makedist.sh -s -wssl openssl-1.0.0a.tar.gz -w --enable-gost 22 June 2010: Wouter - Unbound reports libev or libevent correctly in logs in verbose mode. diff --git a/makedist.sh b/makedist.sh index e259091e9..8d60e8b83 100755 --- a/makedist.sh +++ b/makedist.sh @@ -54,6 +54,7 @@ Generate a distribution tar file for unbound. -d SVN_root Retrieve the unbound source from the specified repository. Detected from svn working copy if not specified. -l ldnsdir Directory where ldns resides. Detected from Makefile. + -wssl openssl.xx.tar.gz Also build openssl from tarball for windows dist. -w ... Build windows binary dist. last args passed to configure. EOF exit 1 @@ -133,6 +134,7 @@ SNAPSHOT="no" RC="no" LDNSDIR="" DOWIN="no" +WINSSL="" # Parse the command line arguments. while [ "$1" ]; do @@ -147,6 +149,10 @@ while [ "$1" ]; do "-s") SNAPSHOT="yes" ;; + "-wssl") + WINSSL="$2" + shift + ;; "-w") DOWIN="yes" shift @@ -180,6 +186,28 @@ if [ "$DOWIN" = "yes" ]; then check_svn_root create_temp_dir + + # crosscompile openssl for windows. + if test -n "$WINSSL"; then + info "Cross compile $WINSSL" + info "winssl tar unpack" + (cd ..; gzip -cd $WINSSL) | tar xf - || error_cleanup "tar unpack of $WINSSL failed" + sslinstall="`pwd`/sslinstall" + cd openssl-* || error_cleanup "no openssl-X dir in tarball" + # configure for crosscompile, without CAPI because it fails + # cross-compilation and it is not used anyway + sslflags="no-asm --cross-compile-prefix=i686-pc-mingw32- -DOPENSSL_NO_CAPIENG mingw" + info "winssl: Configure $sslflags" + ./Configure --prefix="$sslinstall" $sslflags || error_cleanup "OpenSSL Configure failed" + info "winssl: make" + make || error_cleanup "OpenSSL crosscompile failed" + # only install sw not docs, which take a long time. + info "winssl: make install_sw" + make install_sw || error_cleanup "OpenSSL install failed" + cross_flag="$cross_flag --with-ssl=$sslinstall" + cd .. + fi + info "Exporting source from SVN." svn export "$SVNROOT" unbound || error_cleanup "SVN command failed" cd unbound || error_cleanup "Unbound not exported correctly from SVN" -- 2.47.2