From 8be70107efbb417f839292165ee39d07a062046f Mon Sep 17 00:00:00 2001
From: V3n3RiX <venerix@redcorelinux.org>
Date: Sat, 13 Jan 2018 06:19:51 +0000
Subject: gentoo resync : 13.01.2018

---
 media-libs/Manifest.gz                             | Bin 66641 -> 66641 bytes
 media-libs/libffado/Manifest                       |   7 +
 .../libffado-2.4.0-additional-py3-fixes.patch      |  96 ++++++++++
 .../files/libffado-2.4.0-crossbar-router-fix.patch |  11 ++
 .../files/libffado-2.4.0-py3-pyqt5-fixes.patch     | 197 +++++++++++++++++++++
 .../libffado-2.4.0-pyqt5-dbus-detection.patch      |  30 ++++
 .../files/libffado-2.4.0-rme-bigendian-fix.patch   |  50 ++++++
 media-libs/libffado/libffado-2.4.0.ebuild          | 119 +++++++++++++
 media-libs/libxspf/Manifest                        |   6 +-
 media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch |   8 +-
 media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch |   4 +-
 media-libs/libxspf/libxspf-1.2.0.ebuild            |  42 ++---
 media-libs/osl/Manifest                            |   2 +-
 media-libs/osl/osl-1.8.12.ebuild                   |   2 +-
 14 files changed, 543 insertions(+), 31 deletions(-)
 create mode 100644 media-libs/libffado/files/libffado-2.4.0-additional-py3-fixes.patch
 create mode 100644 media-libs/libffado/files/libffado-2.4.0-crossbar-router-fix.patch
 create mode 100644 media-libs/libffado/files/libffado-2.4.0-py3-pyqt5-fixes.patch
 create mode 100644 media-libs/libffado/files/libffado-2.4.0-pyqt5-dbus-detection.patch
 create mode 100644 media-libs/libffado/files/libffado-2.4.0-rme-bigendian-fix.patch
 create mode 100644 media-libs/libffado/libffado-2.4.0.ebuild

(limited to 'media-libs')

diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz
index 5eb47a1dff8d..3b12d86be482 100644
Binary files a/media-libs/Manifest.gz and b/media-libs/Manifest.gz differ
diff --git a/media-libs/libffado/Manifest b/media-libs/libffado/Manifest
index c5ae46cc0ea3..bf853fb272e6 100644
--- a/media-libs/libffado/Manifest
+++ b/media-libs/libffado/Manifest
@@ -1,6 +1,13 @@
 AUX libffado-2.3.0-gcc6.patch 1311 BLAKE2B 76148cf44af3130199e8709aae5f7a276a4ed93acfb06735219bc3e4b1bc0d1d37cff57cd20f216e50ec8c1109e33439ecec666a3272809e940b54d61342d027 SHA512 a700c46af0313511bba311fe95634dc0090507256a9ff60a30d10b221fe267d1190af4710b1c4747f8bfa057b0af96e6bab78f6ec4ecef08fb48425092751cd7
 AUX libffado-2.3.0-include-signal.patch 1246 BLAKE2B ac37bf4da0600c0ee518ace257b0de2aaad5a815e3cbedf51490c06ad90acdd893ee2fc40b4b318411c59515654db5276f40e5b0fbe877b5d2985a9e56b0c42e SHA512 c256a59a77160141e082fa6cf358ae0454779e15c01a9ceaf1df8ecd101afc74246654f9c088a67c5453434430bdd390ab2712c617737b2a93fa54edcf685177
 AUX libffado-2.3.0-modelname-strip.patch 2128 BLAKE2B 29c52d8d30136e0a040fe1801a15f4149affbb7de721f8614416a407952714426036f77c2b6451d7bf1f69adbe003258098d2dceda52a7f8d9da0604cdf78a26 SHA512 1ebbe47bdd4d15d6527c4a8c2dfa02861c8a8ce287e1cd44e80356b52007c6e55bc9f267436467f1600c0efbd261da227b947b3648c6a8efcedf8997356153ac
+AUX libffado-2.4.0-additional-py3-fixes.patch 3657 BLAKE2B 8bb214f90fac168c682119d8758efd67812da784770684e7ff47c1d64146da79346d61dfe5b17c0d5e23700f04605d073147a1dd335f0a1da72faf68418a5cd7 SHA512 feb6cd85ee487182b56f003ddee1fc7a1aa3aa07d6d1f3ccbd2ab3735e5d756e836062789a71248d6a16f7377d9d76645c0a17ab76a8d9178b1154cd67783be8
+AUX libffado-2.4.0-crossbar-router-fix.patch 496 BLAKE2B 7a2b88344c319eb5c1da7a4430600843e57eccc6b96d833b7dfc17ca8f63fb22ff50d959ad06c4c8d06036a96412064ce5630f4a26b53fa0b5eb2e392d8ada66 SHA512 5f31f7db57cf54c05dc00bb00f5f0a5e1771dfd2cd716d9bc56788c24313d14d26fb0ffc7865acb5b55504592929a6b271f657e25971eee37c4aa0a7cc03c382
+AUX libffado-2.4.0-py3-pyqt5-fixes.patch 9119 BLAKE2B e1b4ead17535e573bfced949652fec2418b0236b4ab3146f45f6931b0d80f5c1af86f17247e931baf07d9efd3c3726e0d9a0cc42783fd9053464073bdc233577 SHA512 26f34e318040e3fb9066424538d4ad7dd41e49e93c5f89161cd460bce862d3e2a25e0a2ffb6c28beb1f91fdd00a146f7d33930242e52e5148a7d1a0fb0e1ff28
+AUX libffado-2.4.0-pyqt5-dbus-detection.patch 1503 BLAKE2B 448eb997454a72f9d55722462dbe696d293b271002acf205c73e5fb59690ab7ae622830e09ab05def50d73d3fa1bc62076ead695a7d79335b75a00d3a4f1ce73 SHA512 29a44a73786256e8aec380e4e68df9f6de3ceb1d7bf1d4f1565585418ab4167ac2d16b85958cc1acfa60906b384445bd82866d05d3c3f3bdc517ae424d83e559
+AUX libffado-2.4.0-rme-bigendian-fix.patch 1618 BLAKE2B db8969797d9f8bdf4aac9a1e8474ad7d84428ede18788746b885ed037dcc71798a348bc86335dd72083a3937ad00170f6bbe412666f3109395642186b0fb4e2c SHA512 0ecb20c21858df87f53c0033109a4b736e1a38dc8a2b0ed00660cd3b80f74ce7b4cb87438ac5a37e11f0d4650166b3519e163f442d27a7822a24f4485626d776
 DIST libffado-2.3.0.tgz 1239253 BLAKE2B cb470a590df8018975f40f56cde50468a2b51c9504b719b70ce5941406829f25452a96b8ac897aba1ed6c8d4cafa712e7872430e7bb2ebec0822f7b4720084c5 SHA512 24a8853281a17b04623e41dc590f7a9b8f4aebe4dfaece2e3b8fe28457a6ff011586e817712b4913d1fca660b701dddc70576c12d8c56470cf991eb17b4297c4
+DIST libffado-2.4.0.tgz 1228916 BLAKE2B 21a3a2a96377f698e7c1a43912c761624aabe5401f0e147fee4fa203c4534166494de8867320b4b6bc3ff200b65c77bb62ab2c4e98948ed0ee74e6171d162deb SHA512 7df37584925cc908cc284dba344609928d39e006f71ae4ede62e4531b2628271ebd0db00407418e943fb569b5b8b919a76c90aaeed03005cefbd3c1c16ee1627
 EBUILD libffado-2.3.0.ebuild 2684 BLAKE2B 223f4ecd0acedf93aa83a1f0a47fa3f23a731313cca1ea5663b1c4fee515a594df0d04dad429e16c2240e60249b5a0aa151890e57d550462f050bd0ee0c028c6 SHA512 68469a77cf5bba5cc880c35b1d07d0bcb36f41901eebe92e8e127b4cbcd08671d393e29723743d568b5122e878b7f097e512eca6b3a05971fbd0b7b06b9617d4
+EBUILD libffado-2.4.0.ebuild 3194 BLAKE2B 57fc39ce908391aa991a5dc87d90cc9d709320c65c32eec065fb236a8cc3b5cf6b713b3e97bba0d4de1f96bf9dffb7922b8b8b33d6c31fe3608cba9a00a0b82f SHA512 54574ea4a2baa8a18d4dff29972c96cf94401af1e76afb52271358a0d353e51e4aa589bf590534eaf289998c72e3ee36983a55b77cb3b9969fe480a570c290f3
 MISC metadata.xml 625 BLAKE2B ba2bee4e1ba0c8bc9e8a4bda63c8a184fa4992683ec24bec54424049fbc1b66a8332f25eb6c7841df0198a3a973408fbfe82f0ee306d49f1809d82c12ec3b0c0 SHA512 ac725c6eabcc3cd7fa5ac9f20d936e5a1c494d2a2ed6e504bf27cc750cd328600a8dbcd0adeb27d2bd760ce2b577f9860b1041a899fbfde6b67c4b6a681658eb
diff --git a/media-libs/libffado/files/libffado-2.4.0-additional-py3-fixes.patch b/media-libs/libffado/files/libffado-2.4.0-additional-py3-fixes.patch
new file mode 100644
index 000000000000..fd5d2f44babd
--- /dev/null
+++ b/media-libs/libffado/files/libffado-2.4.0-additional-py3-fixes.patch
@@ -0,0 +1,96 @@
+--- a/support/mixer-qt4/ffado/panelmanager.py	2018-01-11 12:27:20.518923209 +0900
++++ a/support/mixer-qt4/ffado/panelmanager.py	2018-01-11 12:31:03.956299962 +0900
+@@ -38,6 +38,7 @@
+ 
+ import sys
+ import time
++import importlib
+ 
+ import logging
+ log = logging.getLogger('panelmanager')
+@@ -302,20 +303,15 @@
+         #
+         # Specific (or dummy) mixer widgets get loaded in the following
+         #
++        found = False
+         if 'mixer' in dev and dev['mixer'] != None:
+             mixerapp = dev['mixer']
+-            global mixerwidget
+-            exec( """
+-try:
+-    import ffado.mixer.%s
+-    globals()["mixerwidget"] = ffado.mixer.%s.%s( w )
+-    found = True
+-except ImportError:
+-    log.debug("bypassdbus set, %s module not available: ignored")
+-    found = False
+-""" % (mixerapp.lower(), mixerapp.lower(), mixerapp, mixerapp.lower()) )
+-        else:
+-            found = False
++            try:
++                mixer_module = importlib.import_module("ffado.mixer.%s" % mixerapp.lower())
++                mixerwidget = getattr(mixer_module, mixerapp)(w)
++                found = True
++            except ImportError:
++                log.debug("bypassdbus set, %s module not available: ignored" % mixerapp.lower())
+ 
+         if not found:
+             mixerwidget = Dummy( w )
+--- a/support/mixer-qt4/ffado/widgets/crossbarrouter.py	2018-01-11 12:34:10.200777889 +0900
++++ b/support/mixer-qt4/ffado/widgets/crossbarrouter.py	2018-01-11 12:45:13.278911705 +0900
+@@ -194,7 +194,7 @@
+         #log.debug("Got %i peaks" % len(peakvalues))
+         for peak in peakvalues:
+             #log.debug("peak = [%s,%s]" % (str(peak[0]),str(peak[1])))
+-            if peak[0] >= 0:
++            if peak[1] >= 0:
+                 self.switchers[peak[0]].peakValue(peak[1])
+ 
+     def updateMixerRouting(self):
+--- a/support/mixer-qt4/ffado/widgets/matrixmixer.py	2018-01-11 12:54:27.545361864 +0900
++++ b/support/mixer-qt4/ffado/widgets/matrixmixer.py	2018-01-11 12:56:36.899124318 +0900
+@@ -512,7 +512,7 @@
+                     self.rowHeaders[j].lbl.setText(row_name)
+ 
+     def updateValues(self, n):
+-        nbitems = len(n)/3
++        nbitems = len(n) // 3
+         for i in range(nbitems):
+             n_0 = n[3*i]    
+             n_1 = n[3*i+1]   
+@@ -951,7 +951,7 @@
+             return self.interface.setValue(In, Out, val)            
+ 
+     def updateValues(self, n):
+-        nbitems = len(n)/3
++        nbitems = len(n) // 3
+         for j in range(nbitems):
+             n_0 = n[3*j]    
+             n_1 = n[3*j+1]   
+@@ -1406,7 +1406,7 @@
+     def matrixControlChanged(self, n):
+         # Update value needed for "per Out" view
+         #log.debug("Update per Output( %s )" % str(n))
+-        nbitems = len(n)/3
++        nbitems = len(n) // 3
+         if (self.rule == "Columns_are_inputs"):
+            n_t = n
+         else:
+@@ -1420,7 +1420,7 @@
+     def sliderControlChanged(self, n):
+         # Update value needed for matrix view
+         #log.debug("Update Matrix( %s )" % str(n))
+-        nbitems = len(n)/3
++        nbitems = len(n) // 3
+         if (((self.rule == "Columns_are_inputs") and not self.transpose) or ((self.rule != "Columns_are_inputs") and self.transpose)):
+             n_t = ()
+             for i in range(nbitems):
+@@ -1512,7 +1512,7 @@
+                 log.debug("Number of stereo output channels must be specified")
+                 return False
+             n = int(readMixerString[idx+2])
+-            if n > self.perOut.nbOut/2:
++            if n > self.perOut.nbOut // 2:
+                 log.debug("Incoherent number of stereo channels")
+                 return False
+             if n > 0:
diff --git a/media-libs/libffado/files/libffado-2.4.0-crossbar-router-fix.patch b/media-libs/libffado/files/libffado-2.4.0-crossbar-router-fix.patch
new file mode 100644
index 000000000000..99861abe284e
--- /dev/null
+++ b/media-libs/libffado/files/libffado-2.4.0-crossbar-router-fix.patch
@@ -0,0 +1,11 @@
+--- a/support/mixer-qt4/ffado/widgets/crossbarrouter.py	2018-01-11 12:34:10.200777889 +0900
++++ b/support/mixer-qt4/ffado/widgets/crossbarrouter.py	2018-01-11 12:45:13.278911705 +0900
+@@ -98,7 +98,7 @@
+             self.combo.setCurrentIndex(self.combo.findText(src))
+         else:
+             self.combo.setCurrentIndex(0)
+-        self.combo.activated.connect(self.comboCurrentChanged)
++        self.combo.activated[str].connect(self.comboCurrentChanged)
+ 
+ 
+     def peakValue(self, value):
diff --git a/media-libs/libffado/files/libffado-2.4.0-py3-pyqt5-fixes.patch b/media-libs/libffado/files/libffado-2.4.0-py3-pyqt5-fixes.patch
new file mode 100644
index 000000000000..f0937559b8e9
--- /dev/null
+++ b/media-libs/libffado/files/libffado-2.4.0-py3-pyqt5-fixes.patch
@@ -0,0 +1,197 @@
+------------------------------------------------------------------------
+r2726 | jwoithe | 2018-01-05 18:56:40 +0900 (Fri, 05 Jan 2018) | 13 lines
+
+Further Python3/PyQt5 compatibility fixes, enhance "About" dialog box.
+
+This patch was prepared by Orcan Ogetbil on Fedora and tested on that
+distribution with PyQt4-4.12.1 and PyQt5-5.9.1.  It is primarily concerned
+with additional compatibility between Python2/3 and PyQt4/5.  It has also
+been tested under python 2 with pyqt 4.11.4.  Further testing under
+different python/pyqt environments would be welcomed.
+
+An enhancement to the "About" dialog is also included which adds version
+strings and updates the copyright year range.
+
+The patch was submitted to the ffado-devel mailing list.
+
+
+Index: support/mixer-qt4/ffado/ffadowindow.py
+===================================================================
+--- a/support/mixer-qt4/ffado/ffadowindow.py	(revision 2725)
++++ b/support/mixer-qt4/ffado/ffadowindow.py	(revision 2726)
+@@ -22,6 +22,8 @@
+ # along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ #
+ 
++import ctypes
++import datetime
+ import os
+ 
+ from ffado.config import *
+@@ -92,7 +94,8 @@
+             self.menuTheme[theme].setCheckable(True)
+ 
+             if (ffado_python3 and (self.style().objectName().lower() == theme.lower()) or
+-                    not(ffado_python3) and (self.style().objectName().toLower() == theme.toLower())):
++                    not(ffado_python3) and (self.style().objectName().toLower() == theme.toLower() if ffado_pyqt_version == 4 else
++                                            self.style().objectName().lower() == theme.lower())):
+                 self.menuTheme[theme].setDisabled(True)
+                 self.menuTheme[theme].setChecked(True)
+             self.menuTheme[theme].triggered.connect(self.switchTheme )
+@@ -174,9 +177,11 @@
+         QMessageBox.about( self, "About FFADO", """
+ <h1>ffado.org</h1>
+ 
++<p>{ffado_version}</p>
++
+ <p>FFADO is the new approach to have firewire audio on linux.</p>
+ 
+-<p>&copy; 2006-2014 by the FFADO developers<br />ffado is licensed under the GPLv3, for the full license text see <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a> or the LICENSE.* files shipped with ffado.</p>
++        <p>&copy; 2006-2018 by the FFADO developers<br />ffado is licensed under the GPLv3, for the full license text see <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a> or the LICENSE.* files shipped with ffado.</p>
+ 
+ <p>FFADO developers are:<ul>
+ <li>Pieter Palmers
+@@ -191,8 +196,17 @@
+ <li>Stefan Richter
+ <li>Jano Svitok
+ </ul>
+-""" )
++        """.format(ffado_version=get_ffado_version(), thisyear=datetime.datetime.now().year))
+ 
++def get_ffado_version():
++    try:
++        # call the C function ffado_get_version() to figure out the version
++        lib = ctypes.cdll.LoadLibrary('libffado.so')
++        func = ctypes.CFUNCTYPE(ctypes.c_char_p)
++        ffado_get_version = func(('ffado_get_version', lib))
++        return ffado_get_version()
++    except:
++        return "libffado"
+ 
+ def get_lock(process_name):
+     import socket
+@@ -252,6 +266,7 @@
+     logging.getLogger('global').setLevel(debug_level)
+ 
+     log = logging.getLogger('main')
++    log.debug("Using %s with Qt: %s PyQt: %s" % (get_ffado_version(), QtCore.QT_VERSION_STR, QtCore.PYQT_VERSION_STR))
+ 
+     app = QApplication(args)
+     app.setWindowIcon( QIcon( SHAREDIR + "/icons/hi64-apps-ffado.png" ) )
+Index: support/mixer-qt4/ffado/logginghandler.py
+===================================================================
+--- a/support/mixer-qt4/ffado/logginghandler.py	(revision 2725)
++++ b/support/mixer-qt4/ffado/logginghandler.py	(revision 2726)
+@@ -28,7 +28,7 @@
+ log = logging.getLogger('logginghandler')
+ 
+ class QStatusLogger( QObject, logging.Handler ):
+-    log = pyqtSignal(QString, int, name='log')
++    log = pyqtSignal(QString if ffado_pyqt_version == 4 else str, int, name='log')
+     def __init__( self, parent, statusbar, level=logging.NOTSET ):
+         QObject.__init__( self, parent )
+         logging.Handler.__init__( self, level )
+Index: support/mixer-qt4/ffado/panelmanager.py
+===================================================================
+--- a/support/mixer-qt4/ffado/panelmanager.py	(revision 2725)
++++ b/support/mixer-qt4/ffado/panelmanager.py	(revision 2726)
+@@ -378,7 +378,7 @@
+         action = self.sender()
+         # Extract the action data and store as a dbus.String type so 
+         # it is usable as a key into self.panels[].
+-        panel_key = dbus.String(action.data().toString())
++        panel_key = dbus.String(action.data().toString() if ffado_pyqt_version == 4 else action.data())
+         self.tabs.setCurrentIndex(self.tabs.indexOf(self.panels[panel_key]))
+ 
+     def displayPanels(self):
+@@ -515,6 +515,8 @@
+           saveString.append('</device>\n')
+         # file saving
+         savefilename = QFileDialog.getSaveFileName(self, 'Save File', os.getenv('HOME'))
++        if isinstance(savefilename, tuple): # newer PyQt5
++            savefilename = savefilename[0]
+         try:
+           f = open(savefilename, 'w')
+         except IOError:
+@@ -526,6 +528,8 @@
+ 
+     def readSettings(self):
+         readfilename = QFileDialog.getOpenFileName(self, 'Open File', os.getenv('HOME'))
++        if isinstance(readfilename, tuple): # newer PyQt5
++            readfilename = readfilename[0]
+         try:
+           f = open(readfilename, 'r')
+         except IOError:
+Index: support/mixer-qt4/ffado/widgets/crossbarrouter.py
+===================================================================
+--- a/support/mixer-qt4/ffado/widgets/crossbarrouter.py	(revision 2725)
++++ b/support/mixer-qt4/ffado/widgets/crossbarrouter.py	(revision 2726)
+@@ -168,7 +168,10 @@
+         self.timer.setInterval(200)
+         self.timer.timeout.connect(self.updateLevels)
+ 
+-        self.vubtn.setChecked(self.settings.value("crossbarrouter/runvu", False).toBool())
++        if ffado_pyqt_version == 4:
++            self.vubtn.setChecked(self.settings.value("crossbarrouter/runvu", False).toBool())
++        else:
++            self.vubtn.setChecked(self.settings.value("crossbarrouter/runvu", False) == u'true')
+ 
+     def __del__(self):
+         print( "CrossbarRouter.__del__()" )
+Index: support/mixer-qt4/ffado/widgets/matrixmixer.py
+===================================================================
+--- a/support/mixer-qt4/ffado/widgets/matrixmixer.py	(revision 2725)
++++ b/support/mixer-qt4/ffado/widgets/matrixmixer.py	(revision 2726)
+@@ -200,7 +200,7 @@
+ 
+     def mousePressEvent(self, ev):
+         if ev.buttons() & Qt.LeftButton:
+-            self.pos = ev.posF()
++            self.pos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos()
+             self.tmpvalue = self.value()
+             ev.accept()
+             #log.debug("MixerNode.mousePressEvent() %s" % str(self.pos))
+@@ -207,7 +207,7 @@
+ 
+     def mouseMoveEvent(self, ev):
+         if hasattr(self, "tmpvalue") and self.pos is not QtCore.QPointF(0, 0):
+-            newpos = ev.posF()
++            newpos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos()
+             change = newpos.y() - self.pos.y()
+             #log.debug("MixerNode.mouseReleaseEvent() change %s" % (str(change)))
+             self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) )
+@@ -215,7 +215,7 @@
+ 
+     def mouseReleaseEvent(self, ev):
+         if hasattr(self, "tmpvalue") and self.pos is not QtCore.QPointF(0, 0):
+-            newpos = ev.posF()
++            newpos = ev.posF() if ffado_pyqt_version == 4 else ev.localPos()
+             change = newpos.y() - self.pos.y()
+             #log.debug("MixerNode.mouseReleaseEvent() change %s" % (str(change)))
+             self.setValue( self.tmpvalue - math.copysign(pow(abs(change), 2), change) )
+@@ -257,19 +257,19 @@
+         if v == 0:
+             symb_inf = u"\u221E"
+             text = "-" + symb_inf + " dB"
+-        if ffado_python3:
++        if ffado_python3 or ffado_pyqt_version == 5:
+             # Python3 uses native python UTF strings rather than QString.
+             # This therefore appears to be the correct way to display this
+             # UTF8 string, but testing may prove otherwise.
+             p.drawText(rect, Qt.AlignCenter, text)
+         else:
+-            p.drawText(rect, Qt.AlignCenter, QtCore.QString.fromUtf8(text))
++            p.drawText(rect, Qt.AlignCenter, QString.fromUtf8(text))
+         if (self.inv_action!=None and self.inv_action.isChecked()):
+-            if ffado_python3:
++            if ffado_python3 or ffado_pyqt_version == 5:
+                 # Refer to the comment about about Python UTF8 strings.
+                 p.drawText(rect, Qt.AlignLeft|Qt.AlignTop, " ϕ")
+             else:
+-                p.drawText(rect, Qt.AlignLeft|Qt.AlignTop, QtCore.QString.fromUtf8(" ϕ"))
++                p.drawText(rect, Qt.AlignLeft|Qt.AlignTop, QString.fromUtf8(" ϕ"))
+ 
+     def internalValueChanged(self, value):
+         #log.debug("MixerNode.internalValueChanged( %i )" % value)
+
+------------------------------------------------------------------------
diff --git a/media-libs/libffado/files/libffado-2.4.0-pyqt5-dbus-detection.patch b/media-libs/libffado/files/libffado-2.4.0-pyqt5-dbus-detection.patch
new file mode 100644
index 000000000000..9064a59a6bcc
--- /dev/null
+++ b/media-libs/libffado/files/libffado-2.4.0-pyqt5-dbus-detection.patch
@@ -0,0 +1,30 @@
+------------------------------------------------------------------------
+r2725 | jwoithe | 2018-01-05 18:40:19 +0900 (Fri, 05 Jan 2018) | 11 lines
+
+SCons: fix detection of dbus on PyQt5 systems.
+
+The detection of the dbus python modules was qualified on the presence of
+pyuic4.  On systems with only PyQt5 this would obviously fail.  Patch from
+Orcan Ogetbil via the ffado-devel mailing list.
+
+r2724 inadvertently included a change to SConstruct to import sys.  This is
+needed since sys.stdout is referenced in some situations (in particular, if
+jack is not installed in the build environment).  This patch was also from
+Orcan Ogetbil, via the ffado-devel mailing list.
+
+
+Index: SConstruct
+===================================================================
+--- a/SConstruct	(revision 2724)
++++ b/SConstruct	(revision 2725)
+@@ -396,7 +396,7 @@
+ 
+ # PyQT checks
+ if env['BUILD_MIXER'] != 'false':
+-    have_dbus = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' ))
++    have_dbus = ((conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' )) or (conf.CheckForApp( 'which pyuic5' ) and conf.CheckForPyModule( 'dbus.mainloop.pyqt5' )))
+     have_pyqt4 = (conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'PyQt4' ))
+     have_pyqt5 = (conf.CheckForApp( 'which pyuic5' ) and conf.CheckForPyModule( 'PyQt5' ))
+     if ((have_pyqt4 or have_pyqt5) and have_dbus):
+
+------------------------------------------------------------------------
diff --git a/media-libs/libffado/files/libffado-2.4.0-rme-bigendian-fix.patch b/media-libs/libffado/files/libffado-2.4.0-rme-bigendian-fix.patch
new file mode 100644
index 000000000000..8e0158a03c5d
--- /dev/null
+++ b/media-libs/libffado/files/libffado-2.4.0-rme-bigendian-fix.patch
@@ -0,0 +1,50 @@
+------------------------------------------------------------------------
+r2724 | jwoithe | 2018-01-05 18:33:39 +0900 (Fri, 05 Jan 2018) | 8 lines
+
+RME: ensure byte swap macros are available for all components.
+
+The byte swap macros (ByteSwap32() in particular) are required on big-endian
+architectures for more than just the rme_avdevice module.  Including these
+in the RME device header file is a reasonable way to fix this.
+
+Patch from Orcan Ogetbil via the ffado-devel mailing list.
+
+
+Index: SConstruct
+===================================================================
+--- a/SConstruct	(revision 2723)
++++ b/SConstruct	(revision 2724)
+@@ -29,6 +29,7 @@
+ from subprocess import Popen, PIPE
+ import os
+ import re
++import sys
+ from string import Template
+ import imp
+ import distutils.sysconfig
+Index: src/rme/rme_avdevice.cpp
+===================================================================
+--- a/src/rme/rme_avdevice.cpp	(revision 2723)
++++ b/src/rme/rme_avdevice.cpp	(revision 2724)
+@@ -42,7 +42,6 @@
+ #include <stdint.h>
+ #include <assert.h>
+ #include <unistd.h>
+-#include "libutil/ByteSwap.h"
+ 
+ #include <iostream>
+ #include <sstream>
+Index: src/rme/rme_avdevice.h
+===================================================================
+--- a/src/rme/rme_avdevice.h	(revision 2723)
++++ b/src/rme/rme_avdevice.h	(revision 2724)
+@@ -31,6 +31,7 @@
+ #include "libavc/avc_definitions.h"
+ 
+ #include "libutil/Configuration.h"
++#include "libutil/ByteSwap.h"
+ 
+ #include "fireface_def.h"
+ #include "libstreaming/rme/RmeReceiveStreamProcessor.h"
+
+------------------------------------------------------------------------
diff --git a/media-libs/libffado/libffado-2.4.0.ebuild b/media-libs/libffado/libffado-2.4.0.ebuild
new file mode 100644
index 000000000000..10e673c6113d
--- /dev/null
+++ b/media-libs/libffado/libffado-2.4.0.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit desktop python-single-r1 scons-utils toolchain-funcs udev multilib-minimal
+
+DESCRIPTION="Driver for IEEE1394 (Firewire) audio interfaces"
+HOMEPAGE="http://www.ffado.org"
+
+if [[ "${PV}" = "9999" ]]; then
+	inherit subversion
+	ESVN_REPO_URI="http://subversion.ffado.org/ffado/trunk/${PN}"
+else
+	SRC_URI="http://www.ffado.org/files/${P}.tgz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+fi
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+IUSE="debug qt5 test-programs"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+	dev-cpp/libxmlpp:2.6[${MULTILIB_USEDEP}]
+	dev-libs/dbus-c++
+	dev-libs/libconfig[cxx,${MULTILIB_USEDEP}]
+	media-libs/alsa-lib
+	media-libs/libiec61883[${MULTILIB_USEDEP}]
+	sys-apps/dbus
+	sys-libs/libavc1394[${MULTILIB_USEDEP}]
+	sys-libs/libraw1394[${MULTILIB_USEDEP}]
+	qt5? (
+		dev-python/dbus-python[${PYTHON_USEDEP}]
+		dev-python/PyQt5[dbus,${PYTHON_USEDEP}]
+		x11-misc/xdg-utils
+	)"
+DEPEND="${COMMON_DEPEND}
+	virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+	!<media-sound/jack-audio-connection-kit-0.122.0:0
+	!<media-sound/jack-audio-connection-kit-1.9.9:2"
+
+PATCHES=(
+	"${FILESDIR}/${P}-rme-bigendian-fix.patch"
+	"${FILESDIR}/${P}-pyqt5-dbus-detection.patch"
+	"${FILESDIR}/${P}-py3-pyqt5-fixes.patch"
+	"${FILESDIR}/${P}-additional-py3-fixes.patch"
+	"${FILESDIR}/${P}-crossbar-router-fix.patch"
+)
+
+myescons() {
+	local myesconsargs=(
+		PREFIX="${EPREFIX}/usr"
+		LIBDIR="${EPREFIX}/usr/$(get_libdir)"
+		MANDIR="${EPREFIX}/usr/share/man"
+		UDEVDIR="$(get_udevdir)/rules.d"
+		CUSTOM_ENV=true
+		DETECT_USERSPACE_ENV=false
+		DEBUG=$(usex debug)
+		PYPKGDIR="$(python_get_sitedir)"
+		# ENABLE_OPTIMIZATIONS detects cpu type and sets flags accordingly
+		# -fomit-frame-pointer is added also which can cripple debugging.
+		# we set flags from portage instead
+		ENABLE_OPTIMIZATIONS=false
+		# This only works for JACK1>=0.122.0 or JACK2>=1.9.9, so we block
+		# lower versions.
+		ENABLE_SETBUFFERSIZE_API_VER=force
+	)
+	if multilib_is_native_abi; then
+		myesconsargs+=(
+			BUILD_MIXER=$(usex qt5 true false)
+			BUILD_TESTS=$(usex test-programs)
+		)
+	else
+		myesconsargs+=(
+			BUILD_MIXER=false
+			BUILD_TESTS=false
+		)
+	fi
+	escons "${myesconsargs[@]}" "${@}"
+}
+
+src_prepare() {
+	default
+
+	# Python3 fixes
+	sed -i -e 's/\t/        /g' support/mixer-qt4/ffado/mixer/phase88control.py || die
+	sed -i -e 's/\t/        /g' support/mixer-qt4/ffado/mixer/audiofire.py || die
+	sed -i -e 's/\bprint \(.*\)$/print(\1)/g' -e '/import commands/d' support/tools/ffado-diag-static || die
+
+	# Always use Qt5
+	sed -i -e 's/try:/if False:/' -e 's/except.*/else:/' support/mixer-qt4/ffado/import_pyqt.py || die
+
+	multilib_copy_sources
+}
+
+multilib_src_compile() {
+	tc-export CC CXX
+	myescons
+}
+
+multilib_src_install() {
+	myescons DESTDIR="${D}" WILL_DEAL_WITH_XDG_MYSELF="True" install
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	python_fix_shebang "${D}"
+	python_optimize "${D}"
+
+	if use qt5; then
+		newicon "support/xdg/hi64-apps-ffado.png" "ffado.png"
+		newmenu "support/xdg/ffado.org-ffadomixer.desktop" "ffado-mixer.desktop"
+	fi
+}
diff --git a/media-libs/libxspf/Manifest b/media-libs/libxspf/Manifest
index a5911762d927..d9b56a87a450 100644
--- a/media-libs/libxspf/Manifest
+++ b/media-libs/libxspf/Manifest
@@ -1,5 +1,5 @@
-AUX libxspf-1.2.0-gcc44.patch 512 BLAKE2B f688d85fb8bddecfa1864827e210bc5762724221c353a315fc3b5f2819ee9b2699f96e05cc8e335823b71f27a0df268e4db3431f5f6d96aad8f4f8bda576d59b SHA512 968a5e53d91ddc724d321d7598f3cbe7c6e28a343a96ad27cac92ec9603eead6e4452e2965c780bf530db211e62def810bdefd1edd4e7785fd5f646d01af78d6
-AUX libxspf-1.2.0-gcc47.patch 263 BLAKE2B 05cf6ebd828c31cca516146b2ab53cedc9094a875aceb7feb78a092b0a85c2b19d63799c6f24c8e59ead967e37b25a59f83f99f4089af8319e00bb5e831cb6ed SHA512 893f3cf22aa2ede98efb53f8aef553fd7418254f9aa92f7f2126eb5c2f2b66bae94fe43049b59642793ced74168369e32a04ae21719b8e041b5d9ecc0626e6ad
+AUX libxspf-1.2.0-gcc44.patch 520 BLAKE2B 711be1facee0b15d1575daf6f9aadf54a084f733e2f3faeb86918a197464bfcb912efb1f4b93d7c3058d71a8c7f111d6c554ea672644ef5c267a419fa501ac08 SHA512 aa2ee2626504f8b98d1903f1e04e8aab68ea541022f03234b034d477d8d60c8c56af0ca2e1e64aeb28dbde04ca14db2c5ec7b893e6697233752fe629adf169c9
+AUX libxspf-1.2.0-gcc47.patch 267 BLAKE2B bd7c26c5148eed4b936aa811cb98bebcc3ad9b8049827157aea858aa2a48e1283a78d6d8a3fe1726372249a262f029e3a0ccb2269e84ca8bee77b9df037d6d7a SHA512 2e84721ea7e51750ebc3ecad492310ac474563552d46b20aa3184cc26052b91d881ccec7ac283ae76f2b82db7032d371b34a824b4194291427f726c48e8552b6
 DIST libxspf-1.2.0.tar.bz2 372483 BLAKE2B 6a1af724e993bff93979d9e641754e9964dd57363481fda09e91985a773a083f698759e0c4bca6d794ee272bf070304e09282538343fe64bd91a6b876c627868 SHA512 56667b6df89e30517e2e388e2e3b1c083b19d98d69b4ee328d2784bba57a8d50c6b6ae1876cf17e6f9eb1ff872680c8f33b84b826d1290b890ac173c76bea491
-EBUILD libxspf-1.2.0.ebuild 1011 BLAKE2B a5947bf7e0963d656ea17ac724dcfd033102924e3d0922a548d390357900e43ee5704d24bf5ccd18755fa6611e402ab23a8b7994266f04658e9488f9242bdee4 SHA512 95b48eb0281cec4be7ea2622ca4e0e6f209f440677006bb295d615f74404a11c39e714e9da2e17a125ca0b58490c61814fbf7c3e404a237f6fe43fc0d86fe454
+EBUILD libxspf-1.2.0.ebuild 1017 BLAKE2B ca6c00513f893d9f8befb3f1e558e76b6a24481672eabfc7affeba8cad7f8b5688088fcb53576d6bc3b0e8875683e9eda337ba7bf9280cb6b85042cf271d4715 SHA512 a4027b33b273a361fdb55687ccc6d48f5dd08df04757d9f8e48b9ad9e346c7b042a2e2cb6116472a98427be3820ec9c51b0dcdb588a81e16eafa4c26d4c35c14
 MISC metadata.xml 517 BLAKE2B 12f2175a02bdb84c679ff437352cbac8267dac2bd12a3a04fb2e853c4049acac001160daf124b97b9c6170bd73beddf238ea454b8588a2c635efdefee8773ca7 SHA512 eb605d2fb0dfe1fd3e6fc50f29e6408626e2a4fe255db65a0b20844adf1634b9bd0b0bc69c55a2a6ceedaabb41aca03f330af9258d408896042805f7b78cad33
diff --git a/media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch b/media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch
index fa16b589df30..668e8af1be16 100644
--- a/media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch
+++ b/media-libs/libxspf/files/libxspf-1.2.0-gcc44.patch
@@ -1,7 +1,7 @@
 http://bugs.gentoo.org/261604
 
---- test/OfficialSuite.cpp
-+++ test/OfficialSuite.cpp
+--- a/test/OfficialSuite.cpp
++++ b/test/OfficialSuite.cpp
 @@ -21,6 +21,7 @@
   * Sebastian Pipping, sping@xiph.org
   */
@@ -10,8 +10,8 @@ http://bugs.gentoo.org/261604
  #include "OfficialSuite.h"
  #include <xspf/XspfReaderCallback.h>
  using namespace Xspf;
---- test/ProjectOpus/ProjectOpusSuite.cpp
-+++ test/ProjectOpus/ProjectOpusSuite.cpp
+--- a/test/ProjectOpus/ProjectOpusSuite.cpp
++++ b/test/ProjectOpus/ProjectOpusSuite.cpp
 @@ -21,6 +21,7 @@
   * Sebastian Pipping, sping@xiph.org
   */
diff --git a/media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch b/media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch
index b408416e7ef7..76c0dca755f8 100644
--- a/media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch
+++ b/media-libs/libxspf/files/libxspf-1.2.0-gcc47.patch
@@ -1,7 +1,7 @@
 http://bugs.gentoo.org/421745
 
---- examples/read/read.cpp
-+++ examples/read/read.cpp
+--- a/examples/read/read.cpp
++++ b/examples/read/read.cpp
 @@ -43,6 +43,7 @@
  #include <cstdio>
  #include <cstdlib> // MAX_PATH
diff --git a/media-libs/libxspf/libxspf-1.2.0.ebuild b/media-libs/libxspf/libxspf-1.2.0.ebuild
index a7c71fb4d12b..fa7f0ecfa6f8 100644
--- a/media-libs/libxspf/libxspf-1.2.0.ebuild
+++ b/media-libs/libxspf/libxspf-1.2.0.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
-inherit eutils
+EAPI=6
+
+inherit xdg-utils
 
 DESCRIPTION="Playlist handling library"
 HOMEPAGE="http://libspiff.sourceforge.net/"
@@ -11,38 +12,39 @@ SRC_URI="mirror://sourceforge/libspiff/${P}.tar.bz2"
 LICENSE="BSD LGPL-2.1"
 SLOT="0"
 KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
-IUSE="doc static-libs test"
+IUSE="static-libs test"
 
-RDEPEND=">=dev-libs/expat-2
+RDEPEND="
+	>=dev-libs/expat-2
 	>=dev-libs/uriparser-0.7.5"
 DEPEND="${RDEPEND}
 	virtual/pkgconfig
-	doc? (
-		>=app-doc/doxygen-1.5.8
-		media-gfx/graphviz
-		dev-qt/qthelp:4
-		)
 	test? ( >=dev-util/cpptest-1.1 )"
 
-DOCS="AUTHORS ChangeLog NEWS README THANKS"
+DOCS=( AUTHORS ChangeLog NEWS README THANKS )
+
+PATCHES=(
+	"${FILESDIR}"/${P}-gcc44.patch
+	"${FILESDIR}"/${P}-gcc47.patch
+)
 
 src_prepare() {
-	epatch \
-		"${FILESDIR}"/${P}-gcc44.patch \
-		"${FILESDIR}"/${P}-gcc47.patch
+	default
+	xdg_environment_reset
+
+	# do not install missing files
+	sed -e 's/gif,//' -i doc/Makefile* \
+		-i bindings/c/doc/Makefile* || die "sed failed"
 }
 
 src_configure() {
-	export XDG_CONFIG_HOME="${T}" #398881#c2
-
 	econf \
-		--docdir="${EPREFIX}"/usr/share/doc/${PF} \
+		--disable-doc \
 		$(use_enable static-libs static) \
-		$(use_enable test) \
-		$(use_enable doc)
+		$(use_enable test)
 }
 
 src_install() {
 	default
-	prune_libtool_files
+	find "${D}" -name '*.la' -delete || die
 }
diff --git a/media-libs/osl/Manifest b/media-libs/osl/Manifest
index 1b2d6b4d4a40..5db35316f830 100644
--- a/media-libs/osl/Manifest
+++ b/media-libs/osl/Manifest
@@ -1,4 +1,4 @@
 AUX osl-1.8.12-cmake-fixes.patch 14704 BLAKE2B dd7d37ae117c338aa72893a26e59f3046c89d5ddc57c7dfc90225d1e49f5bd4346869db7621e2ec0b7c082650d54987a4f6c1196a169828fa17388ad7a3a32e3 SHA512 14059eb68c520e90ed3217b0480929efa4b1ccfa6860649ca86285856d8f5efd07a563ad01dc8bb46dd42d277708b27a9a9f8833f60960502162df0fc1ee243c
 DIST osl-1.8.12.tar.gz 14572814 BLAKE2B edf742b104e723e1e3e56b2fb28b1cd4c81921b04a00b8c0f58cf174105a78881283837b550fb4a67d38f5f0a37327fac7a17310974895ed747e8813e6c8ad7b SHA512 29bb0a23d9e1aa445e87b7080be056f939a1828fa87f001cc1503a8c76d21a5620c69146158d27800db71b1abee71a0c39804d85aea7b5899b0cb7ca1c617b56
-EBUILD osl-1.8.12.ebuild 1791 BLAKE2B bf0aec35ff9f0b9007795cfd45f5b75aada87a3ca1a98b3cba6f7f457d42ce884c542e7814da1ffdfa31ed381879ccb9c39b42ec4a50ca6adb0725b1db6aca80 SHA512 bb70c8957567653bf9ae2f8ea7beaba631c55e94695a6e60e21f5b30520c2bc437ad966e9c596981a5ca4be6d89e378a14cb65ff2e52154a14827922bdcb3d80
+EBUILD osl-1.8.12.ebuild 1785 BLAKE2B 3e9f514b592c1efc8393ccb49f3972aac28e7ed739e1eadf5b37f3fa78eb73d9eb0ad53090aed2e12038eebbdfd2378f8382c7a5c170e74e4a12683a36ca52ca SHA512 d3ca22e3a8ef7332cb4e9f62c078c4a1a5a77c91a635d183e0a0196d18d0be2e22ca263612b7c6e6f4a45a7eeb74df33657128089143111c408860a2329e26b7
 MISC metadata.xml 872 BLAKE2B 62a7dd02eb26c8784a8ac14469132120ad9e5f99985ceabae37c479e3097867c219e1508080c0f5659f4e9cc9d7964fb1b809fb539f9643b168e66349d7ae0e2 SHA512 549fddfb5428c2ca52bb8470d10ee48ceaa3495c4e55934f6a8a5864886f2e63ae43fbe6f716439897ac3a6bbbb0c9a8770f8243bb7a8bbf953dce030c37df73
diff --git a/media-libs/osl/osl-1.8.12.ebuild b/media-libs/osl/osl-1.8.12.ebuild
index 6bbe3b7c837d..7e3015859962 100644
--- a/media-libs/osl/osl-1.8.12.ebuild
+++ b/media-libs/osl/osl-1.8.12.ebuild
@@ -28,7 +28,7 @@ RDEPEND=">=media-libs/openexr-2.2.0
 
 DEPEND="${RDEPEND}
 	>=dev-libs/boost-1.62
-	sys-devel/llvm[clang]
+	sys-devel/clang
 	sys-devel/bison
 	sys-devel/flex
 	virtual/pkgconfig"
-- 
cgit v1.2.3