2015-12-15 18:25:07 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
from waflib.extras import autowaf as autowaf
|
2022-04-09 09:17:54 -04:00
|
|
|
import waflib.Utils as Utils
|
2015-12-15 18:25:07 -05:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
autowaf.set_options(opt)
|
|
|
|
|
|
|
|
def configure(conf):
|
2016-01-07 07:18:55 -05:00
|
|
|
if not "dummy" in conf.env['BACKENDS']:
|
|
|
|
print ('session-utils depend on the dummy backend.')
|
|
|
|
autowaf.display_msg(conf, 'build session-utils', 'no')
|
|
|
|
return
|
2021-06-03 12:12:29 -04:00
|
|
|
|
2016-01-07 07:18:55 -05:00
|
|
|
autowaf.display_msg(conf, 'build session-utils', 'yes')
|
2015-12-15 18:25:07 -05:00
|
|
|
conf.load('misc')
|
|
|
|
|
|
|
|
def build_ardour_util(bld, util):
|
|
|
|
pgmprefix = bld.env['PROGRAM_NAME'].lower() + str(bld.env['MAJOR'])
|
|
|
|
|
|
|
|
# just the normal executable version of the GTK GUI
|
|
|
|
obj = bld (features = 'cxx c cxxprogram')
|
|
|
|
# this program does not do the whole hidden symbols thing
|
|
|
|
obj.cxxflags = [ '-fvisibility=default' ]
|
|
|
|
obj.source = ['common.cc', util + '.cc' ]
|
|
|
|
obj.target = pgmprefix + '-' + util
|
|
|
|
obj.includes = ['.']
|
|
|
|
obj.use = [ 'libpbd',
|
|
|
|
'libardour',
|
|
|
|
'libardour_cp',
|
2017-09-24 12:03:54 -04:00
|
|
|
'libtemporal',
|
2015-12-15 18:25:07 -05:00
|
|
|
'libmidipp',
|
|
|
|
]
|
|
|
|
obj.defines = [
|
|
|
|
'VERSIONSTRING="' + str(bld.env['VERSION']) + '"',
|
2016-06-03 11:37:05 -04:00
|
|
|
'UTILNAME="' + str(pgmprefix + '-' + util) + '"',
|
2015-12-15 18:25:07 -05:00
|
|
|
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
|
|
|
|
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
|
|
|
|
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
|
|
|
|
'PACKAGE="' + "ARDOURUTILS" + '"',
|
|
|
|
]
|
|
|
|
obj.install_path = bld.env['LIBDIR'] + '/utils'
|
2020-02-13 18:20:45 -05:00
|
|
|
obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GIOMM GTHREAD OGG CURL DL XML'
|
2015-12-15 18:25:07 -05:00
|
|
|
obj.uselib += ' AUDIOUNITS OSX LO '
|
2020-02-13 18:20:45 -05:00
|
|
|
obj.uselib += ' FFTW3F LO TAGLIB LILV RUBBERBAND AUBIO LRDF ARCHIVE VAMPSDK VAMPHOSTSDK'
|
|
|
|
|
|
|
|
if bld.is_defined('HAVE_SUIL'):
|
|
|
|
obj.uselib += ' SUIL'
|
2015-12-15 18:25:07 -05:00
|
|
|
|
2023-05-04 15:31:13 -04:00
|
|
|
if bld.is_defined('HAVE_USB'):
|
|
|
|
obj.uselib += ' USB'
|
|
|
|
|
2015-12-15 18:25:07 -05:00
|
|
|
if sys.platform == 'darwin':
|
|
|
|
obj.uselib += ' AUDIOUNITS OSX'
|
|
|
|
obj.use += ' libappleutility'
|
|
|
|
obj.includes += ['../libs']
|
|
|
|
|
|
|
|
if bld.env['build_target'] == 'mingw':
|
2016-10-14 12:33:16 -04:00
|
|
|
obj.install_path = bld.env['BINDIR']
|
2015-12-15 18:25:07 -05:00
|
|
|
|
|
|
|
if bld.is_defined('NEED_INTL'):
|
|
|
|
obj.linkflags = ' -lintl'
|
|
|
|
|
|
|
|
def build(bld):
|
2016-01-07 07:18:55 -05:00
|
|
|
# session-utils depend on the dummy backend
|
|
|
|
if not "dummy" in bld.env['BACKENDS']:
|
|
|
|
return
|
2015-12-15 18:25:07 -05:00
|
|
|
|
|
|
|
pgmprefix = bld.env['PROGRAM_NAME'].lower() + str(bld.env['MAJOR'])
|
|
|
|
|
2020-11-14 19:21:40 -05:00
|
|
|
utils = bld.path.ant_glob('[a-z]*.cc', excl=['example.cc', 'common.cc'])
|
2015-12-15 18:25:07 -05:00
|
|
|
|
|
|
|
for util in utils:
|
2020-01-20 17:08:11 -05:00
|
|
|
fn = os.path.splitext(os.path.basename(str(util)))[0]
|
2015-12-15 18:25:07 -05:00
|
|
|
build_ardour_util(bld, fn)
|
2016-10-14 12:33:16 -04:00
|
|
|
if bld.env['build_target'] != 'mingw':
|
|
|
|
bld.symlink_as(bld.env['BINDIR'] + '/' + pgmprefix + "-" + fn, bld.env['LIBDIR'] + '/utils/ardour-util.sh')
|
|
|
|
|
|
|
|
if bld.env['build_target'] == 'mingw':
|
|
|
|
return
|
2015-12-15 18:25:07 -05:00
|
|
|
|
|
|
|
obj = bld(features = 'subst')
|
|
|
|
obj.source = 'ardour-util.sh.in'
|
|
|
|
obj.target = 'ardour-util.sh'
|
|
|
|
obj.chmod = Utils.O755
|
|
|
|
obj.install_path = bld.env['LIBDIR'] + '/utils'
|
|
|
|
obj.LIBDIR = os.path.normpath(bld.env['DLLDIR'])
|
|
|
|
obj.DATADIR = os.path.normpath(bld.env['DATADIR'])
|
|
|
|
obj.CONFDIR = os.path.normpath(bld.env['CONFDIR'])
|