From 01d4b602ce624d96a0d9574e8e5f6fba53f2d9d9 Mon Sep 17 00:00:00 2001 From: Francois Andriot Date: Sat, 5 May 2012 11:11:35 +0200 Subject: RHEL/Fedora: more application fixes ... --- .../kmplayer-3.5.13-fix_gcc47_compilation.patch | 45 ++++++++++++++++++++++ .../kmplayer/kmplayer-3.5.13-ftbfs.patch | 2 +- redhat/applications/kmplayer/trinity-kmplayer.spec | 22 +++++++---- 3 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 redhat/applications/kmplayer/kmplayer-3.5.13-fix_gcc47_compilation.patch (limited to 'redhat/applications/kmplayer') diff --git a/redhat/applications/kmplayer/kmplayer-3.5.13-fix_gcc47_compilation.patch b/redhat/applications/kmplayer/kmplayer-3.5.13-fix_gcc47_compilation.patch new file mode 100644 index 000000000..02962e256 --- /dev/null +++ b/redhat/applications/kmplayer/kmplayer-3.5.13-fix_gcc47_compilation.patch @@ -0,0 +1,45 @@ +commit 5106117b5c1439d3fee08395c1a025f62d30a53e +Author: Darrell Anderson +Date: 1335631986 -0500 + + GCC 4.7 fixes. + +diff --git a/src/gstplayer.cpp b/src/gstplayer.cpp +index ebf7b0d..c4bf580 100644 +--- a/src/gstplayer.cpp ++++ b/src/gstplayer.cpp +@@ -1003,11 +1003,16 @@ int main(int argc, char **argv) { + gstapp->exec (); + + XLockDisplay(display); +- XClientMessageEvent ev = { +- ClientMessage, 0, true, display, wid, +- XInternAtom (display, "XVIDEO", false), 8, {b: "quit_now"} +- }; +- XSendEvent (display, wid, false, StructureNotifyMask, (XEvent *) & ev); ++ XEvent ev; ++ ev.xclient.type = ClientMessage; ++ ev.xclient.serial = 0; ++ ev.xclient.send_event = true; ++ ev.xclient.display = display; ++ ev.xclient.window = wid; ++ ev.xclient.message_type = XInternAtom (display, "XVIDEO", false); ++ ev.xclient.format = 8; ++ strcpy(ev.xclient.data.b, "quit_now"); ++ XSendEvent (display, wid, false, StructureNotifyMask, &ev); + XFlush (display); + XUnlockDisplay(display); + eventThread->wait (500); +diff --git a/src/kmplayerapp.cpp b/src/kmplayerapp.cpp +index 27b26cd..bdeac91 100644 +--- a/src/kmplayerapp.cpp ++++ b/src/kmplayerapp.cpp +@@ -17,6 +17,8 @@ + + #undef Always + ++#include ++ + // include files for QT + #include + #include diff --git a/redhat/applications/kmplayer/kmplayer-3.5.13-ftbfs.patch b/redhat/applications/kmplayer/kmplayer-3.5.13-ftbfs.patch index 6b606e32b..f3a5d51da 100644 --- a/redhat/applications/kmplayer/kmplayer-3.5.13-ftbfs.patch +++ b/redhat/applications/kmplayer/kmplayer-3.5.13-ftbfs.patch @@ -4,7 +4,7 @@ kgstplayer_SOURCES= gstplayer.cpp knpplayer_LDADD= $(LIBNSPR_LIBS) -+knpplayer_LDFLAGS= -lX11 ++knpplayer_LDFLAGS= -lX11 -lgmodule-2.0 knpplayer_SOURCES= npplayer.c xdg_apps_DATA = kmplayer.desktop diff --git a/redhat/applications/kmplayer/trinity-kmplayer.spec b/redhat/applications/kmplayer/trinity-kmplayer.spec index 9b938fc7e..933e47ee2 100644 --- a/redhat/applications/kmplayer/trinity-kmplayer.spec +++ b/redhat/applications/kmplayer/trinity-kmplayer.spec @@ -1,7 +1,7 @@ # Default version for this component %define kdecomp kmplayer %define version 0.10.0c -%define release 1 +%define release 2 # If TDE is built in a specific prefix (e.g. /opt/trinity), the release will be suffixed with ".opt". %if "%{?_prefix}" != "/usr" @@ -34,6 +34,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source0: %{kdecomp}-3.5.13.tar.gz Patch0: kmplayer-3.5.13-ftbfs.patch +# [kmplayer] Fix compilation with GCC 4.7 [Commit #5106117b] +Patch1: kmplayer-3.5.13-fix_gcc47_compilation.patch + BuildRequires: tqtinterface-devel BuildRequires: trinity-kdelibs-devel BuildRequires: trinity-kdebase-devel @@ -96,18 +99,20 @@ Documention for KMPlayer, a basic audio/video viewer application for KDE. unset QTDIR; . /etc/profile.d/qt.sh %setup -q -n applications/%{kdecomp} %patch0 -p1 +%patch1 -p1 # Ugly hack to modify TQT include directory inside autoconf files. # If TQT detection fails, it fallbacks to TQT4 instead of TQT3 ! -%__sed -i "admin/acinclude.m4.in" \ - -e "s,/usr/include/tqt,%{_includedir}/tqt,g" \ - -e "s,kde_htmldir='.*',kde_htmldir='%{tde_docdir}/HTML',g" +%__sed -i admin/acinclude.m4.in \ + -e "s|/usr/include/tqt|%{_includedir}/tqt|g" \ + -e "s|kde_htmldir='.*'|kde_htmldir='%{tde_docdir}/HTML'|g" -%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in" -%__cp -f "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh" +%__cp "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in" +%__cp "/usr/share/libtool/config/ltmain.sh" "admin/ltmain.sh" || %__cp "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh" %__make -f "admin/Makefile.common" + %build export PATH="%{_bindir}:${PATH}" export LDFLAGS="-L%{_libdir} -I%{_includedir}" @@ -150,7 +155,7 @@ gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : %files -f %{kdecomp}.lang %defattr(-,root,root,-) -%doc README TODO +%doc AUTHORS COPYING ChangeLog INSTALL README TODO kmplayer.lsm %{_bindir}/kmplayer %{_bindir}/knpplayer %{_bindir}/kxvplayer @@ -193,6 +198,9 @@ gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : %Changelog +* Wed May 02 2012 Francois Andriot - 0.10.0c-2 +- Fix compilation with GCC 4.7 [Commit #5106117b] + * Sat Dec 03 2011 Francois Andriot - 0.10.0c-1 - Initial build for RHEL 5, RHEL 6, Fedora 15, Fedora 16 -- cgit v1.2.1