From 34d0c6905eacd8a439f7bb25d36d6cb215748903 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 20 Apr 2009 01:58:34 +0200 Subject: [PATCH] SCons: now require either a custom 'gdl-lum' or GDL >= 2.27.1 --- SConstruct | 10 +++++++--- admin/scons/LumieraEnvironment.py | 10 ++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/SConstruct b/SConstruct index 194c2df7e..9707a7b16 100644 --- a/SConstruct +++ b/SConstruct @@ -263,8 +263,12 @@ def configurePlatform(env): if not conf.CheckPkgConfig('cairomm-1.0', 0.6): problems.append('Unable to configure Cairo--, exiting.') - if not conf.CheckPkgConfig('gdl-1.0', '0.6.1'): - problems.append('Unable to configure the GNOME DevTool Library.') + verGDL = '2.27.1' + if not conf.CheckPkgConfig('gdl-lum', verGDL, alias='gdl'): + print 'Custom package "gdl-lum" not found. Trying official GDL release >=%s...' % verGDL + if not conf.CheckPkgConfig('gdl-1.0', verGDL, alias='gdl'): + problems.append('GNOME Docking Library not found. We either need a very recent GDL ' + 'version (>=%s), or the custom package "gdl-lum".' % verGDL) if not conf.CheckPkgConfig('librsvg-2.0', '2.18.1'): problems.append('Need rsvg Library for rendering icons.') @@ -351,7 +355,7 @@ def defineBuildTargets(env, artifacts): # the Lumiera GTK GUI envGtk = env.Clone() - envGtk.mergeConf(['gtkmm-2.4','cairomm-1.0','gdl-1.0','xv','xext','sm']) + envGtk.mergeConf(['gtkmm-2.4','cairomm-1.0','gdl','xv','xext','sm']) envGtk.Append(CPPDEFINES='LUMIERA_PLUGIN', LIBS=core) objgui = srcSubtree(envGtk,'$SRCDIR/gui') diff --git a/admin/scons/LumieraEnvironment.py b/admin/scons/LumieraEnvironment.py index 56fd81a81..44b76ed07 100644 --- a/admin/scons/LumieraEnvironment.py +++ b/admin/scons/LumieraEnvironment.py @@ -63,7 +63,7 @@ class LumieraEnvironment(Environment): return self - def addLibInfo (self, libID, minVersion=0): + def addLibInfo (self, libID, minVersion=0, alias=None): """ use pkg-config to create an Environment describing the lib. Don't add this defs to the current Environment, rather store them in the libInfo Dictionary. @@ -73,8 +73,10 @@ class LumieraEnvironment(Environment): print "Problems configuring the Library %s (>= %s)" % (libID,minVersion) return False - self.libInfo[libID] = libInfo = LumieraEnvironment() + self.libInfo[libID] = libInfo = LumieraEnvironment() libInfo.ParseConfig ('pkg-config --cflags --libs '+ libID ) + if alias: + self.libInfo[alias] = libInfo return libInfo def Glob (self, pattern): @@ -107,9 +109,9 @@ class LumieraConfigContext(ConfigBase): def __init__(self, *args,**kw): ConfigBase.__init__(self,*args,**kw) - def CheckPkgConfig (self, libID, minVersion=0): + def CheckPkgConfig (self, libID, minVersion=0, alias=None): print "Checking for library configuration: %s " % libID # self.Message(self,"Checking for library configuration: %s " % libID) - return self.env.addLibInfo (libID, minVersion) + return self.env.addLibInfo (libID, minVersion, alias)