]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fix makedist for crosscompile to windows without ldns tarball builtin.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 30 Jun 2011 13:24:10 +0000 (13:24 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 30 Jun 2011 13:24:10 +0000 (13:24 +0000)
git-svn-id: file:///svn/unbound/trunk@2448 be551aaa-1e26-0410-a405-d3ace91eadb9

makedist.sh

index 4ae9f4325bea3c9f5f158d4ead150a21f3df7adb..d7133b86ab890dd7a115b26caaf5afd0a4e4d4fb 100755 (executable)
@@ -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"