How to install Boxee in Gentoo Linux/version 0.9.6.4578

This howto uses Boxee version 0.9.6.4578

=Ebuild method= incomplete


 * Edit: /etc/make.conf
 * Add line: PORTDIR_OVERLAY=/usr/local/portage
 * if your are x86-64
 * Edit: /etc/portage/package.keywords
 * Add lines
 * media-TV/boxee ~amd64
 * app-emulation/emul-linux-x86-nspr ~amd64

mkdir -p /usr/local/portage/media-tv mkdir -p /usr/local/portage/media-tv/boxee cd /usr/local/portage/media-tv/boxee wget http://bugs.gentoo.org/attachment.cgi?id=191801 -O boxee-0.9.11.5777-r2.ebuild mkdir files cd files/ wget http://bugs.gentoo.org/attachment.cgi?id=189463 -O lashlib-Makefile.patch wget http://bugs.gentoo.org/attachment.cgi?id=189450 -O 0.9.11.5777-desktop.patch wget http://bugs.gentoo.org/attachment.cgi?id=189452 -O 0.9.11.5777-gcc_4.2.patch wget http://bugs.gentoo.org/attachment.cgi?id=189453 -O 0.9.11.5777-gentoo.patch wget http://bugs.gentoo.org/attachment.cgi?id=189455 -O 0.9.11.5777-alsa_buffer_size.patch wget http://bugs.gentoo.org/attachment.cgi?id=189457 -O 0.9.11.5777-fribidi_0.19.patch wget http://bugs.gentoo.org/attachment.cgi?id=189458 -O 0.9.11.5777-mv_syntax.patch wget http://bugs.gentoo.org/attachment.cgi?id=191872 -O boxee-filecurl.patch cd .. ebuild boxee-0.9.11.5777-r2.ebuild digest

mkdir -p /usr/local/portage/app-emulation/emul-linux-x86-nspr cd /usr/local/portage/app-emulation/emul-linux-x86-nspr wget http://bugs.gentoo.org/attachment.cgi?id=189116 -O emul-linux-x86-nspr-20090330.ebuild mkdir files cd files/ wget http://bugs.gentoo.org/attachment.cgi?id=189114 -O 01nspr32 cd .. ebuild emul-linux-x86-nspr-20090330.ebuild digest

mkdir -p /usr/local/portage/app-emulation/emul-linux-x86-libcurl cd /usr/local/portage/app-emulation/emul-linux-x86-libcurl wget http://bugs.gentoo.org/attachment.cgi?id=189112 -O emul-linux-x86-libcurl-7.16.4-r1.ebuild ebuild emul-linux-x86-libcurl-7.16.4-r1.ebuild digest

You need to apply this patch also cd /var/tmp/portage/media-tv/boxee-0.9.11.5777-r2/work/ wget http://bugs.gentoo.org/attachment.cgi?id=191872 -O boxee-filecurl-patch.diff patch -p0 < boxee-filecurl-patch.diff

=Manual compile method=

Get Boxee

 * Sign up to get the source code
 * http://boxee.tv/

Setup and install required packages

 * Enable Device mapped crypto (DM_CRYPTO) in Linux kernel, required by cryptsetup for pmount
 * Device Drivers ---> Multi-device support (RAID and LVM) --->
 * Device mapper support: on
 * Crypt target support: on


 * emerge the following packages, you may have may of these already installed
 * dev-libs/libpcre
 * dev-libs/fribidi
 * dev-libs/lzo
 * dev-libs/tre
 * dev-libs/boost
 * dev-util/subversion
 * dev-db/sqlite
 * dev-db/mysql
 * dev-python/pysqlite
 * net-misc/curl
 * x11-proto/xineramaproto
 * x11-libs/libXinerama
 * x11-libs/libXrandr
 * x11-libs/libXrender
 * x11-libs/libXt
 * x11-libs/libXmu
 * sys-apps/pmount
 * sys-apps/dbus
 * sys-apps/gawk
 * sys-apps/hal
 * sys-libs/zlib
 * sys-devel/automake
 * sys-devel/libtool
 * app-i18n/enca
 * dev-util/cmake
 * dev-util/gperf
 * app-arch/unzip
 * dev-lang/nasm
 * dev-libs/popt
 * dev-libs/libcdio
 * media-libs/glew
 * media-libs/libpng
 * media-libs/jpeg
 * media-libs/libsamplerate
 * media-libs/jasper
 * media-libs/fontconfig
 * media-libs/faac
 * media-libs/libogg
 * media-libs/libvorbis
 * media-libs/libmad
 * media-libs/freetype
 * media-libs/libogg
 * media-libs/alsa-lib
 * media-libs/libsdl
 * media-libs/sdl-image
 * media-libs/sdl-gfx
 * media-libs/sdl-mixer
 * media-libs/sdl-sound
 * media-sound/pulseaudio
 * media-libs/mesa ?? not sure if this is needed
 * x11-apps/mesa-progs?? not sure if this is needed


 * Install the packages needed or install them all
 * emerge dev-libs/libpcre dev-libs/fribidi dev-libs/lzo dev-libs/tre dev-libs/boost dev-util/subversion dev-db/sqlite dev-db/mysql dev-python/pysqlite net-misc/curl x11-proto/xineramaproto x11-libs/libXinerama x11-libs/libXrandr x11-libs/libXrender x11-libs/libXt x11-libs/libXmu sys-apps/pmount sys-apps/dbus sys-apps/gawk sys-apps/hal sys-libs/zlib sys-devel/automake sys-devel/libtool app-i18n/enca dev-util/cmake dev-util/gperf app-arch/unzip dev-lang/nasm dev-libs/popt dev-libs/libcdio media-libs/glew media-libs/libpng media-libs/jpeg media-libs/libsamplerate media-libs/jasper media-libs/fontconfig media-libs/faac media-libs/libogg media-libs/libvorbis media-libs/libmad media-libs/freetype media-libs/libogg media-libs/alsa-lib media-libs/libsdl media-libs/sdl-image media-libs/sdl-gfx media-libs/sdl-mixer media-libs/sdl-sound media-sound/pulseaudio media-libs/mesa x11-apps/mesa-progs

Install Boxee

 * Download the Source code
 * http://app.boxee.tv/download
 * Untar the source
 * Execute: tar xvfj boxee-*.tar.bz2
 * Enter the source
 * Execute: cd boxee-*

Edit some files
You may need to edit some or all of these files to get Boxee to compile, depending on your system and Boxee version. The best method is to try and compile, then modify files as needed. You may also want to run 'make clean', in between edits, but this will make a very slow install.

FileCurl.cpp

 * Fix some problems with FileCurl.cpp (Modified version of FileCurl.cpp)
 * Edit: xbmc/FileSystem/FileCurl.cpp
 * In the g_curlInterface.easy_setopt functions Replace
 * NULL
 * with
 * (void*)NULL
 * Example:
 * g_curlInterface.easy_setopt(h, CURLOPT_FTPPORT, NULL);
 * to
 * g_curlInterface.easy_setopt(h, CURLOPT_FTPPORT, (void*)NULL);

FileSmb.cpp

 * If you have problems with libsmb, specificity FileSmb.cpp (Modified version of FileSmb.cpp)


 * Example: xbmc/FileSystem/FileSmb.cpp:127: undefined reference to `smbc_setDebug' 
 * Edit: xbmc/FileSystem/FileSmb.cpp
 * Comment out the lines with a // in the beginning of the line:
 * line 126: smbc_setDebug(m_context, 0);
 * line 127: smbc_setFunctionAuthData(m_context, xb_smbc_auth);
 * line 128: orig_cache = smbc_getFunctionGetCachedServer(m_context);
 * line 129: smbc_setFunctionGetCachedServer(m_context, xb_smbc_cache);
 * line 130: smbc_setOptionOneSharePerServer(m_context, false); 
 * line 131: smbc_setOptionBrowseMaxLmbCount(m_context, 0);
 * line 132: smbc_setTimeout(m_context, g_advancedSettings.m_sambaclienttimeout * 1000); 
 * line 165:  smbc_setWorkgroup(m_context, strdup(g_guiSettings.GetString("smb.workgroup").c_str));
 * lines 285 and 302: smbc_urlencode(buffer, strSrc, buffer_len);
 * lines 287 and 304: SMBC_urlencode(buffer, strSrc, buffer_len);
 * This is a hack that will likely disable the use of windows file sharing in Boxee!

xbmc/utils/md5.h
On 64 bit systems you'll need to edit this file or otherwise login will fail. Find the following code in the beginning of the file

/* typedef a 32 bit type */ typedef unsigned long int UINT4; /* typedef a 32 bit type */ typedef __int32 UINT4; typedef uint32_t UINT4;
 * Edit: xbmc/utils/md5.h
 * Replace:
 * With:
 * 1) ifdef _WIN32PC
 * 1) else
 * 1) endif

cximage/tiff Makefile
If your build fails in xbmc/lib/cximage-6.0 with a message like: tiff/tiff.a(tif_aux.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC tiff/tiff.a(tif_aux.o): could not read symbols: Bad value collect2: ld returned 1 exit status
 * Edit: xbmc/lib/cximage-6.0/tiff/Makefile
 * add -fPIC to line 6
 * line 6: $(CC) $(CFLAGS) -fPIC -c -o $@ $<
 * You may have to run make clean from xbmc/lib/cximage-6.0/tiff before restarting your build.

libmad fix
there is a problem with libtool when configuring libmad.

cd xbmc/cores/dvdplayer/Codecs/libmad libtoolize --copy --force cd ../../../../..

Goom fix
Goom visualization and create configure file

cd xbmc/visualizations/Goom/goom2k4-0 autoconf ./autogen.sh cd ../../../../

tinyxpath fix
cd xbmc/lib/libBoxee/tinyxpath/ ./configure cd ../../../..

libwbclient-x86_64 fix
If you are 64-bit you will get this error g++: xbmc/lib/libsmb/libwbclient-x86_64-linux.a: No such file or directory

To fix it, execute the following: if [ $(uname -m) = "x86_64" ]; then pushd xbmc/lib/libsmb || return 1 ln -s /usr/lib/libtalloc.so.1 libtalloc-x86_64-linux.a ln -s /usr/lib/libwbclient.so.0 libwbclient-x86_64-linux.a popd || return 1 fi || return 1

XBMCTex fix
Missing a Makefile

LIBS=-lXrandr -lfaac -lhal-storage -ldbus-1 -lXinerama -lXmu -lXt -ljasper -lenca -lresolv -ldl -lSDL_mixer -lSDL_image -lSDL -llzo2 -lpcre -ljpeg -lpng12 -lrt -lasound -lmysqlclient -lsqlite3 -lfribidi -lbz2 -lfontconfig -lfreetype -lvorbisfile -lvorbisenc -lvorbis -logg -lmad -lGLU -lGLEW -lGL INCLUDES = -I../../xbmc/linux -I../../guilib -I../../xbmc/ DEFINES = -DUSE_SDL OBJS = \ AnimatedGif.o \ Bundler.o \ SurfaceSDL.o \ XBMCTex.o \ xbox.o \ xwinapi.o \ XFileUtils.o \ XHandle.o \ XTimeUtils.o \ sha.o
 * Create the file: tools/XBMCTex/Makefile
 * with the following contents

TARGET = XBMCTex CLEAN_FILES=$(TARGET)

all: $(TARGET)

include ../../Makefile.include

$(TARGET): $(OBJS) g++ $(OBJS) $(LDFLAGS) $(LIBS) -o $(TARGET)

Compile

 * Create a configure file
 * Execute: autoconf
 * Configure
 * Execute: ./configure
 * Compile
 * Execute: make

Test

 * Execute: ./Boxee
 * In the source directory
 * Login and test the various functions

Install

 * Install script
 * create file: make-gentoo-install.sh
 * 1) !/bin/bash

curr_dir=`pwd` SRC=/home/zymos/linuxdload/downriver/boxee-source-4880 DEST=/opt/boxee

mkdir -p ${DEST}/language/ cp -r ${SRC}/language/* ${DEST}/language/
 * 1) language

mkdir ${DEST}/media cp ${SRC}/media/*.png ${DEST}/media cp ${SRC}/media/weather.rar ${DEST}/media chmod 644 ${DEST}/media/* mkdir ${DEST}/media/Fonts cp ${SRC}/media/Fonts/* ${DEST}/media/Fonts chmod 644 ${DEST}/media/Fonts/*
 * 1) media

mkdir ${DEST}/screensavers cp ${SRC}/screensavers/Plasma.xbs ${SRC}/screensavers/Solarwinds.xbs ${SRC}/screensavers/Euphoria.xbs ${DEST}/screensavers
 * 1) screensavers

mkdir ${DEST}/scripts cp -r ${SRC}/scripts/Lyrics ${DEST}/scripts cp -r ${SRC}/scripts/RTorrent ${DEST}/scripts cp -r ${SRC}/scripts/OpenSubtitles ${DEST}/scripts
 * 1) scripts
 * 1) Lyrics


 * 1) plugins

mkdir -p ${DEST}/skin/Boxee\ Skin\ NG cp -r ${SRC}/skin/Boxee\ Skin\ NG/* ${DEST}/skin/Boxee\ Skin\ NG
 * 1) skin

mkdir ${DEST}/system cp ${SRC}/system/*-linux.so ${SRC}/system/asound.conf ${DEST}/system mkdir ${DEST}/system/players mkdir ${DEST}/system/players/dvdplayer cp ${SRC}/system/players/dvdplayer/*-linux.so ${DEST}/system/players/dvdplayer mkdir ${DEST}/system/players/paplayer cp ${SRC}/system/players/paplayer/*-linux.so ${DEST}/system/players/paplayer mkdir ${DEST}/system/players/flashplayer cp ${SRC}/system/players/flashplayer/*linux* ${SRC}/system/players/flashplayer/bxoverride.so ${DEST}/system/players/flashplayer chmod 755 ${DEST}/system/players/flashplayer/* mkdir ${DEST}/system/python cp ${SRC}/system/python/*-linux.so ${DEST}/system/python mkdir ${DEST}/system/python/lib cp ${SRC}/xbmc/lib/libPython/Python/build/lib.linux-*-2.4/*.so ${DEST}/system/python/lib ln -s ../libpython2.4.so*. ../python -O >/dev/null << EOF import compileall compileall.compile_dir(".", force=1) EOF tar cf - `find. -name \*.pyo` | (cd $curr_dir; cd ${DEST}/system/python/lib; tar xf -) cd $curr_dir mkdir ${DEST}/system/scrapers cp -r ${SRC}/system/scrapers/* ${DEST}/system/scrapers mkdir ${DEST}/system/cdrip cp ${SRC}/system/cdrip/*-linux.so ${DEST}/system/cdrip
 * 1) system

mkdir -p ${DEST}/UserData cp ${SRC}/system/Keymap.xml ${SRC}system/Lircmap.xml ${DEST}/system chmod 644 ${DEST}/system/*.xml cp ${SRC}/UserData/sources.xml.in.linux ${DEST}/UserData cp ${SRC}/UserData/sources.xml.in.diff.linux ${DEST}/UserData chmod 644 ${DEST}/UserData/* ln -s UserData ${DEST}/userdata
 * 1) userdata

mkdir ${DEST}/visualisations cp ${SRC}/visualisations/opengl_spectrum.vis ${SRC}/visualisations/Goom.vis ${SRC}/visualisations/ProjectM.vis ${SRC}/visualisations/Waveform.vis ${DEST}/visualisations cp -r ${SRC}/visualisations/projectM ${SRC}/visualisations/projectM.presets ${DEST}/visualisations
 * 1) visualizations

mkdir -p ${DEST}/bin cp ${SRC}/bin-linux/boxee-rtorrent ${DEST}/bin cp ${SRC}/system/rtorrent.rc.linux ${DEST}/system
 * 1) rtorrent

cp ${SRC}/Boxee ${DEST}/ strip ${DEST}/Boxee cp ${SRC}/run-boxee-desktop.in ${DEST}/run-boxee-desktop cp ${SRC}/xbmc-xrandr ${DEST}/
 * 1) binary
 * make it executable: chmod 755 make-gentoo-install.sh
 * run it: ./make-gentoo-install.sh