Changeset 761

Show
Ignore:
Timestamp:
12/16/07 13:25:22 (15 years ago)
Author:
arnonym
Message:

Implement a usable(?) configure check to find pyuic. It checks for the module pyqtconfig. At least on gentoo that is installed by the same app/lib as the pyuic app. If we used qt4 the check could also check for other py-modules...

Refactor the config.guess into a config-check so the result gets cached.

And build the mixer-guis again.

Next step: Instaling the mixer apps in a sane way. /me thinks about it...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/admin/pyuic.py

    r742 r761  
    2222# 
    2323 
     24import imp 
     25 
    2426def pyuic_action( target, source, env ): 
    25         print "'"+str( target[0] )+"'" 
    26         print "'"+str( source[0] )+"'" 
    27         print env.Command( str( target[0] ), str( source[0] ), action = "pyuic $SOURCE > $TARGET" ) 
     27        env.Execute( "pyuic " + str( source[0] ) + " > " + str( target[0] ) ) 
    2828        return 0 
    2929 
     
    3131        return "building '%s' from '%s'" % ( str(target[0]), str( source[0] ) ) 
    3232 
     33def PyQtCheck( context ): 
     34        context.Message( "Checking for pyuic (by checking for the python module pyqtconfig) " ) 
     35        ret = True 
     36        try: 
     37                imp.find_module( "pyqtconfig" ) 
     38        except ImportError: 
     39                ret = False 
     40        context.Result( ret ) 
     41        return ret 
     42 
    3343def generate( env, **kw ): 
    34         action = env.Action( pyuic_action, pyuic_string ) 
    35         env['BUILDERS']['PyUIC'] = env.Builder( action=action, src_suffix=".ui", single_source=True ) 
     44        env['BUILDERS']['PyUIC'] = env.Builder( action=pyuic_action, src_suffix=".ui", single_source=True ) 
     45        env['PYUIC_TESTS'] = { "PyQtCheck" : PyQtCheck } 
     46 
    3647 
    3748def exists( env ): 
  • trunk/libffado/SConstruct

    r756 r761  
     1#! /usr/bin/python 
    12# 
    23# Copyright (C) 2007 Arnold Krille 
     
    5556        BoolOption( "ENABLE_BEBOB", "Enable/Disable the bebob part.", True ), 
    5657        BoolOption( "ENABLE_FIREWORKS", "Enable/Disable the ECHO Audio FireWorks avc part.", True ), 
    57         BoolOption( "ENABLE_MOTU", "Enable/Disable the Motu part.", False ), 
     58        BoolOption( "ENABLE_MOTU", "Enable/Disable the Motu part.", True ), 
    5859        BoolOption( "ENABLE_DICE", "Enable/Disable the DICE part.", False ), 
    5960        BoolOption( "ENABLE_METRIC_HALO", "Enable/Disable the Metric Halo part.", False ), 
     
    105106For example with: "rm -Rf .sconsign.dblite cache" 
    106107 
    107 Currently it seems as if only the BEBOB is kind-of-working, thats why only BEBOB 
    108 is enabled by default. 
    109  
    110108Note that this is a development version! Don't complain if its not working! 
    111109See www.ffado.org for stable releases. 
     
    123121opts.Save( 'cache/' + build_base + "options.cache", env ) 
    124122 
    125  
    126 tests = {} 
     123def ConfigGuess( context ): 
     124        context.Message( "Trying to find the system triple: " ) 
     125        ret = os.popen( "admin/config.guess" ).read()[:-1] 
     126        context.Result( ret ) 
     127        return ret 
     128 
     129tests = { "ConfigGuess" : ConfigGuess } 
    127130tests.update( env['PKGCONFIG_TESTS'] ) 
     131tests.update( env['PYUIC_TESTS'] ) 
    128132 
    129133if not env.GetOption('clean'): 
     
    176180        env['ALSA_SEQ_OUTPUT'] = conf.CheckLib( 'asound', symbol='snd_seq_event_output_direct', autoadd=0 ) 
    177181 
     182        config_guess = conf.ConfigGuess() 
     183 
     184        if conf.PyQtCheck(): 
     185                env['PYUIC'] = True 
     186 
    178187        env = conf.Finish() 
    179188 
     
    237246# guess at the platform, used to define compiler flags 
    238247 
    239 config_guess = os.popen("admin/config.guess").read()[:-1] 
    240  
    241248config_cpu = 0 
    242249config_arch = 1 
     
    244251config_os = 3 
    245252config = config_guess.split ("-") 
    246  
    247 print "system triple: " + config_guess 
    248253 
    249254# Autodetect 
  • trunk/libffado/support/mixer/SConscript

    r742 r761  
    2525 
    2626if env.has_key('PYUIC'): 
    27         for app in ["mixer_phase24.ui", 
    28                     "mixer_phase88.ui", 
    29                     "mixer_saffirepro.ui", 
    30                     "mixer_saffire.ui", 
    31                     "mixer_af2.ui", 
    32                     ]: 
    33                 env.Command( target=app.replace(".","")+".py", source=app, action="$PYUIC $SOURCE > $TARGET" ) 
     27        for app in [ "mixer_phase24.ui", 
     28                    "mixer_phase88.ui", 
     29                    "mixer_saffirepro.ui", 
     30                    "mixer_saffire.ui", 
     31                    "mixer_af2.ui", 
     32                  ]: 
     33                env.PyUIC( source=app, target=app.replace(".","")+".py" )