134 | | tests = { "ConfigGuess" : ConfigGuess, "CheckForApp" : CheckForApp } |
---|
| 137 | def CheckForPyModule( context, module ): |
---|
| 138 | context.Message( "Checking for the python module '" + module + "' " ) |
---|
| 139 | ret = True |
---|
| 140 | try: |
---|
| 141 | imp.find_module( module ) |
---|
| 142 | except ImportError: |
---|
| 143 | ret = False |
---|
| 144 | context.Result( ret ) |
---|
| 145 | return ret |
---|
| 146 | |
---|
| 147 | tests = { |
---|
| 148 | "ConfigGuess" : ConfigGuess, |
---|
| 149 | "CheckForApp" : CheckForApp, |
---|
| 150 | "CheckForPyModule": CheckForPyModule, |
---|
| 151 | } |
---|
250 | | # XXX: Maybe we can even drop these lower-case variables and only use the uppercase ones? |
---|
251 | | # |
---|
252 | | env['bindir'] = Template( os.path.join( env['BINDIR'] ) ).safe_substitute( env ) |
---|
253 | | env['libdir'] = Template( os.path.join( env['LIBDIR'] ) ).safe_substitute( env ) |
---|
254 | | env['includedir'] = Template( os.path.join( env['INCLUDEDIR'] ) ).safe_substitute( env ) |
---|
255 | | env['sharedir'] = Template( os.path.join( env['SHAREDIR'] ) ).safe_substitute( env ) |
---|
| 267 | # Uppercase variables are for usage in code, lowercase versions for usage in |
---|
| 268 | # scons-files for installing. |
---|
| 269 | # |
---|
| 270 | env['BINDIR'] = Template( env['BINDIR'] ).safe_substitute( env ) |
---|
| 271 | env['LIBDIR'] = Template( env['LIBDIR'] ).safe_substitute( env ) |
---|
| 272 | env['INCLUDEDIR'] = Template( env['INCLUDEDIR'] ).safe_substitute( env ) |
---|
| 273 | env['SHAREDIR'] = Template( env['SHAREDIR'] ).safe_substitute( env ) |
---|
| 274 | env['bindir'] = Template( destdir + env['BINDIR'] ).safe_substitute( env ) |
---|
| 275 | env['libdir'] = Template( destdir + env['LIBDIR'] ).safe_substitute( env ) |
---|
| 276 | env['includedir'] = Template( destdir + env['INCLUDEDIR'] ).safe_substitute( env ) |
---|
| 277 | env['sharedir'] = Template( destdir + env['SHAREDIR'] ).safe_substitute( env ) |
---|
| 405 | |
---|
| 406 | # |
---|
| 407 | # Deal with the DESTDIR vs. xdg-tools conflict (which is basicely that the xdg-tools can't deal with DESTDIR, so the packagers have to deal with this their own :-) |
---|
| 408 | # |
---|
| 409 | if len(destdir) > 0: |
---|
| 410 | if not len( ARGUMENTS.get( "WILL_DEAL_WITH_XDG_MYSELF", "" ) ) > 0: |
---|
| 411 | print """ |
---|
| 412 | WARNING! |
---|
| 413 | You are usin the (packagers) option DESTDIR to install this package to a |
---|
| 414 | different place than the real prefix. As the xdg-tools can't cope with |
---|
| 415 | that, the .desktop-files are not installed by this build, you have to |
---|
| 416 | deal with them your own. |
---|
| 417 | (And you have to look into the SConstruct to learn how to disable this |
---|
| 418 | message.) |
---|
| 419 | """ |
---|
| 420 | else: |
---|
| 421 | if env.has_key( 'XDG_TOOLS' ) and env.has_key( 'PYUIC' ): |
---|
| 422 | env.Command( "support/mixer/.ffado.org-ffadomixer.desktop", "support/mixer/ffado.org-ffadomixer.desktop", "xdg-desktop-menu install $SOURCES && touch $TARGET" ) |
---|
| 423 | env.NoCache( "support/mixer/.ffado.org-ffadomixer.desktop" ) |
---|
| 424 | env.Alias( "install", "support/mixer/.ffado.org-ffadomixer.desktop" ) |
---|
| 425 | |
---|