# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games multilib HOMEPAGE="http://jonof.edgenetwork.org/index.php?p=jfduke3d" DESCRIPTION="An OpenGL port of Duke3D with support for true-colour textures and 3D objects" MY_P="${P/-/_src_}" S="${WORKDIR}/${MY_P}" SRC_URI="http://users.on.net/~jonof/buildport/jfbuild_src_${PV}.zip http://users.on.net/~jonof/buildport/${PN}_src_${PV}.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 ~amd64" IUSE="kde" RDEPEND="virtual/x11 virtual/opengl media-libs/sdl-mixer media-sound/timidity-eawpatches kde? ( || ( kde-base/kdialog kde-base/kdebase ) )" DEPEND="${RDEPEND} dev-lang/nasm app-arch/unzip amd64? (app-emulation/emul-linux-x86-baselibs) amd64? (app-emulation/emul-linux-x86-compat) amd64? (app-emulation/emul-linux-x86-medialibs) amd64? (app-emulation/emul-linux-x86-sdl) amd64? (app-emulation/emul-linux-x86-soundlibs) amd64? (app-emulation/emul-linux-x86-xlibs)" use amd64 && ABI=x86 src_unpack() { unpack ${A} mv jfbuild_src_${PV} build cd ${S} # Sound support epatch "${FILESDIR}/${P}-sound.patch" cd ../build epatch "${FILESDIR}/jfbuild-${PV}-sound.patch" } src_compile() { emake || die "Compilation failed" mv duke3d ${PN}-bin } src_install() { dogamesbin ${PN}-bin ${FILESDIR}/${PN} || die "dogamesbin failed." dodir ${GAMES_DATADIR}/duke3d if use kde ; then [[ ${LINGUAS} != "nb" ]] && LINGUAS="en" cp ${FILESDIR}/jfdukemp_${LINGUAS} ${WORKDIR}/jfdukemp dogamesbin ${WORKDIR}/jfdukemp || die "dogamesbin failed." fi prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "Put 'duke3d.grp' in '${GAMES_DATADIR}/duke3d'." einfo "Run the game once to generate the configuration" einfo "file '\$HOME/.jfduke3d/DUKE3D.CFG'." if use kde ; then einfo "Run 'jfduke3d' for singleplayer and 'jfdukemp'" einfo "for multiplayer." else einfo "Run 'jfduke3d' for singleplayer. Re-emerge with" einfo "USE="kde" for a multiplayer frontend." fi }