/[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.6 - (show annotations) (download)
Sat Jun 29 19:02:29 2013 UTC (4 years, 5 months ago) by hasufell
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +5 -1 lines
don't build stuff in src_install

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

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-20120630.ebuild,v 1.5 2013/01/02 11:43:04 ago 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_compile() {
42 emake all
43 }
44
45 src_install() {
46 emake \
47 datadir="${GAMES_DATADIR}" \
48 bindir="${GAMES_BINDIR}" \
49 libdir="$(games_get_libdir)/${PN}" \
50 DESTDIR="${D}" \
51 install
52
53 # icons
54 insinto /usr/share/icons/
55 doins -r packaging/linux/hicolor
56
57 # desktop entries
58 local myrenderer=$(usex cg Cg Gl)
59 make_desktop_entry "${PN} Game.Mods=cnc Graphics.Renderer=${myrenderer}" \
60 "OpenRA CNC" ${PN}
61 make_desktop_entry "${PN} Game.Mods=ra Graphics.Renderer=${myrenderer}" \
62 "OpenRA RA" ${PN}
63 make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
64
65 dodoc "${FILESDIR}"/README.gentoo README HACKING CHANGELOG
66
67 # file permissions
68 prepgamesdirs
69 }
70
71 pkg_preinst() {
72 games_pkg_preinst
73 gnome2_icon_savelist
74 }
75
76 pkg_postinst() {
77 games_pkg_postinst
78 gnome2_icon_cache_update
79
80 if ! use cg ; then
81 elog "If you have problems starting the game consider switching"
82 elog "to Graphics.Renderer=Cg in openra*.desktop or manually"
83 elog "run:"
84 elog "${PN} Game.Mods=\$mod Graphics.Renderer=Cg"
85 fi
86 }
87
88 pkg_postrm() {
89 gnome2_icon_cache_update
90 }

  ViewVC Help
Powered by ViewVC 1.1.20