/[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.3 - (hide annotations) (download)
Tue Jan 10 21:18:28 2006 UTC (8 years, 6 months ago) by wolf31o2
Branch: MAIN
Changes since 1.2: +3 -2 lines
Forgot to add libSDL to RDEPEND for x86.
(Portage version: 2.1_pre3-r1)

1 wolf31o2 1.2 # Copyright 1999-2006 Gentoo Foundation
2 wolf31o2 1.1 # Distributed under the terms of the GNU General Public License v2
3 wolf31o2 1.3 # $Header: /var/cvsroot/gentoo-x86/games-action/descent3/descent3-1.4.0b-r1.ebuild,v 1.2 2006/01/10 20:08:05 wolf31o2 Exp $
4 wolf31o2 1.1
5     inherit eutils 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="nostrip"
17    
18     DEPEND=""
19     RDEPEND="virtual/opengl
20 wolf31o2 1.2 x86? (
21     || (
22     (
23     x11-libs/libX11
24     x11-libs/libXext )
25 wolf31o2 1.3 virtual/x11 )
26     =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     GAMES_CHECK_LICENSE="yes"
34     dir=${GAMES_PREFIX_OPT}/${PN}
35     Ddir=${D}/${dir}
36    
37     pkg_setup() {
38     if use videos ; then
39     ewarn "The installed game takes about 1.2GB of space!"
40     cdrom_get_cds missions/d3.mn3 movies/level1.mve
41     else
42     cdrom_get_cds missions/d3.mn3
43     fi
44     if use nocd ; then
45     ewarn "The installed game takes about 510MB of space!"
46     else
47     ewarn "The installed game takes about 220MB of space!"
48     fi
49     games_pkg_setup
50     }
51    
52     src_unpack() {
53     mkdir -p ${S}/{a,b}
54     cd ${S}/a
55     unpack_makeself ${PN}-1.4.0a-x86.run
56     cd ${S}/b
57     unpack_makeself ${P}-x86.run
58     }
59    
60     src_install() {
61     dodir ${dir}
62     einfo "Copying files... this may take a while..."
63     exeinto ${dir}
64     doexe ${CDROM_ROOT}/bin/x86/glibc-2.1/{${PN},nettest} \
65     || die "copying executables"
66     insinto ${dir}
67     doins ${CDROM_ROOT}/{FAQ.txt,README{,.mercenary},d3.hog,icon.{bmp,xpm}} \
68     || die "copying files"
69    
70     cd ${Ddir}
71     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     cd ${S}/a
84     bin/Linux/x86/loki_patch --verify patch.dat
85     bin/Linux/x86/loki_patch patch.dat ${Ddir} >& /dev/null || die "patching a"
86     cd ${S}/b
87     bin/Linux/x86/loki_patch --verify patch.dat
88     bin/Linux/x86/loki_patch patch.dat ${Ddir} >& /dev/null || die "patching b"
89    
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     find ${Ddir} -exec touch '{}' \
94    
95     if use amd64
96     then
97     dosym /usr/$(get_libdir)/loki_libsmpeg-0.4.so.0 \
98     ${dir}/libsmpeg-0.4.so.0 || die "failed compatibility symlink"
99     fi
100    
101     games_make_wrapper descent3 ./descent3.dynamic "${dir}" "${dir}"
102     newicon ${CDROM_ROOT}/icon.xpm ${PN}.xpm
103    
104     # Fix for 2.6 kernel crash
105     cd ${Ddir}
106     ln -sf ppics.hog PPics.Hog
107    
108     prepgamesdirs
109     make_desktop_entry ${PN} "Descent 3" ${PN}
110     }
111    
112     pkg_postinst() {
113 wolf31o2 1.2 games_pkg_postinst
114 wolf31o2 1.1 einfo "To play the game run:"
115     einfo " descent3"
116 wolf31o2 1.2 echo
117 wolf31o2 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20