[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] scons issue for 3.2



Works fine for me on Xandros, although I can't test anything fancy
(e.g. whether it makes debian packaging work more nicely or whatever).
Anyone?

Dan

2008/2/2, John Glover <glover.john@xxxxxxxxx>:
> Ok, here is a quick fix for this problem. Scons no longer checks for
> PKGConfig, libsndfile, fftwf when used with -c or debian, and won't
> exit if it doesn't find jack. I don't think any other dependencies
> will cause scons to exit.
>
> Ok to commit?
>
>
> John
>
>
> Index: SConstruct
> ===================================================================
> --- SConstruct  (revision 7195)
> +++ SConstruct  (working copy)
> @@ -104,6 +104,9 @@
>      context.Result(ret)
>      return (ret, res)
>
> +def get_new_pkg_env():
> +    return Environment(ENV = make_os_env('PATH', 'PKG_CONFIG_PATH'))
> +
>  def merge_lib_info(env, *others):
>      for other in others:
>          env.AppendUnique(CCFLAGS = other.get('CCFLAGS', []))
> @@ -348,23 +351,30 @@
>      return Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
>                                            'CheckPKG' : CheckPKG })
>
> +def isDefaultBuild():
> +    return not env.GetOption('clean') and not 'debian' in COMMAND_LINE_TARGETS
> +
>  conf = make_conf(env)
>
> -if not conf.CheckPKGConfig('0'):
> -    print 'pkg-config not found.'
> -    Exit(1)
> -
>  # libraries
>  libraries = { }
>  features = { }
>
> -# sndfile
> -success, libraries['sndfile'] = conf.CheckPKG('sndfile >= 1.0.16')
> -if not success: Exit(1)
> +if isDefaultBuild():
> +    if not conf.CheckPKGConfig('0'):
> +        print 'pkg-config not found.'
> +        Exit(1)
> +
> +    # sndfile
> +    success, libraries['sndfile'] = conf.CheckPKG('sndfile >= 1.0.16')
> +    if not success: Exit(1)
>
> -# FFTW
> -success, libraries['fftwf'] = conf.CheckPKG('fftw3f')
> -if not success: Exit(1)
> +    # FFTW
> +    success, libraries['fftwf'] = conf.CheckPKG('fftw3f')
> +    if not success: Exit(1)
> +else:
> +    libraries['sndfile'] = get_new_pkg_env()
> +    libraries['fftwf'] = get_new_pkg_env()
>
>  # audio api
>  if env['AUDIOAPI'] == 'jack':
> @@ -377,7 +387,10 @@
>              )
>      else:
>          success, libraries['audioapi'] = conf.CheckPKG('jack')
> -        if not success: Exit(1)
> +        if isDefaultBuild():
> +            if not success: Exit(1)
> +        else:
> +            libraries['audioapi'] = get_new_pkg_env()
>          libraries['audioapi'].Append(
>              CPPDEFINES = [('SC_AUDIO_API', 'SC_AUDIO_API_JACK'),
>                            'SC_USE_JACK_CLIENT_NEW'],
>
>
> On 02/02/2008, nescivi <nescivi@xxxxxxxxx> wrote:
> > On Feb 1, 2008 8:07 PM, John Glover <glover.john@xxxxxxxxx> wrote:
> > > I think Marije is saying that it fails when uninstalling if you do not
> > > have the dependencies, which certainly makes no sense.
> > >
> > > Eg: uninstall libsndfile. Now run scons -c install, and it will fail.
> > > It should not matter if libsndfile is there or not to uninstall.
> > >
> > > I'm looking into this, thankfully scons is python so it shouldn't be
> > > too much of a big deal I hope.
> >
> > That would be great,
> > thanks!
> >
> > sincerely,
> > Marije
> >
> > >
> > >
> > > John
> > >
> > >
> > >
> > > On 01/02/2008, andersvi@xxxxxxxxxxxxx <andersvi@xxxxxxxxxxxxx> wrote:
> > > > >>>>> "n" == nescivi  <nescivi@xxxxxxxxx> writes:
> > > >
> > > >     n> The main issue with the Sconstruct is that the uninstall option does
> > > >     n> not work correctly, i.e. when you do scons -c it will fail, as it
> > > >     n> starts looking for the dependencies, which it should not be doing at
> > > >     n> that point.
> > > >
> > > > Both 'scons -c .' and 'scons -c install' work just fine here.  Are the
> > > > failings specified anywhere?
> > > >
> > > >     n> The same thing happens when you try not to build the package, but want
> > > >     n> to build the debian package.
> > > >
> > > > Perhaps this is related to some debian-packaging thing?
> > > >
> > > > _______________________________________________
> > > > Sc-devel mailing list
> > > > Sc-devel@xxxxxxxxxxxxxxx
> > > > http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
> > > >
> > > _______________________________________________
> > > Sc-devel mailing list
> > > Sc-devel@xxxxxxxxxxxxxxx
> > > http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
> > >
> > _______________________________________________
> > Sc-devel mailing list
> > Sc-devel@xxxxxxxxxxxxxxx
> > http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
> >
> _______________________________________________
> Sc-devel mailing list
> Sc-devel@xxxxxxxxxxxxxxx
> http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
>


-- 
http://www.mcld.co.uk