From: poma <pomma(a)gmail.com>
Subject: [PATCH] VLC: Qt4 UI support selectable if both Qt4 and Qt5 are installed
---
...ectable-if-both-Qt4-and-Qt5-are-installed.patch | 83 ++++++++++++++++++++++
sources | 2 +-
vlc.spec | 8 ++-
3 files changed, 91 insertions(+), 2 deletions(-)
create mode 100644 Qt4-UI-support-selectable-if-both-Qt4-and-Qt5-are-installed.patch
diff --git a/Qt4-UI-support-selectable-if-both-Qt4-and-Qt5-are-installed.patch
b/Qt4-UI-support-selectable-if-both-Qt4-and-Qt5-are-installed.patch
new file mode 100644
index 0000000..26b56c2
--- /dev/null
+++ b/Qt4-UI-support-selectable-if-both-Qt4-and-Qt5-are-installed.patch
@@ -0,0 +1,83 @@
+From: poma <poma(a)gmail.com>
+Subject: [PATCH] Qt4 UI support selectable if both Qt4 and Qt5 are installed
+
+Based on qt4-select.patch von Karol Herbst with additional help strings.
+
+./configure [...] --enable-qt=4
+
+Ref.
+https://trac.videolan.org/vlc/ticket/11772#comment:8
+https://bugs.gentoo.org/show_bug.cgi?id=541678#c19
+https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/vlc/files/qt4-select.patch
+https://gitweb.gentoo.org/repo/gentoo.git/plain/media-video/vlc/files/qt4-select.patch
+https://github.com/funtoo/funtoo-media/blob/master/media-video/vlc/files/qt4-select.patch
+https://raw.githubusercontent.com/funtoo/funtoo-media/master/media-video/vlc/files/qt4-select.patch
+
+---
+ configure.ac | 36 +++++++++++++++++++++---------------
+ 1 file changed, 21 insertions(+), 15 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bb5d1dd..a039af1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3729,14 +3729,17 @@ EXTEND_HELP_STRING([Interface plugins:])
+ dnl
+ dnl QT
+ dnl
+-AC_ARG_ENABLE(qt, [
+- AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)])],, [
++AC_ARG_ENABLE(qt,
++ [AS_HELP_STRING([--disable-qt], [Qt UI support (default enabled)])
++ [--enable-qt=4] [Qt4 UI support (default auto)]
++ [--enable-qt=5] [Qt5 UI support (default auto)]],, [
+ AS_IF([test "${SYS}" = "darwin"], [
+ enable_qt="no"
+ ])
+ ])
+ AS_IF([test "${enable_qt}" != "no"], [
+- PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
++ AS_IF([test "${enable_qt}" != "4"], [
++ PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
+ PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
+ VLC_ADD_LIBS([qt4],[${QTX11_LIBS}])
+ VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11])
+@@ -3763,20 +3766,23 @@ AS_IF([test "${enable_qt}" != "no"], [
+ AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}"
"${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+ AC_PATH_PROGS(RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}"
"${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+ AC_PATH_PROGS(UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}"
"${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
+- ], [
+- PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
+- AS_IF([test -n "${enable_qt}"],[
+- AC_MSG_ERROR([${QT_PKG_ERRORS}.])
+- ],[
+- AC_MSG_WARN([${QT_PKG_ERRORS}.])
+- ])
+- enable_qt="no"
++ enable_qt="5"
++ ])
++ ])
++ AS_IF([test "${enable_qt}" != "5"], [
++ PKG_CHECK_MODULES([QT], [QtCore QtGui >= 4.6.0],, [
++ AS_IF([test -n "${enable_qt}"],[
++ AC_MSG_ERROR([${QT_PKG_ERRORS}.])
++ ],[
++ AC_MSG_WARN([${QT_PKG_ERRORS}.])
+ ])
+- QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
+- AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin"
"${CONTRIB_DIR}/bin"])
+- AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
+- AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin"
"${CONTRIB_DIR}/bin"])
++ enable_qt="no"
+ ])
++ QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix QtCore)"
++ AC_PATH_PROGS(MOC, [moc-qt4 moc], moc, ["${QT_PATH}/bin"
"${CONTRIB_DIR}/bin"])
++ AC_PATH_PROG(RCC, rcc, rcc, [${QT_PATH}/bin ${CONTRIB_DIR}/bin])
++ AC_PATH_PROGS(UIC, [uic-qt4 uic], uic, ["${QT_PATH}/bin"
"${CONTRIB_DIR}/bin"])
++ ])
+ ])
+ AS_IF([test "${enable_qt}" != "no"], [
+ VLC_ADD_PLUGIN([qt4])
+--
+2.4.11
+
diff --git a/sources b/sources
index 02c6944..d6a8916 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f98d60f0f59ef72b6e3407f2ff09bda6 vlc-2.2.2.tar.xz
+ecbc65be549e5cc83e4cbe0129e66dcd vlc-2.2.3.tar.xz
diff --git a/vlc.spec b/vlc.spec
index 7abaa65..6294127 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -32,11 +32,12 @@
Summary: The cross-platform open-source multimedia framework, player and server
Name: vlc
Version: 2.2.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL:
http://www.videolan.org
Source0:
http://download.videolan.org/pub/videolan/vlc/%{version}/vlc-%{version}%{...
+Patch0: Qt4-UI-support-selectable-if-both-Qt4-and-Qt5-are-installed.patch
BuildRequires: desktop-file-utils
@@ -219,6 +220,7 @@ JACK audio plugin for the VLC media player.
%prep
%setup -q -n %{name}-%{version}%{?vlc_rc}
+%patch0 -p1
%{?_with_bootstrap:
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :
./bootstrap
@@ -230,6 +232,7 @@ rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :
%configure \
+ --enable-qt=4 \
--disable-dependency-tracking \
--disable-optimizations \
%if 0%{?fedora} >= 22
@@ -484,6 +487,9 @@ fi || :
%changelog
+* Fri May 06 2016 poma <poma(a)gmail.com> - 2.2.3-2
+- Qt4 UI support selectable if both Qt4 and Qt5 are installed
+
* Wed May 04 2016 Nicolas Chauvet <kwizart(a)gmail.com> - 2.2.3-1
- Update to 2.2.3
--
2.4.11