Advertisement
Guest User

build script for enna and dependencies

a guest
Sep 20th, 2010
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.33 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. cd `dirname $0`
  4.  
  5. ##############################################################################
  6. # Build Variables
  7. export PREFIX="/usr/local/geexbox"
  8. export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig"
  9. export CFLAGS="-fPIC -mfloat-abi=softfp -mfpu=neon"
  10. package="false"
  11.  
  12. ##############################################################################
  13. # Utility Functions
  14. mkdir -p .state
  15. state=`pwd`/.state
  16. target=`pwd`/target
  17.  
  18. function ifneeded() {
  19.     step=$1
  20.     pkg=$2
  21.     cmd=$3
  22.     echo "##############################################################################"
  23.     if ! [ -e $state/$pkg.$step ]; then
  24.         echo "### $pkg: running: $cmd"
  25.         (sh -c "$cmd" && touch $state/$pkg.$step) || return 1
  26.     else
  27.         echo "### $pkg: already completed: $cmd"
  28.     fi
  29.     return 0
  30. }
  31.  
  32. function build2() {
  33.     pkg=$1
  34.     shift 1
  35.     if [ -x autogen.sh ]; then
  36.         ifneeded autogen $pkg "NOCONFIGURE=1 ./autogen.sh" || return 1
  37.     fi
  38.     ifneeded configure $pkg "./configure --prefix=$PREFIX $* --disable-doc" || return 1
  39.     ifneeded build     $pkg "make -j4" || return 1
  40.     ifneeded install   $pkg "sudo make install" || return 1
  41.     if [ $package != "false" ]; then
  42.         ifneeded package $pkg "sudo make install DESTDIR=$target" || return 1
  43.     fi
  44.     return 0
  45. }
  46.  
  47. function build() {
  48.     pkg=$1
  49.     (cd $pkg; build2 $*) || return 1
  50.     return 0
  51. }
  52.  
  53. function fetch() {
  54.     pkg=$1
  55.     shift 1
  56.     ifneeded fetch $pkg "$*" || return 1
  57.     return 0
  58. }
  59.  
  60.  
  61. ###############################################################################
  62. # Argument parsing:
  63.  
  64. DEBUG_CFLAGS="-O3"     # Default optimize instead of debug..
  65.  
  66. for arg in $*; do
  67.     # todo.. add args for kernel and gfx ddk path..
  68.     case $arg in
  69.         --force-bootstrap)
  70.             rm -f $state/*.configure $state/*.autogen
  71.             shift 1
  72.             ;;
  73.         --clean)
  74.             # XXX todo
  75.             shift 1
  76.             ;;
  77.         --debug)
  78.             DEBUG_CFLAGS="-g"
  79.             shift 1
  80.             ;;
  81.         --package)
  82.             package="true"
  83.             shift 1
  84.             ;;
  85.         --help)
  86.             echo "$0 [--force-bootstrap] [--clean] [component-path]*"
  87.             echo "  --force-bootstrap  -  re-run bootstrap and configure even if it has already been run"
  88.             echo "  --clean            -  clean derived objects"
  89.             echo "  --debug            -  build debug build"
  90.             echo "  --package          -  for non cross-compile builds, archive binaries"
  91.             echo "  --help             -  show usage"
  92.             echo ""
  93.             echo "  example:  $0 --force-bootstrap"
  94.             exit 0
  95.             ;;
  96.         *)
  97.             # XXX todo
  98.             build_components="$*"
  99.             break
  100.             ;;
  101.     esac
  102. done
  103.  
  104. CFLAGS="$DEBUG_CFLAGS $CFLAGS"
  105.  
  106. ##############################################################################
  107. # Build Steps
  108.  
  109. # note: -r51480 is 1.0 alpha... geexbox is building r51486 in case of ethumb
  110. # and elementary, so I follow suit..
  111. fetch eina      svn checkout -r51480 http://svn.enlightenment.org/svn/e/trunk/eina &&
  112. build eina      --disable-tests --enable-posix-threads &&
  113. fetch eet       svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/eet &&
  114. build eet       --disable-tests &&
  115. fetch evas      svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/evas &&
  116. build evas      --disable-tests --enable-cpu-neon --disable-convert-32-rgb-rot-90 --enable-pthreads --enable-pipe-render --enable-async-preload --enable-async-events --enable-async-render --enable-word-cache --enable-metric-cache &&
  117. fetch ecore     svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/ecore &&
  118. build ecore     --disable-tests --disable-epoll &&
  119. fetch embryo        svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/embryo &&
  120. build embryo        --disable-tests &&
  121. fetch edje      svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/edje &&
  122. build edje      --disable-tests &&
  123. fetch e_dbus        svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/e_dbus &&
  124. build e_dbus        --disable-tests &&
  125. fetch ethumb        svn co -r51486 http://svn.enlightenment.org/svn/e/trunk/ethumb &&
  126. build ethumb        --disable-tests &&
  127. fetch elementary    svn co -r51486 http://svn.enlightenment.org/svn/e/trunk/TMP/st/elementary &&
  128. build elementary    --disable-tests &&
  129. fetch libplayer     git clone git://github.com/robclark/libplayer.git &&
  130. build libplayer     --enable-gstreamer &&
  131. fetch libnfo        git clone git://git.openbricks.org/libnfo.git &&
  132. build libnfo        &&
  133. fetch libvalhalla   git clone git://git.openbricks.org/libvalhalla.git &&
  134. build libvalhalla   --enable-grabber-ffmpeg &&
  135. fetch enna      git clone git://git.openbricks.org/enna.git &&
  136. build enna      --enable-theme-stb --enable-theme-default &&
  137. echo "Success!!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement