build-scripts/nacl-buildbot.sh
author Sam Lantinga
Thu, 01 Sep 2016 01:26:56 -0700
changeset 10304 ee83e0b4a36f
parent 8882 4fc9e98413c3
child 10592 a5667285680d
permissions -rwxr-xr-x
wayland: Add support for relative mouse mode, by Jonas Ã…dahl <jadahl@gmail.com>

Generate the C protocol files from the protocol XML files installed by
wayland-protocols, and use them to implement support for relative pointer
motions and pointer locking.

Note that at the time, the protocol is unstable and may change in the future.
Any future breaking changes will, however, fail gracefully and result in no
regressions compared to before this patch.
     1 #!/bin/bash
     2 
     3 # This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
     4 #  amd64 Linux to NaCl.
     5 
     6 export NACL_SDK_ROOT="/nacl_sdk/pepper_35"
     7 
     8 TARBALL="$1"
     9 if [ -z $1 ]; then
    10     TARBALL=sdl-nacl.tar.xz
    11 fi
    12 
    13 OSTYPE=`uname -s`
    14 if [ "$OSTYPE" != "Linux" ]; then
    15     # !!! FIXME
    16     echo "This only works on x86 or x64-64 Linux at the moment." 1>&2
    17     exit 1
    18 fi
    19 
    20 if [ "x$MAKE" == "x" ]; then
    21     NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
    22     let NCPU=$NCPU+1
    23     MAKE="make -j$NCPU"
    24 fi
    25 
    26 BUILDBOTDIR="nacl-buildbot"
    27 PARENTDIR="$PWD"
    28 
    29 set -e
    30 set -x
    31 rm -f $TARBALL
    32 rm -rf $BUILDBOTDIR
    33 mkdir -p $BUILDBOTDIR
    34 pushd $BUILDBOTDIR
    35 
    36 # !!! FIXME: ccache?
    37 export CC="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-clang"
    38 export CFLAGS="$CFLAGS -I$NACL_SDK_ROOT/include -I$NACL_SDK_ROOT/include/pnacl"
    39 export AR="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
    40 export LD="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ar"
    41 export RANLIB="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ranlib"
    42 
    43 ../configure --host=pnacl --prefix=$PWD/nacl-sdl2-installed
    44 $MAKE
    45 $MAKE install
    46 # Fix up a few things to a real install path
    47 perl -w -pi -e "s#$PWD/nacl-sdl2-installed#/usr/local#g;" ./nacl-sdl2-installed/lib/libSDL2.la ./nacl-sdl2-installed/lib/pkgconfig/sdl2.pc ./nacl-sdl2-installed/bin/sdl2-config
    48 mkdir -p ./usr
    49 mv ./nacl-sdl2-installed ./usr/local
    50 
    51 popd
    52 tar -cJvvf $TARBALL -C $BUILDBOTDIR usr
    53 rm -rf $BUILDBOTDIR
    54 
    55 set +x
    56 echo "All done. Final installable is in $TARBALL ...";
    57