public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexis Ballier" <aballier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libffado/, media-libs/libffado/files/
Date: Sun, 25 Jun 2017 19:40:59 +0000 (UTC)	[thread overview]
Message-ID: <1498419631.0e4e3a0c73b44a7a2506cdc2aaa698d57c39b99e.aballier@gentoo> (raw)

commit:     0e4e3a0c73b44a7a2506cdc2aaa698d57c39b99e
Author:     Hector Martin <marcan <AT> marcan <DOT> st>
AuthorDate: Fri Jun 23 12:33:04 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sun Jun 25 19:40:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e4e3a0c

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

 media-libs/libffado/Manifest                       |   1 +
 .../libffado/files/libffado-2.3.0-gcc6.patch       |  26 +++++
 .../files/libffado-2.3.0-modelname-strip.patch     |  45 +++++++++
 media-libs/libffado/libffado-2.3.0.ebuild          | 106 +++++++++++++++++++++
 media-libs/libffado/metadata.xml                   |  20 ++++
 5 files changed, 198 insertions(+)

diff --git a/media-libs/libffado/Manifest b/media-libs/libffado/Manifest
new file mode 100644
index 00000000000..dd5225ee1b8
--- /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 00000000000..2a73ee1cf8c
--- /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 00000000000..8f28b6ac0f7
--- /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 00000000000..4a017d149f2
--- /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 00000000000..52a13df73d6
--- /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>


             reply	other threads:[~2017-06-25 19:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25 19:40 Alexis Ballier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-11 23:57 [gentoo-commits] repo/gentoo:master commit in: media-libs/libffado/, media-libs/libffado/files/ Andreas Sturmlechner
2018-01-23 10:56 Andreas Sturmlechner
2019-02-14 18:37 Andreas Sturmlechner
2022-11-28  8:56 Miroslav Šulc
2024-07-04 14:24 Miroslav Šulc
2024-10-31 20:05 Miroslav Šulc
2025-01-01 15:58 Miroslav Šulc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498419631.0e4e3a0c73b44a7a2506cdc2aaa698d57c39b99e.aballier@gentoo \
    --to=aballier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox