From: Wouter Wijngaards Date: Thu, 30 Jun 2011 13:24:10 +0000 (+0000) Subject: fix makedist for crosscompile to windows without ldns tarball builtin. X-Git-Tag: release-1.4.12rc1~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dff4206d5d3730db6b1c5b4bf58709ac0a0a6b9;p=thirdparty%2Funbound.git fix makedist for crosscompile to windows without ldns tarball builtin. git-svn-id: file:///svn/unbound/trunk@2448 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/makedist.sh b/makedist.sh index 4ae9f4325..d7133b86a 100755 --- a/makedist.sh +++ b/makedist.sh @@ -56,6 +56,7 @@ Generate a distribution tar file for unbound. -l ldnsdir Directory where ldns resides. Detected from Makefile. -wssl openssl.xx.tar.gz Also build openssl from tarball for windows dist. -wxp expat.xx.tar.gz Also build expat from tarball for windows dist. + -wldns ldns.xx.tar.gz Also build libldns from tarball for windows dist. -w ... Build windows binary dist. last args passed to configure. EOF exit 1 @@ -137,6 +138,7 @@ LDNSDIR="" DOWIN="no" WINSSL="" WINEXPAT="" +WINLDNS="" # Parse the command line arguments. while [ "$1" ]; do @@ -151,6 +153,10 @@ while [ "$1" ]; do "-s") SNAPSHOT="yes" ;; + "-wldns") + WINLDNS="$2" + shift + ;; "-wssl") WINSSL="$2" shift @@ -187,8 +193,8 @@ if [ "$DOWIN" = "yes" ]; then configure="mingw32-configure" strip="i686-pc-mingw32-strip" makensis="makensis" # from mingw32-nsis package - # in crosscompile no installed ldns, use builtin (not linux-ldns) - cross_flag="--with-ldns-builtin" + # flags for crosscompiled dependency libraries + cross_flag="" check_svn_root create_temp_dir @@ -214,6 +220,21 @@ if [ "$DOWIN" = "yes" ]; then cd .. fi + if test -n "$WINLDNS"; then + info "Cross compile $WINLDNS" + info "ldns tar unpack" + (cd ..; gzip -cd $WINLDNS) | tar xf - || error_cleanup "tar unpack of $WINLDNS failed" + cd ldns-* || error_cleanup "no ldns-X dir in tarball" + # we can use the cross_flag with openssl in it + info "ldns: Configure $cross_flag" + mingw32-configure $cross_flag || error_cleanup "ldns configure failed" + info "ldns: make" + make || error_cleanup "ldns crosscompile failed" + # use from the build directory. + cross_flag="$cross_flag --with-ldns=`pwd`" + cd .. + fi + if test -n "$WINEXPAT"; then info "Cross compile $WINEXPAT" info "wxp: tar unpack"