From 3aa553132b79202a036fe1af980d23f73730a2ed Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 5 Feb 2016 11:46:12 +0100 Subject: deps/qt5: apply a patch to build the ALSA plugin successfully. Luigi Trovato (lonestar) alerted me to this patch found in the FreeBSD repository. It fixes the detection of ALSA in Slackware and results in a Qt5 package which simultaneously supports ALSA and PulseAudio. --- deps/qt5/patches/qt5.alsa.patch | 104 ++++++++++++++++++++++++++++++++++++++++ deps/qt5/qt5.SlackBuild | 8 +++- 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 deps/qt5/patches/qt5.alsa.patch (limited to 'deps/qt5') diff --git a/deps/qt5/patches/qt5.alsa.patch b/deps/qt5/patches/qt5.alsa.patch new file mode 100644 index 0000000..528bc8b --- /dev/null +++ b/deps/qt5/patches/qt5.alsa.patch @@ -0,0 +1,104 @@ +http://svnweb.freebsd.org/ports/head/multimedia/qt5-multimedia/files/patch-git_3b322323?view=log#rev402657 + +commit 3b322323d036ae2fc9f685bfc74d1ebcd5532159 +Author: Raphael Kubo da Costa +Date: Fri Nov 27 14:36:50 2015 +0100 + + alsa: Relax ALSA version checks for 1.1.x to be detected. + + Relax the check for SND_LIB_MINOR and SND_LIB_SUBMINOR so that ALSA + 1.1.x is not considered older than 1.0.10. QtMultimedia builds fine with + ALSA 1.1. + + Change-Id: If697c34cc7d9bbe2f2a3413d0c25ac4de4e93b34 + Reviewed-by: Christian Stromme + +--- config.tests/alsa/alsatest.cpp ++++ config.tests/alsa/alsatest.cpp +@@ -32,7 +32,7 @@ + ****************************************************************************/ + + #include +-#if (!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10)) ++#if (!(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 10))) + #error "Alsa version found too old, require >= 1.0.10" + #endif + +--- src/plugins/alsa/qalsaaudiodeviceinfo.cpp ++++ src/plugins/alsa/qalsaaudiodeviceinfo.cpp +@@ -141,7 +141,7 @@ bool QAlsaAudioDeviceInfo::open() + QList devices = availableDevices(mode); + + if(dev.compare(QLatin1String("default")) == 0) { +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + if (devices.size() > 0) + dev = QLatin1String(devices.first().constData()); + else +@@ -150,7 +150,7 @@ bool QAlsaAudioDeviceInfo::open() + dev = QLatin1String("hw:0,0"); + #endif + } else { +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + dev = device; + #else + int idx = 0; +@@ -194,7 +194,7 @@ bool QAlsaAudioDeviceInfo::testSettings(const QAudioFormat& format) const + snd_pcm_hw_params_t *params; + QString dev; + +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + dev = device; + if (dev.compare(QLatin1String("default")) == 0) { + QList devices = availableDevices(QAudio::AudioOutput); +@@ -335,7 +335,7 @@ QList QAlsaAudioDeviceInfo::availableDevices(QAudio::Mode mode) + QList devices; + QByteArray filter; + +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + // Create a list of all current audio devices that support mode + void **hints, **n; + char *name, *descr, *io; +--- src/plugins/alsa/qalsaaudioinput.cpp ++++ src/plugins/alsa/qalsaaudioinput.cpp +@@ -303,7 +303,7 @@ bool QAlsaAudioInput::open() + QString dev = QString(QLatin1String(m_device.constData())); + QList devices = QAlsaAudioDeviceInfo::availableDevices(QAudio::AudioInput); + if(dev.compare(QLatin1String("default")) == 0) { +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + if (devices.size() > 0) + dev = QLatin1String(devices.first()); + else +@@ -312,7 +312,7 @@ bool QAlsaAudioInput::open() + dev = QLatin1String("hw:0,0"); + #endif + } else { +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + dev = QLatin1String(m_device); + #else + int idx = 0; +--- src/plugins/alsa/qalsaaudiooutput.cpp ++++ src/plugins/alsa/qalsaaudiooutput.cpp +@@ -306,7 +306,7 @@ bool QAlsaAudioOutput::open() + QString dev = QString(QLatin1String(m_device.constData())); + QList devices = QAlsaAudioDeviceInfo::availableDevices(QAudio::AudioOutput); + if(dev.compare(QLatin1String("default")) == 0) { +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + if (devices.size() > 0) + dev = QLatin1String(devices.first()); + else +@@ -315,7 +315,7 @@ bool QAlsaAudioOutput::open() + dev = QLatin1String("hw:0,0"); + #endif + } else { +-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) ++#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) + dev = QLatin1String(m_device); + #else + int idx = 0; diff --git a/deps/qt5/qt5.SlackBuild b/deps/qt5/qt5.SlackBuild index ef123fc..6d01810 100755 --- a/deps/qt5/qt5.SlackBuild +++ b/deps/qt5/qt5.SlackBuild @@ -44,10 +44,11 @@ # Modifications for qt 5.3.1 2014 by Eric Hameleers, Eindhoven, NL # Modifications for qt 5.4.0 2015 by Eric Hameleers, Eindhoven, NL # Modifications for qt 5.4.1 2015 by Eric Hameleers, Eindhoven, NL +# Modifications for qt 5.5.1 2015,2016 by Eric Hameleers, Eindhoven, NL PKGNAM=qt5 VERSION=${VERSION:-5.5.1} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} NUMJOBS=${NUMJOBS:--j7} @@ -129,6 +130,11 @@ fi # Fix path to mysql header: cat $CWD/patches/qt5.mysql.h.diff | patch -p1 --verbose || exit 1 +# Properly detect ALSA version 1.1.0 as being newer than 1.0.10: +cd qtmultimedia + cat $CWD/patches/qt5.alsa.patch | patch -p0 --verbose || exit 1 +cd - + if ! pkg-config --exists libpulse 2>/dev/null ; then # Forcibly disable pulseaudio in qtwebengine: cat $CWD/patches/qt5.pulseaudio.diff | patch -p1 --verbose || exit 1 -- cgit v1.2.3