Guest User

Untitled

a guest
Jun 9th, 2012
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.01 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ################################################################################
  4. # This file is part of OpenELEC - http://www.openelec.tv
  5. # Copyright (C) 2009-2012 Stephan Raue ([email protected])
  6. #
  7. # This Program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # This Program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with OpenELEC.tv; see the file COPYING. If not, write to
  19. # the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
  20. # http://www.gnu.org/copyleft/gpl.html
  21. ################################################################################
  22.  
  23. . config/options $1
  24.  
  25. if [ "$DISPLAYSERVER" = "xorg-server" ]; then
  26. XBMC_XORG="--enable-x11 --enable-xrandr"
  27. else
  28. XBMC_XORG="--disable-x11 --disable-xrandr"
  29. fi
  30.  
  31. if [ "$OPENGL_SUPPORT" = yes ]; then
  32. XBMC_OPENGL="--enable-gl"
  33. else
  34. XBMC_OPENGL="--disable-gl"
  35. fi
  36.  
  37. if [ "$OPENGLES_SUPPORT" = yes ]; then
  38. XBMC_OPENGLES="--enable-gles"
  39. else
  40. XBMC_OPENGLES="--disable-gles"
  41. fi
  42.  
  43. if [ "$XBMC_SCR_RSXS" = yes ]; then
  44. XBMC_RSXS="--enable-rsxs"
  45. # fix build of RSXS Screensaver support if not using libiconv
  46. if [ ! "$ICONV" = "libiconv" ]; then
  47. export jm_cv_func_gettimeofday_clobber=no
  48. fi
  49. else
  50. XBMC_RSXS="--disable-rsxs"
  51. fi
  52.  
  53. if [ "$XBMC_VIS_PROJECTM" = yes ]; then
  54. XBMC_PROJECTM="--enable-projectm"
  55. else
  56. XBMC_PROJECTM="--disable-projectm"
  57. fi
  58.  
  59. if [ "$XBMC_VIS_GOOM" = yes ]; then
  60. XBMC_GOOM="--enable-goom"
  61. else
  62. XBMC_GOOM="--disable-goom"
  63. fi
  64.  
  65. if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
  66. XBMC_PULSEAUDIO="--enable-pulse"
  67. else
  68. XBMC_PULSEAUDIO="--disable-pulse"
  69. fi
  70.  
  71. if [ "$CEC_SUPPORT" = yes ]; then
  72. XBMC_CEC="--enable-libcec"
  73. else
  74. XBMC_CEC="--disable-libcec"
  75. fi
  76.  
  77. if [ "$JOYSTICK_SUPPORT" = yes ]; then
  78. XBMC_JOYSTICK="--enable-joystick"
  79. else
  80. XBMC_JOYSTICK="--disable-joystick"
  81. fi
  82.  
  83. if [ "$NONFREE_SUPPORT" = yes ]; then
  84. XBMC_NONFREE="--enable-non-free"
  85. else
  86. XBMC_NONFREE="--disable-non-free"
  87. fi
  88.  
  89. if [ "$AIRPLAY_SUPPORT" = yes ]; then
  90. XBMC_AIRPLAY="--enable-airplay"
  91. else
  92. XBMC_AIRPLAY="--disable-airplay"
  93. fi
  94.  
  95. if [ "$AIRTUNES_SUPPORT" = yes ]; then
  96. XBMC_AIRTUNES="--enable-airtunes"
  97. else
  98. XBMC_AIRTUNES="--disable-airtunes"
  99. fi
  100.  
  101. if [ "$DVDCSS_SUPPORT" = yes ]; then
  102. XBMC_DVDCSS="--enable-dvdcss"
  103. else
  104. XBMC_DVDCSS="--disable-dvdcss"
  105. fi
  106.  
  107. if [ "$BLURAY_SUPPORT" = yes ]; then
  108. XBMC_BLURAY="--enable-libbluray"
  109. else
  110. XBMC_BLURAY="--disable-libbluray"
  111. fi
  112.  
  113. if [ "$AVAHI_DAEMON" = yes ]; then
  114. XBMC_AVAHI="--enable-avahi"
  115. else
  116. XBMC_AVAHI="--disable-avahi"
  117. fi
  118.  
  119. if [ "$NFS_SUPPORT" = yes ]; then
  120. XBMC_NFS="--enable-nfs"
  121. else
  122. XBMC_NFS="--disable-nfs"
  123. fi
  124.  
  125. if [ "$AFP_SUPPORT" = yes ]; then
  126. XBMC_AFP="--enable-afpclient"
  127. else
  128. XBMC_AFP="--disable-afpclient"
  129. fi
  130.  
  131. if [ "$SAMBA_CLIENT" = yes ]; then
  132. XBMC_SAMBA="--enable-samba"
  133. export LIBS="$LIBS -ltalloc -ltdb -lwbclient"
  134. else
  135. XBMC_SAMBA="--disable-samba"
  136. fi
  137.  
  138. if [ "$WEBSERVER" = yes ]; then
  139. XBMC_WEBSERVER="--enable-webserver"
  140. else
  141. XBMC_WEBSERVER="--disable-webserver"
  142. fi
  143.  
  144. if [ "$VDPAU" = yes ]; then
  145. XBMC_VDPAU="--enable-vdpau"
  146. else
  147. XBMC_VDPAU="--disable-vdpau"
  148. fi
  149.  
  150. if [ "$VAAPI" = yes ]; then
  151. XBMC_VAAPI="--enable-vaapi"
  152. else
  153. XBMC_VAAPI="--disable-vaapi"
  154. fi
  155.  
  156. if [ "$XVBA" = yes ]; then
  157. XBMC_XVBA="--enable-xvba"
  158. else
  159. XBMC_XVBA="--disable-xvba"
  160. fi
  161.  
  162. if [ "$CRYSTALHD" = yes ]; then
  163. XBMC_CRYSTALHD="--enable-crystalhd"
  164. else
  165. XBMC_CRYSTALHD="--disable-crystalhd"
  166. fi
  167.  
  168. # xbmc fails to build with LTO optimization
  169. strip_lto
  170.  
  171. # dont use some optimizations because of build problems
  172. LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
  173.  
  174. # dont build parallel
  175. MAKEFLAGS=-j1
  176.  
  177. export PYTHON_VERSION="2.7"
  178. export PYTHON_CPPFLAGS="-I$SYSROOT_PREFIX/usr/include/python$PYTHON_VERSION"
  179. export PYTHON_LDFLAGS="-L$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION -lpython$PYTHON_VERSION"
  180. export PYTHON_SITE_PKG="$SYSROOT_PREFIX/usr/lib/python$PYTHON_VERSION/site-packages"
  181. export ac_python_version="$PYTHON_VERSION"
  182.  
  183. # setup skin dir from default skin
  184. SKIN_DIR="skin.`tolower $SKIN_DEFAULT`"
  185.  
  186. cd $PKG_BUILD
  187.  
  188. # adding fake Makefile for stripped skin
  189. mkdir -p addons/skin.confluence/media
  190. touch addons/skin.confluence/media/Makefile.in
  191.  
  192. # autoreconf
  193. do_autoreconf
  194. do_autoreconf lib/libid3tag/libid3tag
  195. do_autoreconf xbmc/screensavers/rsxs-0.9
  196. do_autoreconf xbmc/visualizations/Goom/goom2k4-0
  197. do_autoreconf lib/libapetag
  198. do_autoreconf lib/cpluff
  199. # order matters with libdvd and friends
  200. [ -d lib/libdvd/libdvdcss ] && do_autoreconf lib/libdvd/libdvdcss
  201. do_autoreconf lib/libdvd/libdvdread
  202. do_autoreconf lib/libdvd/libdvdnav
  203.  
  204. # Clean the generated files
  205. find . -depth -type d -name "autom4te.cache" -exec rm -rf {} \;
  206.  
  207. ./configure --host=$TARGET_NAME \
  208. --build=$HOST_NAME \
  209. --with-arch=$TARGET_ARCH \
  210. --with-cpu=$TARGET_CPU \
  211. --prefix=/usr \
  212. --exec-prefix=/usr \
  213. --sysconfdir=/etc \
  214. --datadir=/usr/share \
  215. GIT_REV=`cat git.version` \
  216. --disable-debug \
  217. --disable-optimizations \
  218. $XBMC_OPENGL \
  219. $XBMC_OPENGLES \
  220. $XBMC_VDPAU \
  221. $XBMC_VAAPI \
  222. $XBMC_CRYSTALHD \
  223. $XBMC_XVBA \
  224. --disable-vdadecoder \
  225. --disable-vtbdecoder \
  226. --disable-openmax \
  227. --disable-tegra \
  228. --disable-profiling \
  229. $XBMC_JOYSTICK \
  230. $XBMC_CEC \
  231. --enable-udev \
  232. --disable-libusb \
  233. $XBMC_GOOM \
  234. $XBMC_RSXS \
  235. $XBMC_PROJECTM \
  236. $XBMC_XORG \
  237. --disable-ccache \
  238. $XBMC_PULSEAUDIO \
  239. --enable-rtmp \
  240. $XBMC_SAMBA \
  241. $XBMC_NFS \
  242. $XBMC_AFP \
  243. --enable-ffmpeg-libvorbis \
  244. --enable-lame \
  245. $XBMC_DVDCSS \
  246. --disable-mid \
  247. --disable-hal \
  248. $XBMC_AVAHI \
  249. $XBMC_AIRPLAY \
  250. $XBMC_AIRTUNES \
  251. $XBMC_NONFREE \
  252. --disable-asap-codec \
  253. $XBMC_WEBSERVER \
  254. --enable-optical-drive \
  255. $XBMC_BLURAY \
  256. --enable-texturepacker \
  257. --disable-external-libraries \
  258. --enable-external-ffmpeg \
  259.  
  260. # setup default skin inside the sources
  261. sed -i -e "s|skin.confluence|$SKIN_DIR|g" xbmc/settings/Settings.h
  262.  
  263. make externals
  264. make xbmc.bin
  265.  
  266. if [ "$DISPLAYSERVER" = "xorg-server" ]; then
  267. make xbmc-xrandr
  268. fi
Advertisement
Add Comment
Please, Sign In to add comment