summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-puzzle/gtetrinet/files/gtetrinet-0.7.11-noesd.patch')
-rw-r--r--games-puzzle/gtetrinet/files/gtetrinet-0.7.11-noesd.patch130
1 files changed, 130 insertions, 0 deletions
diff --git a/games-puzzle/gtetrinet/files/gtetrinet-0.7.11-noesd.patch b/games-puzzle/gtetrinet/files/gtetrinet-0.7.11-noesd.patch
new file mode 100644
index 000000000000..b49758401298
--- /dev/null
+++ b/games-puzzle/gtetrinet/files/gtetrinet-0.7.11-noesd.patch
@@ -0,0 +1,130 @@
+--- gtetrinet-0.7.11/configure.in~ 2006-11-15 17:02:36.000000000 +0000
++++ gtetrinet-0.7.11/configure.in 2011-03-06 15:39:10.000000000 +0000
+@@ -30,7 +30,6 @@
+ LIBGTK_REQUIRED=2.6.0
+ LIBGNOME_REQUIRED=2.0.0
+ LIBGNOMEUI_REQUIRED=2.0.0
+-LIBESD_REQUIRED=0.2.36
+
+ dnl *****************************************
+ dnl libgnome, libgnomeui needed for all utils
+@@ -40,21 +39,21 @@
+ AC_SUBST(GTET_CFLAGS)
+ AC_SUBST(GTET_LIBS)
+
+-dnl Check for libesd
+-if pkg-config --exists esound ; then
+- have_esound=yes
++dnl Check for libcanberra
++if pkg-config --exists libcanberra ; then
++ have_libcanberra=yes
+ else
+- have_esound=no
++ have_libcanberra=no
+ fi
+
+-if test "x$have_esound" = "xyes"; then
+-AC_DEFINE(HAVE_ESD, 1, [Define this to enable EsounD support.])
+-PKG_CHECK_MODULES(ESOUND, esound >= $LIBESD_REQUIRED)
+-AC_SUBST(ESOUND_CFLAGS)
+-AC_SUBST(ESOUND_LIBS)
++if test "x$have_libcanberra" = "xyes"; then
++AC_DEFINE(HAVE_LIBCANBERRA, 1, [Define this to enable libcanberra support.])
++PKG_CHECK_MODULES(LIBCANBERRA, libcanberra)
++AC_SUBST(LIBCANBERRA_CFLAGS)
++AC_SUBST(LIBCANBERRA_LIBS)
+ fi
+
+-AM_CONDITIONAL(HAVE_ESOUND, test "x$have_esound" = "xyes")
++AM_CONDITIONAL(HAVE_LIBCANBERRA, test "x$have_libcanberra" = "xyes")
+
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+--- gtetrinet-0.7.11/config.h.in~ 2006-11-15 17:03:53.000000000 +0000
++++ gtetrinet-0.7.11/config.h.in 2011-03-06 15:39:31.000000000 +0000
+@@ -15,8 +15,8 @@
+ /* Define to 1 if you have the `dcgettext' function. */
+ #undef HAVE_DCGETTEXT
+
+-/* Define this to enable EsounD support. */
+-#undef HAVE_ESD
++/* Define this to enable libcanberra support. */
++#undef HAVE_LIBCANBERRA
+
+ /* Define if the GNU gettext() function is already present or preinstalled. */
+ #undef HAVE_GETTEXT
+--- gtetrinet-0.7.11/src/dialogs.c~ 2006-11-03 12:49:49.000000000 +0000
++++ gtetrinet-0.7.11/src/dialogs.c 2011-03-06 15:40:45.000000000 +0000
+@@ -1054,7 +1054,7 @@
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(soundcheck), soundenable);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(midicheck), midienable);
+
+-#ifdef HAVE_ESD
++#ifdef HAVE_LIBCANBERRA
+ if (midienable) prefdialog_midion ();
+ else prefdialog_midioff ();
+ if (soundenable) prefdialog_soundon ();
+--- gtetrinet-0.7.11/src/sound.c~ 2005-03-18 21:19:18.000000000 +0000
++++ gtetrinet-0.7.11/src/sound.c 2011-03-06 15:47:24.000000000 +0000
+@@ -36,33 +36,36 @@
+ char midifile[1024];
+ char midicmd[1024];
+
+-#ifdef HAVE_ESD
++#ifdef HAVE_LIBCANBERRA
+
+-#include <esd.h>
+-#include <libgnome/gnome-sound.h>
++#include <canberra.h>
+
+-static int soundsamples[S_NUM];
+ static int midipid = 0;
++static ca_context *ctx = 0;
+
+ void sound_cache (void)
+ {
+ int i;
+ if (!soundenable) return;
++ if (!ctx)
++ ca_context_create(&ctx);
++ if (ctx) {
+ for (i = 0; i < S_NUM; i ++) {
+- if (soundsamples[i])
+- esd_sample_free (gnome_sound_connection_get (), soundsamples[i]);
+ if (soundfiles[i][0])
+- soundsamples[i] = gnome_sound_sample_load (soundfiles[i], soundfiles[i]);
+- else
+- soundsamples[i] = 0;
++ ca_context_cache(ctx,
++ CA_PROP_MEDIA_FILENAME, soundfiles[i],
++ NULL);
++ }
+ }
+ }
+
+ void sound_playsound (int id)
+ {
+- if (!soundenable) return;
+- if (soundsamples[id] > 0)
+- esd_sample_play (gnome_sound_connection_get (), soundsamples[id]);
++ if (!soundenable || !ctx) return;
++ if (soundfiles[id][0])
++ ca_context_play(ctx, 0,
++ CA_PROP_MEDIA_FILENAME, soundfiles[id],
++ NULL);
+ }
+
+ void sound_playmidi (char *file)
+--- gtetrinet-0.7.11/src/Makefile.am~ 2006-11-03 16:20:08.000000000 +0000
++++ gtetrinet-0.7.11/src/Makefile.am 2011-03-06 15:57:32.000000000 +0000
+@@ -7,8 +7,8 @@
+ -DGTETPIXMAPSDIR=\""$(datadir)/pixmaps/gtetrinet"\" \
+ $(GTET_CFLAGS)
+
+-if HAVE_ESOUND
+-LDADD = $(GTET_LIBS) $(ESOUND_LIBS)
++if HAVE_LIBCANBERRA
++LDADD = $(GTET_LIBS) $(LIBCANBERRA_LIBS)
+ else
+ LDADD = $(GTET_LIBS)
+ endif