From a5ed274df316cc75784459d5fb27fd3158446f62 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Fri, 12 Apr 2019 13:38:04 -0300 Subject: [PATCH] libffado: update to 2.4.1. --- .../libffado/patches/fix-gcc6-cplusplus.patch | 13 ----- srcpkgs/libffado/patches/fix-gcc7.patch | 22 -------- .../libffado/patches/fix-python3-pyqt5.patch | 56 +++++++++++++++++++ srcpkgs/libffado/patches/musl-sigval_t.patch | 38 +++++-------- srcpkgs/libffado/template | 44 +++++++-------- 5 files changed, 90 insertions(+), 83 deletions(-) delete mode 100644 srcpkgs/libffado/patches/fix-gcc6-cplusplus.patch delete mode 100644 srcpkgs/libffado/patches/fix-gcc7.patch create mode 100644 srcpkgs/libffado/patches/fix-python3-pyqt5.patch diff --git a/srcpkgs/libffado/patches/fix-gcc6-cplusplus.patch b/srcpkgs/libffado/patches/fix-gcc6-cplusplus.patch deleted file mode 100644 index 7fc1667eabb..00000000000 --- a/srcpkgs/libffado/patches/fix-gcc6-cplusplus.patch +++ /dev/null @@ -1,13 +0,0 @@ -Fix FTBFS with gcc6 - ---- src/ffadotypes.h 2010-01-01 23:04:37.000000000 +0100 -+++ src/ffadotypes.h 2016-10-03 18:14:14.161886793 +0200 -@@ -51,6 +51,8 @@ - }; - - -+#include -+#include - #include - #include - diff --git a/srcpkgs/libffado/patches/fix-gcc7.patch b/srcpkgs/libffado/patches/fix-gcc7.patch deleted file mode 100644 index 6bffbbd86c5..00000000000 --- a/srcpkgs/libffado/patches/fix-gcc7.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/libieee1394/configrom.cpp.orig 2018-03-20 10:21:02.605121213 +0100 -+++ src/libieee1394/configrom.cpp 2018-03-20 10:21:10.306106579 +0100 -@@ -195,7 +195,7 @@ ConfigRom::initialize() - memcpy( buf, - ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_modelNameKv ), - len ); -- while ((buf + len - 1) == '\0') { -+ while (buf[len - 1] == '\0') { - len--; - } - // \todo XXX for edirol fa-66 it seems somehow broken. see above ---- src/libieee1394/configrom.cpp.orig 2018-03-20 10:22:56.490904788 +0100 -+++ src/libieee1394/configrom.cpp 2018-03-20 10:23:06.081886560 +0100 -@@ -176,7 +176,7 @@ ConfigRom::initialize() - ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_vendorNameKv ), - len ); - -- while ((buf + len - 1) == '\0') { -+ while (buf[len - 1] == '\0') { - len--; - } - // \todo XXX seems a bit strage to do this but the nodemgr.c code does diff --git a/srcpkgs/libffado/patches/fix-python3-pyqt5.patch b/srcpkgs/libffado/patches/fix-python3-pyqt5.patch new file mode 100644 index 00000000000..8bdba2486be --- /dev/null +++ b/srcpkgs/libffado/patches/fix-python3-pyqt5.patch @@ -0,0 +1,56 @@ +--- support/mixer-qt4/ffado/import_pyqt.py 2017-06-03 10:34:29.000000000 +0200 ++++ 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 . + # + ++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,) + diff --git a/srcpkgs/libffado/patches/musl-sigval_t.patch b/srcpkgs/libffado/patches/musl-sigval_t.patch index 504278390d2..12068ca57bc 100644 --- a/srcpkgs/libffado/patches/musl-sigval_t.patch +++ b/srcpkgs/libffado/patches/musl-sigval_t.patch @@ -1,26 +1,14 @@ ---- src/libutil/PosixMessageQueue.h 2009-12-19 17:26:20.000000000 +0100 -+++ src/libtuil/PosixMessageQueue.h 2016-10-03 18:40:48.996217777 +0200 -@@ -36,7 +36,13 @@ - #include -+#include - #include - -+#if !defined(__GLIBC__) -+/* In musl libc this type is not defined. */ -+typedef union sigval sigval_t; -+#endif -+ - namespace Util - { - - ---- src/libutil/IpcRingBuffer.h 2008-06-08 19:17:32.000000000 +0200 -+++ src/libutil/IpcRingBuffer.h 2016-10-03 18:53:00.310710281 +0200 -@@ -37,6 +37,7 @@ - #include "PosixMessageQueue.h" - - #include -+#include - - namespace Util { +diff --git src/libutil/PosixMessageQueue.h src/libutil/PosixMessageQueue.h +index 05da300..c331c70 100644 +--- src/libutil/PosixMessageQueue.h ++++ src/libutil/PosixMessageQueue.h +@@ -115,7 +115,7 @@ public: + private: + bool doOpen(enum eDirection t, int, enum eBlocking); +- static void notifyCallbackStatic(sigval_t t) { ++ static void notifyCallbackStatic(union sigval t) { + PosixMessageQueue *obj; + obj = static_cast(t.sival_ptr); + obj->notifyCallback(); + diff --git a/srcpkgs/libffado/template b/srcpkgs/libffado/template index 4330c0e389b..a9b6a5ec6a8 100644 --- a/srcpkgs/libffado/template +++ b/srcpkgs/libffado/template @@ -1,27 +1,26 @@ # Template file for 'libffado' pkgname=libffado -version=2.3.0 -revision=2 +version=2.4.1 +revision=1 build_style=scons -make_build_args="PREFIX=/usr MANDIR=/usr/share/man UDEVDIR=/usr/lib/udev/rules.d CUSTOM_ENV=1 BUILD_TESTS=0 ENABLE_OPTIMIZATIONS=0 WILL_DEAL_WITH_XDG_MYSELF=1" -make_install_args="$make_build_args" -hostmakedepends="pkg-config" +make_build_args="PREFIX=/usr MANDIR=/usr/share/man + UDEVDIR=/usr/lib/udev/rules.d CUSTOM_ENV=1 BUILD_TESTS=0 + ENABLE_OPTIMIZATIONS=0 DEBUG=0 PYTHON_INTERPRETER=/usr/bin/python3 + PYPKGDIR=${py3_sitelib}" +make_install_args="$make_build_args WILL_DEAL_WITH_XDG_MYSELF=1" +hostmakedepends="pkg-config xdg-utils python3-PyQt5-devel-tools" makedepends="libxml++-devel libdbus-c++-devel libsigc++-devel libconfig++-devel - jack-devel libavc1394-devel libiec61883-devel libraw1394-devel alsa-lib-devel" + jack-devel libavc1394-devel libiec61883-devel libraw1394-devel alsa-lib-devel + python3-PyQt5-dbus" +depends="libffado-python" short_desc="Library for accessing BeBoB IEEE1394 devices" maintainer="Duncaen " -license="GPL-3" +license="GPL-2.0-only, GPL-3.0-only" homepage="http://www.ffado.org" distfiles="http://www.ffado.org/files/libffado-${version}.tgz" -checksum=18e3c7e610b7cee58b837c921ebb985e324cb2171f8d130f79de02a3fc435f88 -broken=https://build.voidlinux.eu/builders/x86_64_builder/builds/8326/steps/shell_3/logs/stdio +checksum=3ee19b6841c436dc48a230e127e89e8e7e645073c9e40d8cf7393454f61cd92f +nocross="Tries to run compiled code to test features" -subpackages="libffado-devel" - -if [ -z "$CROSS_BUILD" ]; then - makedepends+=" python-PyQt4-dbus" - subpackages+=" libffado-python" -fi case "$XBPS_TARGET_MACHINE" in *-musl) makedepends+=" argp-standalone" ;; esac @@ -29,9 +28,9 @@ esac pre_configure() { case "$XBPS_TARGET_MACHINE" in *-musl) # Requires argp functions - sed -i 's;-lffado";-lffado -largp";' support/tools/SConscript - sed -i 's;-lpthread";-lpthread -largp";' support/firmware/SConscript - sed -i 's;"pthread";"pthread", "argp";' support/dbus/SConscript + vsed -i 's;-lffado";-lffado -largp";' support/tools/SConscript + vsed -i 's;-lpthread";-lpthread -largp";' support/firmware/SConscript + vsed -i 's;"pthread";"pthread", "argp";' support/dbus/SConscript esac } @@ -41,15 +40,14 @@ post_install() { } libffado-python_package() { - depends="python-PyQt4-dbus" - short_desc+=" - python bindings" + depends="python3-PyQt5-dbus python3-dbus" + short_desc+=" - python3 bindings" pycompile_module="ffado" - pycompile_dirs="usr/share/libffado/python" pkg_install() { - vmove usr/share/libffado/python - vmove usr/lib/python2.7 + vmove ${py3_sitelib} } } + libffado-devel_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files"