Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cd `dirname $0`
- ##############################################################################
- # Build Variables
- export PREFIX="/usr/local/geexbox"
- export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig"
- export CFLAGS="-fPIC -mfloat-abi=softfp -mfpu=neon"
- package="false"
- ##############################################################################
- # Utility Functions
- mkdir -p .state
- state=`pwd`/.state
- target=`pwd`/target
- function ifneeded() {
- step=$1
- pkg=$2
- cmd=$3
- echo "##############################################################################"
- if ! [ -e $state/$pkg.$step ]; then
- echo "### $pkg: running: $cmd"
- (sh -c "$cmd" && touch $state/$pkg.$step) || return 1
- else
- echo "### $pkg: already completed: $cmd"
- fi
- return 0
- }
- function build2() {
- pkg=$1
- shift 1
- if [ -x autogen.sh ]; then
- ifneeded autogen $pkg "NOCONFIGURE=1 ./autogen.sh" || return 1
- fi
- ifneeded configure $pkg "./configure --prefix=$PREFIX $* --disable-doc" || return 1
- ifneeded build $pkg "make -j4" || return 1
- ifneeded install $pkg "sudo make install" || return 1
- if [ $package != "false" ]; then
- ifneeded package $pkg "sudo make install DESTDIR=$target" || return 1
- fi
- return 0
- }
- function build() {
- pkg=$1
- (cd $pkg; build2 $*) || return 1
- return 0
- }
- function fetch() {
- pkg=$1
- shift 1
- ifneeded fetch $pkg "$*" || return 1
- return 0
- }
- ###############################################################################
- # Argument parsing:
- DEBUG_CFLAGS="-O3" # Default optimize instead of debug..
- for arg in $*; do
- # todo.. add args for kernel and gfx ddk path..
- case $arg in
- --force-bootstrap)
- rm -f $state/*.configure $state/*.autogen
- shift 1
- ;;
- --clean)
- # XXX todo
- shift 1
- ;;
- --debug)
- DEBUG_CFLAGS="-g"
- shift 1
- ;;
- --package)
- package="true"
- shift 1
- ;;
- --help)
- echo "$0 [--force-bootstrap] [--clean] [component-path]*"
- echo " --force-bootstrap - re-run bootstrap and configure even if it has already been run"
- echo " --clean - clean derived objects"
- echo " --debug - build debug build"
- echo " --package - for non cross-compile builds, archive binaries"
- echo " --help - show usage"
- echo ""
- echo " example: $0 --force-bootstrap"
- exit 0
- ;;
- *)
- # XXX todo
- build_components="$*"
- break
- ;;
- esac
- done
- CFLAGS="$DEBUG_CFLAGS $CFLAGS"
- ##############################################################################
- # Build Steps
- # note: -r51480 is 1.0 alpha... geexbox is building r51486 in case of ethumb
- # and elementary, so I follow suit..
- fetch eina svn checkout -r51480 http://svn.enlightenment.org/svn/e/trunk/eina &&
- build eina --disable-tests --enable-posix-threads &&
- fetch eet svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/eet &&
- build eet --disable-tests &&
- fetch evas svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/evas &&
- 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 &&
- fetch ecore svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/ecore &&
- build ecore --disable-tests --disable-epoll &&
- fetch embryo svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/embryo &&
- build embryo --disable-tests &&
- fetch edje svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/edje &&
- build edje --disable-tests &&
- fetch e_dbus svn co -r51480 http://svn.enlightenment.org/svn/e/trunk/e_dbus &&
- build e_dbus --disable-tests &&
- fetch ethumb svn co -r51486 http://svn.enlightenment.org/svn/e/trunk/ethumb &&
- build ethumb --disable-tests &&
- fetch elementary svn co -r51486 http://svn.enlightenment.org/svn/e/trunk/TMP/st/elementary &&
- build elementary --disable-tests &&
- fetch libplayer git clone git://github.com/robclark/libplayer.git &&
- build libplayer --enable-gstreamer &&
- fetch libnfo git clone git://git.openbricks.org/libnfo.git &&
- build libnfo &&
- fetch libvalhalla git clone git://git.openbricks.org/libvalhalla.git &&
- build libvalhalla --enable-grabber-ffmpeg &&
- fetch enna git clone git://git.openbricks.org/enna.git &&
- build enna --enable-theme-stb --enable-theme-default &&
- echo "Success!!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement