mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
added community/a2jmidid
This commit is contained in:
parent
f7c0515fb4
commit
8ba1e1f2bb
5 changed files with 271 additions and 0 deletions
34
community/a2jmidid/PKGBUILD
Normal file
34
community/a2jmidid/PKGBUILD
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Maintainer: David Runge <dave@sleepmap.de>
|
||||||
|
# Contributor: speps <speps at aur dot archlinux dot org>
|
||||||
|
# Contributor: Jiyunatori <tori@0xc29.net>
|
||||||
|
|
||||||
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
|
# - use arch-meson to capture defaults (like disabled LTO)
|
||||||
|
|
||||||
|
pkgname=a2jmidid
|
||||||
|
pkgver=9
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A daemon for exposing legacy ALSA sequencer applications in JACK MIDI system."
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://github.com/linuxaudio/a2jmidid"
|
||||||
|
license=('GPL2')
|
||||||
|
groups=('pro-audio')
|
||||||
|
arch=('x86_64')
|
||||||
|
depends=('jack' 'dbus')
|
||||||
|
makedepends=('meson')
|
||||||
|
optdepends=('python-dbus: for a2j and a2j_control')
|
||||||
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/linuxaudio/${pkgname}/archive/${pkgver}.tar.gz")
|
||||||
|
sha512sums=('5bd13b6904ed68c5bfe40ca516fd49b7eb4d4a946b9908ee04687265848734c8e1a81579f0f1a5bd0752595be8858dc748da10487b7f366394c09a5ffc7d5e5c')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "${pkgname}-${pkgver}"
|
||||||
|
arch-meson build
|
||||||
|
ninja -C build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${pkgname}-${pkgver}"
|
||||||
|
DESTDIR="${pkgdir}" meson install -C build
|
||||||
|
install -vDm 644 {AUTHORS,CHANGELOG,INSTALLATION,README}.rst \
|
||||||
|
-t "${pkgdir}/usr/share/doc/${pkgname}"
|
||||||
|
}
|
143
community/a2jmidid/control-unique-port-names-over-dbus.patch
Normal file
143
community/a2jmidid/control-unique-port-names-over-dbus.patch
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
From 034d5db9d017cdcd71ee95b0576ae974aad590f5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nedko Arnaudov <nedko@arnaudov.name>
|
||||||
|
Date: Tue, 26 Nov 2013 23:47:58 +0200
|
||||||
|
Subject: [PATCH] control unique port names over DBUS
|
||||||
|
|
||||||
|
patch by micahscopes@gmail.com
|
||||||
|
sr#3098
|
||||||
|
---
|
||||||
|
a2j_control | 12 ++++++++++++
|
||||||
|
conf.h | 1 +
|
||||||
|
dbus_iface_control.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
3 files changed, 66 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/a2j_control b/a2j_control
|
||||||
|
index 10b2db7..bd78aad 100755
|
||||||
|
--- a/a2j_control
|
||||||
|
+++ b/a2j_control
|
||||||
|
@@ -24,6 +24,8 @@ def main():
|
||||||
|
print " mj2a <jack_port_name> - map JACK port to ALSA port"
|
||||||
|
print " ehw - enable export of hardware ports"
|
||||||
|
print " dhw - disable export of hardware ports"
|
||||||
|
+ print " dup - disallow unique port names"
|
||||||
|
+ print " aup - allow unique port names"
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
bus = dbus.SessionBus()
|
||||||
|
@@ -56,6 +58,10 @@ def main():
|
||||||
|
print "Hardware exported"
|
||||||
|
else:
|
||||||
|
print "Hardware not exported"
|
||||||
|
+ if control_iface.get_disable_port_uniqueness():
|
||||||
|
+ print "Avoiding unique port names"
|
||||||
|
+ else:
|
||||||
|
+ print "Allowing unique port names"
|
||||||
|
elif arg == "gjcn":
|
||||||
|
print "--- get jack client name"
|
||||||
|
print control_iface.get_jack_client_name()
|
||||||
|
@@ -97,6 +103,12 @@ def main():
|
||||||
|
elif arg == 'dhw':
|
||||||
|
print "--- disable export of hardware ports"
|
||||||
|
control_iface.set_hw_export(False)
|
||||||
|
+ elif arg == 'aup':
|
||||||
|
+ print "--- allow unique port names"
|
||||||
|
+ control_iface.set_disable_port_uniqueness(False)
|
||||||
|
+ elif arg == 'dup':
|
||||||
|
+ print "--- disallow unique port names"
|
||||||
|
+ control_iface.set_disable_port_uniqueness(True)
|
||||||
|
else:
|
||||||
|
print "Unknown command '%s'" % arg
|
||||||
|
except dbus.DBusException, e:
|
||||||
|
diff --git a/conf.h b/conf.h
|
||||||
|
index 604eee7..f4303f7 100644
|
||||||
|
--- a/conf.h
|
||||||
|
+++ b/conf.h
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#define CONF_H__AE361BE4_EE60_4F5C_B2D4_13D71A525018__INCLUDED
|
||||||
|
|
||||||
|
extern bool g_a2j_export_hw_ports;
|
||||||
|
+extern bool g_disable_port_uniqueness;
|
||||||
|
extern char * g_a2j_jack_server_name;
|
||||||
|
|
||||||
|
void
|
||||||
|
diff --git a/dbus_iface_control.c b/dbus_iface_control.c
|
||||||
|
index bd894e7..7a1ae13 100644
|
||||||
|
--- a/dbus_iface_control.c
|
||||||
|
+++ b/dbus_iface_control.c
|
||||||
|
@@ -99,6 +99,49 @@ static void a2j_dbus_get_hw_export(struct a2j_dbus_method_call * call_ptr)
|
||||||
|
&hw_export);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void a2j_dbus_get_disable_port_uniqueness(struct a2j_dbus_method_call * call_ptr)
|
||||||
|
+{
|
||||||
|
+ dbus_bool_t disable_port_uniqueness;
|
||||||
|
+
|
||||||
|
+ disable_port_uniqueness = g_disable_port_uniqueness;
|
||||||
|
+
|
||||||
|
+ a2j_dbus_construct_method_return_single(
|
||||||
|
+ call_ptr,
|
||||||
|
+ DBUS_TYPE_BOOLEAN,
|
||||||
|
+ &disable_port_uniqueness);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void a2j_dbus_set_disable_port_uniqueness(struct a2j_dbus_method_call * call_ptr)
|
||||||
|
+{
|
||||||
|
+ DBusError error;
|
||||||
|
+ dbus_bool_t disable_port_uniqueness;
|
||||||
|
+
|
||||||
|
+ if (a2j_is_started())
|
||||||
|
+ {
|
||||||
|
+ a2j_dbus_error(call_ptr, A2J_DBUS_ERROR_BRIDGE_RUNNING, "Bridge is started");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ dbus_error_init(&error);
|
||||||
|
+
|
||||||
|
+ if (!dbus_message_get_args(
|
||||||
|
+ call_ptr->message,
|
||||||
|
+ &error,
|
||||||
|
+ DBUS_TYPE_BOOLEAN, &disable_port_uniqueness,
|
||||||
|
+ DBUS_TYPE_INVALID))
|
||||||
|
+ {
|
||||||
|
+ a2j_dbus_error(call_ptr, A2J_DBUS_ERROR_INVALID_ARGS, "Invalid arguments to method \"%s\"", call_ptr->method_name);
|
||||||
|
+ dbus_error_free(&error);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ g_disable_port_uniqueness = disable_port_uniqueness;
|
||||||
|
+
|
||||||
|
+ a2j_info("Unique port names %s.", g_disable_port_uniqueness ? "disabled": "enabled");
|
||||||
|
+
|
||||||
|
+ a2j_dbus_construct_method_return_void(call_ptr);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static
|
||||||
|
void
|
||||||
|
a2j_dbus_start(
|
||||||
|
@@ -377,6 +420,14 @@ A2J_DBUS_METHOD_ARGUMENTS_BEGIN(get_hw_export)
|
||||||
|
A2J_DBUS_METHOD_ARGUMENT("hw_export", DBUS_TYPE_BOOLEAN_AS_STRING, A2J_DBUS_DIRECTION_OUT)
|
||||||
|
A2J_DBUS_METHOD_ARGUMENTS_END
|
||||||
|
|
||||||
|
+A2J_DBUS_METHOD_ARGUMENTS_BEGIN(set_disable_port_uniqueness)
|
||||||
|
+ A2J_DBUS_METHOD_ARGUMENT("disable_port_uniqueness", DBUS_TYPE_BOOLEAN_AS_STRING, A2J_DBUS_DIRECTION_IN)
|
||||||
|
+A2J_DBUS_METHOD_ARGUMENTS_END
|
||||||
|
+
|
||||||
|
+A2J_DBUS_METHOD_ARGUMENTS_BEGIN(get_disable_port_uniqueness)
|
||||||
|
+ A2J_DBUS_METHOD_ARGUMENT("disable_port_uniqueness", DBUS_TYPE_BOOLEAN_AS_STRING, A2J_DBUS_DIRECTION_OUT)
|
||||||
|
+A2J_DBUS_METHOD_ARGUMENTS_END
|
||||||
|
+
|
||||||
|
A2J_DBUS_METHODS_BEGIN
|
||||||
|
A2J_DBUS_METHOD_DESCRIBE(exit, a2j_dbus_exit)
|
||||||
|
A2J_DBUS_METHOD_DESCRIBE(start, a2j_dbus_start)
|
||||||
|
@@ -387,6 +438,8 @@ A2J_DBUS_METHODS_BEGIN
|
||||||
|
A2J_DBUS_METHOD_DESCRIBE(map_jack_port_to_alsa, a2j_dbus_map_jack_port_to_alsa)
|
||||||
|
A2J_DBUS_METHOD_DESCRIBE(set_hw_export, a2j_dbus_set_hw_export)
|
||||||
|
A2J_DBUS_METHOD_DESCRIBE(get_hw_export, a2j_dbus_get_hw_export)
|
||||||
|
+ A2J_DBUS_METHOD_DESCRIBE(set_disable_port_uniqueness, a2j_dbus_set_disable_port_uniqueness)
|
||||||
|
+ A2J_DBUS_METHOD_DESCRIBE(get_disable_port_uniqueness, a2j_dbus_get_disable_port_uniqueness)
|
||||||
|
A2J_DBUS_METHODS_END
|
||||||
|
|
||||||
|
A2J_DBUS_SIGNAL_ARGUMENTS_BEGIN(bridge_started)
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
34
community/a2jmidid/fix-spelling-mistakes-in-man-page.patch
Normal file
34
community/a2jmidid/fix-spelling-mistakes-in-man-page.patch
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
From bc005a112e6fff85ba02f5f292f877d8daa70984 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?J=C3=B8rn=20Lomax?= <northlomax@gmail.com>
|
||||||
|
Date: Sun, 16 Sep 2012 20:03:20 +0300
|
||||||
|
Subject: [PATCH] Fix spelling mistakes in man page
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=856187
|
||||||
|
https://gna.org/support/?2961
|
||||||
|
---
|
||||||
|
man/a2jmidid.1 | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/man/a2jmidid.1 b/man/a2jmidid.1
|
||||||
|
index b4fe9d6..d4b4bf5 100644
|
||||||
|
--- a/man/a2jmidid.1
|
||||||
|
+++ b/man/a2jmidid.1
|
||||||
|
@@ -19,13 +19,13 @@ specifies which jack-server to use
|
||||||
|
.SH NOTES
|
||||||
|
ALSA does not guarantee client names to by unique. I.e. it is possible
|
||||||
|
to have two apps that create two clients with same ALSA client name.
|
||||||
|
-JACK however requires port names to be unqiue. To ensure this uniqueness,
|
||||||
|
+JACK however requires port names to be unique. To ensure this uniqueness,
|
||||||
|
a2jmidid will add the unique numeric ALSA client ID to the JACK port name.
|
||||||
|
However this behaviour is known to be problematic when restoring
|
||||||
|
connections using simplistic tools like aj\-snapshot and jack_connect.
|
||||||
|
In order to make them work, the -u option can be used. This option will
|
||||||
|
cause a2jmidid to omit the numeric ALSA Client ID from JACK port names.
|
||||||
|
-In this mode, ALSA client name uniqueness must be guartanteed externally.
|
||||||
|
+In this mode, ALSA client name uniqueness must be guaranteed externally.
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
Eric Hedekar <after the beep at g mail dot nospam com>
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
25
community/a2jmidid/link-to-libpthread.patch
Normal file
25
community/a2jmidid/link-to-libpthread.patch
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
From 24e3b8e543256ae8fdfb4b75eb9fd775f07c46e2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nedko Arnaudov <nedko@arnaudov.name>
|
||||||
|
Date: Tue, 10 Jul 2012 05:20:56 +0300
|
||||||
|
Subject: [PATCH] link to libpthread, its used directly
|
||||||
|
|
||||||
|
---
|
||||||
|
wscript | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/wscript b/wscript
|
||||||
|
index 664625b..36710e2 100644
|
||||||
|
--- a/wscript
|
||||||
|
+++ b/wscript
|
||||||
|
@@ -66,7 +66,7 @@ def configure(conf):
|
||||||
|
else:
|
||||||
|
conf.env['DBUS_ENABLED'] = False
|
||||||
|
|
||||||
|
- conf.env['LIB_DL'] = ['dl']
|
||||||
|
+ conf.env['LIB_DL'] = ['dl', 'pthread']
|
||||||
|
|
||||||
|
#conf.check_header('expat.h', mandatory=True)
|
||||||
|
#conf.env['LIB_EXPAT'] = ['expat']
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
35
community/a2jmidid/properly-fix-pthread-linking.patch
Normal file
35
community/a2jmidid/properly-fix-pthread-linking.patch
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
From 7f82da7eb2f540a94db23331be98d42a58ddc269 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nedko Arnaudov <nedko@arnaudov.name>
|
||||||
|
Date: Tue, 10 Jul 2012 07:25:12 +0300
|
||||||
|
Subject: [PATCH] properly fix pthread linking. Patch by Orcan. sr#2934
|
||||||
|
|
||||||
|
---
|
||||||
|
wscript | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/wscript b/wscript
|
||||||
|
index 36710e2..66a532a 100644
|
||||||
|
--- a/wscript
|
||||||
|
+++ b/wscript
|
||||||
|
@@ -66,7 +66,8 @@ def configure(conf):
|
||||||
|
else:
|
||||||
|
conf.env['DBUS_ENABLED'] = False
|
||||||
|
|
||||||
|
- conf.env['LIB_DL'] = ['dl', 'pthread']
|
||||||
|
+ conf.env['LIB_DL'] = ['dl']
|
||||||
|
+ conf.env['LIB_PTHREAD'] = ['pthread']
|
||||||
|
|
||||||
|
#conf.check_header('expat.h', mandatory=True)
|
||||||
|
#conf.env['LIB_EXPAT'] = ['expat']
|
||||||
|
@@ -152,7 +153,7 @@ def build(bld):
|
||||||
|
|
||||||
|
prog.includes = '.' # make waf dependency tracking work
|
||||||
|
prog.target = 'a2jmidid'
|
||||||
|
- prog.uselib = 'ALSA JACK DL'
|
||||||
|
+ prog.uselib = 'ALSA JACK DL PTHREAD'
|
||||||
|
if bld.env()['DBUS_ENABLED']:
|
||||||
|
prog.uselib += " DBUS-1"
|
||||||
|
prog = bld.create_obj('cc', 'program')
|
||||||
|
--
|
||||||
|
2.15.0
|
||||||
|
|
Loading…
Reference in a new issue