From 0b16a6da2440d92f50eacbe20b0b7e7713f607d0 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 24 Dec 2017 16:08:57 +0000 Subject: [PATCH] community/a2jmidid to 8-2 --- community/a2jmidid/PKGBUILD | 47 +++--- community/a2jmidid/a2jmidid-dso-pthread.patch | 20 --- .../control-unique-port-names-over-dbus.patch | 143 ++++++++++++++++++ .../fix-spelling-mistakes-in-man-page.patch | 34 +++++ community/a2jmidid/link-to-libpthread.patch | 25 +++ .../properly-fix-pthread-linking.patch | 35 +++++ 6 files changed, 266 insertions(+), 38 deletions(-) delete mode 100644 community/a2jmidid/a2jmidid-dso-pthread.patch create mode 100644 community/a2jmidid/control-unique-port-names-over-dbus.patch create mode 100644 community/a2jmidid/fix-spelling-mistakes-in-man-page.patch create mode 100644 community/a2jmidid/link-to-libpthread.patch create mode 100644 community/a2jmidid/properly-fix-pthread-linking.patch diff --git a/community/a2jmidid/PKGBUILD b/community/a2jmidid/PKGBUILD index 5ed87f3ff..d7005c335 100644 --- a/community/a2jmidid/PKGBUILD +++ b/community/a2jmidid/PKGBUILD @@ -1,5 +1,5 @@ -# $Id$ -# Maintainer : speps +# Maintainer : David Runge +# Contributor: speps # Contributor: Jiyunatori # ALARM: Kevin Mihelich @@ -7,38 +7,49 @@ pkgname=a2jmidid pkgver=8 -pkgrel=1 +pkgrel=2 pkgdesc="A daemon for exposing legacy ALSA sequencer applications in JACK MIDI system." -arch=('i686' 'x86_64') -url="http://home.gna.org/$pkgname/" -license=('GPL') +arch=('x86_64') +url="http://repo.or.cz/a2jmidid.git" +license=('GPL2') +arch=('x86_64') depends=('jack' 'python2-dbus') -source=("http://download.gna.org/$pkgname/$pkgname-$pkgver.tar.bz2" - "$pkgname-dso-pthread.patch" +source=("${pkgname}-${pkgver}.tar.gz::http://repo.or.cz/a2jmidid.git/snapshot/7383d268c4bfe85df9f10df6351677659211d1ca.tar.gz" + 'control-unique-port-names-over-dbus.patch' + 'fix-spelling-mistakes-in-man-page.patch' + 'link-to-libpthread.patch' + 'properly-fix-pthread-linking.patch' 'a2jmidid-aarch64.patch') -md5sums=('9cf4edbc3ad2ddeeaf6c8c1791ff3ddd' - '4b15e485301aee48371844cb01689ad2' - 'bff91ac5a995f4faf9acd280b7f949b4') +sha512sums=('d9675404b9b12a0816ba58e60ee74710a534ac70845ae12e5d64d2f08bc12b415ae8094f7038b8cf7eb8317eccc818ea7dee10276baf8b1420d3e90a2685743d' + 'dfec328ab5cba7f4a1273df24b651a9acaaf4eb54813f9c7351ef44ca95b8d90fb730e95a29a85067c113786c7e864fbf91cf9558591a7c714d6e9f977f7a110' + '10e2b1b2b7bf5ca97607ad9272a5c548b9435c583e68483d0fb36fa64ab9dc22e324078b4e6535a5087a31e69dab8f7025addc72f9dd9064f0c576488dc3b3d1' + '22b3794fdf1a20563f02eec1ba94994a55595dd8eaf0144d5088ac8afa43276cfbfcc693320ed46fba794e190f544ba3ddfb586f9dd2104d9d4ac51d3a805214' + '6accab16e82b4b283db084eea71db0585c957c647ea945ad9ac1736c197119200d0c0dc5275bdd7013634faf7a22df12d727cc78e24dd67de95f2e52d2f0df0f' + '6f8f018e41b07a783754c6b1010494e6c71c470b02c5c350f6b483cfea2da3f1b68f31086d1c2dac8d5e5ada59032b7eecd87b0d78f03b6546ecebc8f306b7c6') prepare() { - cd $pkgname-$pkgver + cd "${pkgname}-7383d26" - # DSO link patch - patch -p1 -i ../$pkgname-dso-pthread.patch + # "latest" upstream patches + patch -p1 -i "${srcdir}/link-to-libpthread.patch" + patch -p1 -i "${srcdir}/properly-fix-pthread-linking.patch" + patch -p1 -i "${srcdir}/fix-spelling-mistakes-in-man-page.patch" + patch -p1 -i "${srcdir}/control-unique-port-names-over-dbus.patch" # python2 shebang sed -i 's/python/&2/' a2j_control patch -p1 -i ../a2jmidid-aarch64.patch + + python2 waf configure --prefix=/usr } build() { - cd $pkgname-$pkgver - python2 waf configure --prefix=/usr + cd "${pkgname}-7383d26" python2 waf } package() { - cd $pkgname-$pkgver - python2 waf install --destdir="$pkgdir/" + cd "${pkgname}-7383d26" + python2 waf install --destdir="${pkgdir}/" } diff --git a/community/a2jmidid/a2jmidid-dso-pthread.patch b/community/a2jmidid/a2jmidid-dso-pthread.patch deleted file mode 100644 index 028b9d432..000000000 --- a/community/a2jmidid/a2jmidid-dso-pthread.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -aur a2jmidid-8/wscript a2jmidid-8.patched/wscript ---- a2jmidid-8/wscript 2012-07-05 03:14:23.000000000 +0200 -+++ a2jmidid-8.patched/wscript 2012-07-10 17:48:30.710109306 +0200 -@@ -67,6 +67,7 @@ - conf.env['DBUS_ENABLED'] = False - - 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 @@ - - 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') diff --git a/community/a2jmidid/control-unique-port-names-over-dbus.patch b/community/a2jmidid/control-unique-port-names-over-dbus.patch new file mode 100644 index 000000000..c66c94271 --- /dev/null +++ b/community/a2jmidid/control-unique-port-names-over-dbus.patch @@ -0,0 +1,143 @@ +From 034d5db9d017cdcd71ee95b0576ae974aad590f5 Mon Sep 17 00:00:00 2001 +From: Nedko Arnaudov +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 - 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 + diff --git a/community/a2jmidid/fix-spelling-mistakes-in-man-page.patch b/community/a2jmidid/fix-spelling-mistakes-in-man-page.patch new file mode 100644 index 000000000..92b56b20a --- /dev/null +++ b/community/a2jmidid/fix-spelling-mistakes-in-man-page.patch @@ -0,0 +1,34 @@ +From bc005a112e6fff85ba02f5f292f877d8daa70984 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B8rn=20Lomax?= +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 +-- +2.15.0 + diff --git a/community/a2jmidid/link-to-libpthread.patch b/community/a2jmidid/link-to-libpthread.patch new file mode 100644 index 000000000..1531e2b88 --- /dev/null +++ b/community/a2jmidid/link-to-libpthread.patch @@ -0,0 +1,25 @@ +From 24e3b8e543256ae8fdfb4b75eb9fd775f07c46e2 Mon Sep 17 00:00:00 2001 +From: Nedko Arnaudov +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 + diff --git a/community/a2jmidid/properly-fix-pthread-linking.patch b/community/a2jmidid/properly-fix-pthread-linking.patch new file mode 100644 index 000000000..aa2d49743 --- /dev/null +++ b/community/a2jmidid/properly-fix-pthread-linking.patch @@ -0,0 +1,35 @@ +From 7f82da7eb2f540a94db23331be98d42a58ddc269 Mon Sep 17 00:00:00 2001 +From: Nedko Arnaudov +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 +