pkgsrc-WIP-changes archive

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

ardour: Fix remaining problems



Module Name:	pkgsrc-wip
Committed By:	nia <nia%NetBSD.org@localhost>
Pushed By:	nee
Date:		Mon Dec 2 13:35:00 2019 +0000
Changeset:	702cbfd0c03867f64860506128255d3b25429d97

Modified Files:
	ardour/Makefile
	ardour/PLIST
	ardour/distinfo
	ardour/patches/patch-libs_backends_jack_jack__audiobackend.cc
	ardour/patches/patch-libs_backends_jack_jack__utils.cc
	ardour/patches/patch-wscript
Removed Files:
	ardour/TODO
	ardour/patches/patch-libs_ardour_ardour_session__configuration__vars.h

Log Message:
ardour: Fix remaining problems

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

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

diffstat:
 ardour/Makefile                                    | 13 ++++
 ardour/PLIST                                       | 12 ++--
 ardour/TODO                                        | 11 ----
 ardour/distinfo                                    | 10 +--
 ...bs_ardour_ardour_session__configuration__vars.h | 15 -----
 .../patch-libs_backends_jack_jack__audiobackend.cc | 18 +++++-
 .../patch-libs_backends_jack_jack__utils.cc        | 73 +++++++++++++++++++++-
 ardour/patches/patch-wscript                       |  9 +++
 8 files changed, 122 insertions(+), 39 deletions(-)

diffs:
diff --git a/ardour/Makefile b/ardour/Makefile
index 885943fd45..e6997e56ba 100644
--- a/ardour/Makefile
+++ b/ardour/Makefile
@@ -17,6 +17,19 @@ LICENSE=	gnu-gpl-v2
 USE_TOOLS+=	pkg-config perl
 USE_LANGUAGES=	c c++11
 
+EGDIR=		${PREFIX}/share/examples/ardour5
+
+WAF_ENV+=	EGDIR=${EGDIR}
+
+PKG_SYSCONFSUBDIR=	ardour5
+
+CONF_FILES+=	${EGDIR}/ardour.keys ${PKG_SYSCONFDIR}/ardour.keys
+CONF_FILES+=	${EGDIR}/ardour.menus ${PKG_SYSCONFDIR}/ardour.menus
+CONF_FILES+=	${EGDIR}/clearlooks.rc ${PKG_SYSCONFDIR}/clearlooks.rc
+CONF_FILES+=	${EGDIR}/default_ui_config ${PKG_SYSCONFDIR}/default_ui_config
+CONF_FILES+=	${EGDIR}/system_config ${PKG_SYSCONFDIR}/system_config
+CONF_FILES+=	${EGDIR}/trx.menus ${PKG_SYSCONFDIR}/trx.menus
+
 ARD_BACKENDS=	dummy
 
 .include "options.mk"
diff --git a/ardour/PLIST b/ardour/PLIST
index e2ee5bf173..6bbf284e94 100644
--- a/ardour/PLIST
+++ b/ardour/PLIST
@@ -3,12 +3,6 @@ bin/ardour5
 bin/ardour5-copy-mixer
 bin/ardour5-export
 bin/ardour5-fix_bbtppq
-etc/ardour5/ardour.keys
-etc/ardour5/ardour.menus
-etc/ardour5/clearlooks.rc
-etc/ardour5/default_ui_config
-etc/ardour5/system_config
-etc/ardour5/trx.menus
 lib/ardour5/LV2/a-comp.lv2/a-comp#stereo.ttl
 lib/ardour5/LV2/a-comp.lv2/a-comp.so
 lib/ardour5/LV2/a-comp.lv2/a-comp.ttl
@@ -430,6 +424,12 @@ share/ardour5/themes/clear_gray-ardour.colors
 share/ardour5/themes/cubasish-ardour.colors
 share/ardour5/themes/dark-ardour.colors
 share/ardour5/themes/unastudia-ardour.colors
+share/examples/ardour5/ardour.keys
+share/examples/ardour5/ardour.menus
+share/examples/ardour5/clearlooks.rc
+share/examples/ardour5/default_ui_config
+share/examples/ardour5/system_config
+share/examples/ardour5/trx.menus
 share/icons/hicolor/16x16/apps/ardour5.png
 share/icons/hicolor/22x22/apps/ardour5.png
 share/icons/hicolor/256x256/apps/ardour5.png
diff --git a/ardour/TODO b/ardour/TODO
deleted file mode 100644
index d2ab61524e..0000000000
--- a/ardour/TODO
+++ /dev/null
@@ -1,11 +0,0 @@
-- Need to figure out why jack with OSS fails to autostart when a new
-project is created.
-
-Currently you need to use the "Dummy" driver initially then switch
-to OSS once the project is created.
-
-It may be a race condition.
-
-- Also, probably a good idea to get jack's sun driver working on NetBSD.
-
-- Install config files "the pkgsrc way".
diff --git a/ardour/distinfo b/ardour/distinfo
index 368930d0a3..7f44b92ffa 100644
--- a/ardour/distinfo
+++ b/ardour/distinfo
@@ -5,7 +5,9 @@ RMD160 (Ardour-5.12.0.tar.bz2) = 71c25f13445f4036ff7127d071d8c1e0851d5eb8
 SHA512 (Ardour-5.12.0.tar.bz2) = c4b4332bddb2406924119c181622801725f4a7dd7741c1a66ddbc2236542764b786337da2f0a751f3bbe6e0389b5da765eb19b14a6a90c8f8a7fd68231e5067d
 Size (Ardour-5.12.0.tar.bz2) = 8852834 bytes
 SHA1 (patch-gtk2__ardour_ardour__ui.cc) = c8bbd019ecab91081520bdfa999f13f96c9dc39d
-SHA1 (patch-libs_ardour_ardour_session__configuration__vars.h) = 32785e3c57c99cdabcb5e3b5c1c27845d8002835
-SHA1 (patch-libs_backends_jack_jack__audiobackend.cc) = 91c7f9418db89b187dac87035cbca6d953e36741
-SHA1 (patch-libs_backends_jack_jack__utils.cc) = 5866320e2e73c38b17a782bd618c17af344cebf7
-SHA1 (patch-wscript) = 70d73deed21e8ccda804470dbd9e3dbee4b140bc
+SHA1 (patch-gtk2__ardour_wscript) = f78f4028e20d9d917fd1251618136c51ce3fa28a
+SHA1 (patch-libs_backends_jack_jack__audiobackend.cc) = 9fc4201948a6e88711d18d9218e1dacc1dd2700b
+SHA1 (patch-libs_backends_jack_jack__audiobackend.h) = e7cd23f39e31d3a4af3ed513b7e41503c4a6b16c
+SHA1 (patch-libs_backends_jack_jack__utils.cc) = 193f9df5a0b9a092bbfcd131741abfff00b674ee
+SHA1 (patch-libs_backends_jack_jack__utils.h) = 82f929f73a24238b28e2eca129975925c2b8ddc0
+SHA1 (patch-wscript) = 6d3cec0a6d9f81376f439768a38348ba77a5759d
diff --git a/ardour/patches/patch-libs_ardour_ardour_session__configuration__vars.h b/ardour/patches/patch-libs_ardour_ardour_session__configuration__vars.h
deleted file mode 100644
index 5d595ca467..0000000000
--- a/ardour/patches/patch-libs_ardour_ardour_session__configuration__vars.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-16-bit linear is more likely to work on more platforms, so default to it.
-
---- libs/ardour/ardour/session_configuration_vars.h.orig	2017-09-15 20:56:23.000000000 +0000
-+++ libs/ardour/ardour/session_configuration_vars.h
-@@ -29,7 +29,7 @@ CONFIG_VARIABLE (uint32_t, destructive_x
- CONFIG_VARIABLE (bool, use_region_fades, "use-region-fades", true)
- CONFIG_VARIABLE (bool, use_transport_fades, "use-transport-fades", true)
- CONFIG_VARIABLE (bool, use_monitor_fades, "use-monitor-fades", true)
--CONFIG_VARIABLE (SampleFormat, native_file_data_format,  "native-file-data-format", ARDOUR::FormatFloat)
-+CONFIG_VARIABLE (SampleFormat, native_file_data_format,  "native-file-data-format", ARDOUR::FormatInt16)
- CONFIG_VARIABLE (HeaderFormat, native_file_header_format,  "native-file-header-format", ARDOUR::WAVE)
- CONFIG_VARIABLE (bool, auto_play, "auto-play", false)
- CONFIG_VARIABLE (bool, auto_return, "auto-return", false)
diff --git a/ardour/patches/patch-libs_backends_jack_jack__audiobackend.cc b/ardour/patches/patch-libs_backends_jack_jack__audiobackend.cc
index 4e93d2b929..b2ad93b229 100644
--- a/ardour/patches/patch-libs_backends_jack_jack__audiobackend.cc
+++ b/ardour/patches/patch-libs_backends_jack_jack__audiobackend.cc
@@ -1,10 +1,26 @@
 $NetBSD$
 
+Default to 48000 since it seems to avoid some problems with the 44100
+fallback....
+
 Realtime JACK currently doesn't work on NetBSD.
 
 --- libs/backends/jack/jack_audiobackend.cc.orig	2017-09-15 20:56:23.000000000 +0000
 +++ libs/backends/jack/jack_audiobackend.cc
-@@ -504,7 +504,11 @@ JACKAudioBackend::setup_jack_startup_com
+@@ -118,6 +118,12 @@ JACKAudioBackend::set_driver (const std:
+ 	return 0;
+ }
+ 
++float
++JACKAudioBackend::default_sample_rate () const
++{
++	return 48000.0;
++}
++
+ vector<AudioBackend::DeviceStatus>
+ JACKAudioBackend::enumerate_devices () const
+ {
+@@ -504,7 +510,11 @@ JACKAudioBackend::setup_jack_startup_com
  	if (_target_sample_format == FormatInt16) {
  		options.force16_bit = _target_sample_format;
  	}
diff --git a/ardour/patches/patch-libs_backends_jack_jack__utils.cc b/ardour/patches/patch-libs_backends_jack_jack__utils.cc
index 5cc4c79670..188f42bfda 100644
--- a/ardour/patches/patch-libs_backends_jack_jack__utils.cc
+++ b/ardour/patches/patch-libs_backends_jack_jack__utils.cc
@@ -5,9 +5,78 @@ Realtime JACK currently doesn't work on NetBSD.
 This also means it's inadvisable to set the period count.
 Let the system worry about latency and don't endure terrible output quality.
 
+Support Sun backend.
+
 --- libs/backends/jack/jack_utils.cc.orig	2017-09-15 20:56:23.000000000 +0000
 +++ libs/backends/jack/jack_utils.cc
-@@ -485,8 +485,12 @@ ARDOUR::get_jack_audio_driver_supports_l
+@@ -66,6 +66,7 @@ namespace ARDOUR {
+ 	const char * const coreaudio_driver_name = X_("CoreAudio");
+ 	const char * const alsa_driver_name = X_("ALSA");
+ 	const char * const oss_driver_name = X_("OSS");
++	const char * const sun_driver_name = X_("Sun");
+ 	const char * const freebob_driver_name = X_("FreeBoB");
+ 	const char * const ffado_driver_name = X_("FFADO");
+ 	const char * const netjack_driver_name = X_("NetJACK");
+@@ -79,6 +80,7 @@ namespace {
+ 	const char * const coreaudio_driver_command_line_name = X_("coreaudio");
+ 	const char * const alsa_driver_command_line_name = X_("alsa");
+ 	const char * const oss_driver_command_line_name = X_("oss");
++	const char * const sun_driver_command_line_name = X_("sun");
+ 	const char * const freebob_driver_command_line_name = X_("freebob");
+ 	const char * const ffado_driver_command_line_name = X_("firewire");
+ 	const char * const netjack_driver_command_line_name = X_("netjack");
+@@ -109,6 +111,8 @@ ARDOUR::get_jack_audio_driver_names (vec
+ {
+ #ifdef PLATFORM_WINDOWS
+ 	audio_driver_names.push_back (portaudio_driver_name);
++#elif defined(__NetBSD__) || defined(__sun)
++	audio_driver_names.push_back (sun_driver_name);
+ #elif __APPLE__
+ 	audio_driver_names.push_back (coreaudio_driver_name);
+ #else
+@@ -216,6 +220,9 @@ get_jack_command_line_audio_driver_name 
+ 	} else if (driver_name == oss_driver_name) {
+ 		command_line_name = oss_driver_command_line_name;
+ 		return true;
++	} else if (driver_name == sun_driver_name) {
++		command_line_name = sun_driver_command_line_name;
++		return true;
+ 	} else if (driver_name == freebob_driver_name) {
+ 		command_line_name = freebob_driver_command_line_name;
+ 		return true;
+@@ -404,6 +411,12 @@ ARDOUR::get_jack_oss_device_names (devic
+ }
+ 
+ void
++ARDOUR::get_jack_sun_device_names (device_map_t& devices)
++{
++	devices.insert (make_pair (default_device_name, default_device_name));
++}
++
++void
+ ARDOUR::get_jack_freebob_device_names (device_map_t& devices)
+ {
+ 	devices.insert (make_pair (default_device_name, default_device_name));
+@@ -440,6 +453,8 @@ ARDOUR::get_jack_device_names_for_audio_
+ 		get_jack_alsa_device_names (devices);
+ 	} else if (driver_name == oss_driver_name) {
+ 		get_jack_oss_device_names (devices);
++	} else if (driver_name == sun_driver_name) {
++		get_jack_sun_device_names (devices);
+ 	} else if (driver_name == freebob_driver_name) {
+ 		get_jack_freebob_device_names (devices);
+ 	} else if (driver_name == ffado_driver_name) {
+@@ -472,7 +487,8 @@ ARDOUR::get_jack_device_names_for_audio_
+ bool
+ ARDOUR::get_jack_audio_driver_supports_two_devices (const string& driver)
+ {
+-	return (driver == alsa_driver_name || driver == oss_driver_name);
++	return (driver == alsa_driver_name || driver == oss_driver_name ||
++			driver == sun_driver_name);
+ }
+ 
+ bool
+@@ -485,8 +501,12 @@ ARDOUR::get_jack_audio_driver_supports_l
  bool
  ARDOUR::get_jack_audio_driver_supports_setting_period_count (const string& driver)
  {
@@ -20,7 +89,7 @@ Let the system worry about latency and don't endure terrible output quality.
  }
  
  bool
-@@ -664,7 +668,11 @@ ARDOUR::JackCommandLineOptions::JackComm
+@@ -664,7 +684,11 @@ ARDOUR::JackCommandLineOptions::JackComm
  	, timeout(0)
  	, no_mlock(false)
  	, ports_max(128)
diff --git a/ardour/patches/patch-wscript b/ardour/patches/patch-wscript
index 526eab7dc6..f3b5451ee7 100644
--- a/ardour/patches/patch-wscript
+++ b/ardour/patches/patch-wscript
@@ -22,3 +22,12 @@ Support NetBSD.
              if re.search ("freebsd", sys.platform) != None:
                  conf.check_cc(function_name='dlopen', header_name='dlfcn.h', uselib_store='DL')
              else:
+@@ -1366,7 +1366,7 @@ def build(bld):
+     if bld.is_defined ('BEATBOX'):
+         bld.recurse('tools/bb')
+             
+-    bld.install_files (bld.env['CONFDIR'], 'system_config')
++    bld.install_files (os.environ['EGDIR'], 'system_config')
+ 
+     bld.install_files (os.path.join (bld.env['DATADIR'], 'templates'), bld.path.ant_glob ('templates/**'), cwd=bld.path.find_dir ('templates'), relative_trick=True)
+ 


Home | Main Index | Thread Index | Old Index