/[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.6 - (hide annotations) (download)
Fri Mar 31 20:16:49 2006 UTC (8 years ago) by wolf31o2
Branch: MAIN
Changes since 1.5: +2 -2 lines
Changing nostrip to strip.
(Portage version: 2.1_pre7-r2)

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

  ViewVC Help
Powered by ViewVC 1.1.20