# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-fps/doomsday/doomsday-1.9.0_beta67.ebuild,v 1.4 2010/01/23 16:52:13 ssuominen Exp $ EAPI=3 inherit games eutils #MY_P=deng-build322 # FIXME, this is stupid DESCRIPTION="A modern gaming engine for Doom, Heretic, and Hexen" HOMEPAGE="http://www.dengine.net/" SRC_URI="mirror://sourceforge/deng/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="amd64 ~ppc ~x86" IUSE="openal" RDEPEND="virtual/opengl virtual/glu media-libs/sdl-mixer media-libs/libpng x11-libs/qt-opengl x11-libs/qt-gui openal? ( media-libs/openal )" DEPEND="${RDEPEND} app-arch/zip" #S="${WORKDIR}/deng-build322/doomsday/" src_prepare() { sed -i -e "/^DENG_BASE_DIR =/s:\$\$PREFIX/share:${GAMES_DATADIR}:" "${S}/doomsday/config_unix.pri" echo "CONFIG += nostrip" > "${S}/doomsday/config_user.pri" echo "PREFIX=/usr/games" >> "${S}/doomsday/config_user.pri" if use openal; then echo "CONFIG += deng_openal" >> "${S}/doomsday/config_user.pri" sed -i 's:\# Generic Unix.:LIBS += -lopenal:' "${S}/doomsday/dep_openal.pri" epatch "${FILESDIR}/${P}-openal-link.patch" fi } src_configure() { cd "${WORKDIR}" mkdir build cd build qmake "${S}/doomsday/doomsday.pro" } src_compile() { cd "${WORKDIR}/build" emake } src_install() { cd "${WORKDIR}/build" emake INSTALL_ROOT="${D}" install #mv "${D}/${GAMES_DATADIR}"/{${PN}/data/jdoom,doom-data} || die #dosym "${GAMES_DATADIR}"/doom-data "${GAMES_DATADIR}"/${PN}/data/jdoom || die local game for game in jdoom jheretic jhexen ; do newgamesbin "${FILESDIR}"/wrapper ${game} sed -i "s:GAME:${game}:" \ "${D}/${GAMES_BINDIR}"/${game} \ || die "sed ${GAMES_BINDIR}/${game} failed" done # Make wrappers for the common wads local n for n in doom doom2 ; do games_make_wrapper ${PN}-${n} \ "jdoom -iwad \"${GAMES_DATADIR}\"/doom-data/${n}.wad" done games_make_wrapper ${PN}-hexen \ "jhexen -iwad \"${GAMES_DATADIR}\"/doom-data/hexen.wad" games_make_wrapper ${PN}-heretic \ "jheretic -iwad \"${GAMES_DATADIR}\"/doom-data/heretic.wad" #doman engine/doc/${PN}.6 #dodoc engine/doc/*.txt build/README prepgamesdirs } pkg_postinst() { games_pkg_postinst elog "To play the original Doom levels, place doom.wad and/or doom2.wad" elog "into ${GAMES_DATADIR}/doom-data" elog "Then run doomsday-doom or doomsday-doom2 accordingly." elog elog "doom1.wad is the shareware demo wad consisting of 1 episode," elog "and doom.wad is the full Doom 1 set of 3 episodes" elog "(or 4 in the Final Doom wad)." elog elog "You can even emerge doom-data and/or freedoom, with the doomsday use" elog "flag enabled, to play for free" }