/[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.16 - (hide annotations) (download)
Wed Dec 14 17:12:16 2011 UTC (2 years, 9 months ago) by vapier
Branch: MAIN
Changes since 1.15: +2 -3 lines
The games.eclass has dropped GAMES_CHECK_LICENSE support (since portage now has ACCEPT_LICENSE), so drop it here too.

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

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

  ViewVC Help
Powered by ViewVC 1.1.20