/[gentoo-x86]/games-strategy/smac/smac-6.0a.ebuild
Gentoo

Contents of /games-strategy/smac/smac-6.0a.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (show annotations) (download)
Thu Jan 31 20:04:47 2013 UTC (22 months, 2 weeks ago) by mr_bones_
Branch: MAIN
Changes since 1.22: +12 -11 lines
add log message about CONFIG_UID16 (bug #340303); tidy

(Portage version: 2.1.11.31/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-strategy/smac/smac-6.0a.ebuild,v 1.22 2012/02/05 06:25:05 vapier Exp $
4
5 EAPI=2
6 inherit eutils unpacker cdrom games
7
8 DESCRIPTION="Linux port of the popular strategy game from Firaxis"
9 HOMEPAGE="http://www.lokigames.com/products/smac/"
10 SRC_URI="x86? ( mirror://lokigames/${PN}/${P}-x86.run )
11 amd64? ( mirror://lokigames/${PN}/${P}-x86.run )
12 ppc? ( http://mirrors.dotsrc.org/lokigames/installers/${PN}/${PN}-install-ppc.run )"
13
14 LICENSE="LOKI-EULA"
15 SLOT="0"
16 KEYWORDS="~amd64 ~ppc ~x86"
17 IUSE="+videos"
18 RESTRICT="strip"
19
20 DEPEND="games-util/loki_patch"
21 RDEPEND="sys-libs/glibc
22 x11-libs/libX11
23 x11-libs/libXext
24 x11-libs/libXau
25 x11-libs/libXdmcp
26 !ppc? ( sys-libs/lib-compat-loki )
27 media-libs/libsdl[audio,video]
28 media-libs/sdl-ttf
29 media-libs/sdl-mixer
30 media-libs/smpeg
31 media-libs/freetype
32 sys-libs/zlib"
33
34 dir=${GAMES_PREFIX_OPT}/${PN}
35 Ddir=${D}/${dir}
36
37 src_unpack() {
38 cdrom_get_cds Alien_Crossfire_Manual.pdf
39 mkdir -p "${S}"/a
40 cd "${S}"/a
41 use x86 || use amd64 && unpack_makeself ${P}-x86.run
42 use ppc && unpack_makeself ${PN}-install-ppc.run
43 }
44
45 src_install() {
46 einfo "Copying files... this may take a while..."
47 exeinto "${dir}"
48 doexe "${CDROM_ROOT}"/bin/x86/{smac,smacx,smacpack} || die
49
50 insinto "${dir}"
51 doins ${CDROM_ROOT}/{{Alien_Crossfire,Alpha_Centauri}_Manual.pdf,QuickStart.txt,README,icon.{bmp,xpm}}
52
53 cd "${Ddir}"
54 tar xzf "${CDROM_ROOT}"/data.tar.gz || die
55 insinto "${dir}"/data
56 doins "${CDROM_ROOT}"/data/*.{pcx,cvr,flc,gif} || die
57 doins -r "${CDROM_ROOT}"/data/{facs,fx,projs,techs,voices} || die
58
59 if use videos ; then
60 doins -r "${CDROM_ROOT}"/data/movies || die
61 fi
62
63 cd "${S}"/a
64 if use ppc ; then
65 cd ${P}-ppc
66 fi
67 loki_patch --verify patch.dat
68 loki_patch patch.dat "${Ddir}" >& /dev/null || die
69
70 # now, since these files are coming off a cd, the times/sizes/md5sums wont
71 # be different ... that means portage will try to unmerge some files (!)
72 # we run touch on ${D} so as to make sure portage doesnt do any such thing
73 find "${Ddir}" -exec touch '{}' +
74
75 newicon "${CDROM_ROOT}"/icon.xpm smac.xpm
76
77 games_make_wrapper ${PN}pack ./${PN}pack "${dir}" "${dir}"
78 games_make_wrapper ${PN} ./${PN} "${dir}" "${dir}"
79 games_make_wrapper ${PN}x ./${PN}x "${dir}" "${dir}"
80 make_desktop_entry smacpack "Sid Meier's SMAC Planetary Pack" smacpack
81 make_desktop_entry smac "Sid Meier's Alpha Centauri" smac
82 make_desktop_entry smacx "Sid Meier's Alpha Centauri - Alien Crossfire" smac
83 prepgamesdirs
84
85 if use x86 || use amd64 ; then
86 einfo "Linking libs provided by 'sys-libs/lib-compat-loki' to '${dir}'."
87 dosym /lib/loki_ld-linux.so.2 "${dir}"/ld-linux.so.2 && \
88 dosym /usr/lib/loki_libc.so.6 "${dir}"/libc.so.6 && \
89 dosym /usr/lib/loki_libnss_files.so.2 "${dir}"/libnss_files.so.2 || die
90 fi
91 }
92
93 pkg_postinst() {
94 games_pkg_postinst
95 elog "To start Sid Meyer's SMAC Planetary Pack run:"
96 elog " smac"
97 elog "To play Sid Meyer's Alpha Centauri run:"
98 elog " smac"
99 elog "To play Alien Crossfire run:"
100 elog " smacx"
101 elog "Be sure to enable CONFIG_UID16 in your kernel config or"
102 elog "the game will error." # bug 340303
103 }

  ViewVC Help
Powered by ViewVC 1.1.20