# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit cmake-utils eutils toolchain-funcs subversion games DESCRIPTION="Enhanced OpenGL port of the official DOOM source code, that also supports Heretic, Hexen, and Strife" HOMEPAGE="http://grafzahl.drdteam.org/" ESVN_REPO_URI="http://mancubus.net/svn/hosted/gzdoom/trunk/" # It's not yet clear against which licenses ZDoom source code is released :( LICENSE="|| ( DOOMLIC BUILDLIC )" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="asm debug doc gtk" DEPEND=">=media-libs/libsdl-1.2.8-r1 asm? ( || ( >=dev-lang/nasm-0.98.39-r3 >=dev-lang/yasm-0.7.1 ) ) gtk? ( >=x11-libs/gtk+-2.0 ) >=media-libs/fmod-4.14 >=media-libs/flac-1.1.2-r7 media-libs/jpeg" pkg_setup() { games_pkg_setup } src_unpack() { subversion_src_unpack || die "svn_unpack failed" cd "${S}" # Use default game data path sed -i \ -e "s:/usr/local/share/:/usr/share/games/doom-data/:" \ src/sdl/i_system.h \ || die "sed i_system.h failed" } src_compile() { local \ with_asm="-DNO_ASM=yes" \ with_gtk="-DNO_GTK=yes" use asm && with_asm="-DNO_ASM=no" use gtk && with_gtk="-DNO_GTK=no" mycmakeargs="${mycmakeargs} ${with_asm} ${with_gtk} -DNO_STRIP=yes -DFOMD_INCLUDE_DIR=/opt/fmodex/api/inc/ -DFMOD_LIBRARY=/opt/fmodex/api/lib/libfmodex.so -DCMAKE_BUILD_TYPE=Release " cmake-utils_src_configure cmake-utils_src_make } src_install() { cd "../${P}_build" dogamesbin "${PN}" || die "dogamesbin failed" insinto "${GAMES_DATADIR}/doom-data" doins "${PN}.pk3" || die "doins failed" if use doc; then cd "../${P}" dodoc docs/{commands,history,rh-log,zdoom}.txt dohtml docs/console*.{css,html} fi prepgamesdirs } pkg_postinst() { games_pkg_postinst echo elog "Copy or link wad files into ${GAMES_DATADIR}/doom-data/" elog "(the files must be readable by the 'games' group)." elog elog "To play, simply run:" elog elog " gzdoom" if use doc; then elog elog "See /usr/share/doc/${P}/zdoom.txt.bz2 for more info" fi echo }