# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ # TODO: # - use fonts from media-fonts/dejavu instead of the ones bundles; EAPI="2" NEED_PYTHON=2.5 inherit eutils multilib games python cmake-utils SECONDLIFE_REVISION=2451 DESCRIPTION="The Second Life (an online, 3D virtual world) viewer" HOMEPAGE="http://secondlife.com/" SRC_URI="http://secondlife.com/developers/opensource/downloads/2009/snowglobe/1.0/${PN}-src-viewer-${PV}-r${SECONDLIFE_REVISION}.tar.gz http://automated-builds-secondlife-com.s3.amazonaws.com/oss-viewer/slviewer-artwork-oss-viewer-1.23.2.121778.zip http://automated-builds-secondlife-com.s3.amazonaws.com/oss-viewer/slviewer-linux-libs-oss-viewer-1.23.2.121778.tar.gz http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/vivox-2.1.3010.6270-linux-20090309.tar.bz2" LICENSE="GPL-2-with-Linden-Lab-FLOSS-exception Epinions" SLOT="0" KEYWORDS="~x86" IUSE="debug doc mozembed +openal +fmod sse test" RDEPEND="dev-libs/apr-util dev-libs/boost dev-libs/openssl dev-libs/xmlrpc-epi media-libs/fontconfig media-libs/freealut media-libs/freetype media-libs/gstreamer media-libs/jpeg media-libs/openjpeg media-libs/libogg media-libs/libpng media-libs/libsdl media-libs/libvorbis virtual/opengl net-dns/c-ares net-misc/curl x11-libs/gtk+:2 >=dev-games/libndofdev-0.2 fmod? ( media-libs/fmod ) openal? ( media-libs/openal ) mozembed? ( dev-libs/llmozlib2 ) test? ( dev-libs/tut ) amd64? ( app-emulation/emul-linux-x86-baselibs )" DEPEND="${RDEPEND} x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext dev-libs/elfio dev-libs/expat sys-libs/zlib" S="${WORKDIR}/linden/indra" # suppress QA warning about Text Relocation into vivox sdk QA_TEXTRELS="usr/share/games/snowglobe/lib/libvivoxsdk.so" src_prepare() { # FIX: by default unit tests are always one, the patch disables them unless # the USE 'test' is on (i know it's a dirty workaround). use test || epatch "${FILESDIR}/${P}-test.patch" # FIX: the patch fix gcc4 compilation errors epatch "${FILESDIR}/${P}-gcc-4.3.patch" # FIX (no more necessary): converting old 'md5' python module calls to 'hashlib' #epatch "${FILESDIR}/${P}-fix-python-2.6.patch" #EPATCH_OPTS="-p1 -d${S/indra/}" epatch "${FILESDIR}/${P}-python-2.6.patch" # FIX: usefull patches from upstream epatch "${FILESDIR}/${P}-linden.patch" # FIX: SL buildsystem forces nosense gcc flags values for '-march' and '-O' epatch "${FILESDIR}/${P}-flags.patch" # FIX: develop.py forces nosense values for 'make -j' # NOTE: this is required only if used develop.py #sed -i -e \ # "s:' '.join(opts):'${MAKEOPTS}':" \ # develop.py || die "failed to fix job count for develop.py" } src_configure() { #FIX: automatic SIMD detection is broken, we force VECTORIZE with use 'sse' use sse && append-flags "-DLL_VECTORIZE=1" mycmakeargs="${mycmakeargs} \ -DUNATTENDED:BOOL=FALSE \ -DSTANDALONE:BOOL=TRUE \ -DSERVER:BOOL=FALSE \ -DVIEWER:BOOL=TRUE \ -DPACKAGE:BOOL=OFF \ -DLOCALIZESETUP:BOOL=OFF \ -DINSTALL:BOOL=TRUE \ -DAPP_SHARE_DIR:STRING=${GAMES_DATADIR}/${PN} \ -DAPP_BINARY_DIR:STRING=${GAMES_DATADIR}/${PN}/bin \ -DGSTREAMER:BOOL=TRUE \ -DDBUSGLIB:BOOL=TRUE \ $(cmake-utils_use debug CMAKE_VERBOSE_MAKEFILE) \ $(cmake-utils_use openal OPENAL) \ $(cmake-utils_use fmod FMOD) \ $(cmake-utils_use mozembed MOZLIB)" cmake-utils_src_configure } src_install() { cmake-utils_src_install dodoc ../LICENSE-source.txt ../doc/*.txt || die # desktop files games_make_wrapper "${PN}" /usr/bin/snowglobe "${GAMES_DATADIR}"/"${PN}" make_desktop_entry "${PN}" "Snowglobe" "${GAMES_DATADIR}"/"${PN}"/res/snowglobe_icon.png prepgamesdirs }