1 # Contributor: Prurigro
3 # Patches/Fixes created from efforts by prurigro, sdnick484, jaydonoghue, anish, jpf, vrtladept, paulingham, bralkein, wonder, Slash and others! (contact us if your work is here but you aren't mentioned)
4 # fribidi.patch fixes an issue where some people were having missing file issues related to the fribidi library
5 # gcc44.patch helps boxee compile on gcc 4.4
6 # boxee64.patch addresses a number of problems getting boxee to compile and run smoothly on x86_64
7 # flashlib.patch allows flashlib to compile, allowing us to get a little closer to a built-from-source flash solution. this is turned off for now
8 # libpng.patch helps compile against libpng1.4
9 # 12563_fix removes extraneous function calls that wont let boxee compile
10 # pkgdesc from wikipedia :)
16 pkgdesc="A freeware cross-platform media center software with social networking features that is a fork of the open source XBMC media center"
17 arch=('i686' 'x86_64')
19 depends=('php' 'glew' 'hal' 'jasper' 'libcdio' 'sdl_image' 'sdl_mixer' 'sdl_gfx' 'sdl_sound' 'fribidi' 'libmad' 'lzo2' 'unrar' 'smbclient' 'streamripper' 'python-pysqlite' 'curl' 'gawk' 'pmount' 'libmysqlclient' 'dbus' 'bzip2' 'boost' 'faac' 'enca' 'gperf' 'unzip' 'tre' 'screen' 'bison' 'libsamplerate' 'zip' 'libmms' 'libvdpau' 'libxtst' 'libxrandr' 'fontconfig' 'libxinerama' 'python24')
20 makedepends=( 'boost' 'cmake' 'nasm' 'coreutils' 'rsync' 'glew')
21 options=('!makeflags')
22 url="http://www.boxee.tv/"
23 install='boxee-source.install'
24 source=(http://dl.boxee.tv/boxee-sources-$pkgver.tar.bz2
36 md5sums=('36284eee3cb1db776b78e594865aa7b6'
37 'dcad8a3955ea2742a6dccb23e6b665ef'
38 '3e53f9a60344dad366b230fb2ac876ec'
39 'b9ff2928d707321c96ef1ad792c14dda'
40 '3241498186d95a5aafd4d2a6947c764f'
41 'a07e311b6da020f7e6847d249cf08b66'
42 'fbed461ece6620d2c31da1169d9744d3'
43 '4ad256054dbc6739fbe5591aac5777d7'
44 'de21425ae087313e2898aa5edaeda14b'
45 'cff658ec51e4fe7cfb94700ae689970f'
46 'da4c26bf1a0b3c55ed5b773d025d45fb'
47 'a28c4cf86d1eba78d7f66bdbc4dafcf0')
49 _src=${srcdir}/boxee-sources-"$pkgver"
52 pushd ${_src} || return 1
53 #this section contains changes required for x86_64 and thus is only loaded if your arch is x86_64
54 if [ $(uname -m) = "x86_64" ]; then
55 #boxee64.patch allows boxee to compile on 64bit systems
56 patch -p0 < ../boxee64.patch || return 1
57 #ffmpeg needs to be patched for 64bit systems
58 patch -p0 < ../ffmpeg64.patch || return 1
60 #two symlinks added by paulingham that work with boxee64.patch to allow boxee to compile on x86_64
61 pushd xbmc/lib/libsmb || return 1
62 ln -s /usr/lib/libtalloc.so.1 libtalloc-x86_64-linux.a
63 ln -s /usr/lib/libwbclient.so.0 libwbclient-x86_64-linux.a
65 _xulrunner=xulrunner-x86_64-linux
67 _xulrunner=xulrunner-i486-linux
71 #anish.patch adds some minor tweaks anish figured out to get the latest sources running
72 patch -p0 < ../anish.patch || return 1
74 #fribidi.patch fixes the compile issue related to fribidi (big thanks to vrtladept and anish for getting this one rolling)
75 patch -p0 < ../fribidi.patch || return 1
77 #patch to compile against libpng14, thanks to wonder for providing the original patch
78 patch -p0 < ../libpng.patch || return 1
80 #patch to compilet release 0.9.21.12563, remove extraneous function calls that cause linkage failure
81 patch -p0 < ../12563_fix.patch || return 1
84 patch -p0 < ../libmms.patch || return 1
86 #thank the fedora guys for this
87 patch -p1 < ../mysql_fix.patch || return 1
89 #smbno.h was deprecated in the kernel, the boxee guys leave us hanging as usual
90 patch -p0 < ../samba.patch || return 1
91 cp ../smbno.h xbmc/cores/paplayer/MACDll/Source/MACLib/. || return 1
93 #tinyxpath and goom need to be reconfigured so they link against the correct utilities (another thanks to anish for this one)
94 pushd xbmc/lib/libBoxee/tinyxpath || return 1
95 autoreconf -vif || return 1
96 ./configure || return 1
99 pushd xbmc/visualizations/Goom/goom2k4-0 || return 1
101 libtoolize --copy --force || return 1
102 ./autogen.sh --enable-static --with-pic || return 1
106 pushd xbmc/lib/libass/ || return 1
107 autoreconf --install || return 1
111 autoheader || return 1
113 #if anyone wants pulseaudio, simply remove "--disable-pulse"
114 ./configure --prefix=/opt/boxee --enable-mid --disable-debug --disable-pulse --enable-xrandr --disable-ccache --enable-vdpau || return 1
116 #this is another hack to fix an issue with gcc44-- once again I'm using sed because the Makefile is generated in this package
117 if [ $(uname -m) = "x86_64" ]; then
118 sed -r 's/\(MAKE\)\ -C\ xbmc\/screensavers$/\(MAKE\)\ CFLAGS=\"-march=k8\ -02\ -pipe\"\ -C\ xbmc\/screensavers/g' Makefile > Makefile.sed || return 1
120 sed -r 's/\(MAKE\)\ -C\ xbmc\/screensavers$/\(MAKE\)\ CFLAGS=\"-march=i486\ -02\ -pipe\"\ -C\ xbmc\/screensavers/g' Makefile > Makefile.sed || return 1
122 cat Makefile.sed > Makefile || return 1
131 install -d ${pkgdir}/opt/boxee/language || return 1
132 pushd ${_src}/language/ || return 1
133 find . | sed -e 's/\.\///g' | while read file; do
134 if [ -d "$file" ]; then
135 install -d ${pkgdir}/opt/boxee/language/"$file" || return 1
137 install -D "$file" ${pkgdir}/opt/boxee/language/"$file" || return 1
143 install -d ${pkgdir}/opt/boxee/media || return 1
144 pushd ${_src}/media/ || return 1
145 find . | sed -e 's/\.\///g' | while read file; do
146 if [ $(echo "$file" | grep "icon.png" -i -c) = 0 -a $(echo "$file" | grep "icon32x32.png" -i -c) = 0 -a $(echo "$file" | grep "xbmc.icns" -i -c) = 0 -a $(echo "$file" | grep "Boxee.ico" -i -c) = 0 -a $(echo "$file" | grep "Splash.png" -i -c) = 0 -a $(echo "$file" | grep "Splash_old.png" -i -c) = 0 -a $(echo "$file" | grep "Fonts/arial.ttf" -i -c) = 0 ]; then
147 if [ -d "$file" ]; then
148 install -d ${pkgdir}/opt/boxee/media/"$file" || return 1
150 install -D "$file" ${pkgdir}/opt/boxee/media/"$file" || return 1
157 install -d ${pkgdir}/opt/boxee/scripts || return 1
158 pushd ${_src}/scripts || return 1
159 find . | sed -e 's/\.\///g' | while read file; do
160 if [ $(echo "$file" | grep "scripts.zip" -i -c) = 0 -a $(echo "$file" | grep "user_submitted.zip" -i -c) = 0 -a $(echo "$file" | grep "autoexec.py" -i -c) = 0 ]; then
161 if [ -d "$file" ]; then
162 install -d ${pkgdir}/opt/boxee/scripts/"$file" || return 1
164 install -D "$file" ${pkgdir}/opt/boxee/scripts/"$file" || return 1
171 install -d ${pkgdir}/opt/boxee/skin/boxee || return 1
172 pushd ${_src}/skin/boxee || return 1
173 find . | sed -e 's/\.\///g' | while read file; do
174 # if [ $(echo "$file" | grep -e "^media" -i -c) = 0 ]; then
175 if [ -d "$file" ]; then
176 install -d ${pkgdir}/opt/boxee/skin/boxee/"$file" || return 1
178 install -D "$file" ${pkgdir}/opt/boxee/skin/boxee/"$file" || return 1
182 install -d ${pkgdir}/opt/boxee/skin/boxee/media || return 1
186 pushd ${_src}/system/python/local || return 1
187 #This isn't indented because whitespace is significant to python
188 python2.4 -O >/dev/null << EOF
190 py_compile.compile('mc.py')
194 install -d ${pkgdir}/opt/boxee/system || return 1
195 pushd ${_src}/system/ || return 1
196 find . -path "./python/Lib" -prune -o -print | sed -e 's/\.\///g' | while read file; do
197 if [ $(echo "$file" | grep "win32" -i -c) = 0 -a $(echo "$file" | grep "spyce" -i -c) = 0 -a $(echo "$file" | grep "DLLs" -i -c) = 0 -a $(echo "$file" | grep "osx" -i -c) = 0 -a $(echo "$file" | grep -e "\.dll$" -i -c) = 0 -a $(echo "$file" | grep -e "\.pyc$" -i -c) = 0 -a $(echo "$file" | grep "xulrunner" -i -c) = 0 -a $(echo "$file" | grep "etc" -i -c) = 0 -a $(echo "$file" | grep "python24.zlib" -i -c) = 0 -a $(echo "$file" | grep "upnpserver.xml" -i -c) = 0 -a $(echo "$file" | grep "IRSSmap.xml" -i -c) = 0 -a $(echo "$file" | grep "X10-Lola-IRSSmap.xml" -i -c) = 0 -a $(echo "$file" | grep "fontconfig_readme" -i -c) = 0 -a $(echo "$file" | grep "libmpeg2-i486-linux.so" -i -c) = 0 -a $(echo "$file" | grep "bxoverride.so" -i -c) = 0 -a $(echo "$file" | grep "readme.txt" -i -c) = 0 -a $(echo "$file" | grep "simplejson/_speedups.so" -i -c) = 0 ]; then
198 if [ -d "$file" ]; then
199 install -d ${pkgdir}/opt/boxee/system/"$file" || return 1
201 install -D "$file" ${pkgdir}/opt/boxee/system/"$file" || return 1
207 install -d ${pkgdir}/opt/boxee/system/players/flashplayer/${_xulrunner} || return 1
208 pushd ${_src}/system/players/flashplayer/${_xulrunner} || return 1
209 find . | sed -e 's/\.\///g' | while read file; do
210 if [ -d "$file" ]; then
211 install -d ${pkgdir}/opt/boxee/system/players/flashplayer/${_xulrunner}/"$file" || return 1
213 install -D "$file" ${pkgdir}/opt/boxee/system/players/flashplayer/${_xulrunner}/"$file" || return 1
218 install -d ${pkgdir}/opt/boxee/system/python/lib || return 1
219 pushd ${_src}/system/python/Lib || return 1
220 #This isn't indented because whitespace is significant to python
221 python2.4 -O >/dev/null << EOF
223 compileall.compile_dir(".", force=1)
225 find . | sed -e 's/\.\///g' | while read file; do
226 if [ $(echo "$file" | grep -e "darwin$" -e "mac$" -i -c) = 0 ]; then
227 if [ -d "$file" ]; then
228 install -d ${pkgdir}/opt/boxee/system/python/lib/"$file" || return 1
229 elif [ ! $(echo "$file" | grep -e "\.pyo$" -i -c) = 0 ]; then
230 install -D "$file" ${pkgdir}/opt/boxee/system/python/lib/"$file" || return 1
231 elif [ ! $(echo "$file" | grep -e "\.so$" -i -c) = 0 ]; then
232 install -D "$file" ${pkgdir}/opt/boxee/system/python/lib/"$file" || return 1
238 rm -rf ${pkgdir}/opt/boxee/system/python/lib/plat-darwin || return 1
239 rm -rf ${pkgdir}/opt/boxee/system/python/lib/plat-mac || return 1
240 rmdir ${pkgdir}/opt/boxee/system/python/lib/idlelib/Icons || return 1
241 rmdir ${pkgdir}/opt/boxee/system/python/lib/site-packages || return 1
244 install -d ${pkgdir}/opt/boxee/UserData || return 1
245 install -D ${_src}/UserData/*linux* ${pkgdir}/opt/boxee/UserData/ || return 1
246 ln -s UserData ${pkgdir}/opt/boxee/userdata || return 1
249 install -d ${pkgdir}/opt/boxee/plugins/music || return 1
250 install -d ${pkgdir}/opt/boxee/plugins/pictures || return 1
251 install -d ${pkgdir}/opt/boxee/plugins/video || return 1
254 install -d ${pkgdir}/opt/boxee/visualisations/
255 pushd ${_src}/visualisations/ || return 1
258 install -d ${pkgdir}/opt/boxee/visualisations/"$i" || return 1
259 if [ $(ls "$i" | wc -l) != "0" ]; then
260 install -D "$i"/* ${pkgdir}/opt/boxee/visualisations/"$i"/ || return 1
263 if [ $(echo "$i" | grep "osx" -c) = "0" -a $(echo "$i" | grep "win32" -c) = "0" -a $(echo "$i" | grep "Goom.vis" -c) = "0" -a $(echo "$i" | grep "xbmc_vis.h" -c) = "0" ]; then
264 install -D "$i" ${pkgdir}/opt/boxee/visualisations/ || return 1
270 #remove unnecessary libs
271 if [ $(uname -m) = "x86_64" ]; then
272 rm -rf ${pkgdir}/opt/boxee/system/players/flashplayer/*486*
274 rm -rf ${pkgdir}/opt/boxee/system/players/flashplayer/*x86_64*
278 install -d ${pkgdir}/opt/boxee/screensavers || return 1
279 install -D ${_src}/screensavers/*.xbs ${pkgdir}/opt/boxee/screensavers/ || return 1
282 install -d ${pkgdir}/opt/boxee/bin || return 1
283 install -D ${_src}/bin-linux/boxee-rtorrent ${pkgdir}/opt/boxee/bin/ || return 1
286 install -D ${_src}/Boxee ${pkgdir}/opt/boxee/ || return 1
287 strip ${pkgdir}/opt/boxee/Boxee || return 1
288 install -D ${_src}/run-boxee-desktop.in ${pkgdir}/opt/boxee/run-boxee-desktop || return 1
290 #give_me_my_mouse_back
291 gcc ${_src}/give_me_my_mouse_back.c -o ${_src}/give_me_my_mouse_back -lSDL || return 1
292 install -D ${_src}/give_me_my_mouse_back ${pkgdir}/opt/boxee/ || return 1
293 strip ${pkgdir}/opt/boxee/give_me_my_mouse_back || return 1
296 install -D ${_src}/xbmc-xrandr ${pkgdir}/opt/boxee/ || return 1
297 strip ${pkgdir}/opt/boxee/xbmc-xrandr || return 1
300 install -d ${pkgdir}/usr/share/applications || return 1
301 install -D -m644 ${srcdir}/boxee.desktop ${pkgdir}/usr/share/applications/ || return 1
302 install -d ${pkgdir}/usr/share/pixmaps || return 1
303 install -D ${_src}/media/icon.png ${pkgdir}/usr/share/pixmaps/boxee.png || return 1