Creating boost-autobuild

Tue, 11 Jan 2011 16:28:42 -0800

author
Mark Palange (Mani) <palange@lindenlab.com>
date
Tue, 11 Jan 2011 16:28:42 -0800
changeset 0
e72314f66307
child 1
5d2fab2fd055
child 12
30a18f5cbb06

Creating boost-autobuild

.hgignore file | annotate | diff | revisions
BuildParams file | annotate | diff | revisions
autobuild.xml file | annotate | diff | revisions
build-cmd.sh file | annotate | diff | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/BuildParams	Tue Jan 11 16:28:42 2011 -0800
     1.3 @@ -0,0 +1,6 @@
     1.4 +# Use Public Upload Locations
     1.5 +public_build = true
     1.6 +
     1.7 +CYGWIN.AUTOBUILD_VSVER=100
     1.8 +CYGWIN.USE_INCREDIBUILD=0
     1.9 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/autobuild.xml	Tue Jan 11 16:28:42 2011 -0800
     2.3 @@ -0,0 +1,121 @@
     2.4 +<?xml version="1.0" ?>
     2.5 +<llsd>
     2.6 +<map>
     2.7 +    <key>package_description</key>
     2.8 +    <map>
     2.9 +      <key>license</key>
    2.10 +      <string>zlib</string>
    2.11 +      <key>license_file</key>
    2.12 +      <string>LICENSES/zlib.txt</string>
    2.13 +      <key>name</key>
    2.14 +      <string>zlib</string>
    2.15 +      <key>platforms</key>
    2.16 +      <map>
    2.17 +        <key>common</key>
    2.18 +        <map>
    2.19 +          <key>build_directory</key>
    2.20 +          <string>zlib-1.2.5/stage</string>
    2.21 +          <key>configurations</key>
    2.22 +          <map>
    2.23 +            <key>Release</key>
    2.24 +            <map>
    2.25 +              <key>build</key>
    2.26 +              <map>
    2.27 +                <key>arguments</key>
    2.28 +                <array>
    2.29 +                  <string>../../build-cmd.sh</string>
    2.30 +                </array>
    2.31 +                <key>command</key>
    2.32 +                <string>sh</string>
    2.33 +              </map>
    2.34 +              <key>name</key>
    2.35 +              <string>Release</string>
    2.36 +            </map>
    2.37 +          </map>
    2.38 +          <key>manifest</key>
    2.39 +          <array>
    2.40 +            <string>include/zlib/*.h</string>
    2.41 +            <string>LICENSES/zlib.txt</string>
    2.42 +          </array>
    2.43 +          <key>name</key>
    2.44 +          <string>common</string>
    2.45 +        </map>
    2.46 +        <key>darwin</key>
    2.47 +        <map>
    2.48 +          <key>configurations</key>
    2.49 +          <map>
    2.50 +            <key>Release</key>
    2.51 +            <map>
    2.52 +              <key>build</key>
    2.53 +              <map>
    2.54 +              </map>
    2.55 +              <key>default</key>
    2.56 +              <boolean>true</boolean>
    2.57 +              <key>name</key>
    2.58 +              <string>Release</string>
    2.59 +            </map>
    2.60 +          </map>
    2.61 +          <key>manifest</key>
    2.62 +          <array>
    2.63 +            <string>lib/libz.a</string>
    2.64 +          </array>
    2.65 +          <key>name</key>
    2.66 +          <string>darwin</string>
    2.67 +        </map>
    2.68 +        <key>linux</key>
    2.69 +        <map>
    2.70 +          <key>configurations</key>
    2.71 +          <map>
    2.72 +            <key>Release</key>
    2.73 +            <map>
    2.74 +              <key>build</key>
    2.75 +              <map>
    2.76 +              </map>
    2.77 +              <key>default</key>
    2.78 +              <boolean>true</boolean>
    2.79 +              <key>name</key>
    2.80 +              <string>Release</string>
    2.81 +            </map>
    2.82 +          </map>
    2.83 +          <key>manifest</key>
    2.84 +          <array>
    2.85 +            <string>lib/libz.a</string>
    2.86 +          </array>
    2.87 +          <key>name</key>
    2.88 +          <string>linux</string>
    2.89 +        </map>
    2.90 +        <key>windows</key>
    2.91 +        <map>
    2.92 +          <key>configurations</key>
    2.93 +          <map>
    2.94 +            <key>Release</key>
    2.95 +            <map>
    2.96 +              <key>build</key>
    2.97 +              <map>
    2.98 +              </map>
    2.99 +              <key>default</key>
   2.100 +              <boolean>true</boolean>
   2.101 +              <key>name</key>
   2.102 +              <string>Release</string>
   2.103 +            </map>
   2.104 +          </map>
   2.105 +          <key>manifest</key>
   2.106 +          <array>
   2.107 +            <string>lib/debug/zlibd.lib</string>
   2.108 +            <string>lib/release/zlib.lib</string>
   2.109 +          </array>
   2.110 +          <key>name</key>
   2.111 +          <string>windows</string>
   2.112 +        </map>
   2.113 +      </map>
   2.114 +      <key>source_directory</key>
   2.115 +      <string>zlib-1.2.5</string>
   2.116 +      <key>version</key>
   2.117 +      <string>1.2.5</string>
   2.118 +    </map>
   2.119 +    <key>type</key>
   2.120 +    <string>autobuild</string>
   2.121 +    <key>version</key>
   2.122 +    <string>1.2</string>
   2.123 +  </map>
   2.124 +</llsd>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/build-cmd.sh	Tue Jan 11 16:28:42 2011 -0800
     3.3 @@ -0,0 +1,78 @@
     3.4 +#!/bin/sh
     3.5 +
     3.6 +cd "$(dirname "$0")"
     3.7 +
     3.8 +# turn on verbose debugging output for parabuild logs.
     3.9 +set -x
    3.10 +# make errors fatal
    3.11 +set -e
    3.12 +
    3.13 +BOOST_VERSION="1_45_0"
    3.14 +BOOST_SOURCE_DIR="boost_$BOOST_VERSION"
    3.15 +BOOST_ARCHIVE="$BOOST_SOURCE_DIR.tar.gz"
    3.16 +BOOST_URL="http://sourceforge.net/projects/boost/files/boost/1.45.0/$BOOST_ARCHIVE/download"
    3.17 +BOOST_MD5="739792c98fafb95e7a6b5da23a30062c" # for boost_1_45_0.tar.gz
    3.18 +
    3.19 +if [ -z "$AUTOBUILD" ] ; then 
    3.20 +    fail
    3.21 +fi
    3.22 +
    3.23 +if [ "$OSTYPE" = "cygwin" ] ; then
    3.24 +    export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
    3.25 +fi
    3.26 +
    3.27 +# load autbuild provided shell functions and variables
    3.28 +set +x
    3.29 +eval "$("$AUTOBUILD" source_environment)"
    3.30 +set -x
    3.31 +
    3.32 +fetch_archive "$BOOST_URL" "$BOOST_ARCHIVE" "$BOOST_MD5"
    3.33 +extract "$BOOST_ARCHIVE"
    3.34 +
    3.35 +top="$(pwd)"
    3.36 +cd "$BOOST_SOURCE_DIR"
    3.37 +	stage="$(pwd)/stage"
    3.38 +    case "$AUTOBUILD_PLATFORM" in
    3.39 +        "windows")
    3.40 +	    #install bjam, the boost build tool, to the extracted boost folder.
    3.41 +	    BJAM_URL_WINDOWS="http://sourceforge.net/projects/boost/files/boost-jam/3.1.18/boost-jam-3.1.18-1-ntx86.zip/download"
    3.42 +	    BJAM_ARCHIVE_WINDOWS="boost-jam-3.1.18-1-ntx86.zip"
    3.43 +	    BJAM_MD5_WINDOWS="15ec7ae2c8354e4d070a67660f022c5b" # for bjam 3.1.18-1-ntx86
    3.44 +	    
    3.45 +	    fetch_archive "$BJAM_URL_WINDOWS" "$BJAM_ARCHIVE_WINDOWS" "$BJAM_MD5_WINDOWS"
    3.46 +	    extract "$BJAM_ARCHIVE_WINDOWS'
    3.47 +
    3.48 +	    
    3.49 +	    (cd contrib/masmx86 ; cmd.exe /C "bld_ml32.bat")
    3.50 +            build_sln "contrib/vstudio/vc10/zlibvc.sln" "Debug|Win32" "zlibstat"
    3.51 +            build_sln "contrib/vstudio/vc10/zlibvc.sln" "Release|Win32" "zlibstat"
    3.52 +            mkdir -p "$stage/lib/debug"
    3.53 +            mkdir -p "$stage/lib/release"
    3.54 +            cp "contrib/vstudio/vc10/x86/ZlibStatDebug/zlibstat.lib" \
    3.55 +                "$stage/lib/debug/zlibd.lib"
    3.56 +            cp "contrib/vstudio/vc10/x86/ZlibStatRelease/zlibstat.lib" \
    3.57 +                "$stage/lib/release/zlib.lib"
    3.58 +            mkdir -p "stage/include/zlib"
    3.59 +            cp {zlib.h,zconf.h} "$stage/include/zlib"
    3.60 +        ;;
    3.61 +        "darwin")
    3.62 +            ./configure --prefix="$stage"
    3.63 +            make
    3.64 +            make install
    3.65 +			mkdir -p "$stage/include/zlib"
    3.66 +			mv "$stage/include/"*.h "$stage/include/zlib/"
    3.67 +        ;;
    3.68 +        "linux")
    3.69 +            CFLAGS="-m32" CXXFLAGS="-m32" ./configure --prefix="$stage"
    3.70 +            make
    3.71 +            make install
    3.72 +			mkdir -p "$stage/include/zlib"
    3.73 +			mv "$stage/include/"*.h "$stage/include/zlib/"
    3.74 +        ;;
    3.75 +    esac
    3.76 +    mkdir -p stage/LICENSES
    3.77 +    tail -n 31 README > stage/LICENSES/zlib.txt
    3.78 +cd "$top"
    3.79 +
    3.80 +pass
    3.81 +

mercurial