# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ ### NOTE: THIS IS NOT COMPLETE - also apply updates from old ebuild ### EAPI="2" inherit eutils games MY_BUILD="2387" #MY_HRP="4.0" #MY_HRP_BUILD="321" DESCRIPTION="Port of Duke Nukem 3D for SDL" HOMEPAGE="http://www.eduke32.com/ http://hrp.duke4.net/" SRC_URI="http://dukeworld.duke4.net/eduke32/synthesis/${PV}-${MY_BUILD}/${PN}_src_${PV}-${MY_BUILD}.tar.bz2 textures? ( http://www.duke4.org/files/nightfright/polymer/polymer_hrp.zip http://www.duke4.org/files/nightfright/polymer/polymer_upd.zip ) music? ( http://www.duke4.org/files/nightfright/eduke32_mus.zip )" LICENSE="as-is" SLOT="0" KEYWORDS="amd64 ~x86" IUSE="debug editor gtk +opengl png textures music vpx" RDEPEND="gtk? ( x11-libs/gtk+ ) media-libs/libsdl music? ( media-libs/sdl-mixer[timidity] ) !music? ( media-libs/sdl-mixer ) media-libs/libvorbis opengl? ( virtual/opengl ) png? ( media-libs/libpng ) vpx? ( media-libs/libvpx )" DEPEND="${RDEPEND} app-arch/unzip" S=${WORKDIR}/${PN}_${PV}-${MY_BUILD} pkg_setup() { # Validate USE flags if (use textures && ! use opengl); then ewarn "You must enable opengl if you wish to use the high resolution textures." die "textures requires opengl" fi } src_unpack() { unpack "${PN}_src_${PV}-${MY_BUILD}.tar.bz2" } src_compile() { local MY_OPTS use debug && MY_OPTS+=" RELEASE=0" use gtk || MY_OPTS+=" WITHOUT_GTK=1" use opengl || MY_OPTS+=" USE_OPENGL=0" use png && MY_OPTS+=" USE_LIBPNG=1" use vpx || MY_OPTS+=" USE_LIBVPX=0" unset ARCH emake ${MY_OPTS} || die "make failed" } src_install() { local ARGS insinto "${GAMES_DATADIR}/${PN}" if use editor; then doexe mapster32 || die "editor install failed" games_make_wrapper mapster32 "${GAMES_DATADIR}/${PN}/mapster32" "${GAMES_DATADIR}/${PN}" fi if use textures; then doins "${DISTDIR}"/polymer_{hrp,upd}.zip || die "texture install failed" ARGS+=" -g polymer_hrp.zip -g polymer_upd.zip" fi if use music; then doins "${DISTDIR}/eduke32_mus.zip" || die "music install failed" ARGS+=" -g eduke32_mus.zip" fi newgamesbin "${PN}" "${PN}.bin" || die "binary install failed" games_make_wrapper "${PN}" "${GAMES_BINDIR}/${PN}.bin ${ARGS}" make_desktop_entry ${PN} "EDuke32" prepgamesdirs } pkg_postinst() { games_pkg_postinst ewarn "Note: You must also install games-fps/duke3d-data before playing this game." }