Ticket #515: springlobby-0.0.1.10245.ebuild

File springlobby-0.0.1.10245.ebuild, 1.2 kB (added by k-r.ernst@…, 6 months ago)

new ebuild

Line 
1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5# TODO add debug use flag
6
7inherit eutils
8
9DESCRIPTION="lobby client for spring rts engine"
10HOMEPAGE="http://springlobby.info"
11SRC_URI="http://www.springlobby.info/tarballs/${P}.tar.bz2"
12
13LICENSE="GPL-2"
14SLOT="0"
15KEYWORDS="~amd64 ~x86"
16IUSE=""
17RESTRICT="nomirror"
18IUSE="torrent sound"
19
20RDEPEND="
21        !games-util/springlobby-svn
22        !virtual/springlobby
23        >=x11-libs/wxGTK-2.6.3
24        sound? ( media-libs/sdl-sound media-libs/sdl-mixer )
25        torrent? ( >=net-libs/rb_libtorrent-0.13 )
26"
27DEPEND="${RDEPEND}
28"
29
30PROVIDE="virtual/springlobby"
31
32my_depend_with_use () {
33        if ! built_with_use $* ; then
34                eerror "Please run 'echo \"$*\" >> /etc/portage/package.use' and re-emerge '$1'."
35                MY_DEPEND_WITH_USE=false
36        fi
37}
38
39pkg_setup() {
40        my_depend_with_use x11-libs/wxGTK X
41        ${MY_DEPEND_WITH_USE} || die "Some dependencies need different use flags. Package setup failed."
42}
43
44src_compile() {
45        OPTIONS=""
46        if ! use torrent ; then
47                OPTIONS="${OPTIONS} --disable-torrent-system"
48        fi
49        if ! use sound ; then
50                OPTIONS="${OPTIONS} --disable-sound"
51        fi
52
53        econf ${OPTIONS} || die "econf failed"
54        emake || die "emake failed"
55}
56
57src_install() {
58        emake install DESTDIR=${D}
59}
60