media-video/nvidia-settings-195.30: Bump
[otih-overlay.git] / games-arcade / performous / performous-0.3.1.ebuild
blobca2ac062f685ce680ae2d4335bf11b7ac7ce0139
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /cvsroot/ultrastar-ng/UltraStar-ng/portage-overlay/games-arcade/performous/performous-9999.ebuild,v 1.10 2007/09/29 13:04:19 yoda-jm Exp $
5 inherit games cmake-utils
7 RESTRICT="nostrip"
9 MY_PN=Performous
10 MY_P=${MY_PN}-${PV}-Source
11 SONGS_PN=ultrastar-songs
13 DESCRIPTION="Karaoke game similar to Singstar"
14 HOMEPAGE="http://performous.org"
15 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2
16 songs? (
17 mirror://sourceforge/${PN}/${SONGS_PN}-jc-1.zip
18 mirror://sourceforge/${PN}/${SONGS_PN}-libre-3.zip
19 mirror://sourceforge/${PN}/${SONGS_PN}-restricted-3.zip
20 mirror://sourceforge/${PN}/${SONGS_PN}-shearer-1.zip
23 LICENSE="GPL-2
24 songs? (
25 CCPL-Attribution-ShareAlike-NonCommercial-2.5
26 CCPL-Attribution-NonCommercial-NoDerivs-2.5
28 SLOT="0"
29 KEYWORDS="~x86 ~amd64 ~ppc ~ppc64"
31 IUSE="debug alsa portaudio pulseaudio jack songs gstreamer"
33 RDEPEND="gnome-base/librsvg
34 dev-libs/boost
35 x11-libs/pango
36 dev-cpp/libxmlpp
37 media-libs/libsdl[joystick,opengl]
38 media-gfx/imagemagick
40 virtual/opengl
41 virtual/glu
43 >=media-video/ffmpeg-0.4.9_p20070616-r20
44 alsa? ( media-libs/alsa-lib )
45 jack? ( media-sound/jack-audio-connection-kit )
46 portaudio? ( media-libs/portaudio )
47 gstreamer? ( media-libs/gstreamer )
48 pulseaudio? ( media-sound/pulseaudio )
49 sys-apps/help2man
50 !games-arcade/ultrastar-ng"
51 DEPEND="${RDEPEND}
52 >=dev-util/cmake-2.6.0"
54 pkg_setup() {
55 games_pkg_setup
56 if ! built_with_use --missing true dev-libs/boost threads ; then
57 eerror "Please emerge dev-libs/boost with USE=threads"
61 src_unpack() {
62 unpack "${MY_P}.tar.bz2"
63 mv "${MY_P}" "${P}"
64 if use songs; then
65 cd "${S}"
66 unpack "${SONGS_PN}-jc-1.zip"
67 unpack "${SONGS_PN}-libre-3.zip"
68 unpack "${SONGS_PN}-restricted-3.zip"
69 unpack "${SONGS_PN}-shearer-1.zip"
73 src_compile() {
74 mkdir build
75 cd build
76 plugins="-DLIBDA_AUTODETECT_PLUGINS=false -DLIBDA_PLUGIN_TESTING=false"
77 if use alsa ; then
78 plugins="$plugins -DLIBDA_PLUGIN_ALSA=true"
79 else
80 plugins="$plugins -DLIBDA_PLUGIN_ALSA=false"
82 if use jack ; then
83 plugins="$plugins -DLIBDA_PLUGIN_JACK=true"
84 else
85 plugins="$plugins -DLIBDA_PLUGIN_JACK=false"
87 if use gstreamer ; then
88 plugins="$plugins -DLIBDA_PLUGIN_GSTREAMER=true"
89 else
90 plugins="$plugins -DLIBDA_PLUGIN_GSTREAMER=false"
92 if use portaudio ; then
93 plugins="$plugins -DLIBDA_PLUGIN_PORTAUDIO=true"
94 else
95 plugins="$plugins -DLIBDA_PLUGIN_PORTAUDIO=false"
97 if use pulseaudio ; then
98 plugins="$plugins -DLIBDA_PLUGIN_PULSE=true"
99 else
100 plugins="$plugins -DLIBDA_PLUGIN_PULSE=false"
102 cmake \
103 -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
104 -DCMAKE_INSTALL_PREFIX="/usr" \
105 $plugins \
106 .. || die "cmake failed"
107 emake || die "emake failed"
110 src_install() {
111 cd build
112 emake DESTDIR="${D}" install || die "make install failed"
113 keepdir "/usr/ultrastar/songs"
114 rm -rf "${D}/usr/share/${PN}"/{applications,pixmaps}
115 if use songs; then
116 insinto "/usr/share/games/ultrastar"
117 doins -r ../songs || die "doins songs failed"
119 doicon data/${PN}.xpm
120 domenu data/${PN}.desktop
121 dodoc ../docs/*.txt
122 prepgamesdirs