From patchwork Tue May 12 08:03:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tenart X-Patchwork-Id: 471187 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 7C23A140D23 for ; Tue, 12 May 2015 18:03:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7CDA433518; Tue, 12 May 2015 08:03:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L4+Ne9mZrHqN; Tue, 12 May 2015 08:03:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BE37A32C43; Tue, 12 May 2015 08:03:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E901D1BF9F9 for ; Tue, 12 May 2015 08:03:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E3B5991B37 for ; Tue, 12 May 2015 08:03:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B+BqCB2gKNRk for ; Tue, 12 May 2015 08:03:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by whitealder.osuosl.org (Postfix) with ESMTP id DD69891B13 for ; Tue, 12 May 2015 08:03:40 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 57EBE65B; Tue, 12 May 2015 10:03:40 +0200 (CEST) Received: from localhost (vpn.foo.tf [195.154.43.236]) by mail.free-electrons.com (Postfix) with ESMTPSA id DE1E695; Tue, 12 May 2015 10:03:39 +0200 (CEST) From: Antoine Tenart To: buildroot@busybox.net Date: Tue, 12 May 2015 10:03:38 +0200 Message-Id: <1431417818-12630-1-git-send-email-antoine.tenart@free-electrons.com> X-Mailer: git-send-email 2.4.0 Subject: [Buildroot] [PATCH] jack2: allow to choose the mode to operate jackd X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" jack2 allows to use three modes: - A legacy jackd service alone. - A DBUS jackd service alone. - A mixture between the standalone jackd and the DBUS jackd. This patch adds the possibility to choose between these three modes, while the legacy jackd was the only option before. In addition, the jack_control tool is removed when the DBUS jackd is not available, as this tool is used to control it. Signed-off-by: Antoine Tenart --- package/jack2/Config.in | 40 ++++++++++++++++++++++++++++++++++++++++ package/jack2/jack2.mk | 22 +++++++++++++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/package/jack2/Config.in b/package/jack2/Config.in index eeeb8daad8bd..26869a7aac1c 100644 --- a/package/jack2/Config.in +++ b/package/jack2/Config.in @@ -20,6 +20,46 @@ config BR2_PACKAGE_JACK2 http://jackaudio.org/ +if BR2_PACKAGE_JACK2 + +choice + prompt "jack2 mode" + default BR2_PACKAGE_JACK2_LEGACY + help + https://github.com/jackaudio/jackaudio.github.com/wiki/JackDbusPackaging + +config BR2_PACKAGE_JACK2_LEGACY + bool "legacy jack2 only" + help + Build and use only jackd. + +config BR2_PACKAGE_JACK2_DBUS + bool "dbus jack2 only" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_PYTHON + select BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYEXPAT + help + Build on use only jackdbus. + +config BR2_PACKAGE_JACK2_CLASSIC + bool "legacy jack2 and dbus jack2 mixture" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_PYTHON + select BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYEXPAT + help + Build jackd and jackdbus, and allow to use both of + these tools. + +endchoice + +endif + comment "jack2 needs a toolchain w/ threads, C++" depends on BR2_USE_MMU depends on BR2_ARCH_HAS_ATOMICS diff --git a/package/jack2/jack2.mk b/package/jack2/jack2.mk index 73328d3fd408..72f2a23d83c0 100644 --- a/package/jack2/jack2.mk +++ b/package/jack2/jack2.mk @@ -10,12 +10,24 @@ JACK2_LICENSE = GPLv2+ (jack server), LGPLv2.1+ (jack library) JACK2_DEPENDENCIES = libsamplerate libsndfile alsa-lib host-python JACK2_INSTALL_STAGING = YES +JACK2_CONF_OPTS = --alsa + +ifeq ($(BR2_PACKAGE_JACK2_DBUS),y) +JACK2_DEPENDENCIES += dbus +JACK2_CONF_OPTS += --dbus +endif + +ifeq ($(BR2_PACKAGE_JACK2_CLASSIC),y) +JACK2_DEPENDENCIES += dbus +JACK2_CONF_OPTS += --dbus --classic +endif + define JACK2_CONFIGURE_CMDS (cd $(@D); \ $(TARGET_CONFIGURE_OPTS) \ $(HOST_DIR)/usr/bin/python2 ./waf configure \ --prefix=/usr \ - --alsa \ + $(JACK2_CONF_OPTS) \ ) endef @@ -33,4 +45,12 @@ define JACK2_INSTALL_STAGING_CMDS install) endef +define JACK2_REMOVE_JACK_CONTROL + $(RM) -f $(TARGET_DIR)/usr/bin/jack_control +endef + +ifeq ($(BR2_PACKAGE_JACK2_LEGACY),y) +JACK2_POST_INSTALL_TARGET_HOOKS += JACK2_REMOVE_JACK_CONTROL +endif + $(eval $(generic-package))