summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-03-16 06:41:56 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-03-16 06:41:56 +0000
commit879bbced71249eb566b7ac1d532a03e86a5d7df2 (patch)
tree700298d9d1b62fec9380c71124b1ce585785353d /games-fps/cube/cube-20031223.ebuild
parentChanged to not assign read-only variable PN. See bug #44712. metadata.xml fix... (diff)
downloadgentoo-2-879bbced71249eb566b7ac1d532a03e86a5d7df2.tar.gz
gentoo-2-879bbced71249eb566b7ac1d532a03e86a5d7df2.tar.bz2
gentoo-2-879bbced71249eb566b7ac1d532a03e86a5d7df2.zip
fix IUSE; add error checking; enable parallel make
Diffstat (limited to 'games-fps/cube/cube-20031223.ebuild')
-rw-r--r--games-fps/cube/cube-20031223.ebuild33
1 files changed, 22 insertions, 11 deletions
diff --git a/games-fps/cube/cube-20031223.ebuild b/games-fps/cube/cube-20031223.ebuild
index 007df80af867..c78640e80f26 100644
--- a/games-fps/cube/cube-20031223.ebuild
+++ b/games-fps/cube/cube-20031223.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/cube-20031223.ebuild,v 1.3 2004/02/20 06:40:07 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-fps/cube/cube-20031223.ebuild,v 1.4 2004/03/16 06:41:56 mr_bones_ Exp $
inherit eutils games
@@ -12,16 +12,20 @@ SRC_URI="mirror://sourceforge/cube/${MY_P}.zip"
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="x86 ppc hppa"
+IUSE=""
-DEPEND="virtual/opengl
+RDEPEND="virtual/opengl
+ virtual/glu
media-libs/libsdl
media-libs/sdl-mixer
media-libs/sdl-image
sys-libs/zlib
media-libs/libpng"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
-S=${WORKDIR}/cube
-CUBE_DATADIR=${GAMES_DATADIR}/${PN}/
+S="${WORKDIR}/cube"
+CUBE_DATADIR="${GAMES_DATADIR}/${PN}/"
src_unpack() {
unpack ${A}
@@ -34,20 +38,25 @@ src_unpack() {
echo "#define GAMES_DATADIR \"${CUBE_DATADIR}\"" >> tools.h
echo "#define GAMES_DATADIR_LEN ${#CUBE_DATADIR}" >> tools.h
sed -i \
- "s:packages/:${CUBE_DATADIR}packages/:" \
+ -e "s:packages/:${CUBE_DATADIR}packages/:" \
renderextras.cpp rendermd2.cpp sound.cpp worldio.cpp \
- || die "fixing data path failed"
+ || die "fixing data path failed"
+ # enable parallel make
+ sed -i \
+ -e 's/make -C/$(MAKE) -C/' Makefile \
+ || die "sed Makefile failed"
edos2unix *.cpp
}
src_compile() {
cd source/${MY_P}_src/src
- emake CXXOPTFLAGS="${CXXFLAGS}" || die
+ emake CXXOPTFLAGS="${CXXFLAGS}" || die "emake failed"
}
src_install() {
- dogamesbin source/${MY_P}_src/src/cube_{client,server}
- exeinto ${GAMES_LIBDIR}/${PN}
+ dogamesbin source/${MY_P}_src/src/cube_{client,server} \
+ || die "dogamesbin failed"
+ exeinto "${GAMES_LIBDIR}/${PN}"
if [ "${ARCH}" == "x86" ] ; then
newexe bin_unix/linux_client cube_client
newexe bin_unix/linux_server cube_server
@@ -55,14 +64,16 @@ src_install() {
newexe bin_unix/ppc_linux_client cube_client
newexe bin_unix/ppc_linux_server cube_server
fi
- dogamesbin ${FILESDIR}/cube_{client,server}-bin
+ dogamesbin ${FILESDIR}/cube_{client,server}-bin \
+ || die "dogamesbin failed (bin)"
sed -i \
-e "s:GENTOO_DATADIR:${CUBE_DATADIR}:" \
-e "s:GENTOO_LIBDIR:${GAMES_LIBDIR}/${PN}:" \
${D}/${GAMES_BINDIR}/cube_{client,server}-bin
dodir ${CUBE_DATADIR}
- cp -r *.cfg data packages ${D}/${CUBE_DATADIR}
+ cp -r *.cfg data packages ${D}/${CUBE_DATADIR} \
+ || die "cp failed"
dodoc source/${MY_P}_src/src/CUBE_TODO.txt
dohtml -r docs/