--- gnome-games-2.26.2.ebuild 2009-05-24 21:08:16.000000000 +0530 +++ gnome-games-2.26.2.ebuild 2009-05-24 21:08:03.000000000 +0530 @@ -16,7 +16,7 @@ HOMEPAGE="http://live.gnome.org/GnomeGam LICENSE="GPL-2 FDL-1.1" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="artworkextra guile opengl test" +IUSE="artworkextra guile opengl test +gstreamer" RDEPEND=">=dev-python/pygtk-2.10 dev-python/pygobject @@ -32,7 +32,11 @@ RDEPEND=">=dev-python/pygtk-2.10 >=gnome-base/gconf-2 >=dev-libs/libxml2-2.4.0 >=gnome-base/librsvg-2.14 - >=media-libs/gstreamer-0.10.11 + gstreamer? ( >=media-libs/gstreamer-0.10.11 ) + !gstreamer? ( + media-libs/libsdl + media-libs/sdl-mixer[vorbis] + ) >=gnome-base/libglade-2 >=dev-libs/glib-2.6.3 >=dev-games/libggz-0.0.14 @@ -69,6 +73,13 @@ pkg_setup() { # create the games user / group games_pkg_setup + # Decide the sound backend to use - GStreamer gets preference over SDL + if use gstreamer; then + G2CONF="${G2CONF} --with-sound=gstreamer" + else + G2CONF="${G2CONF} --with-sound=sdl_mixer" + fi + # Needs "seed", which needs gobject-introspection, libffi, etc. #$(use_enable clutter) #$(use_enable clutter staging) @@ -77,7 +88,6 @@ pkg_setup() { --with-scores-group=${GAMES_GROUP} --enable-noregistry=\"${GGZ_MODDIR}\" --with-platform=gnome - --with-sound=gstreamer --with-card-theme-formats=all --with-smclient --enable-omitgames=none" # This line should be last for _omitgame @@ -145,6 +155,11 @@ pkg_postinst() { if use opengl; then python_mod_optimize $(python_get_sitedir)/glchess fi + + if ! use sdl && ! use gstreamer; then + ewarn "gnome-games has been built with out sound support. To enable," + ewarn "add gstreamer or sdl to your use flags" + fi } pkg_postrm() {