summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHector Martin <marcan@marcan.st>2017-06-23 21:33:04 +0900
committerAlexis Ballier <aballier@gentoo.org>2017-06-25 21:40:31 +0200
commit0e4e3a0c73b44a7a2506cdc2aaa698d57c39b99e (patch)
tree6ad8dbfce70fe639ea952cb9cc71fc6ddac8568b
parentmedia-sound/jack-audio-connection-kit: disable automagic dependency on libffado (diff)
downloadgentoo-0e4e3a0c73b44a7a2506cdc2aaa698d57c39b99e.tar.gz
gentoo-0e4e3a0c73b44a7a2506cdc2aaa698d57c39b99e.tar.bz2
gentoo-0e4e3a0c73b44a7a2506cdc2aaa698d57c39b99e.zip
media-libs/libffado: New package.
FFADO is a userspace driver for IEEE1394 (FireWire) audio interfaces. From audio-overlay: https://github.com/gentoo-audio/audio-overlay (Previously from the proaudio overlay) Gentoo-Bug: https://bugs.gentoo.org/622520 Package-Manager: Portage-2.3.6, Repoman-2.3.2
-rw-r--r--media-libs/libffado/Manifest1
-rw-r--r--media-libs/libffado/files/libffado-2.3.0-gcc6.patch26
-rw-r--r--media-libs/libffado/files/libffado-2.3.0-modelname-strip.patch45
-rw-r--r--media-libs/libffado/libffado-2.3.0.ebuild106
-rw-r--r--media-libs/libffado/metadata.xml20
5 files changed, 198 insertions, 0 deletions
diff --git a/media-libs/libffado/Manifest b/media-libs/libffado/Manifest
new file mode 100644
index 000000000000..dd5225ee1b83
--- /dev/null
+++ b/media-libs/libffado/Manifest
@@ -0,0 +1 @@
+DIST libffado-2.3.0.tgz 1239253 SHA256 18e3c7e610b7cee58b837c921ebb985e324cb2171f8d130f79de02a3fc435f88 SHA512 24a8853281a17b04623e41dc590f7a9b8f4aebe4dfaece2e3b8fe28457a6ff011586e817712b4913d1fca660b701dddc70576c12d8c56470cf991eb17b4297c4 WHIRLPOOL 8eb1c3f6372b25b173d230500cfad7ef7207d730ec8e048bdb84cd7436e196e5429d85afcea0f626a411c1f792f20f1ab59f0c0b0f5a97b114f646c4a7423053
diff --git a/media-libs/libffado/files/libffado-2.3.0-gcc6.patch b/media-libs/libffado/files/libffado-2.3.0-gcc6.patch
new file mode 100644
index 000000000000..2a73ee1cf8cc
--- /dev/null
+++ b/media-libs/libffado/files/libffado-2.3.0-gcc6.patch
@@ -0,0 +1,26 @@
+------------------------------------------------------------------------
+r2629 | jwoithe | 2016-10-09 13:00:28 +0900 (Sun, 09 Oct 2016) | 1 line
+
+TimestampedBuffer.cpp: move the include of math.h to the top of the file which is where most people would expect it to be. The patch comes from a Fedora RPM source package via Simon Lewis, who suggested that without it gcc6 had trouble with the file (the nature of the problem is not known by the FFADO project at this time). Earlier versions of gcc (for example, 4.8.2) had no trouble compiling this file without any math.h include, so the issue that some have seen with gcc6 must be due to math.h being removed from some other system-level include file at some point.
+------------------------------------------------------------------------
+Index: src/libutil/TimestampedBuffer.cpp
+===================================================================
+--- a/src/libutil/TimestampedBuffer.cpp (revision 2628)
++++ b/src/libutil/TimestampedBuffer.cpp (revision 2629)
+@@ -32,6 +32,7 @@
+
+ #include <cstdlib>
+ #include <cstring>
++#include <math.h>
+
+ #define DLL_PI (3.141592653589793238)
+ #define DLL_SQRT2 (1.414213562373095049)
+@@ -179,8 +180,6 @@
+ m_wrap_at=w;
+ return true;
+ }
+-#include <math.h>
+-
+ /**
+ * \brief return the effective rate
+ *
diff --git a/media-libs/libffado/files/libffado-2.3.0-modelname-strip.patch b/media-libs/libffado/files/libffado-2.3.0-modelname-strip.patch
new file mode 100644
index 000000000000..8f28b6ac0f75
--- /dev/null
+++ b/media-libs/libffado/files/libffado-2.3.0-modelname-strip.patch
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------
+r2677 | jwoithe | 2017-03-22 07:43:24 +0900 (Wed, 22 Mar 2017) | 1 line
+
+configrom: there is no obvious reason why a space should be added to the end of the vendor and model strings returned from the interface. Retain the explicit null termination of these strings to cover for the case where an interface may not return any null bytes. Also fix indentation associated with the null termination code. The issue with the trailing space was noticed and reported by Nils Philippsen: its presence broke a test in the saffire_dice mixer python code.
+------------------------------------------------------------------------
+Index: src/libieee1394/configrom.cpp
+===================================================================
+--- a/src/libieee1394/configrom.cpp (revision 2676)
++++ b/src/libieee1394/configrom.cpp (revision 2677)
+@@ -176,13 +176,11 @@
+ ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_vendorNameKv ),
+ len );
+
+- while ((buf + len - 1) == '\0') {
+- len--;
++ while (*(buf + len - 1) == '\0') {
++ len--;
+ }
+- // \todo XXX seems a bit strage to do this but the nodemgr.c code does
+- // it. try to figure out why this is needed (or not)
+- buf[len++] = ' ';
+- buf[len] = '\0';
++ // Ensure vendor string is null terminated
++ buf[len] = '\0';
+
+
+ debugOutput( DEBUG_LEVEL_VERBOSE, "Vendor name: '%s'\n", buf );
+@@ -195,13 +193,11 @@
+ memcpy( buf,
+ ( void* )CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA( m_modelNameKv ),
+ len );
+- while ((buf + len - 1) == '\0') {
+- len--;
++ while (*(buf + len - 1) == '\0') {
++ len--;
+ }
+- // \todo XXX for edirol fa-66 it seems somehow broken. see above
+- // todo as well.
+- buf[len++] = ' ';
+- buf[len] = '\0';
++ // Ensure model name string is null terminated
++ buf[len] = '\0';
+
+ debugOutput( DEBUG_LEVEL_VERBOSE, "Model name: '%s'\n", buf);
+ m_modelName = buf;
diff --git a/media-libs/libffado/libffado-2.3.0.ebuild b/media-libs/libffado/libffado-2.3.0.ebuild
new file mode 100644
index 000000000000..4a017d149f28
--- /dev/null
+++ b/media-libs/libffado/libffado-2.3.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils 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}"
+ KEYWORDS=""
+else
+ SRC_URI="http://www.ffado.org/files/${P}.tgz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+IUSE="debug qt4 test-programs"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="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}]
+ !<media-sound/jack-audio-connection-kit-0.122.0:0
+ !<media-sound/jack-audio-connection-kit-1.9.9:2
+ sys-apps/dbus
+ sys-libs/libraw1394[${MULTILIB_USEDEP}]
+ sys-libs/libavc1394[${MULTILIB_USEDEP}]
+ ${PYTHON_DEPS}
+ qt4? (
+ dev-python/PyQt4[dbus,${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ x11-misc/xdg-utils
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/libffado-2.3.0-modelname-strip.patch"
+ "${FILESDIR}/libffado-2.3.0-gcc6.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)
+ # 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 qt4 true false)
+ BUILD_TESTS=$(usex test-programs)
+ )
+ else
+ myesconsargs+=(
+ BUILD_MIXER=false
+ BUILD_TESTS=false
+ )
+ fi
+ escons "${myesconsargs[@]}" "${@}"
+}
+
+src_prepare() {
+ default
+ 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 qt4; 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/libffado/metadata.xml b/media-libs/libffado/metadata.xml
new file mode 100644
index 000000000000..52a13df73d66
--- /dev/null
+++ b/media-libs/libffado/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>marcan@marcan.st</email>
+ <name>Hector Martin</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proaudio@gentoo.org</email>
+ <name>Gentoo ProAudio Project</name>
+ </maintainer>
+ <use>
+ <flag name="qt4">Install qt4-based mixer frontend</flag>
+ <flag name="test-programs">Install standalone test programs</flag>
+ </use>
+</pkgmetadata>