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

Contents of /games-strategy/openra/openra-20130514-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jul 4 12:23:03 2013 UTC (5 years, 3 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Stable for x86, wrt bug #475670

(Portage version: 2.1.12.11/cvs/Linux x86_64, RepoMan options: --include-arches="x86", signed Manifest commit with key 7194459F)

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/openra/openra-20130514-r1.ebuild,v 1.2 2013/07/04 12:13:10 ago Exp $
4
5 EAPI=5
6
7 inherit eutils mono-env 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="https://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 tools"
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 pkg_setup() {
29 mono-env_pkg_setup
30 games_pkg_setup
31 }
32
33 src_unpack() {
34 vcs-snapshot_src_unpack
35 }
36
37 src_prepare() {
38 epatch "${FILESDIR}"/${P}-makefile.patch
39
40 # register game-version
41 sed \
42 -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
43 -i mods/{ra,cnc,d2k}/mod.yaml || die
44 }
45
46 src_compile() {
47 emake $(usex tools "all" "")
48 }
49
50 src_install() {
51 emake \
52 datadir="${GAMES_DATADIR}" \
53 bindir="${GAMES_BINDIR}" \
54 libdir="$(games_get_libdir)/${PN}" \
55 DESTDIR="${D}" \
56 $(usex tools "install-all" "install")
57
58 # icons
59 insinto /usr/share/icons/
60 doins -r packaging/linux/hicolor
61
62 # desktop entries
63 local myrenderer=$(usex cg Cg Gl)
64 make_desktop_entry "${PN} Game.Mods=cnc Graphics.Renderer=${myrenderer}" \
65 "OpenRA CNC" ${PN}
66 make_desktop_entry "${PN} Game.Mods=ra Graphics.Renderer=${myrenderer}" \
67 "OpenRA RA" ${PN}
68 make_desktop_entry "${PN} Game.Mods=d2k Graphics.Renderer=${myrenderer}" \
69 "OpenRA Dune2k" ${PN}
70 make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
71
72 dodoc "${FILESDIR}"/README.gentoo README.md HACKING CHANGELOG
73
74 # file permissions
75 prepgamesdirs
76 }
77
78 pkg_preinst() {
79 games_pkg_preinst
80 gnome2_icon_savelist
81 }
82
83 pkg_postinst() {
84 games_pkg_postinst
85 gnome2_icon_cache_update
86
87 if ! use cg ; then
88 elog "If you have problems starting the game consider switching"
89 elog "to Graphics.Renderer=Cg in openra*.desktop or manually"
90 elog "run:"
91 elog "${PN} Game.Mods=\$mod Graphics.Renderer=Cg"
92 fi
93 }
94
95 pkg_postrm() {
96 gnome2_icon_cache_update
97 }

  ViewVC Help
Powered by ViewVC 1.1.20