pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ardour: Initial work on alsa and jack backends



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Jun 19 12:29:31 2016 +0200
Changeset:	e2d72369ef473a8c91b4e840b69322ec81de546d

Modified Files:
	ardour/Makefile
	ardour/distinfo
	ardour/patches/patch-libs_ardouralsautil_wscript
Added Files:
	ardour/MESSAGE
	ardour/options.mk
	ardour/patches/patch-libs_backends_alsa_alsa__audiobackend.h
	ardour/patches/patch-libs_backends_alsa_zita-alsa-pcmi.cc
	ardour/patches/patch-libs_backends_jack_jack__utils.cc
	ardour/patches/patch-libs_backends_jack_wscript
	ardour/patches/patch-wscript

Log Message:
ardour: Initial work on alsa and jack backends

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e2d72369ef473a8c91b4e840b69322ec81de546d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 ardour/MESSAGE                                     | 11 ++++++++
 ardour/Makefile                                    |  5 +++-
 ardour/distinfo                                    |  7 ++++-
 ardour/options.mk                                  | 25 +++++++++++++++++
 ardour/patches/patch-libs_ardouralsautil_wscript   | 15 +++++++++++
 .../patch-libs_backends_alsa_alsa__audiobackend.h  |  0
 .../patch-libs_backends_alsa_zita-alsa-pcmi.cc     | 28 +++++++++++++++++++
 .../patch-libs_backends_jack_jack__utils.cc        |  9 +++++++
 ardour/patches/patch-libs_backends_jack_wscript    | 16 +++++++++++
 ardour/patches/patch-wscript                       | 31 ++++++++++++++++++++++
 10 files changed, 145 insertions(+), 2 deletions(-)

diffs:
diff --git a/ardour/MESSAGE b/ardour/MESSAGE
new file mode 100644
index 0000000..e01c530
--- /dev/null
+++ b/ardour/MESSAGE
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.6 2009/03/17 14:46:39 jmcneill Exp $
+
+In order to get additional features available in Ardour, video-timeline and
+video-monitor for soundtracks you need to install:
+
+1) audio/xjadeo       - X JAck viDEo mOnitor
+
+2) multimedia/harvid  - HTTP Ardour Video Daemon
+
+===========================================================================
diff --git a/ardour/Makefile b/ardour/Makefile
index ca03b53..f5da858 100644
--- a/ardour/Makefile
+++ b/ardour/Makefile
@@ -143,15 +143,18 @@ pre-configure:
 
 WAF_ARGS+=	--prefix=${PREFIX}
 WAF_ARGS+=	--configdir=${PKG_SYSCONFDIR}
+# Use dlopen(3) for the JACK library
 WAF_ARGS+=	--libjack=weak
 WAF_ARGS+=	--optimize
-WAF_ARGS+=	--with-backends=dummy
+# Required to build on NetBSD
 WAF_ARGS+=	--cxx11
 
 WAF_REPLACE_EXECUTABLE=	no
 
 # ./waf i18n
 
+.include "options.mk"
+
 .include "../../devel/waf/waf.mk"
 .include "../../x11/gtkmm/buildlink3.mk"
 .include "../../audio/lilv/buildlink3.mk"
diff --git a/ardour/distinfo b/ardour/distinfo
index aad96cd..f5fec75 100644
--- a/ardour/distinfo
+++ b/ardour/distinfo
@@ -6,9 +6,14 @@ SHA512 (ardour-4.7.tar.gz) = 5daff563ec0b2dc38ec6ca55bb12526ef54da9d8d5a29a9fd6d
 Size (ardour-4.7.tar.gz) = 9863149 bytes
 SHA1 (patch-gtk2__ardour_ardour.sh.in) = f0d90933665ad0fdf816eafc7d13143f244fee1b
 SHA1 (patch-libs_ardour_session__state.cc) = a1966a289db67c4ddadffe68e681827720f61f8c
-SHA1 (patch-libs_ardouralsautil_wscript) = 5812a50ebbc9e27461617a238eca1d11445a4324
+SHA1 (patch-libs_ardouralsautil_wscript) = b5efaa7f83995da47cf807dedd063293baa61739
+SHA1 (patch-libs_backends_alsa_alsa__audiobackend.h) = da39a3ee5e6b4b0d3255bfef95601890afd80709
+SHA1 (patch-libs_backends_alsa_zita-alsa-pcmi.cc) = d988e72154536b759579c5bd515d74e3a849b569
+SHA1 (patch-libs_backends_jack_jack__utils.cc) = ca7d745eb75a5ad114d94d9c66f61ef481d9a5d4
+SHA1 (patch-libs_backends_jack_wscript) = f591b2351af7f6d08542484a3f9e2532f87cbac7
 SHA1 (patch-libs_fst_wscript) = fe13abd4f13cf3bc044b2f91adf17a4722b361ec
 SHA1 (patch-libs_pbd_fpu.cc) = bec4f67f8b52482b5b1cf582a4631c335efec8c7
 SHA1 (patch-libs_pbd_mountpoint.cc) = 1c19b7fd593dbc9773a0e344b543e5842c8880a4
 SHA1 (patch-libs_pbd_wscript) = 9af54613ec93752f643371568656ff9a1ff04a84
 SHA1 (patch-libs_vfork_wscript) = 37186271aaaffd82c4bafcb70218d9bc68648a4f
+SHA1 (patch-wscript) = 4350b98cf873515c811be3875c072e3295aba8fc
diff --git a/ardour/options.mk b/ardour/options.mk
new file mode 100644
index 0000000..b5814c2
--- /dev/null
+++ b/ardour/options.mk
@@ -0,0 +1,25 @@
+# $NetBSD: options.mk,v 1.1 2016/06/12 20:31:10 kamil Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.ardour
+
+PKG_SUPPORTED_OPTIONS=	alsa jack dummy
+PKG_SUGGESTED_OPTIONS=	alsa jack
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+.include "../../audio/alsa-lib/buildlink3.mk"
+WAF_ARGS+=      --with-backends=alsa
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+.include "../../audio/jack/buildlink3.mk"
+WAF_ARGS+=      --with-backends=jack
+.endif
+
+# Useful for developers
+.if !empty(PKG_OPTIONS:Mjack)
+WAF_ARGS+=      --with-backends=dummy
+.endif
+
+WAF_ARGS+=      --with-backends=alsa,jack,dummy
diff --git a/ardour/patches/patch-libs_ardouralsautil_wscript b/ardour/patches/patch-libs_ardouralsautil_wscript
index cf1c96f..869eed3 100644
--- a/ardour/patches/patch-libs_ardouralsautil_wscript
+++ b/ardour/patches/patch-libs_ardouralsautil_wscript
@@ -8,6 +8,21 @@ $NetBSD$
  from waflib.extras import autowaf as autowaf
  from waflib import Options
  import os
+@@ -17,12 +17,12 @@ def options(opt):
+ 
+ def configure(conf):
+     autowaf.configure(conf)
+-    if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw':
++    if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw' and not sys.platform.startswith('netbsd'):
+         autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
+         autowaf.check_pkg(conf, 'dbus-1', uselib_store='DBUS', mandatory = False)
+ 
+ def build(bld):
+-    if re.search ("linux", sys.platform) != None:
++    if re.search ("linux", sys.platform) != None and not sys.platform.startswith('netbsd'):
+         if bld.is_defined('HAVE_ALSA'):
+             obj = bld(features = 'cxx cxxshlib')
+             obj.source = [
 @@ -51,6 +51,7 @@ def build(bld):
              obj.defines = [
                      '_POSIX_SOURCE',
diff --git a/ardour/patches/patch-libs_backends_alsa_alsa__audiobackend.h b/ardour/patches/patch-libs_backends_alsa_alsa__audiobackend.h
new file mode 100644
index 0000000..e69de29
diff --git a/ardour/patches/patch-libs_backends_alsa_zita-alsa-pcmi.cc b/ardour/patches/patch-libs_backends_alsa_zita-alsa-pcmi.cc
new file mode 100644
index 0000000..b4b8239
--- /dev/null
+++ b/ardour/patches/patch-libs_backends_alsa_zita-alsa-pcmi.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- libs/backends/alsa/zita-alsa-pcmi.cc.orig	2016-02-19 01:28:56.000000000 +0000
++++ libs/backends/alsa/zita-alsa-pcmi.cc
+@@ -18,7 +18,11 @@
+ // ----------------------------------------------------------------------------
+ 
+ 
++#if defined(__NetBSD__)
++#include <sys/endian.h>
++#else
+ #include <endian.h>
++#endif
+ #include <sys/time.h>
+ #include "zita-alsa-pcmi.h"
+ 
+@@ -175,7 +179,11 @@ snd_pcm_sframes_t Alsa_pcmi::pcm_wait (v
+ 		timespec timeout;
+ 		timeout.tv_sec = 1;
+ 		timeout.tv_nsec = 0;
++#if defined(__NetBSD__)
++		r = pollts (_poll_fd, n2, &timeout, NULL);
++#else
+ 		r = ppoll (_poll_fd, n2, &timeout, NULL);
++#endif
+ 
+ 		if (r < 0)
+ 		{
diff --git a/ardour/patches/patch-libs_backends_jack_jack__utils.cc b/ardour/patches/patch-libs_backends_jack_jack__utils.cc
new file mode 100644
index 0000000..d27f2d4
--- /dev/null
+++ b/ardour/patches/patch-libs_backends_jack_jack__utils.cc
@@ -0,0 +1,9 @@
+$NetBSD$
+
+--- libs/backends/jack/jack_utils.cc.orig	2016-02-19 01:28:56.000000000 +0000
++++ libs/backends/jack/jack_utils.cc
+@@ -982,4 +982,3 @@ ARDOUR::set_midi_option (ARDOUR::JackCom
+ 
+ 	return -1;
+ }
+-
diff --git a/ardour/patches/patch-libs_backends_jack_wscript b/ardour/patches/patch-libs_backends_jack_wscript
new file mode 100644
index 0000000..4d75783
--- /dev/null
+++ b/ardour/patches/patch-libs_backends_jack_wscript
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- libs/backends/jack/wscript.orig	2016-06-19 10:00:50.209065188 +0000
++++ libs/backends/jack/wscript
+@@ -110,9 +110,8 @@ def build(bld):
+ 
+     #
+     # device discovery code in the jack backend needs ALSA
+-    # on Linux.
++    # on Linux/NetBSD.
+     #
+ 
+-    if re.search ("linux", sys.platform) != None:
++    if re.search ("linux", sys.platform) != None and not sys.platform.startswith('netbsd'):
+        obj.uselib += [ 'ALSA' ]
+-
diff --git a/ardour/patches/patch-wscript b/ardour/patches/patch-wscript
new file mode 100644
index 0000000..6f904c5
--- /dev/null
+++ b/ardour/patches/patch-wscript
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- wscript.orig	2016-02-19 01:28:56.000000000 +0000
++++ wscript
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/pkg/bin/python2.7
+ from waflib.extras import autowaf as autowaf
+ from waflib import Options
+ import os
+@@ -1093,16 +1093,16 @@ int main () { return 0; }
+     conf.env['BUILD_PABACKEND'] = any('portaudio' in b for b in backends)
+     conf.env['BUILD_CORECRAPPITA'] = any('coreaudio' in b for b in backends)
+ 
+-    if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']:
+-        print("PortAudio Backend is not for Linux")
++    if re.search ("linux", sys.platform) != None and not sys.platform.startswith('netbsd') and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']:
++        print("PortAudio Backend is not for Linux/NetBSD")
+         sys.exit(1)
+ 
+     if sys.platform != 'darwin' and conf.env['BUILD_CORECRAPPITA']:
+         print("Coreaudio backend is only available for OSX")
+         sys.exit(1)
+ 
+-    if re.search ("linux", sys.platform) == None and conf.env['BUILD_ALSABACKEND']:
+-        print("ALSA Backend is only available on Linux")
++    if re.search ("linux", sys.platform) == None and not sys.platform.startswith('netbsd') and conf.env['BUILD_ALSABACKEND']:
++        print("ALSA Backend is only available on Linux/NetBSD")
+         sys.exit(1)
+ 
+     set_compiler_flags (conf, Options.options)


Home | Main Index | Thread Index | Old Index