1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Add a proxy method to access protected IO::connecting_legal field from

Session::add_routes(); no idea why it worked before with GCC 4.2
- Switch from using non-standard STL slist container (which is not available
  with libc++) to the one provided by boost::container::slist, it allows to
  build Ardour on all supported FreeBSD versions/compilers
- Fix remaining cases of boost::shared_ptr to fix the build against Clang
This commit is contained in:
Alexey Dokuchaev 2013-12-24 04:01:44 +00:00
parent d44cfe00ee
commit ef0ae999f6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=337319
7 changed files with 163 additions and 0 deletions

View File

@ -0,0 +1,23 @@
--- gtk2_ardour/connection_editor.cc.orig
+++ gtk2_ardour/connection_editor.cc
@@ -502,9 +502,9 @@ ConnectionEditor::display_connection_sta
frame_label += _("\"");
port_frame.set_label (frame_label);
- for (slist<ScrolledWindow *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
+ for (boost::container::slist<ScrolledWindow *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
- slist<ScrolledWindow *>::iterator tmp;
+ boost::container::slist<ScrolledWindow *>::iterator tmp;
tmp = i;
tmp++;
@@ -612,7 +612,7 @@ ConnectionEditor::connection_port_button
tview->set_name ("ConnectionEditorPortListSelected");
- for (slist<ScrolledWindow *>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
+ for (boost::container::slist<ScrolledWindow *>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
Widget *child = (*i)->get_child();

View File

@ -0,0 +1,25 @@
--- gtk2_ardour/connection_editor.h.orig
+++ gtk2_ardour/connection_editor.h
@@ -20,12 +20,7 @@
#ifndef __ardour_gtk_connection_editor_h__
#define __ardour_gtk_connection_editor_h__
-#if __GNUC__ >= 3
-#include <ext/slist>
-using __gnu_cxx::slist;
-#else
-#include <slist.h>
-#endif
+#include <boost/container/slist.hpp>
#include <gtkmm/box.h>
#include <gtkmm/window.h>
@@ -116,7 +111,7 @@ class ConnectionEditor : public ArdourDi
Gtk::Button add_port_button;
Glib::Mutex port_display_lock;
- slist<Gtk::ScrolledWindow *> port_displays;
+ boost::container::slist<Gtk::ScrolledWindow *> port_displays;
Gtk::Button ok_button;
Gtk::Button cancel_button;

View File

@ -0,0 +1,39 @@
--- gtk2_ardour/io_selector.cc.orig
+++ gtk2_ardour/io_selector.cc
@@ -389,9 +389,9 @@ IOSelector::display_ports ()
limit = io->n_outputs();
}
- for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
+ for (boost::container::slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ) {
- slist<TreeView *>::iterator tmp;
+ boost::container::slist<TreeView *>::iterator tmp;
tmp = i;
++tmp;
@@ -632,13 +632,13 @@ IOSelector::connection_button_release (G
void
IOSelector::select_next_treeview ()
{
- slist<TreeView*>::iterator next;
+ boost::container::slist<TreeView*>::iterator next;
if (port_displays.empty() || port_displays.size() == 1) {
return;
}
- for (slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
+ for (boost::container::slist<TreeView *>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
if ((*i)->get_name() == "IOSelectorPortListSelected") {
@@ -681,7 +681,7 @@ IOSelector::select_treeview (TreeView* t
gtk_widget_queue_draw (ccol->button);
}
- for (slist<TreeView*>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
+ for (boost::container::slist<TreeView*>::iterator i = port_displays.begin(); i != port_displays.end(); ++i) {
if (*i == tview) {
continue;
}

View File

@ -0,0 +1,25 @@
--- gtk2_ardour/io_selector.h.orig
+++ gtk2_ardour/io_selector.h
@@ -20,12 +20,7 @@
#ifndef __ardour_ui_io_selector_h__
#define __ardour_ui_io_selector_h__
-#if __GNUC__ >= 3
-#include <ext/slist>
-using __gnu_cxx::slist;
-#else
-#include <slist.h>
-#endif
+#include <boost/container/slist.hpp>
#include <string>
@@ -110,7 +105,7 @@ class IOSelector : public Gtk::VBox {
Gtk::ScrolledWindow port_display_scroller;
Glib::Mutex port_display_lock;
- slist<Gtk::TreeView *> port_displays;
+ boost::container::slist<Gtk::TreeView *> port_displays;
void display_ports ();
void rescan ();

View File

@ -0,0 +1,13 @@
--- libs/ardour/ardour/io.h.orig
+++ libs/ardour/ardour/io.h
@@ -288,6 +288,10 @@ class IO : public PBD::StatefulDestructi
XMLNode *pending_state_node;
int ports_became_legal ();
+ static bool connecting_is_legal() {
+ return connecting_legal;
+ }
+
private:
mutable Glib::Mutex io_lock;

View File

@ -162,6 +162,15 @@
r->insert (r->end(), new_routes.begin(), new_routes.end());
resort_routes_using (r);
}
@@ -2150,7 +2149,7 @@ Session::add_routes (RouteList& new_rout
}
}
- if (_control_out && IO::connecting_legal) {
+ if (_control_out && IO::connecting_is_legal()) {
vector<string> cports;
uint32_t ni = _control_out->n_inputs();
@@ -2198,14 +2197,14 @@ Session::add_diskstream (boost::shared_p
}

View File

@ -0,0 +1,29 @@
--- libs/surfaces/mackie/mackie_control_protocol.cc.orig
+++ libs/surfaces/mackie/mackie_control_protocol.cc
@@ -64,8 +64,6 @@ using namespace sigc;
using namespace Mackie;
using namespace PBD;
-using boost::shared_ptr;
-
#include "i18n.h"
MackieMidiBuilder builder;
@@ -200,7 +198,7 @@ MackieControlProtocol::port_for_id( uint
// predicate for sort call in get_sorted_routes
struct RouteByRemoteId
{
- bool operator () ( const shared_ptr<Route> & a, const shared_ptr<Route> & b ) const {
+ bool operator () ( const boost::shared_ptr<Route> & a, const boost::shared_ptr<Route> & b ) const {
return a->remote_control_id() < b->remote_control_id();
}
@@ -680,7 +678,7 @@ MackieControlProtocol::create_ports()
}
}
-shared_ptr<Route>
+boost::shared_ptr<Route>
MackieControlProtocol::master_route()
{
boost::shared_ptr<IO> mo = session->master_out ();