[phonon-backend-vlc] 0.9.0

Leigh Scott leigh123linux at rpmfusion.org
Sun Jul 17 09:02:43 CEST 2016


commit 1584cd1b5ff9ae9e423f31259bce8bfab6233c24
Author: leigh123linux <leigh123linux at googlemail.com>
Date:   Sun Jul 17 08:02:37 2016 +0100

    0.9.0

 .gitignore                                         |   1 +
 ...-a-prefix-to-avoid-it-preprocessing-on-li.patch | 155 +++++++++++++++++++++
 phonon-backend-vlc-0.7.0-initial_preference.patch  |  12 --
 phonon-backend-vlc-0.9.0-initial_preference.patch  |  12 ++
 phonon-backend-vlc.spec                            |  19 ++-
 sources                                            |   2 +-
 6 files changed, 182 insertions(+), 19 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e88ea93..c0f7793 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 phonon-backend-vlc-0.8.2.tar.xz
+/phonon-backend-vlc-0.9.0.tar.xz
diff --git a/give-libvlc-a-prefix-to-avoid-it-preprocessing-on-li.patch b/give-libvlc-a-prefix-to-avoid-it-preprocessing-on-li.patch
new file mode 100644
index 0000000..d5a75ae
--- /dev/null
+++ b/give-libvlc-a-prefix-to-avoid-it-preprocessing-on-li.patch
@@ -0,0 +1,155 @@
+From 6268ba35692acdb9cfdd062a807f957f499fef2c Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sitter at kde.org>
+Date: Tue, 21 Jun 2016 15:12:28 +0200
+Subject: [PATCH 2/2] give libvlc a prefix, to avoid it preprocessing on
+ libvlc_foo lines
+
+i.e. technically we should always have
+file header > qt include > vlc include > other include > other pvlc include
+but apparently there is a case where this isn't being done so
+utils/libvlc.h is included before the actual vlc headers which means by
+the time the vlc headers are preprocessed the 'libvlc' macro was already
+defined which then caused to it being applied to libvlc_foo_kitten_magic
+which naturally resulted in compilation failure.
+
+BUG: 364582
+---
+ src/backend.cpp       | 6 +++---
+ src/devicemanager.cpp | 8 ++++----
+ src/effectmanager.cpp | 2 +-
+ src/media.cpp         | 2 +-
+ src/mediaplayer.cpp   | 2 +-
+ src/utils/libvlc.h    | 4 ++--
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/src/backend.cpp b/src/backend.cpp
+index b59ad34..a3f6aae 100644
+--- a/src/backend.cpp
++++ b/src/backend.cpp
+@@ -96,7 +96,7 @@ Backend::Backend(QObject *parent, const QVariantList &)
+                         qApp->applicationVersion(),
+                         PHONON_VERSION_STR,
+                         PHONON_VLC_VERSION);
+-            libvlc_set_user_agent(libvlc,
++            libvlc_set_user_agent(pvlc_libvlc,
+                                   qApp->applicationName().toUtf8().constData(),
+                                   userAgent.toUtf8().constData());
+         } else {
+@@ -121,7 +121,7 @@ Backend::Backend(QObject *parent, const QVariantList &)
+                 // If we failed to get a proper icon name, use the appname instead.
+                 icon = qApp->applicationName().toLower();
+             }
+-            libvlc_set_app_id(libvlc,
++            libvlc_set_app_id(pvlc_libvlc,
+                               id.toUtf8().constData(),
+                               version.toUtf8().constData(),
+                               icon.toUtf8().constData());
+@@ -176,7 +176,7 @@ Backend::~Backend()
+ 
+ QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args)
+ {
+-    if (!LibVLC::self || !libvlc)
++    if (!LibVLC::self || !pvlc_libvlc)
+         return 0;
+ 
+     switch (c) {
+diff --git a/src/devicemanager.cpp b/src/devicemanager.cpp
+index 665d075..b3966aa 100644
+--- a/src/devicemanager.cpp
++++ b/src/devicemanager.cpp
+@@ -203,7 +203,7 @@ void DeviceManager::updateDeviceList()
+ {
+     QList<DeviceInfo> newDeviceList;
+ 
+-    if (!LibVLC::self || !libvlc)
++    if (!LibVLC::self || !pvlc_libvlc)
+         return;
+ 
+     QList<QByteArray> audioOutBackends = vlcAudioOutBackends();
+@@ -252,7 +252,7 @@ void DeviceManager::updateDeviceList()
+         bool hasDevices = false;
+         VLC_FOREACH(audio_output_device,
+                     device,
+-                    libvlc_audio_output_device_list_get(libvlc, soundSystem),
++                    libvlc_audio_output_device_list_get(pvlc_libvlc, soundSystem),
+                     libvlc_audio_output_device_list_release) {
+             QString idName = QString::fromUtf8(device->psz_device);
+             QString longName = QString::fromUtf8(device->psz_description);
+@@ -275,11 +275,11 @@ void DeviceManager::updateDeviceList()
+             newDeviceList.append(info);
+         }
+ #else
+-        const int deviceCount = libvlc_audio_output_device_count(libvlc, soundSystem);
++        const int deviceCount = libvlc_audio_output_device_count(pvlc_libvlc, soundSystem);
+ 
+         for (int i = 0; i < deviceCount; i++) {
+             VString idName(libvlc_audio_output_device_id(libvlc, soundSystem, i));
+-            VString longName(libvlc_audio_output_device_longname(libvlc, soundSystem, i));
++            VString longName(libvlc_audio_output_device_longname(pvlc_libvlc, soundSystem, i));
+ 
+             debug() << "found device" << soundSystem << idName << longName;
+ 
+diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp
+index bec3eaa..631af13 100644
+--- a/src/effectmanager.cpp
++++ b/src/effectmanager.cpp
+@@ -46,7 +46,7 @@ EffectInfo::EffectInfo(const QString &name, const QString &description,
+ EffectManager::EffectManager(QObject *parent)
+     : QObject(parent)
+ {
+-    if (!libvlc)
++    if (!pvlc_libvlc)
+         return;
+ 
+     updateEffects();
+diff --git a/src/media.cpp b/src/media.cpp
+index e047893..d27ccf7 100644
+--- a/src/media.cpp
++++ b/src/media.cpp
+@@ -30,7 +30,7 @@ namespace VLC {
+ 
+ Media::Media(const QByteArray &mrl, QObject *parent) :
+     QObject(parent),
+-    m_media(libvlc_media_new_location(libvlc, mrl.constData())),
++    m_media(libvlc_media_new_location(pvlc_libvlc, mrl.constData())),
+     m_mrl(mrl)
+ {
+     Q_ASSERT(m_media);
+diff --git a/src/mediaplayer.cpp b/src/mediaplayer.cpp
+index 691f072..c006310 100644
+--- a/src/mediaplayer.cpp
++++ b/src/mediaplayer.cpp
+@@ -50,7 +50,7 @@ namespace VLC {
+ MediaPlayer::MediaPlayer(QObject *parent)
+     : QObject(parent)
+     , m_media(0)
+-    , m_player(libvlc_media_player_new(libvlc))
++    , m_player(libvlc_media_player_new(pvlc_libvlc))
+     , m_doingPausedPlay(false)
+     , m_volume(75)
+     , m_fadeAmount(1.0f)
+diff --git a/src/utils/libvlc.h b/src/utils/libvlc.h
+index 6dcc96f..a034afd 100644
+--- a/src/utils/libvlc.h
++++ b/src/utils/libvlc.h
+@@ -30,7 +30,7 @@ struct libvlc_instance_t;
+  * Please note that init() must have been called whenever using this, as no
+  * checking of self is conducted (i.e. can be null).
+  */
+-#define libvlc LibVLC::self->vlc()
++#define pvlc_libvlc LibVLC::self->vlc()
+ 
+ /**
+  * Foreach loop macro for VLC descriptions.
+@@ -50,7 +50,7 @@ struct libvlc_instance_t;
+ 
+ // This foreach expects only a type and variable because getter and releaser are generic.
+ // Also the type is in short form i.e. libvlc_foo_t would be foo.
+-#define VLC_FOREACH_LIST(type, variable) VLC_FOREACH(type, variable, libvlc_##type##_list_get(libvlc), libvlc_##type##_list_release)
++#define VLC_FOREACH_LIST(type, variable) VLC_FOREACH(type, variable, libvlc_##type##_list_get(pvlc_libvlc), libvlc_##type##_list_release)
+ 
+ // These foreach expect no type because the type is generic, they do however
+ // expect a getter to allow usage with our wrapper classes and since the getter
+-- 
+2.7.4
+
diff --git a/phonon-backend-vlc-0.9.0-initial_preference.patch b/phonon-backend-vlc-0.9.0-initial_preference.patch
new file mode 100644
index 0000000..90b0589
--- /dev/null
+++ b/phonon-backend-vlc-0.9.0-initial_preference.patch
@@ -0,0 +1,12 @@
+--- a/src/vlc.desktop.cmake
++++ b/src/vlc.desktop.cmake
+@@ -7,7 +7,7 @@
+ X-KDE-PhononBackendInfo-Version=@PHONON_VLC_VERSION@
+ X-KDE-PhononBackendInfo-Website=http://www.videolan.org/
+ Icon=vlc
+-InitialPreference=20
++InitialPreference=10
+ 
+ Name=VLC
+ Name[ast]=VLC
+
diff --git a/phonon-backend-vlc.spec b/phonon-backend-vlc.spec
index 8afb6a2..a92a093 100644
--- a/phonon-backend-vlc.spec
+++ b/phonon-backend-vlc.spec
@@ -1,8 +1,8 @@
 
 name: phonon-backend-vlc
 Summary: VLC phonon backend
-Version: 0.8.2
-Release: 2%{?dist}
+Version: 0.9.0
+Release: 1%{?dist}
 
 License: LGPLv2+
 URL:     http://phonon.kde.org/
@@ -11,12 +11,15 @@ URL:     http://phonon.kde.org/
 # git archive --prefix=phonon-backend-vlc-%{version}/ master | xz > phonon-backend-vlc-%{version}-%{snap}.tar.xz
 Source0: phonon-backend-vlc-%{version}-%{snap}.tar.xz
 %else
-Source0: http://download.kde.org/stable/phonon/phonon-backend-vlc/%{version}/src/phonon-backend-vlc-%{version}.tar.xz
+Source0: http://download.kde.org/stable/phonon/phonon-backend-vlc/%{version}/phonon-backend-vlc-%{version}.tar.xz
 %endif
 
 ## downstream patches
 # reset initial preference below (fedora's default) gstreamer
-Patch1: phonon-backend-vlc-0.7.0-initial_preference.patch
+Patch1: phonon-backend-vlc-0.9.0-initial_preference.patch
+
+## upstream patch
+Patch2: give-libvlc-a-prefix-to-avoid-it-preprocessing-on-li.patch
 
 BuildRequires: automoc4 >= 0.9.86
 BuildRequires: cmake 
@@ -52,10 +55,10 @@ Provides: phonon-qt5-backend%{?_isa} = %{phonon_version}
 
 
 %prep
-%setup -q -n phonon-backend-vlc-%{version}%{?pre:-%{pre}}
+%setup -q -n phonon-vlc-%{version}%{?pre:-%{pre}}
 
 %patch1 -p1 -b .initial_preference
-
+%patch2 -p1 -b .give-libvlc-a-prefix
 
 %build
 mkdir -p %{_target_platform}
@@ -87,6 +90,10 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
 
 
 %changelog
+* Sun Jul 17 2016 Leigh Scott <leigh123linux at googlemail.com> - 0.9.0-1
+- 0.9.0
+- patch to fix compile with vlc-3
+
 * Sat Nov 14 2015 Nicolas Chauvet <kwizart at gmail.com> - 0.8.2-2
 - https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
diff --git a/sources b/sources
index a25ff83..d973b4a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3937517ce4929dea4398ad9834507f97  phonon-backend-vlc-0.8.2.tar.xz
+66615ae8df37408f47f369e64d836746  phonon-backend-vlc-0.9.0.tar.xz


More information about the rpmfusion-commits mailing list