4 # Copyright (C) 2015, 2018 Karl Linden <karl.j.linden@gmail.com>
5 # Copyleft (C) 2008-2022 Nedko Arnaudov
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 from waflib import Logs, Options, Utils
28 '--enable-pkg-config-dbus-service-dir',
31 help='force D-Bus service install dir to be one returned by pkg-config',
36 if not conf.check_cfg(package='dbus-1 >= 1.0.0', args='--cflags --libs', mandatory=False):
38 Logs.colors.RED + 'ERROR !! jackdbus will not be built because libdbus-dev is missing' + Logs.colors.NORMAL
42 dbus_dir = conf.check_cfg(package='dbus-1', args='--variable=session_bus_services_dir')
45 Logs.colors.RED + 'ERROR !! jackdbus will not be built because service dir is unknown' + Logs.colors.NORMAL
49 dbus_dir = dbus_dir.strip()
50 conf.env['DBUS_SERVICES_DIR_REAL'] = dbus_dir
52 if Options.options.enable_pkg_config_dbus_service_dir:
53 conf.env['DBUS_SERVICES_DIR'] = dbus_dir
55 conf.env['DBUS_SERVICES_DIR'] = os.path.normpath(conf.env['PREFIX'] + '/share/dbus-1/services')
60 obj = bld(features=['c', 'cprogram'], idx=17)
61 sysdeps_dbus_include = ['../linux']
63 obj.includes = sysdeps_dbus_include + ['.', '../', '../common', '../common/jack', 'libpaxsoundserveris/include/paxsoundserveris-1']
65 obj.defines = ['HAVE_CONFIG_H', 'SERVER_SIDE']
70 'controller_iface_configure.c',
71 'controller_iface_control.c',
72 'controller_iface_introspectable.c',
73 'controller_iface_patchbay.c',
74 'controller_iface_session_manager.c',
75 'controller_iface_transport.c',
79 'libpaxsoundserveris/src/reserve.c',
80 'libpaxsoundserveris/src/device_reservation.c',
82 obj.use = ['JACKSERVER']
83 if bld.env['IS_LINUX']:
84 obj.use += ['PTHREAD', 'DL', 'RT', 'DBUS-1', 'EXPAT']
85 if bld.env['IS_FREEBSD']:
86 obj.use += ['PTHREAD', 'EXECINFO', 'LIBSYSINFO', 'DBUS-1', 'EXPAT']
87 if bld.env['BUILD_SIGINFO']:
91 obj.target = 'jackdbus'
93 # process org.jackaudio.service.in -> org.jackaudio.service
96 source='org.jackaudio.service.in',
97 target='org.jackaudio.service',
98 install_path='${DBUS_SERVICES_DIR}/',
99 BINDIR=bld.env['PREFIX'] + '/bin')
101 bld.install_as('${PREFIX}/bin/' + "jack_control", 'jack_control/jack_control.py', chmod=Utils.O755)