build-scripts/nacl-buildbot.sh
changeset 8882 4fc9e98413c3
parent 8881 eb48568ecabb
child 10592 a5667285680d
equal deleted inserted replaced
8881:eb48568ecabb 8882:4fc9e98413c3
     1 #!/bin/bash
     1 #!/bin/bash
     2 
     2 
     3 # This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
     3 # This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
     4 #  amd64 Linux to NaCl.
     4 #  amd64 Linux to NaCl.
     5 
       
     6 # The final tarball can be unpacked in the root directory of a RPi,
       
     7 #  so the SDL2 install lands in /usr/local. Run ldconfig, and then
       
     8 #  you should be able to build and run SDL2-based software on your
       
     9 #  Pi. Standard configure scripts should be able to find SDL and
       
    10 #  build against it, and sdl2-config should work correctly on the
       
    11 #  actual device.
       
    12 
     5 
    13 export NACL_SDK_ROOT="/nacl_sdk/pepper_35"
     6 export NACL_SDK_ROOT="/nacl_sdk/pepper_35"
    14 
     7 
    15 TARBALL="$1"
     8 TARBALL="$1"
    16 if [ -z $1 ]; then
     9 if [ -z $1 ]; then
    48 export RANLIB="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ranlib"
    41 export RANLIB="$NACL_SDK_ROOT/toolchain/linux_pnacl/bin/pnacl-ranlib"
    49 
    42 
    50 ../configure --host=pnacl --prefix=$PWD/nacl-sdl2-installed
    43 ../configure --host=pnacl --prefix=$PWD/nacl-sdl2-installed
    51 $MAKE
    44 $MAKE
    52 $MAKE install
    45 $MAKE install
    53 # Fix up a few things to a real install path on a real Raspberry Pi...
    46 # Fix up a few things to a real install path
    54 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
    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
    55 mkdir -p ./usr
    48 mkdir -p ./usr
    56 mv ./nacl-sdl2-installed ./usr/local
    49 mv ./nacl-sdl2-installed ./usr/local
    57 
    50 
    58 popd
    51 popd