From 475076c204d5ec6349e457faf3ca0667bb7e3ec3 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Wed, 11 Jul 2012 18:26:16 +0000 Subject: [PATCH] Switch to pkgconfig(libudev) --- vlc-2.0.2-xcb_discard.patch | 15 +++++++++++++++ vlc.spec | 23 ++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 vlc-2.0.2-xcb_discard.patch diff --git a/vlc-2.0.2-xcb_discard.patch b/vlc-2.0.2-xcb_discard.patch new file mode 100644 index 0000000..aca164f --- /dev/null +++ b/vlc-2.0.2-xcb_discard.patch @@ -0,0 +1,15 @@ +diff -up vlc-2.0.2/modules/access/screen/xcb.c.discard vlc-2.0.2/modules/access/screen/xcb.c +--- vlc-2.0.2/modules/access/screen/xcb.c.discard 2011-12-08 19:00:26.000000000 +0100 ++++ vlc-2.0.2/modules/access/screen/xcb.c 2012-07-11 15:07:43.092366202 +0200 +@@ -319,7 +319,11 @@ static void Demux (void *data) + msg_Err (demux, "bad X11 drawable 0x%08"PRIx32, sys->window); + discard: + if (sys->follow_mouse) ++#if 0 + xcb_discard_reply (conn, gc.sequence); ++#else ++ msg_Warn (demux, "xcb_discard_reply not available in libxcb < 1.6") ; ++#endif + return; + } + diff --git a/vlc.spec b/vlc.spec index 1f3f0ae..3adf734 100644 --- a/vlc.spec +++ b/vlc.spec @@ -15,6 +15,7 @@ %global _with_xvidcore --with-xvidcore %global _with_live555 --with-live555 %global _with_vaapi --with-vaapi +%global _with_xcb 1 %endif %if 0%{?fedora} %global _with_fluidsyth 1 @@ -28,11 +29,12 @@ Summary: The cross-platform open-source multimedia framework, player and server Name: vlc Version: 2.0.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.videolan.org Source0: http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{?vlc_rc}.tar.xz +Patch0: vlc-2.0.2-xcb_discard.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -96,7 +98,7 @@ BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel -BuildRequires: libudev-devel >= 142 +BuildRequires: pkgconfig(libudev) BuildRequires: libupnp-devel BuildRequires: libv4l-devel %{?_with_vaapi:BuildRequires: libva-devel} @@ -140,7 +142,10 @@ BuildRequires: libXxf86vm-devel BuildRequires: libX11-devel BuildRequires: libXext-devel BuildRequires: libXpm-devel -BuildRequires: xcb-util-devel +%{?_with_xcb: +BuildRequires: libxcb-devel +BuildRequires: xcb-util-devel +} BuildRequires: xorg-x11-proto-devel @@ -210,6 +215,14 @@ JACK audio plugin for the VLC media player. %prep %setup -q -n %{name}-%{version}%{?vlc_rc} +%if 0%{?rhel} +%patch0 -p1 -b .xcb_discard +%{?_with_xcb: +sed -i -e "s|xcb >= 1.6|xcb >= 1.5|" configure configure.ac +touch -r config.h.in configure configure.ac +} +%endif + %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : ./bootstrap @@ -495,6 +508,10 @@ fi || : %changelog +* Wed Jul 11 2012 Nicolas Chauvet - 2.0.2-3 +- Fix build of xcb +- Switch to pkgconfig(libudev) + * Wed Jul 04 2012 Nicolas Chauvet - 2.0.2-2 - Rework BR and RPM conditionals - Drop support for anything below EL-6 and current Fedora.