Fix dbus detection and svnversion.h [re]generation
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3077 0c269be4-1314-0410-8aa9-9f06e86f4224
This commit is contained in:
parent
3c6d9b0a6b
commit
b8f5e3e74f
15
dbus/wscript
15
dbus/wscript
|
@ -4,17 +4,24 @@
|
|||
import os.path
|
||||
import Options
|
||||
import re # subst_func
|
||||
import Logs
|
||||
|
||||
def set_options(opt):
|
||||
opt.add_option('--enable-pkg-config-dbus-service-dir', action='store_true', default=False, help='force D-Bus service install dir to be one returned by pkg-config')
|
||||
|
||||
def configure(conf):
|
||||
# conf.check_pkg('dbus-1', pkgvars=['session_bus_services_dir'])
|
||||
# Needs a fix : nedko ??
|
||||
conf.check_cfg(package='dbus-1', pkgvars=['session_bus_services_dir'])
|
||||
if not conf.check_cfg(package='dbus-1', atleast_version='1.0.0', args='--cflags --libs'):
|
||||
return
|
||||
|
||||
dbus_dir = conf.check_cfg(package='dbus-1', args='--variable=session_bus_services_dir')
|
||||
if not dbus_dir:
|
||||
return
|
||||
|
||||
dbus_dir = dbus_dir.strip()
|
||||
conf.env['DBUS_SERVICES_DIR_REAL'] = dbus_dir
|
||||
|
||||
if Options.options.enable_pkg_config_dbus_service_dir:
|
||||
conf.env['DBUS_SERVICES_DIR'] = conf.env['DBUS-1_SESSION_BUS_SERVICES_DIR'][0]
|
||||
conf.env['DBUS_SERVICES_DIR'] = dbus_dir
|
||||
else:
|
||||
conf.env['DBUS_SERVICES_DIR'] = os.path.normpath(conf.env['PREFIX'] + '/share/dbus-1/services')
|
||||
|
||||
|
|
50
wscript
50
wscript
|
@ -9,6 +9,7 @@ g_maxlen = 40
|
|||
import shutil
|
||||
import Task
|
||||
import re
|
||||
import Logs
|
||||
|
||||
VERSION='1.9.0'
|
||||
APPNAME='jack'
|
||||
|
@ -34,29 +35,25 @@ def display_feature(msg, build):
|
|||
else:
|
||||
display_msg(msg, "no", 'YELLOW')
|
||||
|
||||
def create_svnversion_gen(bld, header='svnversion.h', define=None):
|
||||
def create_svnversion_task(bld, header='svnversion.h', define=None):
|
||||
import Constants, Build
|
||||
|
||||
cmd = '../svnversion_regenerate.sh ${TGT}'
|
||||
if define:
|
||||
cmd += " " + define
|
||||
cls = Task.simple_task_type('svnversion', cmd, color='BLUE')
|
||||
cls.must_run = lambda self: True
|
||||
#cls.before = 'cxx'
|
||||
|
||||
def sg(self):
|
||||
rt = Utils.h_file(self.outputs[0].abspath(self.env()))
|
||||
return rt
|
||||
cls.signature = sg
|
||||
cls = Task.simple_task_type('svnversion', cmd, color='BLUE', before='cc')
|
||||
cls.runnable_status = lambda self: Constants.RUN_ME
|
||||
|
||||
#def se(self):
|
||||
# r = sg(self)
|
||||
# return (r, r, r, r, r)
|
||||
#cls.cache_sig = property(sg, None)
|
||||
cls.cache_sig = None
|
||||
def post_run(self):
|
||||
sg = Utils.h_file(self.outputs[0].abspath(self.env))
|
||||
print sg.encode('hex')
|
||||
Build.bld.node_sigs[self.env.variant()][self.outputs[0].id] = sg
|
||||
cls.post_run = post_run
|
||||
|
||||
tsk = cls('svnversion')
|
||||
tsk = cls(bld.env.copy())
|
||||
tsk.inputs = []
|
||||
tsk.outputs = [bld.path.find_or_declare(header)]
|
||||
tsk.prio = 1 # execute this task first
|
||||
|
||||
def set_options(opt):
|
||||
# options provided by the modules
|
||||
|
@ -146,24 +143,23 @@ def configure(conf):
|
|||
display_msg('D-Bus service install directory', conf.env['DBUS_SERVICES_DIR'], 'CYAN')
|
||||
#display_msg('Settings persistence', xxx)
|
||||
|
||||
if conf.env['DBUS_SERVICES_DIR'] != conf.env['DBUS-1_SESSION_BUS_SERVICES_DIR'][0]:
|
||||
if conf.env['DBUS_SERVICES_DIR'] != conf.env['DBUS_SERVICES_DIR_REAL']:
|
||||
print
|
||||
print Logs.g_colors['RED'] + "WARNING: D-Bus session services directory as reported by pkg-config is"
|
||||
print Logs.g_colors['RED'] + "WARNING:",
|
||||
print Logs.g_colors['CYAN'] + conf.env['DBUS-1_SESSION_BUS_SERVICES_DIR'][0]
|
||||
print Logs.g_colors['RED'] + 'WARNING: but service file will be installed in'
|
||||
print Logs.g_colors['RED'] + "WARNING:",
|
||||
print Logs.g_colors['CYAN'] + conf.env['DBUS_SERVICES_DIR']
|
||||
print Logs.g_colors['RED'] + 'WARNING: You may need to adjust your D-Bus configuration after installing jackdbus'
|
||||
print Logs.colors.RED + "WARNING: D-Bus session services directory as reported by pkg-config is"
|
||||
print Logs.colors.RED + "WARNING:",
|
||||
print Logs.colors.CYAN + conf.env['DBUS_SERVICES_DIR_REAL']
|
||||
print Logs.colors.RED + 'WARNING: but service file will be installed in'
|
||||
print Logs.colors.RED + "WARNING:",
|
||||
print Logs.colors.CYAN + conf.env['DBUS_SERVICES_DIR']
|
||||
print Logs.colors.RED + 'WARNING: You may need to adjust your D-Bus configuration after installing jackdbus'
|
||||
print 'WARNING: You can override dbus service install directory'
|
||||
print 'WARNING: with --enable-pkg-config-dbus-service-dir option to this script'
|
||||
print Logs.g_colors['NORMAL'],
|
||||
print Logs.colors.NORMAL,
|
||||
print
|
||||
|
||||
def build(bld):
|
||||
# Needs a fix : nedko ??
|
||||
#if not os.access('svnversion.h', os.R_OK):
|
||||
# create_svnversion_gen(bld)
|
||||
if not os.access('svnversion.h', os.R_OK):
|
||||
create_svnversion_task(bld)
|
||||
|
||||
# process subfolders from here
|
||||
bld.add_subdirs('common')
|
||||
|
|
Loading…
Reference in New Issue