summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2004-06-26 17:52:01 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2004-06-26 17:52:01 +0000
commit4e4da349713497be407738e8b6b5d5fe7071ad9b (patch)
treee01c5cfa1a2309765ea894749292754f834ab1b9 /games-action/d2x
parentQA fix: moving manpages to /usr/share (Manifest recommit) (diff)
downloadgentoo-2-4e4da349713497be407738e8b6b5d5fe7071ad9b.tar.gz
gentoo-2-4e4da349713497be407738e8b6b5d5fe7071ad9b.tar.bz2
gentoo-2-4e4da349713497be407738e8b6b5d5fe7071ad9b.zip
Added ability to install from CD. Ebuild submitted by David A. Bestor <gentoo1@indenial.com> to bug #49487. Closing bug.
Diffstat (limited to 'games-action/d2x')
-rw-r--r--games-action/d2x/ChangeLog8
-rw-r--r--games-action/d2x/d2x-0.2.5-r1.ebuild94
-rw-r--r--games-action/d2x/files/digest-d2x-0.2.5-r12
3 files changed, 103 insertions, 1 deletions
diff --git a/games-action/d2x/ChangeLog b/games-action/d2x/ChangeLog
index 2faa8c1abb2e..b33583b38497 100644
--- a/games-action/d2x/ChangeLog
+++ b/games-action/d2x/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-action/d2x
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-action/d2x/ChangeLog,v 1.4 2004/06/24 21:54:04 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-action/d2x/ChangeLog,v 1.5 2004/06/26 17:52:01 wolf31o2 Exp $
+
+*d2x-0.2.5-r1 (26 Jun 2004)
+
+ 26 Jun 2004; Chris Gianelloni <wolf31o2@gentoo.org> +d2x-0.2.5-r1.ebuild:
+ Added ability to install from CD. Ebuild submitted by David A. Bestor
+ <gentoo1@indenial.com> to bug #49487. Closing bug.
30 Mar 2004; Michael Sterrett <mr_bones_@gentoo.org> d2x-0.2.5.ebuild:
don't rdepend on nasm
diff --git a/games-action/d2x/d2x-0.2.5-r1.ebuild b/games-action/d2x/d2x-0.2.5-r1.ebuild
new file mode 100644
index 000000000000..8a6561a603dc
--- /dev/null
+++ b/games-action/d2x/d2x-0.2.5-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-action/d2x/d2x-0.2.5-r1.ebuild,v 1.1 2004/06/26 17:52:01 wolf31o2 Exp $
+
+inherit flag-o-matic eutils games
+
+DATAFILE="d2shar10"
+DESCRIPTION="Descent 2"
+HOMEPAGE="http://icculus.org/d2x/"
+SRC_URI="http://icculus.org/d2x/src/${P}.tar.gz
+ http://icculus.org/d2x/data/${DATAFILE}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc"
+IUSE="cdinstall debug opengl ggi svga"
+
+RDEPEND="media-libs/libsdl
+ media-libs/sdl-image
+ cdinstall? app-arch/unarj
+ opengl? ( virtual/opengl )
+ ggi? ( media-libs/libggi )
+ svga? ( media-libs/svgalib )"
+DEPEND="${RDEPEND}
+ x86? ( dev-lang/nasm )"
+
+pkg_setup() {
+ if ! [ -e ${DISTDIR}/descent2.sow ] ; then
+ cdrom_get_cds d2data
+ if [ -e ${CDROM_ROOT}/d2data/descent2.sow ] ; then
+ export CDROM_ROOT=${CDROM_ROOT}/d2data
+ einfo "Found the original Descent2 CD"
+ einfo "Copying descent2.sow to ${DISTDIR}"
+ cp ${CDROM_ROOT}/descent2.sow ${DISTDIR}/descent2.sow
+ else
+ die "You need the original Descent2 CD"
+ fi
+ fi
+ games_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+ if use cdinstall ; then
+ cd ${WORKDIR}
+ mkdir SOW
+ cd SOW
+ unarj e ${DISTDIR}/descent2.sow
+ fi
+ rm *.{exe,bat}
+ cd ${S}
+ epatch ${FILESDIR}/${PV}-shellscripts.patch
+}
+
+src_compile() {
+ # --disable-network --enable-console
+ local myconf="$(use_enable x86 assembler)"
+ use debug \
+ && debugconf="${myconf} --enable-debug --disable-release" \
+ || debugconf="${myconf} --disable-debug --enable-release"
+ # we do this because each of the optional guys define the same functions
+ # in gr, thus when they go to link they cause redefine errors ...
+ # we build each by it self, save the binary file, clean up, and start over
+ mkdir my-bins
+ for ren in sdl $(use opengl) $(use svga) $(use ggi) ; do
+ [ "${ren}" == "sdl" ] \
+ && renconf="" \
+ || renconf="--with-${ren}"
+ [ "${ren}" == "svga" ] \
+ && defflags="-DSVGALIB_INPUT" \
+ || defflags=""
+ make distclean
+ egamesconf \
+ ${myconf} \
+ ${renconf} \
+ --datadir=${GAMES_DATADIR_BASE} \
+ || die "conf ${ren}"
+ emake CXXFLAGS="${CXXFLAGS} ${defflags}" || die "build ${ren}"
+ mv d2x* my-bins/
+ done
+}
+
+src_install() {
+ make install DESTDIR=${D} || die
+ dogamesbin my-bins/*
+ dodir ${GAMES_DATADIR}/${PN}
+ if use cdinstall ; then
+ cp -r ${WORKDIR}/SOW/* ${D}/${GAMES_DATADIR}/${PN}/
+ else
+ cp -r ${WORKDIR}/${DATAFILE}/* ${D}/${GAMES_DATADIR}/${PN}/
+ fi
+ dodoc AUTHORS ChangeLog NEWS README* TODO readme.txt
+ prepgamesdirs
+}
diff --git a/games-action/d2x/files/digest-d2x-0.2.5-r1 b/games-action/d2x/files/digest-d2x-0.2.5-r1
new file mode 100644
index 000000000000..3bae26d927d8
--- /dev/null
+++ b/games-action/d2x/files/digest-d2x-0.2.5-r1
@@ -0,0 +1,2 @@
+MD5 79474db1ff4f0ae1fb76d691701cc560 d2x-0.2.5.tar.gz 2015249
+MD5 1b952cc4a4419e24d230589027d73490 d2shar10.tar.gz 4311406