Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ################################################################################
- # This file is part of OpenELEC - http://www.openelec.tv
- # Copyright (C) 2009-2012 Stephan Raue ([email protected])
- #
- # This Program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2, or (at your option)
- # any later version.
- #
- # This Program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with OpenELEC.tv; see the file COPYING. If not, write to
- # the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
- # http://www.gnu.org/copyleft/gpl.html
- ################################################################################
- . config/options $1
- if [ "$DISPLAYSERVER" = "xorg-server" ]; then
- XBMC_XORG="--enable-x11 --enable-xrandr"
- else
- XBMC_XORG="--disable-x11 --disable-xrandr"
- fi
- if [ "$OPENGL_SUPPORT" = yes ]; then
- XBMC_OPENGL="--enable-gl"
- else
- XBMC_OPENGL="--disable-gl"
- fi
- if [ "$OPENGLES_SUPPORT" = yes ]; then
- XBMC_OPENGLES="--enable-gles"
- else
- XBMC_OPENGLES="--disable-gles"
- fi
- if [ "$XBMC_SCR_RSXS" = yes ]; then
- XBMC_RSXS="--enable-rsxs"
- # fix build of RSXS Screensaver support if not using libiconv
- if [ ! "$ICONV" = "libiconv" ]; then
- export jm_cv_func_gettimeofday_clobber=no
- fi
- else
- XBMC_RSXS="--disable-rsxs"
- fi
- if [ "$XBMC_VIS_PROJECTM" = yes ]; then
- XBMC_PROJECTM="--enable-projectm"
- else
- XBMC_PROJECTM="--disable-projectm"
- fi
- if [ "$XBMC_VIS_GOOM" = yes ]; then
- XBMC_GOOM="--enable-goom"
- else
- XBMC_GOOM="--disable-goom"
- fi
- if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
- XBMC_PULSEAUDIO="--enable-pulse"
- else
- XBMC_PULSEAUDIO="--disable-pulse"
- fi
- if [ "$CEC_SUPPORT" = yes ]; then
- XBMC_CEC="--enable-libcec"
- else
- XBMC_CEC="--disable-libcec"
- fi
- if [ "$JOYSTICK_SUPPORT" = yes ]; then
- XBMC_JOYSTICK="--enable-joystick"
- else
- XBMC_JOYSTICK="--disable-joystick"
- fi
- if [ "$NONFREE_SUPPORT" = yes ]; then
- XBMC_NONFREE="--enable-non-free"
- else
- XBMC_NONFREE="--disable-non-free"
- fi
- if [ "$AIRPLAY_SUPPORT" = yes ]; then
- XBMC_AIRPLAY="--enable-airplay"
- else
- XBMC_AIRPLAY="--disable-airplay"
- fi
- if [ "$AIRTUNES_SUPPORT" = yes ]; then
- XBMC_AIRTUNES="--enable-airtunes"
- else
- XBMC_AIRTUNES="--disable-airtunes"
- fi
- if [ "$DVDCSS_SUPPORT" = yes ]; then
- XBMC_DVDCSS="--enable-dvdcss"
- else
- XBMC_DVDCSS="--disable-dvdcss"
- fi
- if [ "$BLURAY_SUPPORT" = yes ]; then
- XBMC_BLURAY="--enable-libbluray"
- else
- XBMC_BLURAY="--disable-libbluray"
- fi
- if [ "$AVAHI_DAEMON" = yes ]; then
- XBMC_AVAHI="--enable-avahi"
- else
- XBMC_AVAHI="--disable-avahi"
- fi
- if [ "$NFS_SUPPORT" = yes ]; then
- XBMC_NFS="--enable-nfs"
- else
- XBMC_NFS="--disable-nfs"
- fi
- if [ "$AFP_SUPPORT" = yes ]; then
- XBMC_AFP="--enable-afpclient"
- else
- XBMC_AFP="--disable-afpclient"
- fi
- if [ "$SAMBA_CLIENT" = yes ]; then
- XBMC_SAMBA="--enable-samba"
- export LIBS="$LIBS -ltalloc -ltdb -lwbclient"
- else
- XBMC_SAMBA="--disable-samba"
- fi
- if [ "$WEBSERVER" = yes ]; then
- XBMC_WEBSERVER="--enable-webserver"
- else
- XBMC_WEBSERVER="--disable-webserver"
- fi
- if [ "$VDPAU" = yes ]; then
- XBMC_VDPAU="--enable-vdpau"
- else
- XBMC_VDPAU="--disable-vdpau"
- fi
- if [ "$VAAPI" = yes ]; then
- XBMC_VAAPI="--enable-vaapi"
- else
- XBMC_VAAPI="--disable-vaapi"
- fi
- if [ "$XVBA" = yes ]; then
- XBMC_XVBA="--enable-xvba"
- else
- XBMC_XVBA="--disable-xvba"
- fi
- if [ "$CRYSTALHD" = yes ]; then
- XBMC_CRYSTALHD="--enable-crystalhd"
- else
- XBMC_CRYSTALHD="--disable-crystalhd"
- fi
- # xbmc fails to build with LTO optimization
- strip_lto
- # dont use some optimizations because of build problems
- LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
- # dont build parallel
- MAKEFLAGS=-j1
- export PYTHON_VERSION="2.7"
- export PYTHON_CPPFLAGS="-I$SYSROOT_PREFIX/usr/include/python$PYTHON_VERSION"
- export PYTHON_LDFLAGS="-L$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION -lpython$PYTHON_VERSION"
- export PYTHON_SITE_PKG="$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION/site-packages"
- export ac_python_version="$PYTHON_VERSION"
- # setup skin dir from default skin
- SKIN_DIR="skin.`tolower $SKIN_DEFAULT`"
- cd $PKG_BUILD
- # adding fake Makefile for stripped skin
- mkdir -p addons/skin.confluence/media
- touch addons/skin.confluence/media/Makefile.in
- # autoreconf
- do_autoreconf
- do_autoreconf lib/libid3tag/libid3tag
- do_autoreconf xbmc/screensavers/rsxs-0.9
- do_autoreconf xbmc/visualizations/Goom/goom2k4-0
- do_autoreconf lib/libapetag
- do_autoreconf lib/cpluff
- # order matters with libdvd and friends
- [ -d lib/libdvd/libdvdcss ] && do_autoreconf lib/libdvd/libdvdcss
- do_autoreconf lib/libdvd/libdvdread
- do_autoreconf lib/libdvd/libdvdnav
- # Clean the generated files
- find . -depth -type d -name "autom4te.cache" -exec rm -rf {} \;
- ./configure --host=$TARGET_NAME \
- --build=$HOST_NAME \
- --with-arch=$TARGET_ARCH \
- --with-cpu=$TARGET_CPU \
- --prefix=/usr \
- --exec-prefix=/usr \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- GIT_REV=`cat git.version` \
- --disable-debug \
- --disable-optimizations \
- $XBMC_OPENGL \
- $XBMC_OPENGLES \
- $XBMC_VDPAU \
- $XBMC_VAAPI \
- $XBMC_CRYSTALHD \
- $XBMC_XVBA \
- --disable-vdadecoder \
- --disable-vtbdecoder \
- --disable-openmax \
- --disable-tegra \
- --disable-profiling \
- $XBMC_JOYSTICK \
- $XBMC_CEC \
- --enable-udev \
- --disable-libusb \
- $XBMC_GOOM \
- $XBMC_RSXS \
- $XBMC_PROJECTM \
- $XBMC_XORG \
- --disable-ccache \
- $XBMC_PULSEAUDIO \
- --enable-rtmp \
- $XBMC_SAMBA \
- $XBMC_NFS \
- $XBMC_AFP \
- --enable-ffmpeg-libvorbis \
- --enable-lame \
- $XBMC_DVDCSS \
- --disable-mid \
- --disable-hal \
- $XBMC_AVAHI \
- $XBMC_AIRPLAY \
- $XBMC_AIRTUNES \
- $XBMC_NONFREE \
- --disable-asap-codec \
- $XBMC_WEBSERVER \
- --enable-optical-drive \
- $XBMC_BLURAY \
- --enable-texturepacker \
- --disable-external-libraries \
- --enable-external-ffmpeg \
- # setup default skin inside the sources
- sed -i -e "s|skin.confluence|$SKIN_DIR|g" xbmc/settings/Settings.h
- make externals
- make xbmc.bin
- if [ "$DISPLAYSERVER" = "xorg-server" ]; then
- make xbmc-xrandr
- fi
Advertisement
Add Comment
Please, Sign In to add comment