[SCM] ardour/master: Fix FTBFS on kFreeBSD (Closes: #636921)

adiknoth-guest at users.alioth.debian.org adiknoth-guest at users.alioth.debian.org
Mon Aug 8 15:45:38 UTC 2011


The following commit has been merged in the master branch:
commit 65c0d290df123d4d84cfb53bae64c479242836c1
Author: Adrian Knoth <adi at drcomp.erfurt.thur.de>
Date:   Mon Aug 8 16:24:07 2011 +0200

    Fix FTBFS on kFreeBSD (Closes: #636921)

diff --git a/debian/patches/160_kfreebsd.patch b/debian/patches/160_kfreebsd.patch
new file mode 100644
index 0000000..17f1eee
--- /dev/null
+++ b/debian/patches/160_kfreebsd.patch
@@ -0,0 +1,178 @@
+From: Steven McDonald <steven.mcdonald at libremail.me>
+Description: Remove assumptions about ALSA to make it work on non-Linux ports.
+Forwarded: No (unclean patch, DEB_HOST_ARCH_OS is Debian specific)
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636921
+--- a/SConstruct
++++ b/SConstruct
+@@ -1016,7 +1016,7 @@
+ 
+ conf = Configure(env)
+ 
+-if conf.CheckCHeader('alsa/asoundlib.h'):
++if conf.CheckCHeader('alsa/asoundlib.h') and os.environ['DEB_HOST_ARCH_OS'] == 'linux':
+     libraries['sysmidi'] = LibraryInfo (LIBS='asound')
+     env['SYSMIDI'] = 'ALSA Sequencer'
+     subst_dict['%MIDITAG%'] = "seq"
+@@ -1034,8 +1034,10 @@
+     subst_dict['%MIDITAG%'] = "ardour"
+     subst_dict['%MIDITYPE%'] = "coremidi"
+ else:
+-    print "It appears you don't have the required MIDI libraries installed. For Linux this means you are missing the development package for ALSA libraries."
+-    sys.exit (1)
++    libraries['sysmidi'] = LibraryInfo ()
++    env['SYSMIDI'] = 'none'
++    subst_dict['%MIDITAG%'] = "none"
++    subst_dict['%MIDITYPE%'] = "none"
+ 
+ pname = env['PROGRAM_NAME']
+ subst_dict['%MIDI_DEVICE_NAME%'] = pname.lower()
+@@ -1320,9 +1322,12 @@
+ if conf.CheckCHeader('/System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/CoreAudio.h'):
+     subst_dict['%JACK_INPUT%'] = "coreaudio:Built-in Audio:in"
+     subst_dict['%JACK_OUTPUT%'] = "coreaudio:Built-in Audio:out"
+-else:
++elif os.environ['DEB_HOST_ARCH_OS'] == 'linux':
+     subst_dict['%JACK_INPUT%'] = "alsa_pcm:playback_"
+     subst_dict['%JACK_OUTPUT%'] = "alsa_pcm:capture_"
++else:
++    subst_dict['%JACK_INPUT%'] = "oss:playback_"
++    subst_dict['%JACK_OUTPUT%'] = "oss:capture_"
+ 
+ # posix_memalign available
+ if not conf.CheckFunc('posix_memalign'):
+--- a/libs/midi++2/SConscript
++++ b/libs/midi++2/SConscript
+@@ -39,9 +39,11 @@
+    midi2.Append (CCFLAGS="-DWITH_COREMIDI")
+    midi2.Append (LINKFLAGS="-framework CoreMIDI")
+    midi2.Append (LINKFLAGS="-framework CoreFoundation")
+-else:
++elif os.environ['DEB_HOST_ARCH_OS'] == 'linux':
+    sysdep_src = [ 'alsa_sequencer_midiport.cc' ]
+    midi2.Append (CCFLAGS="-DWITH_ALSA")
++else:
++   sysdep_src = [ ]
+ 
+ midi2.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
+ midi2.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+--- a/gtk2_ardour/engine_dialog.cc
++++ b/gtk2_ardour/engine_dialog.cc
+@@ -12,7 +12,7 @@
+ #include <CoreFoundation/CFString.h>
+ #include <sys/param.h>
+ #include <mach-o/dyld.h>
+-#else
++#elif defined(__linux__)
+ #include <alsa/asoundlib.h>
+ #endif
+ 
+@@ -113,7 +113,9 @@
+ #ifdef __APPLE__
+ 	strings.push_back (X_("CoreAudio"));
+ #else
++#ifdef __linux__
+ 	strings.push_back (X_("ALSA"));
++#endif
+ 	strings.push_back (X_("OSS"));
+ 	strings.push_back (X_("FFADO"));
+ #endif
+@@ -158,7 +160,7 @@
+ 	basic_packer.attach (period_size_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
+ 	row++;
+ 
+-#ifndef __APPLE__
++#ifdef __linux__
+ 	label = manage (new Label (_("Number of buffers")));
+ 	basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
+ 	basic_packer.attach (periods_spinner, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
+@@ -179,7 +181,7 @@
+ 	row++;
+ 	/* no audio mode with CoreAudio, its duplex or nuthin' */
+ 
+-#ifndef __APPLE__
++#ifdef __linux__
+ 	label = manage (new Label (_("Audio Mode")));
+ 	basic_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
+ 	basic_packer.attach (audio_mode_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
+@@ -218,7 +220,7 @@
+ 	realtime_button.signal_toggled().connect (mem_fun (*this, &EngineControl::realtime_changed));
+ 	realtime_changed ();
+ 
+-#ifndef __APPLE__
++#ifdef __linux__
+ 	label = manage (new Label (_("Realtime Priority")));
+ 	label->set_alignment (1.0, 0.5);
+ 	options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
+@@ -268,7 +270,7 @@
+ 	options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
+ 	++row;
+ 
+-#ifndef __APPLE__
++#ifdef __linux
+ 	label = manage (new Label (_("Dither")));	
+ 	label->set_alignment (1.0, 0.5);
+ 	options_packer.attach (dither_mode_combo, 1, 2, row, row + 1, FILL|EXPAND, AttachOptions(0));
+@@ -299,7 +301,7 @@
+ 	device_packer.set_spacings (6);
+ 	row = 0;
+ 
+-#ifndef __APPLE__
++#ifdef __linux__
+ 	label = manage (new Label (_("Input device")));
+ 	label->set_alignment (1.0, 0.5);
+ 	device_packer.attach (*label, 0, 1, row, row+1, FILL|EXPAND, (AttachOptions) 0);
+@@ -570,7 +572,7 @@
+ void
+ EngineControl::realtime_changed ()
+ {
+-#ifndef __APPLE__
++#ifdef __linux__
+ 	priority_spinner.set_sensitive (realtime_button.get_active());
+ #endif
+ }
+@@ -586,8 +588,10 @@
+ #endif
+ 
+ #ifndef __APPLE__
++#ifdef __linux__
+ 	} else if (driver == "ALSA") {
+ 		devices[driver] = enumerate_alsa_devices ();
++#endif
+ 	} else if (driver == "FFADO") {
+ 		devices[driver] = enumerate_ffado_devices ();
+ 	} else if (driver == "OSS") {
+@@ -714,6 +718,7 @@
+ 	return devs;
+ }
+ #else
++#ifdef __linux__
+ vector<string>
+ EngineControl::enumerate_alsa_devices ()
+ {
+@@ -774,6 +779,7 @@
+ 
+ 	return devs;
+ }
++#endif
+ 
+ vector<string>
+ EngineControl::enumerate_ffado_devices ()
+@@ -816,7 +822,9 @@
+ 	vector<string>& strings = devices[driver];
+ 
+ 	if (strings.empty() && driver != "FFADO" && driver != "Dummy") {
++#ifdef __linux__
+ 		error << string_compose (_("No devices found for driver \"%1\""), driver) << endmsg;
++#endif
+ 		return;
+ 	}
+ 	
+@@ -862,7 +870,7 @@
+ EngineControl::redisplay_latency ()
+ {
+ 	uint32_t rate = get_rate();
+-#ifdef __APPLE_
++#ifndef __linux__
+ 	float periods = 2;
+ #else
+ 	float periods = periods_adjustment.get_value();

-- 
ardour Debian packaging



More information about the pkg-multimedia-commits mailing list