/[gentoo-x86]/games-action/d1x-rebirth/d1x-rebirth-0.56.ebuild
Gentoo

Contents of /games-action/d1x-rebirth/d1x-rebirth-0.56.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jan 18 12:42:50 2012 UTC (2 years, 8 months ago) by vapier
Branch: MAIN
Changes since 1.3: +4 -4 lines
Move to new CDROM_OPTIONAL variable.

(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-action/d1x-rebirth/d1x-rebirth-0.56.ebuild,v 1.3 2012/01/16 18:58:56 ulm Exp $
4
5 EAPI=2
6
7 CDROM_OPTIONAL="yes"
8 inherit eutils cdrom scons-utils games
9
10 DV=1
11 DESCRIPTION="Descent Rebirth - enhanced Descent ${DV} engine"
12 HOMEPAGE="http://www.dxx-rebirth.de/"
13 SRC_URI="mirror://sourceforge/dxx-rebirth/${PN}_v${PV}-src.tar.gz
14 http://www.dxx-rebirth.com/download/dxx/res/d1xrdata.zip
15 http://www.dxx-rebirth.com/download/dxx/res/dxx-rebirth_icons.zip
16 timidity? ( http://www.dxx-rebirth.com/download/dxx/res/descent${DV/1}_midi.zip )
17 cdinstall? ( http://www.dxx-rebirth.com/download/dxx/res/d1datapt.zip )
18 linguas_de? ( http://www.dxx-rebirth.com/download/dxx/res/D${DV}XBDE01.zip )"
19
20 LICENSE="D1X GPL-2 as-is"
21 SLOT="0"
22 KEYWORDS="~amd64 ~x86"
23 IUSE="ipv6 linguas_de opengl timidity"
24
25 RDEPEND="opengl? ( virtual/opengl virtual/glu )
26 dev-games/physfs[hog,zip]
27 media-libs/libsdl[audio,opengl?,video]
28 media-libs/sdl-mixer[timidity?]
29 cdinstall? ( !games-action/descent1-demodata )"
30 DEPEND="${RDEPEND}
31 app-arch/unzip"
32
33 S=${WORKDIR}/${PN}_v${PV}-src
34
35 src_unpack() {
36 unpack ${PN}_v${PV}-src.tar.gz dxx-rebirth_icons.zip
37 use linguas_de && unpack D${DV}XBDE01.zip
38 if use cdinstall ; then
39 unpack d1datapt.zip
40 cdrom_get_cds descent/descent.hog
41 mkdir "${S}"/Data
42 cp \
43 ${CDROM_ROOT}/descent/descent.{hog,pig} \
44 ${CDROM_ROOT}/descent/chaos.{hog,msn} \
45 "${S}"/Data \
46 || die "cp failed"
47 fi
48 }
49
50 src_prepare() {
51 sed -i -e "/lflags = /s/$/ + env['LINKFLAGS']/" SConstruct || die
52 if use cdinstall ; then
53 cd Data
54 patch -p0 < "${WORKDIR}"/d1datapt/descent.hog.diff descent.hog
55 patch -p0 < "${WORKDIR}"/d1datapt/descent.pig.diff descent.pig
56 fi
57 epatch "${FILESDIR}"/${P}-underlink.patch
58 }
59
60 src_compile() {
61 escons \
62 verbosebuild=1 \
63 sharepath="${GAMES_DATADIR}/d${DV}x" \
64 sdlmixer=1 \
65 $(use_scons !opengl sdl_only) \
66 $(use_scons ipv6) \
67 || die
68 }
69
70 src_install() {
71 dodoc INSTALL.txt README.txt
72 insinto "${GAMES_DATADIR}/d${DV}x"
73 doins "${DISTDIR}"/d1xrdata.zip || die
74 if use linguas_de ; then
75 doins "${WORKDIR}"/D${DV}XBDE01/D${DV}XbDE01/*.txb
76 fi
77 if use timidity ; then
78 doins "${DISTDIR}"/descent_midi.zip || die
79 fi
80 if use cdinstall ; then
81 doins Data/descent.{hog,pig} || die
82 insinto "${GAMES_DATADIR}"/d${DV}x/missions
83 doins Data/chaos.{hog,msn} || die
84 fi
85 doicon "${WORKDIR}/${PN}.xpm"
86
87 if use opengl ; then
88 newgamesbin d${DV}x-rebirth-gl d${DV}x-rebirth
89 else
90 newgamesbin d${DV}x-rebirth-sdl d${DV}x-rebirth
91 fi
92 make_desktop_entry d${DV}x-rebirth "Descent ${DV} Rebirth"
93 prepgamesdirs
94 }
95
96 pkg_postinst() {
97 games_pkg_postinst
98 if ! use cdinstall ; then
99 echo
100 elog "You need to copy data-files from original Descent ${DV}"
101 elog "installation to ${GAMES_DATADIR}/d${DV}x. Please read "
102 elog "/usr/share/doc/${PF}/INSTALL.txt for more info."
103 echo
104 fi
105 }

  ViewVC Help
Powered by ViewVC 1.1.20