/[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.1.1.1 - (hide annotations) (download) (vendor branch)
Wed Nov 30 10:02:39 2005 UTC (8 years, 7 months ago) by chriswhite
Changes since 1.1: +1 -1 lines
*** empty log message ***

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

  ViewVC Help
Powered by ViewVC 1.1.20