From deef3c3dbf6bc3409109b4b4ac3d6d8b64f08571 Mon Sep 17 00:00:00 2001 From: Bruno Wolff III Date: Jun 11 2016 15:16:00 +0000 Subject: Switch to Gstreamermm 1.0 API --- diff --git a/0001-Migrate-to-Gstreamermm-1.0-API.patch b/0001-Migrate-to-Gstreamermm-1.0-API.patch new file mode 100644 index 0000000..c033664 --- /dev/null +++ b/0001-Migrate-to-Gstreamermm-1.0-API.patch @@ -0,0 +1,60 @@ +From 77561b1a3f1f8ef20c162b0b7880694f101a4acc Mon Sep 17 00:00:00 2001 +From: Haikel Guemar +Date: Fri, 10 Jun 2016 14:22:24 +0200 +Subject: [PATCH 1/1] Migrate to Gstreamermm 1.0 API + +--- + configure.ac | 2 +- + src/snd.cpp | 9 +++++---- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a713e0a..fa2c4d2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -95,7 +95,7 @@ AC_ARG_ENABLE(sound, [ --enable-sound Enable or disable sound usage (de + use_sound="$enableval", use_sound="yes") + + if test $use_sound = yes; then +-PKG_CHECK_MODULES(GSTREAMER, gstreamermm-0.10) ++PKG_CHECK_MODULES(GSTREAMER, gstreamermm-1.0) + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) + AC_DEFINE([LW_SOUND], 1, [enables sound]) +diff --git a/src/snd.cpp b/src/snd.cpp +index 63279cd..aea6497 100644 +--- a/src/snd.cpp ++++ b/src/snd.cpp +@@ -32,6 +32,7 @@ + + #ifdef LW_SOUND + #include ++#include + #endif + + //#define debug(x) {std::cerr<<__FILE__<<": "<<__LINE__<<": "< back; +- Glib::RefPtr effect; ++ Glib::RefPtr back; ++ Glib::RefPtr effect; + #endif + int placeholder; + }; +@@ -83,8 +84,8 @@ Snd::Snd() + helper.close(); + + #ifdef LW_SOUND +- impl->back = Gst::PlayBin2::create(); +- impl->effect = Gst::PlayBin2::create(); ++ impl->back = Gst::PlayBin::create(); ++ impl->effect = Gst::PlayBin::create(); + impl->effect->get_bus()->add_watch(sigc::bind(sigc::hide<0>(sigc::mem_fun(*this, &Snd::on_bus_message)), 0)); + impl->back->get_bus()->add_watch(sigc::bind(sigc::hide<0>(sigc::mem_fun(*this, &Snd::on_bus_message)), 1)); + #endif +-- +2.7.4 + diff --git a/lordsawar.spec b/lordsawar.spec index ff9d083..6513dd5 100644 --- a/lordsawar.spec +++ b/lordsawar.spec @@ -1,6 +1,6 @@ Name: lordsawar Version: 0.3.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Turn-based strategy game in a fantasy setting # This is used for prereleases and such @@ -16,11 +16,12 @@ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{rel_ # Except we don't have a copy of the movie demo that doesn't come with # the source. Patch1: lordsawar-local-manual.patch +Patch2: 0001-Migrate-to-Gstreamermm-1.0-API.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtkmm30-devel gettext desktop-file-utils gstreamermm-devel BuildRequires: libarchive-devel intltool libxslt-devel docbook-utils -BuildRequires: libxml++-devel +BuildRequires: libxml++-devel libtool %description LordsAWar! is a turn-based strategy game set in a fantasy setting. @@ -29,6 +30,7 @@ LordsAWar! is a turn-based strategy game set in a fantasy setting. %prep %setup -qn %{name}-%{rel_version} %patch1 +%patch2 -p1 sed -i.orig -e "s/Comment=Play a clone of Warlords II/Comment=Play a turn-based strategy game/" dat/lordsawar.desktop.in.in @@ -85,6 +87,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_mandir}/man6/lordsawar.6* %changelog +* Fri Jun 10 2016 Haïkel Guémar - 0.3.0-4 +- Migrate to Gstreamermm 1.0 API + * Wed Jun 08 2016 Bruno Wolff III - 0.3.0-3 - Rebuild for gstreamermm soname bump - Manually pull libxml++ in for the build