6 from waflib import Logs, Options
11 '--enable-pkg-config-dbus-service-dir',
14 help='force D-Bus service install dir to be one returned by pkg-config',
19 conf.define('JACK_VERSION', conf.env['JACK_VERSION'])
21 if not conf.check_cfg(package='dbus-1 >= 1.0.0', args='--cflags --libs', mandatory=False):
23 Logs.colors.RED + 'ERROR !! jackdbus will not be built because libdbus-dev is missing' + Logs.colors.NORMAL
27 dbus_dir = conf.check_cfg(package='dbus-1', args='--variable=session_bus_services_dir')
30 Logs.colors.RED + 'ERROR !! jackdbus will not be built because service dir is unknown' + Logs.colors.NORMAL
34 dbus_dir = dbus_dir.strip()
35 conf.env['DBUS_SERVICES_DIR_REAL'] = dbus_dir
37 if Options.options.enable_pkg_config_dbus_service_dir:
38 conf.env['DBUS_SERVICES_DIR'] = dbus_dir
40 conf.env['DBUS_SERVICES_DIR'] = os.path.normpath(conf.env['PREFIX'] + '/share/dbus-1/services')
45 obj = bld(features=['c', 'cprogram'], idx=17)
46 if bld.env['IS_LINUX']:
47 sysdeps_dbus_include = ['../linux', '../posix']
48 if bld.env['IS_FREEBSD']:
49 sysdeps_dbus_include = ['../freebsd', '../posix']
50 if bld.env['IS_MACOSX']:
51 sysdeps_dbus_include = ['../macosx', '../posix']
53 obj.includes = sysdeps_dbus_include + ['.', '../', '../common', '../common/jack']
55 obj.defines = ['HAVE_CONFIG_H', 'SERVER_SIDE']
60 'controller_iface_configure.c',
61 'controller_iface_control.c',
62 'controller_iface_introspectable.c',
63 'controller_iface_patchbay.c',
64 'controller_iface_session_manager.c',
65 'controller_iface_transport.c',
72 obj.use = ['JACKSERVER']
73 if bld.env['IS_LINUX']:
77 obj.use += ['PTHREAD', 'DL', 'RT', 'DBUS-1', 'EXPAT', 'STDC++']
78 if bld.env['IS_FREEBSD']:
82 obj.use += ['PTHREAD', 'EXECINFO', 'LIBSYSINFO', 'DBUS-1', 'EXPAT']
83 if bld.env['IS_MACOSX']:
87 obj.use += ['PTHREAD', 'DL', 'DBUS-1', 'EXPAT']
88 obj.target = 'jackdbus'
90 # process org.jackaudio.service.in -> org.jackaudio.service
93 source='org.jackaudio.service.in',
94 target='org.jackaudio.service',
95 install_path='${DBUS_SERVICES_DIR}/',
96 BINDIR=bld.env['PREFIX'] + '/bin')
98 if not bld.env['IS_WINDOWS']:
99 bld.install_files('${PREFIX}/bin', 'jack_control', chmod=0o755)