Date: Wednesday, August 7, 2019 @ 18:26:30 Author: dvzrv Revision: 498176
upgpkg: libffado 2.4.1-4 Patching scons scripts sufficiently (in -3, most of the Python related packaging would not be installed). Adding libffado.so to provides. Minor cleanup. Added: libffado/trunk/libffado-2.4.1-fix-python3-pyqt5.diff (from rev 498175, libffado/trunk/libffado-fix-python3-pyqt5.diff) libffado/trunk/libffado-2.4.1-fix-scons.diff Modified: libffado/trunk/PKGBUILD Deleted: libffado/trunk/libffado-fix-python3-pyqt5.diff libffado/trunk/scons-python3.patch ---------------------------------------+ PKGBUILD | 16 ++++----- libffado-2.4.1-fix-python3-pyqt5.diff | 55 ++++++++++++++++++++++++++++++++ libffado-2.4.1-fix-scons.diff | 39 ++++++++++++++++++++++ libffado-fix-python3-pyqt5.diff | 55 -------------------------------- scons-python3.patch | 24 ------------- 5 files changed, 102 insertions(+), 87 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2019-08-07 18:22:01 UTC (rev 498175) +++ PKGBUILD 2019-08-07 18:26:30 UTC (rev 498176) @@ -5,7 +5,7 @@ pkgname=libffado pkgver=2.4.1 -pkgrel=3 +pkgrel=4 pkgdesc="Driver for FireWire audio devices" arch=('x86_64') url="http://www.ffado.org/" @@ -13,21 +13,21 @@ depends=('alsa-lib' 'dbus-c++' 'libavc1394' 'libconfig' 'libiec61883' 'libxml++' 'python-dbus') makedepends=('jack' 'python-pyqt5' 'scons') optdepends=('python-pyqt5: ffado-mixer') -provides=('ffado') +provides=('libffado.so') source=("http://www.ffado.org/files/${pkgname}-${pkgver}.tgz" - "${pkgname}-fix-python3-pyqt5.diff" scons-python3.patch -) + "${pkgname}-2.4.1-fix-python3-pyqt5.diff" + "${pkgname}-2.4.1-fix-scons.diff") sha512sums=('0859f17b87c68108bbde726d1cf8ab0b99f6f7f02cbe36acd8b451e112688a4d1edc21134eb4a2edc8c92dcf5f5da52efeabb2ad0dc07804ed1aa664a3b38d74' '39beb2399377d7ee13a43ddd7a80907eb94a2f8f146c5a94a4ba0e1471b3369d2b1519cb8b15c3e2352d9854048882cc037058a1992e6e87270fe9e17fdba91e' - '69890fd26d3c07dce7c1a9789eb34a86d27207fc58040afc1c9c53ad157bf62d751cf1cf80f2d7b88b88ac9fd3ecb04e2cf41a2644103db8aeed3701555cc6d2') + '69d0771a1abf5e40473e4b46fa53fdeead44de78108b3901841b68649f203c64ac6afe4f925c57f1126792def3be246a3600d9032f1a558bb536c0b28fe61f68') prepare() { cd "${pkgname}-${pkgver}" - patch -Np1 -i "${srcdir}/${pkgname}-fix-python3-pyqt5.diff" + patch -Np1 -i "../${pkgname}-2.4.1-fix-python3-pyqt5.diff" + patch -Np1 -i "../${pkgname}-2.4.1-fix-scons.diff" # fix icon name, so it's coherent with XDG desktop file name sed -e 's/hi64-apps-ffado/ffado-mixer/g' \ - -i support/xdg/ffado.org-ffadomixer.desktop - patch -p1 -i ../scons-python3.patch + -i support/xdg/ffado.org-ffadomixer.desktop } build() { Copied: libffado/trunk/libffado-2.4.1-fix-python3-pyqt5.diff (from rev 498175, libffado/trunk/libffado-fix-python3-pyqt5.diff) =================================================================== --- libffado-2.4.1-fix-python3-pyqt5.diff (rev 0) +++ libffado-2.4.1-fix-python3-pyqt5.diff 2019-08-07 18:26:30 UTC (rev 498176) @@ -0,0 +1,55 @@ +--- libffado-2.4.1-a/support/mixer-qt4/ffado/import_pyqt.py 2017-06-03 10:34:29.000000000 +0200 ++++ libffado-2.4.1-b/support/mixer-qt4/ffado/import_pyqt.py 2018-03-06 17:19:15.024087729 +0100 +@@ -20,27 +20,37 @@ + # along with this program. If not, see <http://www.gnu.org/licenses/>. + # + ++import sys ++ffado_python3 = sys.version_info >= (3,) + ffado_pyqt_version = 4 + +-# This module handles the importing of PyQt modules for both PyQt4 and PyQt5. +-# The idea is to first try importing PyQt4. If there's an import error it's ++# This module handles the importing of PyQt modules for both PyQt4 and PyQt5 on ++# python2 or python3. ++# Using python2 the first try is to import PyQt4. If there's an import error it's + # assumed PyQt5 is present instead and that is tried. ++# Using python3 PyQt5 is assumed (PyQt4 is missing the old APIs and can ++# therefore not be used). + # + # All modules used by any part of ffado-mixer are imported. This greatly + # simplifies the process. Otherwise the modules to import would be delivered + # by string variables, and there isn't a supported way to do this across + # Python2 and Python3. +-try: +- from PyQt4 import QtGui, QtCore, Qt, uic +- from PyQt4.QtCore import QByteArray, QObject, QTimer, Qt, pyqtSignal, QString, pyqtSlot +- from PyQt4.QtGui import * +- ffado_pyqt_version = 4 +-except ImportError: +- from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic +- from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt +- from PyQt5.QtGui import * +- from PyQt5.QtWidgets import * +- ffado_pyqt_version = 5 ++if ffado_python3: ++ from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic ++ from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt ++ from PyQt5.QtGui import * ++ from PyQt5.QtWidgets import * ++ ffado_pyqt_version = 5 ++else: ++ try: ++ from PyQt4 import QtGui, QtCore, Qt, uic ++ from PyQt4.QtCore import QByteArray, QObject, QTimer, Qt, pyqtSignal, QString, pyqtSlot ++ from PyQt4.QtGui import * ++ ffado_pyqt_version = 4 ++ except ImportError: ++ from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic ++ from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt ++ from PyQt5.QtGui import * ++ from PyQt5.QtWidgets import * ++ ffado_pyqt_version = 5 + +-import sys +-ffado_python3 = sys.version_info >= (3,) Added: libffado-2.4.1-fix-scons.diff =================================================================== --- libffado-2.4.1-fix-scons.diff (rev 0) +++ libffado-2.4.1-fix-scons.diff 2019-08-07 18:26:30 UTC (rev 498176) @@ -0,0 +1,39 @@ +diff -ruN a/SConstruct b/SConstruct +--- a/SConstruct 2018-03-04 07:13:17.000000000 +0100 ++++ b/SConstruct 2019-08-07 20:13:43.578850445 +0200 +@@ -719,8 +719,8 @@ + # /bin/mount: file format elf64-x86-64 + # or like this: + # /bin/mount: file format elf32-powerpc +- for line in x.split(b'\n'): +- line = line.strip().decode() ++ for line in x.split('\n'): ++ line = line.strip() + if line.startswith(real_exe): + x, fmt = line.rsplit(None, 1) + answer = 'elf32' in fmt +diff -ruN a/support/mixer-qt4/SConscript b/support/mixer-qt4/SConscript +--- a/support/mixer-qt4/SConscript 2015-04-12 13:18:15.000000000 +0200 ++++ b/support/mixer-qt4/SConscript 2019-08-07 20:12:52.849369440 +0200 +@@ -29,16 +29,12 @@ + if env['BUILD_MIXER'] == 'true': + e = env.Clone() + +- def findfiles( arg, dirname, names ): +- for name in names: +- if name.startswith("."): +- names.remove(name) +- for name in names: +- if '.pyc' not in name and '.in' not in name: +- arg.append( os.path.join( dirname, name ) ) +- + pythonfiles = [ 'ffado/config.py' ] +- os.path.walk( "ffado", findfiles, pythonfiles ) ++ for root, dirs, files in os.walk( "ffado" ): ++ for name in files: ++ if name.endswith( '.pyc' ) or '.in' in name or name.startswith("."): ++ continue ++ pythonfiles.append( os.path.join( root, name ) ) + + e.ScanReplace( "ffado/config.py.in" ) + e.Depends( "ffado/config.py", "#/SConstruct" ) Deleted: libffado-fix-python3-pyqt5.diff =================================================================== --- libffado-fix-python3-pyqt5.diff 2019-08-07 18:22:01 UTC (rev 498175) +++ libffado-fix-python3-pyqt5.diff 2019-08-07 18:26:30 UTC (rev 498176) @@ -1,55 +0,0 @@ ---- libffado-2.4.1-a/support/mixer-qt4/ffado/import_pyqt.py 2017-06-03 10:34:29.000000000 +0200 -+++ libffado-2.4.1-b/support/mixer-qt4/ffado/import_pyqt.py 2018-03-06 17:19:15.024087729 +0100 -@@ -20,27 +20,37 @@ - # along with this program. If not, see <http://www.gnu.org/licenses/>. - # - -+import sys -+ffado_python3 = sys.version_info >= (3,) - ffado_pyqt_version = 4 - --# This module handles the importing of PyQt modules for both PyQt4 and PyQt5. --# The idea is to first try importing PyQt4. If there's an import error it's -+# This module handles the importing of PyQt modules for both PyQt4 and PyQt5 on -+# python2 or python3. -+# Using python2 the first try is to import PyQt4. If there's an import error it's - # assumed PyQt5 is present instead and that is tried. -+# Using python3 PyQt5 is assumed (PyQt4 is missing the old APIs and can -+# therefore not be used). - # - # All modules used by any part of ffado-mixer are imported. This greatly - # simplifies the process. Otherwise the modules to import would be delivered - # by string variables, and there isn't a supported way to do this across - # Python2 and Python3. --try: -- from PyQt4 import QtGui, QtCore, Qt, uic -- from PyQt4.QtCore import QByteArray, QObject, QTimer, Qt, pyqtSignal, QString, pyqtSlot -- from PyQt4.QtGui import * -- ffado_pyqt_version = 4 --except ImportError: -- from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic -- from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt -- from PyQt5.QtGui import * -- from PyQt5.QtWidgets import * -- ffado_pyqt_version = 5 -+if ffado_python3: -+ from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic -+ from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt -+ from PyQt5.QtGui import * -+ from PyQt5.QtWidgets import * -+ ffado_pyqt_version = 5 -+else: -+ try: -+ from PyQt4 import QtGui, QtCore, Qt, uic -+ from PyQt4.QtCore import QByteArray, QObject, QTimer, Qt, pyqtSignal, QString, pyqtSlot -+ from PyQt4.QtGui import * -+ ffado_pyqt_version = 4 -+ except ImportError: -+ from PyQt5 import QtGui, Qt, QtCore, Qt, QtWidgets, uic -+ from PyQt5.QtCore import QByteArray, QObject, pyqtSignal, pyqtSlot, QTimer, Qt -+ from PyQt5.QtGui import * -+ from PyQt5.QtWidgets import * -+ ffado_pyqt_version = 5 - --import sys --ffado_python3 = sys.version_info >= (3,) Deleted: scons-python3.patch =================================================================== --- scons-python3.patch 2019-08-07 18:22:01 UTC (rev 498175) +++ scons-python3.patch 2019-08-07 18:26:30 UTC (rev 498176) @@ -1,24 +0,0 @@ ---- libffado-2.4.1/SConstruct.orig 2019-07-26 22:54:47.409490023 +0000 -+++ libffado-2.4.1/SConstruct 2019-07-26 22:55:33.906830766 +0000 -@@ -719,8 +719,8 @@ - # /bin/mount: file format elf64-x86-64 - # or like this: - # /bin/mount: file format elf32-powerpc -- for line in x.split(b'\n'): -- line = line.strip().decode() -+ for line in x.split('\n'): -+ line = line.strip() - if line.startswith(real_exe): - x, fmt = line.rsplit(None, 1) - answer = 'elf32' in fmt ---- libffado-2.4.1/support/mixer-qt4/SConscript.orig 2019-07-26 23:02:25.349419059 +0000 -+++ libffado-2.4.1/support/mixer-qt4/SConscript 2019-07-26 23:02:43.363010354 +0000 -@@ -38,7 +38,7 @@ - arg.append( os.path.join( dirname, name ) ) - - pythonfiles = [ 'ffado/config.py' ] -- os.path.walk( "ffado", findfiles, pythonfiles ) -+ os.walk( "ffado", findfiles, pythonfiles ) - - e.ScanReplace( "ffado/config.py.in" ) - e.Depends( "ffado/config.py", "#/SConstruct" )