blob: 5912e5ec989850083db2fd03926c38ccc094ca7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-rpg/vegastrike/vegastrike-0.3.1.ebuild,v 1.3 2003/11/23 00:08:36 mholzer Exp $
inherit games eutils flag-o-matic
DATA_VER=0.3-1
DESCRIPTION="3d OpenGL Action RPG space sim"
HOMEPAGE="http://vegastrike.sourceforge.net/"
SRC_URI="mirror://sourceforge/vegastrike/${P}-gcc3.2.src.rpm
mirror://sourceforge/vegastrike/${PN}-data-${DATA_VER}.noarch.rpm"
RESTRICT="nomirror"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86"
IUSE="sdl" # openal"
RDEPEND="media-libs/glut
virtual/x11
sdl? ( media-libs/libsdl
media-libs/sdl-mixer )
media-libs/openal"
# openal? ( media-libs/openal )"
DEPEND="${RDEPEND}
dev-lang/perl
app-arch/rpm2targz"
S=${WORKDIR}/${PN}
src_unpack() {
rpm2targz ${DISTDIR}/${P}-gcc3.2.src.rpm || die "src rpm2targz failed"
tar -zxf ${P}-gcc3.2.src.tar.gz || die "src tar 1 failed"
tar -zxf ${PN}.tar.gz || die "src tar 2 failed"
rpm2targz ${DISTDIR}/${PN}-data-${DATA_VER}.noarch.rpm || die "data rpm2targz failed"
tar -zxf ${PN}-data-${DATA_VER}.noarch.tar.gz || die "src tar failed"
cd ${WORKDIR}
#Fixes gcc3 issue
epatch ${FILESDIR}/${P}-gcc3.patch || die
cd ${S}
autoconf || die
automake || die
cd ${WORKDIR}
mv usr/local data
cd data/bin/
epatch ${FILESDIR}/${PV}-vsinstall.patch
}
src_compile() {
append-flags -DGL_GLEXT_LEGACY
local sdlconf
use sdl \
&& sdlconf="--enable-sdl --disable-nosdl" \
|| sdlconf="--disable-sdl --enable-nosdl"
egamesconf ${sdlconf} || die
cp src/common/{common.cpp,common.cpp.orig}
sed -e "s:/opt/share/vegastrike/data:${GAMES_DATADIR}/${PN}/data:" \
src/common/common.cpp.orig > src/common/common.cpp
emake || die
}
src_install() {
make install DESTDIR=${D} || die
dogamesbin ${WORKDIR}/data/bin/vsinstall vssetup vslauncher
dodoc NEWS AUTHORS README ChangeLog ${WORKDIR}/data/doc/vegastrike/readme.txt
doman ${WORKDIR}/data/man/man1/*
dodir ${GAMES_DATADIR}
mv ${WORKDIR}/data/games/vegastrike ${D}/${GAMES_DATADIR}/
find ${D} -type d -name cvs -exec rm -rf '{}' \; >& /dev/null
prepgamesdirs
}
pkg_postinst() {
einfo "run vsinstall to setup your account"
einfo "then run vslauncher to start Vega Strike"
games_pkg_postinst
}
|