/[gentoo-x86]/games-strategy/defcon-demo/defcon-demo-1.60.ebuild
Gentoo

Contents of /games-strategy/defcon-demo/defcon-demo-1.60.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Dec 31 14:10:21 2012 UTC (23 months, 3 weeks ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
version bump wrt #448434

(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/games-strategy/defcon-demo/defcon-demo-1.42.ebuild,v 1.6 2012/12/20 07:25:37 tupone Exp $
4
5 EAPI=5
6 inherit eutils toolchain-funcs gnome2-utils games
7
8 MY_PN=defcon
9 MY_PV=${PV:0:3}
10 MY_PVR=1
11 MY_P=defcon_${MY_PV}-${MY_PVR}
12
13 DESCRIPTION="Global thermonuclear war simulation with multiplayer support"
14 HOMEPAGE="http://www.introversion.co.uk/defcon/"
15 SRC_URI="x86? ( http://www.introversion.co.uk/defcon/downloads/${MY_P}_i386.deb )
16 amd64? ( http://www.introversion.co.uk/defcon/downloads/${MY_P}_amd64.deb )"
17
18 LICENSE="Introversion"
19 SLOT="0"
20 KEYWORDS="-* ~amd64 ~x86"
21 IUSE="+system-libs"
22 RESTRICT="mirror strip"
23
24 # glibc discussion:
25 # http://forums.introversion.co.uk/defcon/viewtopic.php?t=4016
26 RDEPEND="
27 media-libs/libogg
28 media-libs/libvorbis
29 >=sys-libs/glibc-2.3
30 x11-libs/libX11
31 x11-libs/libXau
32 x11-libs/libXext
33 x11-libs/libXdmcp
34 system-libs? ( media-libs/libsdl )"
35 DEPEND=""
36
37 QA_PREBUILT="${GAMES_PREFIX_OPT:1}/${PN}/lib/${MY_PN}.bin.x86"
38
39 S=${WORKDIR}/usr/local/games/${MY_PN}
40
41 src_unpack() {
42 default
43 unpack ./data.tar.gz
44
45 cd "${S}" || die
46 # maintain compatibility with old installation/script
47 [[ -e lib64 ]] && { mv lib64 lib || die ;}
48 [[ -e ${MY_PN}.bin.x86_64 ]] && { mv ${MY_PN}.bin.x86_64 ${MY_PN}.bin.x86 || die ;}
49 }
50
51 src_prepare() {
52 # FindPath scripts are ugly and unnecessary
53 if use system-libs ; then
54 rm -f lib/lib*
55 fi
56 sed \
57 -e "s:GAMEDIR:${GAMES_PREFIX_OPT}/${PN}:g" \
58 "${FILESDIR}"/${MY_PN} > "${T}"/${MY_PN} \
59 || die "sed failed"
60 echo "int chdir(const char *d) { return 0; }" > chdir.c \
61 || die "echo failed"
62 }
63
64 src_compile() {
65 echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -shared -o lib/chdir.so chdir.c"
66 $(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -shared -o lib/chdir.so chdir.c || die
67 }
68
69 src_install() {
70 local dir=${GAMES_PREFIX_OPT}/${PN}
71
72 insinto "${dir}/lib"
73 doins *.dat
74
75 exeinto "${dir}"/lib
76 doexe lib/*.so
77 doexe ${MY_PN}.bin.x86
78
79 doicon -s 128 ${MY_PN}.png
80
81 # Can be upgraded to full version, so is not installed as "demo"
82 dogamesbin "${T}"/${MY_PN}
83 make_desktop_entry ${MY_PN} "Defcon"
84
85 prepgamesdirs
86 }
87
88 pkg_preinst() {
89 games_pkg_preinst
90 gnome2_icon_savelist
91 }
92
93 pkg_postinst() {
94 games_pkg_postinst
95 gnome2_icon_cache_update
96 elog "Screenshots will appear in ~/.${MY_PN}/lib"
97 }
98
99 pkg_postrm() {
100 gnome2_icon_cache_update
101 }

  ViewVC Help
Powered by ViewVC 1.1.20