# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit versionator games cmake-utils REV="4687" DESCRIPTION="A fork of the famous open racing car simulator TORCS" HOMEPAGE="http://speed-dreams.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${PV}/${PN}-src-base-${PV}-r${REV}.tar.xz mirror://sourceforge/${PN}/${PV}/${PN}-src-partial-build-patch-${PV}-r${REV}.tar.xz hq? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-hq-cars-and-tracks-${PV}-r${REV}.tar.xz ) more-hq? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-more-hq-cars-and-tracks-${PV}-r${REV}.tar.xz ) unmaintained? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-unmaintained-${PV}-r${REV}.tar.xz ) wip? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-wip-cars-and-tracks-${PV}-r${REV}.tar.xz )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="hq more-hq profiling schedule_spy +trace +unload_ssggraph unmaintained wip +xrandr" RDEPEND="media-libs/freeglut >=media-libs/libpng-1.2.40 media-libs/openal media-libs/freealut x11-libs/libX11 x11-libs/libXxf86vm sys-libs/zlib virtual/glu virtual/opengl" DEPEND="${RDEPEND} media-libs/libsdl >=media-libs/plib-1.8.3 net-libs/enet:1.3 virtual/jpeg x11-proto/xproto x11-libs/libXext x11-libs/libICE x11-libs/libSM x11-libs/libXt x11-libs/libXi x11-libs/libXmu x11-libs/libXrender xrandr? ( x11-proto/randrproto )" S=${WORKDIR} src_unpack() { unpack ${PN}-src-base-${PV}-r${REV}.tar.xz use hq && unpack ${PN}-src-hq-cars-and-tracks-${PV}-r${REV}.tar.xz use more-hq && unpack ${PN}-src-more-hq-cars-and-tracks-${PV}-r${REV}.tar.xz use unmaintained && unpack ${PN}-src-unmaintained-${PV}-r${REV}.tar.xz use wip && unpack ${PN}-src-wip-cars-and-tracks-${PV}-r${REV}.tar.xz if ( use !hq || use !more-hq || use !unmaintained || use !wip ) ; then unpack ${PN}-src-partial-build-patch-${PV}-r${REV}.tar.xz fi } src_configure() { local mycmakeargs=( $(cmake-utils_use profiling OPTION_PROFILER) $(cmake-utils_use schedule_spy OPTION_SCHEDULE_SPY) $(cmake-utils_use trace OPTION_TRACE) $(cmake-utils_use unload_ssggraph OPTION_UNLOAD_SSGGRAPH) $(cmake-utils_use xrandr OPTION_XRANDR) -DOPTION_OFFICIAL_ONLY=ON -DSD_BINDIR:PATH=games/bin -DSD_DATADIR:PATH=share/games/speed-dreams-2 -DSD_INCLUDEDIR:PATH=include/speed-dreams-2 -DSD_LIBDIR:PATH=$(games_get_libdir)/speed-dreams-2 ) cmake-utils_src_configure } src_install() { cmake-utils_src_install # NOTE: We don't usually install INSTALL.txt, but I'm including it here because it # explains the unload_ssggraph option as a workaround for bugs in some setups. dodoc CHANGES.txt INSTALL.txt README.txt TODO.txt dohtml -r doc/faq doc/userman newicon data/data/icons/icon.png ${PN}-2.svg make_desktop_entry "speed-dreams-2" "Speed Dreams" "${PN}-2" prepgamesdirs }