# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games HOMEPAGE="http://jonof.edgenetwork.org/index.php?p=jfduke3d" DESCRIPTION="An OpenGL port of Duke3D with support for true-colour textures and 3D objects" SRC_URI="mirror://gentoo/jfbuild_src_${PV}.zip mirror://gentoo/jfduke3d_src_${PV}.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" RDEPEND="virtual/x11 virtual/opengl media-libs/sdl-mixer media-sound/timidity++ media-sound/timidity-eawpatches" DEPEND="${RDEPEND} dev-lang/nasm" src_unpack() { unpack ${A} mv "jfbuild_src_${PV}/" "build/" cd "${WORKDIR}/jfduke3d_src_${PV}" epatch "${FILESDIR}/jfduke3d_src_20050531-sound.patch" # Sound support } src_compile() { cd "${WORKDIR}/jfduke3d_src_${PV}" emake OPTFLAGS="" || die = "Compilation failed" mv duke3d jfduke3d_${PV} } src_install() { # The patch puts a temporary MIDI file in /tmp, the following fixes # permission problems if test -d tmpsong.mid; then rm -rf /tmp/tmpsong.mid; fi if ! test -f tmpsong.mid; then touch /tmp/tmpsong.mid; fi chmod 660 /tmp/tmpsong.mid chown root:games /tmp/tmpsong.mid cd "${WORKDIR}/jfduke3d_src_${PV}/" games_make_wrapper jfduke3d "${GAMES_BINDIR}/jfduke3d_${PV} /g${GAMES_DATADIR}/duke3d/duke3d.grp" "\$HOME" dogamesbin jfduke3d_${PV} || die "dogamesbin failed." insinto "${GAMES_DATADIR}/duke3d" prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "Put 'duke3d.grp' in '${GAMES_DATADIR}/duke3d'." einfo "You will have to edit the display options" einfo "manually, as the built-in configurator does not" einfo "work properly; run the game once to generate" einfo "the configuration file '\$HOME/DUKE3D.CFG'." }