/[gentoo-x86]/games-strategy/openra/openra-20120630.ebuild
Gentoo

Contents of /games-strategy/openra/openra-20120630.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sun Jul 29 11:57:32 2012 UTC (2 years, 3 months ago) by hasufell
Branch: MAIN
Changes since 1.2: +7 -7 lines
minor fix to elog

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

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/openra/openra-20120630.ebuild,v 1.2 2012/07/01 00:49:49 hasufell Exp $
4
5 EAPI=4
6
7 inherit eutils mono gnome2-utils vcs-snapshot games
8
9 DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
10 HOMEPAGE="http://open-ra.org/"
11 SRC_URI="http://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
12
13 LICENSE="GPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="cg"
17
18 DEPEND="dev-dotnet/libgdiplus
19 dev-lang/mono
20 media-libs/freetype:2[X]
21 media-libs/libsdl[X,opengl,video]
22 media-libs/openal
23 virtual/jpeg
24 virtual/opengl
25 cg? ( >=media-gfx/nvidia-cg-toolkit-2.1.0017 )"
26 RDEPEND="${DEPEND}"
27
28 src_unpack() {
29 vcs-snapshot_src_unpack
30 }
31
32 src_prepare() {
33 epatch "${FILESDIR}"/${P}-sound.patch
34
35 # register game-version
36 sed \
37 -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
38 -i mods/{ra,cnc}/mod.yaml || die
39 }
40
41 src_install() {
42 emake \
43 datadir="${GAMES_DATADIR}" \
44 bindir="${GAMES_BINDIR}" \
45 libdir="$(games_get_libdir)/${PN}" \
46 DESTDIR="${D}" \
47 install
48
49 # icons
50 insinto /usr/share/icons/
51 doins -r packaging/linux/hicolor
52
53 # desktop entries
54 local myrenderer=$(usex cg Cg Gl)
55 make_desktop_entry "${PN} Game.Mods=cnc Graphics.Renderer=${myrenderer}" \
56 "OpenRA CNC" ${PN}
57 make_desktop_entry "${PN} Game.Mods=ra Graphics.Renderer=${myrenderer}" \
58 "OpenRA RA" ${PN}
59 make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
60
61 dodoc "${FILESDIR}"/README.gentoo README HACKING CHANGELOG
62
63 # file permissions
64 prepgamesdirs
65 }
66
67 pkg_preinst() {
68 games_pkg_preinst
69 gnome2_icon_savelist
70 }
71
72 pkg_postinst() {
73 games_pkg_postinst
74 gnome2_icon_cache_update
75
76 if ! use cg ; then
77 elog "If you have problems starting the game consider switching"
78 elog "to Graphics.Renderer=Cg in openra*.desktop or manually"
79 elog "run:"
80 elog "${PN} Game.Mods=\$mod Graphics.Renderer=Cg"
81 fi
82 }
83
84 pkg_postrm() {
85 gnome2_icon_cache_update
86 }

  ViewVC Help
Powered by ViewVC 1.1.20