/[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.9 - (hide annotations) (download)
Fri Oct 13 15:41:19 2006 UTC (7 years, 9 months ago) by wolf31o2
Branch: MAIN
Changes since 1.8: +3 -6 lines
Removing virtual/x11 from dependencies.
(Portage version: 2.1.2_pre2-r8)

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

  ViewVC Help
Powered by ViewVC 1.1.20