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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Thu Dec 20 07:25:37 2012 UTC (18 months, 3 weeks ago) by tupone
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +9 -7 lines
Migrate to EAPI=5.
Use QA_PREBUILT as per bug #426836

(Portage version: 2.1.11.38/cvs/Linux i686, signed Manifest commit with key 0145142D)

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.5 2011/10/19 21:40:06 mr_bones_ Exp $
4
5 EAPI=5
6 inherit eutils toolchain-funcs games
7
8 MY_PN=defcon
9 MY_PV=${PV/_/-}
10 MY_P=defcon-v${MY_PV}
11
12 DESCRIPTION="Global thermonuclear war simulation with multiplayer support"
13 HOMEPAGE="http://www.introversion.co.uk/defcon/"
14 SRC_URI="http://download.introversion.co.uk/defcon/linux/${MY_P}.tar.gz"
15
16 LICENSE="Introversion"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="+system-libs"
20 RESTRICT="mirror strip"
21
22 # glibc discussion:
23 # http://forums.introversion.co.uk/defcon/viewtopic.php?t=4016
24 RDEPEND=">=sys-libs/glibc-2.3
25 system-libs? (
26 media-libs/libogg
27 media-libs/libsdl
28 media-libs/libvorbis )
29 x11-libs/libX11
30 x11-libs/libXau
31 x11-libs/libXext
32 x11-libs/libXdmcp"
33 DEPEND=""
34
35 QA_PREBUILT="${GAMES_PREFIX_OPT:1}/${PN}/lib/defcon.bin.x86"
36
37 S=${WORKDIR}/${MY_P}
38
39 src_prepare() {
40 # FindPath scripts are ugly and unnecessary
41 rm -f defcon doc/README-SDL.txt
42 if use system-libs ; then
43 rm -f lib/lib*
44 fi
45 sed \
46 -e "s:GAMEDIR:${GAMES_PREFIX_OPT}/${PN}:g" \
47 "${FILESDIR}"/defcon > "${T}"/defcon \
48 || die "sed failed"
49 echo "int chdir(const char *d) { return 0; }" > chdir.c \
50 || die "echo failed"
51 }
52
53 src_compile() {
54 $(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -shared -o lib/chdir.so chdir.c || die
55 }
56
57 src_install() {
58 local dir=${GAMES_PREFIX_OPT}/${PN}
59
60 insinto "${dir}/lib"
61 doins lib/*.dat
62
63 exeinto "${dir}"/lib
64 doexe lib/*.{sh,x86,so}
65
66 dodoc manual.pdf doc/*txt
67 doicon doc/defcon.ico
68
69 # Can be upgraded to full version, so is not installed as "demo"
70 dogamesbin "${T}"/defcon
71 make_desktop_entry ${MY_PN} "Defcon" /usr/share/pixmaps/defcon.ico
72
73 prepgamesdirs
74 }
75
76 pkg_postinst() {
77 games_pkg_postinst
78 elog "Screenshots will appear in ~/.defcon/lib"
79 }

  ViewVC Help
Powered by ViewVC 1.1.20