Import ardour-2.8.14, with added support for sndio midi.

Ardour is a full-featured, free and open-source hard disk recorder and
digital audio workstation program suitable for professional use. It
features unlimited audio tracks and buses, non-destructive, non-linear
editing with unlimited undo, and anything-to-anywhere signal routing. It
supports standard file formats, such as BWF, WAV, WAV64, AIFF and CAF,
and it can use LADSPA, LV2, VST and AudioUnit plugin formats.

with and ok ajacoutot@
This commit is contained in:
stsp 2012-08-17 15:33:32 +00:00
parent fa3aa22965
commit 1bc8c067b9
20 changed files with 933 additions and 0 deletions

66
audio/ardour/Makefile Normal file
View File

@ -0,0 +1,66 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
SHARED_ONLY = Yes
COMMENT = digital audio workstation
DISTNAME = ardour-2.8.14
CATEGORIES = audio
HOMEPAGE = http://ardour.org
# GPLv2+
PERMIT_PACKAGE_CDROM = Yes
PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes \
Xi Xinerama Xrandr Xrender Xxf86vm art_lgpl_2 atk-1.0 \
atkmm-1.6 aubio c cairo cairomm-1.0 curl drm execinfo \
expat fftw3 fftw3f fontconfig freetype gailutil gdk-x11-2.0 \
gdk_pixbuf-2.0 gdkmm-2.4 gio-2.0 giomm-2.4 glib-2.0 \
glibmm-2.4 gmodule-2.0 gnomecanvas-2 gnomecanvasmm-2.6 \
gobject-2.0 gthread-2.0 gtk-x11-2.0 gtkmm-2.4 jack \
lo lrdf m pango-1.0 pangocairo-1.0 pangoft2-1.0 pangomm-1.4 \
pcre pixman-1 png pthread pthread-stubs samplerate \
sigc-2.0 sndfile sndio stdc++ xcb xcb-render xcb-shm \
xml2 xslt z
# Use mirrors as official site has click-through donation-request download.
MASTER_SITES = http://stsp.name/openbsd/distfiles/ \
http://pkgs.fedoraproject.org/repo/pkgs/ardour/ardour-2.8.14.tar.bz2/c79219ba10735d0b061d53a84ae611a4/
EXTRACT_SUFX = .tar.bz2
MODULES = devel/gettext \
devel/scons
MODSCONS_ENV= CC="${CC}" \
CXX="${CXX}" \
CCFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LINKFLAGS="${LDFLAGS}" \
CPPPATH="${LOCALBASE}/include ${X11BASE}/include" \
LIBPATH="${LOCALBASE}/lib ${X11BASE}/lib" \
PREFIX="${TRUEPREFIX}" \
debug=0 \
DIST_LIBDIR=lib \
LIBLO=1 \
FREEDESKTOP=1 \
SYSLIBS=1
BUILD_DEPENDS = devel/boost
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+2,-guic \
misc/shared-mime-info
LIB_DEPENDS = audio/aubio \
audio/liblo \
devel/libexecinfo \
math/fftw3,-main \
textproc/liblrdf \
x11/gnome/libgnomecanvasmm
post-extract:
cp ${FILESDIR}/sndio_midiport.h ${WRKSRC}/libs/midi++2/midi++/
cp ${FILESDIR}/sndio_midiport.cc ${WRKSRC}/libs/midi++2/
post-install:
mv ${WRKINST}/etc/ardour2 ${PREFIX}/share/examples/
.include <bsd.port.mk>

2
audio/ardour/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (ardour-2.8.14.tar.bz2) = 4H5IOhI1TADYIdr77F9dJpAGK3WCBdrOq3I78emmM/4=
SIZE (ardour-2.8.14.tar.bz2) = 2169985

View File

@ -0,0 +1,136 @@
/*
* Copyright (c) 2012 Stefan Sperling <stsp@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <cstdlib>
#include <poll.h>
#include <pbd/xml++.h>
#include <midi++/sndio_midiport.h>
#include <midi++/types.h>
#include "i18n.h"
using namespace std;
using namespace MIDI;
SndioMidi_MidiPort::SndioMidi_MidiPort(const XMLNode& node) : Port(node)
{
const char *dev;
Descriptor desc(node);
if (strcmp(desc.device.c_str(), "ardour") == 0)
dev = NULL; /* default */
else
dev = desc.device.c_str();
hdl = mio_open(dev, MIO_IN | MIO_OUT, 1);
if (hdl) {
pfd = new struct pollfd[mio_nfds(hdl)];
_ok = true;
}
}
SndioMidi_MidiPort::~SndioMidi_MidiPort()
{
if (hdl) {
mio_close(hdl);
delete[] pfd;
}
}
int SndioMidi_MidiPort::poll(int event) const
{
int n = mio_pollfd(hdl, pfd, event);
if (n == 0)
return -1;
if (::poll(pfd, n, 100) < 0)
return -1;
int revents = mio_revents(hdl, pfd);
if (revents & event) {
for (unsigned int i = 0; i < sizeof(pfd)/sizeof(pfd[0]); i++) {
if (pfd[i].revents & event)
return pfd[i].fd;
}
}
return -1;
}
int SndioMidi_MidiPort::read(byte *buf, size_t max)
{
if (mio_eof(hdl)) {
cerr << "sndio MIDI read error" << endl;
return 0;
}
if (input_parser) {
size_t n = mio_read(hdl, buf, max);
if (n == 0)
return 0;
input_parser->raw_preparse(*input_parser, buf, n);
for (unsigned int i = 0; i < n; i++)
input_parser->scanner(buf[i]);
input_parser->raw_postparse(*input_parser, buf, n);
return (int)n;
}
return 0;
}
int SndioMidi_MidiPort::write(byte *buf, size_t len)
{
if (mio_eof(hdl)) {
cerr << "sndio MIDI write error" << endl;
return 0;
}
return (int)mio_write(hdl, buf, len);
}
int
SndioMidi_MidiPort::selectable() const
{
return poll(POLLIN|POLLOUT);
}
int
SndioMidi_MidiPort::discover(vector<PortSet>& ports)
{
int ret = 0;
/* Try to find usable sndio midi ports.
* Users can add additional ports manually. */
for (int n = 0; n < 8; n++) {
std::string dev_name = "rmidi/" + n;
struct mio_hdl *hdl;
hdl = mio_open(dev_name.c_str(), MIO_IN | MIO_OUT, 1);
if (hdl) {
mio_close(hdl);
XMLNode node(X_("MIDI-port"));
node.add_property("tag", "ardour");
node.add_property("device", dev_name);
node.add_property("type", "sndio");
node.add_property("mode", "duplex");
ports.back().ports.push_back(node);
ret = 1;
}
}
return ret;
}

View File

@ -0,0 +1,58 @@
/*
* Copyright (c) 2012 Stefan Sperling <stsp@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef __sndio_midiport_h__
#define __sndio_midiport_h__
#include <list>
#include <string>
#include <vector>
#include <midi++/port.h>
#include <sndio.h>
namespace MIDI {
class SndioMidi_MidiPort:public Port {
public:
SndioMidi_MidiPort(const XMLNode& node);
virtual ~ SndioMidi_MidiPort();
virtual int selectable() const;
static int discover(std::vector<PortSet>&);
static std::string typestring;
protected:
/* Direct I/O */
int write(byte * msg, size_t msglen);
int read(byte * buf, size_t max);
std::string get_typestring() const {
return typestring;
}
private:
struct mio_hdl *hdl;
int poll(int event) const;
struct pollfd *pfd;
};
} // namespace MIDI
#endif // __sndio_midiport_h__

View File

@ -0,0 +1,82 @@
$OpenBSD: patch-SConstruct,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- SConstruct.orig Fri Jul 20 17:25:16 2012
+++ SConstruct Fri Aug 17 15:23:17 2012
@@ -441,7 +441,6 @@ deps = \
'gtk+-2.0' : '2.8.1',
'libxml-2.0' : '2.6.0',
'samplerate' : '0.1.0',
- 'raptor2' : '2.0.0',
'lrdf' : '0.4.0',
'jack' : '0.120.0',
'libgnomecanvas-2.0' : '2.0',
@@ -588,9 +587,6 @@ libraries['lrdf'].ParseConfig('pkg-config --cflags --l
libraries['liblo'] = LibraryInfo()
libraries['liblo'].ParseConfig('pkg-config --cflags --libs liblo')
-libraries['raptor'] = LibraryInfo()
-libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor2')
-
libraries['sndfile'] = LibraryInfo()
libraries['sndfile'].ParseConfig ('pkg-config --cflags --libs sndfile')
@@ -629,6 +625,9 @@ libraries['midi++2'] = LibraryInfo (LIBS='midi++', LIB
libraries['pbd'] = LibraryInfo (LIBS='pbd', LIBPATH='#libs/pbd', CPPPATH='#libs/pbd')
libraries['gtkmm2ext'] = LibraryInfo (LIBS='gtkmm2ext', LIBPATH='#libs/gtkmm2ext', CPPPATH='#libs/gtkmm2ext')
+libraries['execinfo'] = LibraryInfo (LIBS='execinfo')
+conf = Configure(libraries['execinfo'])
+conf.Finish()
# SCons should really do this for us
@@ -678,6 +677,9 @@ if env['DIST_TARGET'] == 'auto':
else:
env['DIST_TARGET'] = 'leopard'
else:
+ if re.search("openbsd", config[config_kernel]):
+ if config[config_cpu] == 'amd64':
+ config[config_cpu] = 'x86_64'
if re.search ("x86_64", config[config_cpu]) != None:
env['DIST_TARGET'] = 'x86_64'
elif re.search("i[0-5]86", config[config_cpu]) != None:
@@ -698,6 +700,7 @@ if env['DIST_TARGET'] != 'tiger' and env['DIST_TARGET'
env['AUSTATE'] = 0
env['WITH_CARBON'] = 0
+build_host_supports_sse = 0
if config[config_cpu] == 'powerpc' and env['DIST_TARGET'] != 'none':
# Apple/PowerPC optimization options
#
@@ -929,6 +932,7 @@ libraries['vamphost'] = LibraryInfo (LIBS='vamphostsdk
env['RUBBERBAND'] = False
+env.Merge([libraries['fftw3f']])
conf = Configure (env)
if conf.CheckHeader ('fftw3.h'):
@@ -1061,6 +1065,11 @@ elif conf.CheckCHeader('/System/Library/Frameworks/Cor
env['SYSMIDI'] = 'CoreMIDI'
subst_dict['%MIDITAG%'] = "ardour"
subst_dict['%MIDITYPE%'] = "coremidi"
+elif conf.CheckHeader("sndio.h"):
+ libraries['sysmidi'] = LibraryInfo (LIBS='sndio')
+ env['SYSMIDI'] = 'SndioMIDI'
+ subst_dict['%MIDITAG%'] = "ardour"
+ subst_dict['%MIDITYPE%'] = "sndio"
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)
@@ -1283,11 +1292,7 @@ subst_dict['%INSTALL_PREFIX%'] = install_prefix;
subst_dict['%FINAL_PREFIX%'] = final_prefix;
subst_dict['%PREFIX%'] = final_prefix;
-if env['PREFIX'] == '/usr':
- final_config_prefix = '/etc'
-else:
- final_config_prefix = env['PREFIX'] + '/etc'
-
+final_config_prefix = '/etc'
config_prefix = '$DESTDIR' + final_config_prefix
#

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-gtk2_ardour_SConscript,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- gtk2_ardour/SConscript.orig Thu Apr 19 20:33:57 2012
+++ gtk2_ardour/SConscript Sat Aug 11 15:12:45 2012
@@ -413,7 +413,7 @@ for style in ['', 'BOLD', 'ITALIC']:
if env['GTKOSX']:
ardour_menus = env.Command ('ardour.menus', 'ardour.menus.in', "cpp -E -P -DGTKOSX -DTOP_MENUBAR ardour.menus.in ardour.menus", chdir=1)
else:
- ardour_menus = env.Command ('ardour.menus', 'ardour.menus.in', "cpp -E -P ardour.menus.in ardour.menus", chdir=1)
+ ardour_menus = env.Command ('ardour.menus', 'ardour.menus.in', "cpp -E -P ardour.menus.in > ardour.menus", chdir=1)
ardour_dark_theme = env.SubstInFile ('ardour2_ui_dark.rc', 'ardour2_ui_dark.rc.in', SUBST_DICT = my_font_dict)
ardour_light_theme = env.SubstInFile ('ardour2_ui_light.rc', 'ardour2_ui_light.rc.in', SUBST_DICT = my_font_dict)
@@ -529,14 +529,9 @@ if env['FREEDESKTOP']:
env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '22x22', 'mimetypes', 'application-x-ardour2.png'), 'icons/application-x-ardour_22px.png'))
env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '32x32', 'mimetypes', 'application-x-ardour2.png'), 'icons/application-x-ardour_32px.png'))
env.Alias('install', env.InstallAs(os.path.join(desktop_icon_install_prefix, '48x48', 'mimetypes', 'application-x-ardour2.png'), 'icons/application-x-ardour_48px.png'))
- env.Alias('install', env.Command (os.path.join(install_prefix, 'share', 'mime'), [], 'update-mime-database $TARGET'))
- # Update the icon cache #
- env.Alias('install', env.Command (desktop_icon_install_prefix, [], 'touch --no-create $TARGET'))
- env.Alias('install', env.Command (desktop_icon_install_prefix, [], 'gtk-update-icon-cache $TARGET'))
# Make the ardour2.desktop file and install it #
env.Alias('install', env.Command ('ardour2.desktop', 'ardour2.desktop.in', 'cat $SOURCES > $TARGET'))
env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'applications'), 'ardour2.desktop'))
- env.Alias('install', env.Command (os.path.join(install_prefix, 'share', 'applications'), [], 'update-desktop-database $TARGET'))
# uninstall target.. needed to run update-mime-database and update-desktop-database after removal. #`
remove_desktop_files = env.Command ('another_frobnicatory_decoy', [],
[ Delete (install_prefix + '/share/mime/packages/ardour2.xml'),

View File

@ -0,0 +1,33 @@
$OpenBSD: patch-gtk2_ardour_ardour_sh_in,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- gtk2_ardour/ardour.sh.in.orig Tue Feb 24 13:37:42 2009
+++ gtk2_ardour/ardour.sh.in Mon Jan 23 17:30:29 2012
@@ -13,28 +13,9 @@ if [ "$MLOCK_LIMIT" != "unlimited" ]; then
echo "WARNING: Your system has a limit for maximum amount of locked memory!"
echo " This might cause Ardour to run out of memory before your system runs"
echo " out of memory. You can view the memory limit with 'ulimit -l', and it"
- echo " is normally controlled by /etc/security/limits.conf"
+ echo " is normally controlled by /etc/login.conf"
echo ""
-fi
-
-
-## Glib atomic test
-
-GLIB=$(ldd %INSTALL_PREFIX%/%LIBDIR%/ardour2/ardour-%VERSION% 2> /dev/null | grep glib-2.0 | sed 's/.*=> \([^ ]*\) .*/\1/')
-
-if [ "$GLIB" = "" ]; then
- echo "WARNING: Could not check your glib-2.0 for mutex locking atomic operations."
- echo ""
-elif [ $(nm -D --radix=dec --defined-only -S $GLIB | grep -w g_atomic_int_add | cut -d ' ' -f 2) -gt 32 ]; then
- echo "WARNING: Your system contains a suspect libglib-2.0. Your version might be built"
- echo " to use mutex locking atomic operations. This is a fallback solution to"
- echo " a more robust hardware supported atomicity. It might cause reduced "
- echo " performance and/or deadlocks. Please contact your distribution support"
- echo " about this issue."
- echo " Unfortunately this check is not 100% accurate, so this might not be"
- echo " the case with your system."
- echo ""
fi
exec %INSTALL_PREFIX%/%LIBDIR%/ardour2/ardour-%VERSION% "$@"

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gtk2_ardour_ardour_ui_cc,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- gtk2_ardour/ardour_ui.cc.orig Sat Aug 11 23:50:19 2012
+++ gtk2_ardour/ardour_ui.cc Sat Aug 11 23:50:33 2012
@@ -716,7 +716,7 @@ ARDOUR_UI::check_memory_locking ()
"This might cause %1 to run out of memory before your system "
"runs out of memory. \n\n"
"You can view the memory limit with 'ulimit -l', "
- "and it is normally controlled by /etc/security/limits.conf"), PROGRAM_NAME));
+ "and it is normally controlled by /etc/login.conf"), PROGRAM_NAME));
VBox* vbox = msg.get_vbox();
HBox hbox;

View File

@ -0,0 +1,126 @@
$OpenBSD: patch-gtk2_ardour_engine_dialog_cc,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- gtk2_ardour/engine_dialog.cc.orig Thu Apr 19 16:35:13 2012
+++ gtk2_ardour/engine_dialog.cc Sat Aug 11 15:12:45 2012
@@ -14,7 +14,7 @@
#include <CoreFoundation/CFString.h>
#include <sys/param.h>
#include <mach-o/dyld.h>
-#else
+#elif defined(__linux__)
#include <alsa/asoundlib.h>
#endif
@@ -116,6 +116,8 @@ EngineControl::EngineControl ()
strings.clear ();
#ifdef __APPLE__
strings.push_back (X_("CoreAudio"));
+#elif defined(__OpenBSD__)
+ strings.push_back (X_("sndio"));
#else
strings.push_back (X_("ALSA"));
strings.push_back (X_("OSS"));
@@ -131,7 +133,9 @@ EngineControl::EngineControl ()
strings.clear ();
strings.push_back (_("Playback/Recording on 1 Device"));
+#ifndef __OpenBSD__
strings.push_back (_("Playback/Recording on 2 Devices"));
+#endif
strings.push_back (_("Playback only"));
strings.push_back (_("Recording only"));
set_popdown_strings (audio_mode_combo, strings);
@@ -162,7 +166,7 @@ EngineControl::EngineControl ()
basic_packer.attach (period_size_combo, 1, 2, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
row++;
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
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);
@@ -183,7 +187,7 @@ EngineControl::EngineControl ()
row++;
/* no audio mode with CoreAudio, its duplex or nuthin' */
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
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);
@@ -223,7 +227,7 @@ EngineControl::EngineControl ()
realtime_button.signal_toggled().connect (mem_fun (*this, &EngineControl::realtime_changed));
realtime_changed ();
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
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);
@@ -273,7 +277,7 @@ EngineControl::EngineControl ()
options_packer.attach (*label, 0, 1, row, row + 1, FILL|EXPAND, (AttachOptions) 0);
++row;
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
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));
@@ -289,7 +293,7 @@ EngineControl::EngineControl ()
device_packer.set_spacings (6);
row = 0;
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
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);
@@ -433,6 +437,8 @@ EngineControl::build_command_line (vector<string>& cmd
} else if (driver == X_("CoreAudio")) {
using_coreaudio = true;
cmd.push_back ("coreaudio");
+ } else if (driver == X_("sndio")) {
+ cmd.push_back ("sndio");
} else if (driver == X_("NetJACK")) {
using_netjack = true;
cmd.push_back ("netjack");
@@ -613,7 +619,7 @@ EngineControl::setup_engine ()
void
EngineControl::realtime_changed ()
{
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
priority_spinner.set_sensitive (realtime_button.get_active());
#endif
}
@@ -628,7 +634,12 @@ EngineControl::enumerate_devices (const string& driver
devices[driver] = enumerate_coreaudio_devices ();
#endif
-#ifndef __APPLE__
+#ifdef __OpenBSD__
+ } else if (driver == "sndio") {
+ devices[driver] = enumerate_sndio_devices ();
+#endif
+
+#ifdef __linux__
} else if (driver == "ALSA") {
devices[driver] = enumerate_alsa_devices ();
} else if (driver == "FFADO") {
@@ -753,6 +764,17 @@ Ardour and choose the relevant device then."
exit (1);
}
+
+ return devs;
+}
+#elif defined(__OpenBSD__)
+vector<string>
+EngineControl::enumerate_sndio_devices ()
+{
+ vector<string> devs;
+
+ backend_devs.clear ();
+ devs.push_back ("default");
return devs;
}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gtk2_ardour_engine_dialog_h,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- gtk2_ardour/engine_dialog.h.orig Sat Jan 21 16:42:23 2012
+++ gtk2_ardour/engine_dialog.h Sat Jan 21 16:42:41 2012
@@ -92,6 +92,8 @@ class EngineControl : public Gtk::VBox {
#ifdef __APPLE__
std::vector<std::string> enumerate_coreaudio_devices ();
+#elif defined(__OpenBSD__)
+ std::vector<std::string> enumerate_sndio_devices ();
#else
std::vector<std::string> enumerate_alsa_devices ();
std::vector<std::string> enumerate_oss_devices ();

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-gtk2_ardour_new_session_dialog_cc,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- gtk2_ardour/new_session_dialog.cc.orig Mon Jul 2 02:19:40 2012
+++ gtk2_ardour/new_session_dialog.cc Sat Aug 11 15:12:45 2012
@@ -589,7 +589,7 @@ NewSessionDialog::set_session_folder(const std::string
*/
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__OpenBSD__)
char buf[PATH_MAX];

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-libs_ardour_SConscript,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- libs/ardour/SConscript.orig Sat Aug 11 17:46:06 2012
+++ libs/ardour/SConscript Sat Aug 11 17:46:10 2012
@@ -327,7 +327,6 @@ ardour.Merge ([
libraries['lrdf'],
libraries['midi++2'],
libraries['pbd'],
- libraries['raptor'],
libraries['samplerate'],
libraries['sigc2'],
libraries['sndfile'],

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-libs_ardour_source_cc,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- libs/ardour/source.cc.orig Mon Jan 23 18:22:43 2012
+++ libs/ardour/source.cc Mon Jan 23 18:23:32 2012
@@ -79,7 +79,7 @@ Source::get_state ()
node->add_property ("id", buf);
if (_timestamp != 0) {
- snprintf (buf, sizeof (buf), "%ld", _timestamp);
+ snprintf (buf, sizeof (buf), "%d", _timestamp);
node->add_property ("timestamp", buf);
}
@@ -104,7 +104,7 @@ Source::set_state (const XMLNode& node)
}
if ((prop = node.property ("timestamp")) != 0) {
- sscanf (prop->value().c_str(), "%ld", &_timestamp);
+ sscanf (prop->value().c_str(), "%d", &_timestamp);
}
return 0;

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-libs_midi++2_SConscript,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- libs/midi++2/SConscript.orig Mon Jan 2 20:01:31 2012
+++ libs/midi++2/SConscript Mon Jan 2 20:05:13 2012
@@ -32,6 +32,7 @@ version.cc
sysdep_sources = Split ("""
alsa_sequencer_midiport.cc
coremidi_midiport.cc
+sndio_midiport.cc
""")
if env['SYSMIDI'] == 'CoreMIDI':
@@ -39,6 +40,9 @@ if env['SYSMIDI'] == 'CoreMIDI':
midi2.Append (CCFLAGS="-DWITH_COREMIDI")
midi2.Append (LINKFLAGS="-framework CoreMIDI")
midi2.Append (LINKFLAGS="-framework CoreFoundation")
+elif env['SYSMIDI'] == 'SndioMIDI':
+ sysdep_src = [ 'sndio_midiport.cc' ]
+ midi2.Append (CCFLAGS="-DWITH_SNDIO")
else:
sysdep_src = [ 'alsa_sequencer_midiport.cc' ]
midi2.Append (CCFLAGS="-DWITH_ALSA")

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-libs_midi++2_midi++_port_h,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- libs/midi++2/midi++/port.h.orig Sun Jan 22 04:25:49 2012
+++ libs/midi++2/midi++/port.h Sun Jan 22 04:26:02 2012
@@ -40,6 +40,7 @@ class Port : public sigc::trackable {
ALSA_RawMidi,
ALSA_Sequencer,
CoreMidi_MidiPort,
+ SndioMidi_MidiPort,
Null,
FIFO
};

View File

@ -0,0 +1,77 @@
$OpenBSD: patch-libs_midi++2_midifactory_cc,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- libs/midi++2/midifactory.cc.orig Tue Feb 24 13:37:50 2009
+++ libs/midi++2/midifactory.cc Mon Jan 23 17:31:34 2012
@@ -46,7 +46,15 @@ std::string MIDI::CoreMidi_MidiPort::typestring = "cor
#endif // WITH_COREMIDI
+#ifdef WITH_SNDIO
+#include <midi++/sndio_midiport.h>
+
+std::string MIDI::SndioMidi_MidiPort::typestring = "sndio";
+
+#endif // WITH_SNDIO
+
+
using namespace std;
using namespace MIDI;
using namespace PBD;
@@ -74,6 +82,12 @@ PortFactory::create_port (const XMLNode& node)
break;
#endif // WITH_COREMIDI
+#if WITH_SNDIO
+ case Port::SndioMidi_MidiPort:
+ port = new SndioMidi_MidiPort (node);
+ break;
+#endif // WITH_SNDIO
+
case Port::Null:
port = new Null_MidiPort (node);
break;
@@ -107,6 +121,12 @@ PortFactory::ignore_duplicate_devices (Port::Type type
break;
#endif // WITH_COREMIDI
+#if WITH_SNDIO
+ case Port::SndioMidi_MidiPort:
+ ret = false;
+ break;
+#endif // WITH_SNDIO
+
default:
break;
}
@@ -126,6 +146,10 @@ PortFactory::get_known_ports (vector<PortSet>& ports)
n += CoreMidi_MidiPort::discover (ports);
#endif // WITH_COREMIDI
+#if WITH_SNDIO
+ n += SndioMidi_MidiPort::discover (ports);
+#endif // WITH_SNDIO
+
return n;
}
@@ -141,6 +165,9 @@ PortFactory::default_port_type ()
return "coremidi";
#endif // WITH_COREMIDI
+#ifdef WITH_SNDIO
+ return "sndio";
+#endif
PBD::fatal << "programming error: no default port type defined in midifactory.cc" << endmsg;
}
@@ -157,6 +184,10 @@ PortFactory::string_to_type (const string& xtype)
#ifdef WITH_COREMIDI
} else if (strings_equal_ignore_case (xtype, CoreMidi_MidiPort::typestring)) {
return Port::CoreMidi_MidiPort;
+#endif
+#ifdef WITH_SNDIO
+ } else if (strings_equal_ignore_case (xtype, SndioMidi_MidiPort::typestring)) {
+ return Port::SndioMidi_MidiPort;
#endif
} else if (strings_equal_ignore_case (xtype, Null_MidiPort::typestring)) {
return Port::Null;

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-libs_midi++2_midiport_cc,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- libs/midi++2/midiport.cc.orig Mon Jan 23 16:25:09 2012
+++ libs/midi++2/midiport.cc Mon Jan 23 16:26:26 2012
@@ -51,6 +51,7 @@ Port::Port (const XMLNode& node)
_devname = desc.device;
_tagname = desc.tag;
_mode = desc.mode;
+ _type = desc.type;
if (_mode == O_RDONLY || _mode == O_RDWR) {
input_parser = new Parser (*this);

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-libs_pbd_SConscript,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
--- libs/pbd/SConscript.orig Wed Nov 23 15:08:24 2011
+++ libs/pbd/SConscript Sat Aug 11 15:12:45 2012
@@ -58,6 +58,9 @@ if conf.CheckCHeader('execinfo.h'):
conf.env.Append(CXXFLAGS="-DHAVE_EXECINFO")
pbd = conf.Finish()
+if libraries.has_key('execinfo'):
+ pbd.Merge([libraries['execinfo']])
+
pbd.Merge ([ libraries['sigc2'],
libraries['xml'],
libraries['glibmm2'],

6
audio/ardour/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
Ardour is a full-featured, free and open-source hard disk recorder and
digital audio workstation program suitable for professional use. It
features unlimited audio tracks and buses, non-destructive, non-linear
editing with unlimited undo, and anything-to-anywhere signal routing. It
supports standard file formats, such as BWF, WAV, WAV64, AIFF and CAF,
and it can use LADSPA, LV2, VST and AudioUnit plugin formats.

196
audio/ardour/pkg/PLIST Normal file
View File

@ -0,0 +1,196 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/08/17 15:33:32 stsp Exp $
bin/ardour2
lib/ardour2/
@bin lib/ardour2/${FULLPKGNAME}
lib/ardour2/engines/
lib/ardour2/engines/libclearlooks.so
lib/ardour2/libardour.so
lib/ardour2/libardour_cp.so
lib/ardour2/libgtkmm2ext.so
lib/ardour2/libmidi++.so
lib/ardour2/libpbd.so
lib/ardour2/librubberband.so
lib/ardour2/libvamphostsdk.so
lib/ardour2/libvampsdk.so
lib/ardour2/surfaces/
lib/ardour2/surfaces/libardour_genericmidi.so
lib/ardour2/surfaces/libardour_mackie.so
lib/ardour2/vamp/
lib/ardour2/vamp/libardourvampplugins.so
share/applications/ardour2.desktop
share/ardour2/
share/ardour2/icons/
share/ardour2/icons/application-x-ardour_16px.png
share/ardour2/icons/application-x-ardour_22px.png
share/ardour2/icons/application-x-ardour_32px.png
share/ardour2/icons/application-x-ardour_48px.png
share/ardour2/icons/ardour_icon_16px.png
share/ardour2/icons/ardour_icon_22px.png
share/ardour2/icons/ardour_icon_32px.png
share/ardour2/icons/ardour_icon_48px.png
share/ardour2/icons/computer_keyboard.png
share/ardour2/icons/computer_keyboard_active.png
share/ardour2/icons/crossfade-in-S1.png
share/ardour2/icons/crossfade-in-S2.png
share/ardour2/icons/crossfade-in-constant-power.png
share/ardour2/icons/crossfade-in-fast-cut.png
share/ardour2/icons/crossfade-in-linear.png
share/ardour2/icons/crossfade-in-long-cut.png
share/ardour2/icons/crossfade-in-short-cut.png
share/ardour2/icons/crossfade-in-slow-cut.png
share/ardour2/icons/crossfade-out-S1.png
share/ardour2/icons/crossfade-out-S2.png
share/ardour2/icons/crossfade-out-constant-power.png
share/ardour2/icons/crossfade-out-fast-cut.png
share/ardour2/icons/crossfade-out-linear.png
share/ardour2/icons/crossfade-out-long-cut.png
share/ardour2/icons/crossfade-out-short-cut.png
share/ardour2/icons/crossfade-out-slow-cut.png
share/ardour2/icons/fader_belt.png
share/ardour2/icons/fader_belt_h.png
share/ardour2/icons/ferret_02.png
share/ardour2/icons/grabber_edit_point.png
share/ardour2/icons/hide.png
share/ardour2/icons/nudge_left.png
share/ardour2/icons/nudge_right.png
share/ardour2/icons/record_normal_red.png
share/ardour2/icons/record_tape_red.png
share/ardour2/icons/sae.png
share/ardour2/icons/saelogo.png
share/ardour2/icons/strip_width.png
share/ardour2/icons/tool_audition.png
share/ardour2/icons/tool_gain.png
share/ardour2/icons/tool_object.png
share/ardour2/icons/tool_stretch.png
share/ardour2/icons/tool_zoom.png
share/ardour2/icons/transport_end.png
share/ardour2/icons/transport_loop.png
share/ardour2/icons/transport_play.png
share/ardour2/icons/transport_range.png
share/ardour2/icons/transport_record.png
share/ardour2/icons/transport_start.png
share/ardour2/icons/transport_stop.png
share/ardour2/icons/zoom_full.png
share/ardour2/icons/zoom_in.png
share/ardour2/icons/zoom_out.png
share/ardour2/pixmaps/
share/ardour2/pixmaps/forwardblarrow.xpm
share/ardour2/pixmaps/hiin.xpm
share/ardour2/pixmaps/hiout.xpm
share/ardour2/pixmaps/hslider00.xpm
share/ardour2/pixmaps/hslider01.xpm
share/ardour2/pixmaps/left_arrow.xpm
share/ardour2/pixmaps/linin.xpm
share/ardour2/pixmaps/linout.xpm
share/ardour2/pixmaps/loin.xpm
share/ardour2/pixmaps/loop.xpm
share/ardour2/pixmaps/loout.xpm
share/ardour2/pixmaps/lr.xpm
share/ardour2/pixmaps/regin.xpm
share/ardour2/pixmaps/regin2.xpm
share/ardour2/pixmaps/regout.xpm
share/ardour2/pixmaps/regout2.xpm
share/ardour2/pixmaps/revdblarrow.xpm
share/ardour2/pixmaps/right_arrow.xpm
share/ardour2/pixmaps/set-next-button.xpm
share/ardour2/pixmaps/small-round-button-01.xpm
share/ardour2/pixmaps/small_x.xpm
share/ardour2/pixmaps/toggle-button-00.xpm
share/ardour2/pixmaps/toggle-button-01.xpm
share/ardour2/pixmaps/tool_audition.xpm
share/ardour2/pixmaps/tool_gain.xpm
share/ardour2/pixmaps/tool_object.xpm
share/ardour2/pixmaps/tool_range.xpm
share/ardour2/pixmaps/tool_stretch.xpm
share/ardour2/pixmaps/tool_zoom.xpm
share/ardour2/pixmaps/vslider00.xpm
share/ardour2/pixmaps/vslider01.xpm
share/ardour2/pixmaps/vslider02_rail.xpm
share/ardour2/pixmaps/vslider02_slider.xpm
share/ardour2/pixmaps/vslider_slider_16wide.xpm
share/ardour2/pixmaps/zoom_full.xpm
share/ardour2/pixmaps/zoom_in.xpm
share/ardour2/pixmaps/zoom_out.xpm
share/ardour2/splash.png
share/ardour2/templates/
share/ardour2/templates/16 Tracks.template
share/ardour2/templates/2 Track.template
share/ardour2/templates/32 Tracks.template
share/ardour2/templates/4 Tracks.template
share/ardour2/templates/8 Tracks.template
share/examples/ardour2/
@sample ${SYSCONFDIR}/ardour2/
share/examples/ardour2/SAE-de-keypad.bindings
@sample ${SYSCONFDIR}/ardour2/SAE-de-keypad.bindings
share/examples/ardour2/SAE-de-nokeypad.bindings
@sample ${SYSCONFDIR}/ardour2/SAE-de-nokeypad.bindings
share/examples/ardour2/SAE-us-keypad.bindings
@sample ${SYSCONFDIR}/ardour2/SAE-us-keypad.bindings
share/examples/ardour2/SAE-us-nokeypad.bindings
@sample ${SYSCONFDIR}/ardour2/SAE-us-nokeypad.bindings
share/examples/ardour2/ardour-sae.menus
@sample ${SYSCONFDIR}/ardour2/ardour-sae.menus
share/examples/ardour2/ardour.menus
@sample ${SYSCONFDIR}/ardour2/ardour.menus
share/examples/ardour2/ardour2_ui_dark.rc
@sample ${SYSCONFDIR}/ardour2/ardour2_ui_dark.rc
share/examples/ardour2/ardour2_ui_dark_sae.rc
@sample ${SYSCONFDIR}/ardour2/ardour2_ui_dark_sae.rc
share/examples/ardour2/ardour2_ui_default.conf
@sample ${SYSCONFDIR}/ardour2/ardour2_ui_default.conf
share/examples/ardour2/ardour2_ui_light.rc
@sample ${SYSCONFDIR}/ardour2/ardour2_ui_light.rc
share/examples/ardour2/ardour2_ui_light_sae.rc
@sample ${SYSCONFDIR}/ardour2/ardour2_ui_light_sae.rc
share/examples/ardour2/ardour_system.rc
@sample ${SYSCONFDIR}/ardour2/ardour_system.rc
share/examples/ardour2/ergonomic-us.bindings
@sample ${SYSCONFDIR}/ardour2/ergonomic-us.bindings
share/examples/ardour2/mnemonic-us.bindings
@sample ${SYSCONFDIR}/ardour2/mnemonic-us.bindings
share/icons/hicolor/16x16/apps/ardour2.png
share/icons/hicolor/16x16/mimetypes/application-x-ardour2.png
share/icons/hicolor/22x22/apps/ardour2.png
share/icons/hicolor/22x22/mimetypes/application-x-ardour2.png
share/icons/hicolor/32x32/apps/ardour2.png
share/icons/hicolor/32x32/mimetypes/application-x-ardour2.png
share/icons/hicolor/48x48/apps/ardour2.png
share/icons/hicolor/48x48/mimetypes/application-x-ardour2.png
share/locale/cs/LC_MESSAGES/gtk2_ardour.mo
share/locale/de/LC_MESSAGES/gtk2_ardour.mo
share/locale/el/LC_MESSAGES/gtk2_ardour.mo
share/locale/el/LC_MESSAGES/libardour2.mo
share/locale/el/LC_MESSAGES/libgtkmm2ext.mo
share/locale/es/LC_MESSAGES/gtk2_ardour.mo
share/locale/es/LC_MESSAGES/libardour2.mo
share/locale/es/LC_MESSAGES/libgtkmm2ext.mo
share/locale/eu/LC_MESSAGES/gtk2_ardour.mo
share/locale/eu/LC_MESSAGES/libardour2.mo
share/locale/eu/LC_MESSAGES/libgtkmm2ext.mo
share/locale/fr/LC_MESSAGES/gtk2_ardour.mo
share/locale/fr/LC_MESSAGES/libardour2.mo
share/locale/it/LC_MESSAGES/gtk2_ardour.mo
share/locale/it/LC_MESSAGES/libardour2.mo
share/locale/nn/LC_MESSAGES/gtk2_ardour.mo
share/locale/nn/LC_MESSAGES/libardour2.mo
share/locale/nn/LC_MESSAGES/libgtkmm2ext.mo
share/locale/pl/LC_MESSAGES/gtk2_ardour.mo
share/locale/pl/LC_MESSAGES/libardour2.mo
share/locale/pl/LC_MESSAGES/libgtkmm2ext.mo
share/locale/pt/LC_MESSAGES/gtk2_ardour.mo
share/locale/pt/LC_MESSAGES/libgtkmm2ext.mo
share/locale/pt_PT/
share/locale/pt_PT/LC_MESSAGES/
share/locale/pt_PT/LC_MESSAGES/gtk2_ardour.mo
share/locale/ru/LC_MESSAGES/gtk2_ardour.mo
share/locale/ru/LC_MESSAGES/libardour2.mo
share/locale/ru/LC_MESSAGES/libgtkmm2ext.mo
share/locale/sv/LC_MESSAGES/gtk2_ardour.mo
share/locale/sv/LC_MESSAGES/libardour2.mo
share/mime/packages/ardour2.xml
@exec %D/bin/update-mime-database %D/share/mime
@unexec-delete %D/bin/update-mime-database %D/share/mime
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor
@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/hicolor