View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001341 | ardour | features | public | 2006-12-01 04:03 | 2008-11-20 23:51 |
| Reporter | timbyr | Assigned To | paul | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Summary | 0001341: Check for the minimum required dependency versions | ||||
| Description | Ardour requires specific minimum versions of some libraries to build successfully but does not check that the minimum required version/s are installed prior to starting the build. Attached is a patch that does this, the specific required versions may need to be adjusted a bit. | ||||
| Tags | No tags attached. | ||||
|
2006-12-01 04:03
|
check-dependencies.patch (2,824 bytes)
Index: SConstruct
===================================================================
--- SConstruct (revision 1177)
+++ SConstruct (working copy)
@@ -389,6 +389,57 @@
print "OK, VST support will be enabled"
+#######################
+# Dependency Checking #
+#######################
+
+deps = \
+{
+ 'glib-2.0' : '2.10.1',
+ 'gthread-2.0' : '2.10.1',
+ 'gtk+-2.0' : '2.8.1',
+ 'libxml-2.0' : '2.6.0',
+ 'samplerate' : '0.1.2',
+ 'raptor' : '1.4.8',
+ 'lrdf' : '0.4.0',
+ 'jack' : '0.101.1',
+ 'libgnomecanvas-2.0' : '2.0'
+}
+
+def DependenciesRequiredMessage():
+ print 'You do not have the necessary dependencies required to build ardour'
+ print 'Please consult http://ardour.org/building for more information'
+
+def CheckPKGConfig(context, version):
+ context.Message( 'Checking for pkg-config version >= %s... ' %version )
+ ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
+ context.Result( ret )
+ return ret
+
+def CheckPKGVersion(context, name, version):
+ context.Message( 'Checking for %s... ' % name )
+ ret = context.TryAction('pkg-config --atleast-version=%s %s' %(version,name) )[0]
+ context.Result( ret )
+ return ret
+
+conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
+ 'CheckPKGVersion' : CheckPKGVersion })
+
+# I think a more recent version is needed on win32
+min_pkg_config_version = '0.8.0'
+
+if not conf.CheckPKGConfig(min_pkg_config_version):
+ print 'pkg-config >= %s not found.' % min_pkg_config_version
+ Exit(1)
+
+for pkg, version in deps.iteritems():
+ if not conf.CheckPKGVersion( pkg, version ):
+ print '%s >= %s not found.' %(pkg, version)
+ DependenciesRequiredMessage()
+ Exit(1)
+
+env = conf.Finish()
+
# ----------------------------------------------------------------------
# Construction environment setup
# ----------------------------------------------------------------------
@@ -540,6 +591,24 @@
env = conf.Finish()
if env['SYSLIBS']:
+
+ syslibdeps = \
+ {
+ 'sigc++-2.0' : '2.0',
+ 'gtkmm-2.4' : '2.8',
+ 'libgnomecanvasmm-2.6' : '2.12.0'
+ }
+
+ conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
+ 'CheckPKGVersion' : CheckPKGVersion })
+
+ for pkg, version in syslibdeps.iteritems():
+ if not conf.CheckPKGVersion( pkg, version ):
+ print '%s >= %s not found.' %(pkg, version)
+ DependenciesRequiredMessage()
+ Exit(1)
+
+ env = conf.Finish()
libraries['sigc2'] = LibraryInfo()
libraries['sigc2'].ParseConfig('pkg-config --cflags --libs sigc++-2.0')
|
|
|
applied to my code, to be committed to svn soon. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-12-01 04:03 | timbyr | New Issue | |
| 2006-12-01 04:03 | timbyr | File Added: check-dependencies.patch | |
| 2006-12-01 17:33 | paul | Status | new => resolved |
| 2006-12-01 17:33 | paul | Resolution | open => fixed |
| 2006-12-01 17:33 | paul | Assigned To | => paul |
| 2006-12-01 17:33 | paul | Note Added: 0002835 | |
| 2008-11-20 23:51 | seablade | Status | resolved => closed |