/[gentoo-x86]/games-action/descent3/descent3-1.4.0b-r1.ebuild
Gentoo

Diff of /games-action/descent3/descent3-1.4.0b-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20