# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-games/gtkradiant/gtkradiant-1.5.0_pre20050626.ebuild,v 1.4 2006/01/25 17:23:12 wolf31o2 Exp $ # copy files/svncache.eclass into /usr/portage/eclass before emerging this # package inherit eutils games svncache DESCRIPTION="FPS level editor" HOMEPAGE="http://www.qeradiant.com/?data=editors/gtk" SVN_REPO_ROOT="https://zerowing.idsoftware.com/svn" REL_EDITOR=95 REL_GAMEPACKS=13 GAMEPACKS="DarkPlacesPack Doom3Pack ETPack HalfLifePack Her2Pack JAPack JK2Pack Q1Pack Q2Pack Q3Pack Q4Pack NexuizPack RavenPack STVEFPack Sof2Pack WolfPack" # prepend "radiant_" tmpgp="" for gp in $GAMEPACKS; do tmpgp="$tmpgp radiant_$gp" done GAMEPACKS="$tmpgp" LICENSE="GPL-2,LGPL,BSD" SLOT="0" KEYWORDS="-* x86" IUSE="$GAMEPACKS radiant_all_gamepacks doc" RDEPEND="media-libs/libpng sys-libs/zlib app-crypt/mhash =dev-libs/glib-2* =x11-libs/gtk+-2* dev-libs/atk x11-libs/pango x11-libs/gtkglext dev-libs/libxml2 sys-libs/glibc dev-util/scons dev-util/subversion virtual/opengl doc? ( app-doc/doxygen )" src_unpack() { svncache_fetch "$SVN_REPO_ROOT/radiant/GtkRadiant/trunk/@$REL_EDITOR" \ ./$P || die mkdir -p "${S}" svncache_fetch \ "$SVN_REPO_ROOT/radiant.gamepacks/Q3Rad_Manual/trunk/@$REL_GAMEPACKS" \ ./$P/Q3Rad_Manual || die local something_co="no" local gamepack for gamepack in $GAMEPACKS; do ! use $gamepack && ! use radiant_all_gamepacks && continue gamepack=${gamepack#radiant_} svncache_fetch \ "$SVN_REPO_ROOT/radiant.gamepacks/$gamepack/trunk/@$REL_GAMEPACKS" \ ./$P/games/$gamepack || die something_co="yes" done [ "$something_co" == "no" ] && { einfo "You have to enable one of the following use flags/game packs:" einfo "$GAMEPACKS" einfo "Or specify the use flag \"radiant_all_gamepacks\" to install all." die } # nexuiz pack needs Q3Pack ! use radiant_Q3Pack && use radiant_NexuizPack && svncache_fetch \ "$SVN_REPO_ROOT/radiant.gamepacks/Q3Pack/trunk/@$REL_GAMEPACKS" \ ./$P/games/Q3Pack || die # fix netscape problem (who the **** is using netscape nowadays?) sed -i ./$P/radiant/url.cpp \ -e 's:netscape -remote \\"openURL(%s,new-window)\\" || netscape \\"%s\\":firefox -remote \\"openURL(%s,new-window)\\" || firefox \\"%s\\":' cd "${S}" } src_compile() { scons SETUP=0 use doc && { cd Doxygen_files doxygen -u cd .. sh gendox include/ -o html } } src_install() { python ./install.py while read l; do rm -rf "$l" done < <(find -type d -name .svn) insinto /usr/share/games/$PN doins -r install/* doins -r Q3Rad_Manual cat > ../radiant <