# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games # Used to fix openal compilation. # Look in http://icculus.org/~taylor/fso/nightly/ # and change it to the current version. NIGHTLY_VER=20060426 DESCRIPTION="Freespace 2 Source Code Project" HOMEPAGE="http://scp.indiegames.us/" # zpack is a large (172mb) collection of graphics enhancements: # http://scp.indiegames.us/download.php?view.148 # and http://scp.indiegames.us/download.php?view.151 # Directory listing: http://fs2source.warpcore.org/mvp367/ # http://icculus.org/~taylor/fso/releases/${P}.tar.bz2 # Newer releases are in http://icculus.org/~taylor/fso/nightly/ SRC_URI="http://icculus.org/~taylor/fso/releases/${P}.tar.bz2 http://icculus.org/~taylor/fso/nightly/fs2_open-${NIGHTLY_VER}.tar.bz2 zpack? ( http://fs2source.warpcore.org/mvp367/mv_zpack.zip http://fs2source.warpcore.org/mvp367/mv_100patch.zip )" # See COPYING file LICENSE="Freespace2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="zpack" RESTRICT="primaryuri" RDEPEND=">=dev-libs/DirectFB-0.9.22 media-libs/alsa-lib >=media-libs/libogg-1.1.2 >=media-libs/libsdl-1.2.8-r1 >=media-libs/libvorbis-1.1.0 media-libs/openal virtual/opengl || ( ( media-libs/mesa x11-libs/libX11 x11-libs/libXau x11-libs/libXdmcp x11-libs/libXext ) virtual/x11 )" DEPEND="${RDEPEND} zpack? ( app-arch/unzip )" dir=${GAMES_DATADIR}/freespace2 src_unpack() { unpack ${A} cd "${WORKDIR}" # Copy source code, to fix openal compilation cp ${PN}-${NIGHTLY_VER}/code/sound/ds.* ${P}/code/sound/ \ || die "cp ds failed" cp ${PN}-${NIGHTLY_VER}/code/sound/ds3d.* ${P}/code/sound/ \ || die "cp ds3d failed" # Remove unnecessary reference to alut.h sed -i ${P}/code/sound/audiostr-openal.cpp \ -e "s:#include ::" \ || die "sed audiostr-openal.cpp failed" } src_install() { newgamesbin code/fs2_open_r fs2_open.bin games_make_wrapper fs2_open fs2_open.bin "${dir}" if use zpack ; then insinto "${dir}" doins "${WORKDIR}"/*.vp || die "doins vp failed" dodoc "${WORKDIR}"/*.txt fi dodoc AUTHORS ChangeLog NEWS README prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "Copy the data files from a Freespace 2 Windows full installation" einfo "into ${dir} (can be installed using wine)." einfo einfo " Example: cp -r /mnt/winc/Games/FreeSpace2/* ${dir}" einfo einfo "You can change resolution from (640x480)x16 to (1024x768)x32 if you edit" einfo "~/.fs2open/fs2_open.ini (created on the first run). The command is:" einfo einfo " sed -i \"s:(640x480)x16:(1024x768)x32:\" ~/.fs2_open/fs2_open.ini" einfo einfo "The Gentoo forum thread for help is:" einfo "http://forums.gentoo.org/viewtopic-p-2977565.html" }