/[gentoo-x86]/games-action/descent3/descent3-1.4.0b-r1.ebuild
Gentoo

Contents of /games-action/descent3/descent3-1.4.0b-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Sun Feb 5 05:22:29 2012 UTC (2 years, 6 months ago) by vapier
Branch: MAIN
Changes since 1.17: +2 -2 lines
Move to new unpacker eclass for unpack_makeself.

(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/descent3/descent3-1.4.0b-r1.ebuild,v 1.17 2012/01/16 19:05:35 ulm Exp $
4
5 inherit eutils unpacker cdrom multilib games
6
7 IUSE="nocd videos"
8 DESCRIPTION="Descent 3 - 3-Dimensional indoor/outdoor spaceship combat"
9 HOMEPAGE="http://www.lokigames.com/products/descent3/"
10 SRC_URI="mirror://lokigames/${PN}/${PN}-1.4.0a-x86.run
11 mirror://lokigames/${PN}/${P}-x86.run"
12
13 LICENSE="LOKI-EULA"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 RESTRICT="strip"
17
18 DEPEND=""
19 RDEPEND="sys-libs/glibc
20 virtual/opengl
21 sys-libs/lib-compat-loki
22 x86? (
23 x11-libs/libX11
24 x11-libs/libXext
25 =media-libs/libsdl-1.2* )
26 amd64? (
27 app-emulation/emul-linux-x86-xlibs
28 app-emulation/emul-linux-x86-compat
29 app-emulation/emul-linux-x86-sdl
30 >=sys-libs/lib-compat-loki-0.2 )"
31
32 dir=${GAMES_PREFIX_OPT}/${PN}
33 Ddir=${D}/${dir}
34
35 pkg_setup() {
36 games_pkg_setup
37 if use videos ; then
38 ewarn "The installed game takes about 1.2GB of space!"
39 elif use nocd ; then
40 ewarn "The installed game takes about 510MB of space!"
41 else
42 ewarn "The installed game takes about 220MB of space!"
43 fi
44 }
45
46 src_unpack() {
47 if use videos ; then
48 cdrom_get_cds missions/d3.mn3 movies/level1.mve
49 else
50 cdrom_get_cds missions/d3.mn3
51 fi
52 mkdir -p "${S}"/{a,b}
53 cd "${S}"/a
54 unpack_makeself ${PN}-1.4.0a-x86.run
55 cd "${S}"/b
56 unpack_makeself ${P}-x86.run
57 }
58
59 src_install() {
60 einfo "Copying files... this may take a while..."
61 exeinto "${dir}"
62 doexe ${CDROM_ROOT}/bin/x86/glibc-2.1/{${PN},nettest} \
63 || die "copying executables"
64 insinto "${dir}"
65 doins ${CDROM_ROOT}/{FAQ.txt,README{,.mercenary},d3.hog,icon.{bmp,xpm}} \
66 || die "copying files"
67
68 cd "${Ddir}"
69 # TODO: move this to src_unpack where it belongs
70 tar xzf ${CDROM_ROOT}/data.tar.gz || die "uncompressing data"
71 tar xzf ${CDROM_ROOT}/shared.tar.gz || die "uncompressing shared"
72
73 if use nocd; then
74 doins -r ${CDROM_ROOT}/missions || die "copying missions"
75 fi
76
77 if use videos ; then
78 cdrom_load_next_cd
79 doins -r ${CDROM_ROOT}/movies || die "copying movies"
80 fi
81
82 cd "${S}"/a
83 bin/Linux/x86/loki_patch --verify patch.dat
84 bin/Linux/x86/loki_patch patch.dat "${Ddir}" >& /dev/null || die "patching a"
85 cd "${S}"/b
86 bin/Linux/x86/loki_patch --verify patch.dat
87 bin/Linux/x86/loki_patch patch.dat "${Ddir}" >& /dev/null || die "patching b"
88
89 # now, since these files are coming off a cd, the times/sizes/md5sums wont
90 # be different ... that means portage will try to unmerge some files (!)
91 # we run touch on ${D} so as to make sure portage doesnt do any such thing
92 find "${Ddir}" -exec touch '{}' \
93
94 dosym /usr/$(get_libdir)/loki_libsmpeg-0.4.so.0 \
95 "${dir}"/libsmpeg-0.4.so.0 || die "failed compatibility symlink"
96
97 games_make_wrapper descent3 ./descent3.dynamic "${dir}" "${dir}"
98 newicon ${CDROM_ROOT}/icon.xpm ${PN}.xpm
99
100 # Fix for 2.6 kernel crash
101 cd "${Ddir}"
102 ln -sf ppics.hog PPics.Hog
103
104 prepgamesdirs
105 make_desktop_entry ${PN} "Descent 3" ${PN}
106 }
107
108 pkg_postinst() {
109 games_pkg_postinst
110 elog "To play the game run:"
111 elog " descent3"
112 echo
113 }

  ViewVC Help
Powered by ViewVC 1.1.20