summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2011-03-08 01:10:38 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2011-03-08 01:10:38 +0000
commit0cdbbe7706f1b694356846acf52222123eddcb98 (patch)
tree39dc2222852f813f6ac844745ba13a380aebfbd3 /games-puzzle
parentVersion bump (bug #357855) and old versions clean up. (diff)
downloadgentoo-2-0cdbbe7706f1b694356846acf52222123eddcb98.tar.gz
gentoo-2-0cdbbe7706f1b694356846acf52222123eddcb98.tar.bz2
gentoo-2-0cdbbe7706f1b694356846acf52222123eddcb98.zip
port from using esd to canberra - patch submitted by David Leverton via bug #357675
(Portage version: 2.1.9.25/cvs/Linux i686)
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/gtetrinet/ChangeLog11
-rw-r--r--games-puzzle/gtetrinet/files/gtetrinet-0.7.11-noesd.patch130
-rw-r--r--games-puzzle/gtetrinet/gtetrinet-0.7.11-r1.ebuild63
3 files changed, 202 insertions, 2 deletions
diff --git a/games-puzzle/gtetrinet/ChangeLog b/games-puzzle/gtetrinet/ChangeLog
index 928e2c838c60..a3ace024938d 100644
--- a/games-puzzle/gtetrinet/ChangeLog
+++ b/games-puzzle/gtetrinet/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-puzzle/gtetrinet
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/gtetrinet/ChangeLog,v 1.17 2009/01/29 02:36:31 mr_bones_ Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/gtetrinet/ChangeLog,v 1.18 2011/03/08 01:10:38 mr_bones_ Exp $
+
+*gtetrinet-0.7.11-r1 (08 Mar 2011)
+
+ 08 Mar 2011; Michael Sterrett <mr_bones_@gentoo.org>
+ +gtetrinet-0.7.11-r1.ebuild, +files/gtetrinet-0.7.11-noesd.patch:
+ port from using esd to canberra - patch submitted by David Leverton via
+ bug #357675
29 Jan 2009; Michael Sterrett <mr_bones_@gentoo.org>
gtetrinet-0.7.11.ebuild:
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
diff --git a/games-puzzle/gtetrinet/gtetrinet-0.7.11-r1.ebuild b/games-puzzle/gtetrinet/gtetrinet-0.7.11-r1.ebuild
new file mode 100644
index 000000000000..9b3f9e88db0a
--- /dev/null
+++ b/games-puzzle/gtetrinet/gtetrinet-0.7.11-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/gtetrinet/gtetrinet-0.7.11-r1.ebuild,v 1.1 2011/03/08 01:10:38 mr_bones_ Exp $
+
+EAPI=2
+# games after gnome2 so games' functions will override gnome2's
+inherit autotools gnome2 games
+
+DESCRIPTION="Tetrinet Clone for GNOME 2"
+HOMEPAGE="http://gtetrinet.sourceforge.net/"
+SRC_URI="${SRC_URI}
+ mirror://gentoo/gtetrinet-gentoo-theme-0.1.tbz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="nls ipv6"
+
+RDEPEND="dev-libs/libxml2
+ media-libs/libcanberra
+ >=gnome-base/gconf-2
+ >=gnome-base/libgnome-2
+ >=gnome-base/libgnomeui-2
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-noesd.patch
+ sed -i \
+ -e "/^pkgdatadir =/s:=.*:= ${GAMES_DATADIR}/${PN}:" \
+ src/Makefile.in themes/*/Makefile.in || die
+ sed -i \
+ -e '/^gamesdir/s:=.*:=@bindir@:' \
+ src/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ --bindir="${GAMES_BINDIR}" \
+ || die
+}
+
+src_install() {
+ USE_DESTDIR=1 gnome2_src_install
+ dodoc AUTHORS ChangeLog NEWS README TODO
+ mv "${WORKDIR}"/gentoo "${D}/${GAMES_DATADIR}"/${PN}/themes/
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ gnome2_pkg_preinst
+ games_pkg_preinst
+}
+
+pkg_postinst() {
+ SCROLLKEEPER_UPDATE=0
+ gnome2_pkg_postinst
+ games_pkg_postinst
+}