Changeset 1493
- Timestamp:
- 11/30/08 14:53:26 (15 years ago)
- Files:
-
- trunk/libffado/admin/pkgconfig.py (modified) (1 diff)
- trunk/libffado/SConstruct (modified) (5 diffs)
- trunk/libffado/support/dbus/org.ffado.Control.service.in (added)
- trunk/libffado/support/dbus/SConscript (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/admin/pkgconfig.py
r864 r1493 84 84 return ret 85 85 86 # 87 # Checks for the existance of the package and returns the value of the specified variable. 88 # 89 def GetPKGVariable( context, name, variable ): 90 import os 91 92 context.Message( "Checking for variable %s in package %s... \t" % (variable,name) ) 93 94 ret = context.TryAction( "pkg-config --exists '%s'" % name )[0] 95 if not ret: 96 context.Result( ret ) 97 return ret 98 99 out = os.popen2( "pkg-config --variable=%s %s" % (variable,name) )[1] 100 ret = out.read() 101 102 context.Result( True ) 103 return ret 104 86 105 def generate( env, **kw ): 87 env['PKGCONFIG_TESTS' ] = { 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG, 'GetPKGFlags' : GetPKGFlags }106 env['PKGCONFIG_TESTS' ] = { 'CheckForPKGConfig' : CheckForPKGConfig, 'CheckForPKG' : CheckForPKG, 'GetPKGFlags' : GetPKGFlags, 'GetPKGVariable' : GetPKGVariable } 88 107 89 108 def exists( env ): trunk/libffado/SConstruct
r1491 r1493 40 40 else: 41 41 build_base='' 42 43 destdir = ARGUMENTS.get( 'DESTDIR', "" )44 42 45 43 if not os.path.isdir( "cache" ): … … 314 312 env['%s_FLAGS' % name2] = conf.GetPKGFlags( pkg, '1.0.0' ) 315 313 314 # 315 # Get the directory where dbus stores the service-files 316 # 317 env['dbus_service_dir'] = conf.GetPKGVariable( 'dbus-1', 'session_bus_services_dir' ).strip() 316 318 317 319 config_guess = conf.ConfigGuess() … … 365 367 366 368 # 369 # Get the DESTDIR (if wanted) from the commandline 370 # 371 env.destdir = ARGUMENTS.get( 'DESTDIR', "" ) 372 373 # 367 374 # Uppercase variables are for usage in code, lowercase versions for usage in 368 375 # scons-files for installing. … … 372 379 env['INCLUDEDIR'] = Template( env['INCLUDEDIR'] ).safe_substitute( env ) 373 380 env['SHAREDIR'] = Template( env['SHAREDIR'] ).safe_substitute( env ) 374 env['bindir'] = Template( destdir + env['BINDIR'] ).safe_substitute( env )375 env['libdir'] = Template( destdir + env['LIBDIR'] ).safe_substitute( env )376 env['includedir'] = Template( destdir + env['INCLUDEDIR'] ).safe_substitute( env )377 env['sharedir'] = Template( destdir + env['SHAREDIR'] ).safe_substitute( env )381 env['bindir'] = Template( env.destdir + env['BINDIR'] ).safe_substitute( env ) 382 env['libdir'] = Template( env.destdir + env['LIBDIR'] ).safe_substitute( env ) 383 env['includedir'] = Template( env.destdir + env['INCLUDEDIR'] ).safe_substitute( env ) 384 env['sharedir'] = Template( env.destdir + env['SHAREDIR'] ).safe_substitute( env ) 378 385 379 386 env.Command( target=env['sharedir'], source="", action=Mkdir( env['sharedir'] ) ) … … 577 584 # their own :-/ 578 585 # 579 if len( destdir) > 0:586 if len(env.destdir) > 0: 580 587 if not len( ARGUMENTS.get( "WILL_DEAL_WITH_XDG_MYSELF", "" ) ) > 0: 581 588 print """ trunk/libffado/support/dbus/SConscript
r1185 r1493 1 #!/bin/env python 1 2 # 2 3 # Copyright (C) 2007-2008 Arnold Krille … … 21 22 # along with this program. If not, see <http://www.gnu.org/licenses/>. 22 23 # 24 25 import os 23 26 24 27 Import( 'env' ) … … 64 67 env.Install( "$bindir", app ) 65 68 69 if env['dbus_service_dir'] and ( env.destdir or os.access( env['dbus_service_dir'], os.W_OK ) ): 70 print "Will install the service-file" 71 servicefile = env.ScanReplace('org.ffado.Control.service.in') 72 targetdir = env.destdir + env['dbus_service_dir'] 73 env.Alias( "install", env.Install( env.destdir + env['dbus_service_dir'], servicefile ) ) 74 66 75 # static versions 67 76 if static_env['BUILD_STATIC_TOOLS']: … … 70 79 static_app = app + "-static" 71 80 static_env.Program( target=static_app, source = static_env.Split( apps[app] ) ) 81 82 # vim: et