diff --git a/SConstruct b/SConstruct index 12f6b9909..c5f2971ee 100644 --- a/SConstruct +++ b/SConstruct @@ -35,6 +35,7 @@ CUSTOPTIONSFILE = 'custom-options' SRCDIR = 'src' BINDIR = 'bin' TESTDIR = 'tests' +ICONDIR = 'icons' VERSION = '0.1+pre.01' #-----------------------------------Configuration @@ -61,6 +62,7 @@ def setupBasicEnvironment(): env.Replace( VERSION=VERSION , SRCDIR=SRCDIR , BINDIR=BINDIR + , ICONDIR=ICONDIR , CPPPATH=["#"+SRCDIR] # used to find includes, "#" means always absolute to build-root , CPPDEFINES=['-DLUMIERA_VERSION='+VERSION ] # note: it's a list to append further defines , CCFLAGS='-Wall ' # -fdiagnostics-show-option @@ -211,8 +213,36 @@ def configurePlatform(env): if not conf.CheckLibWithHeader('boost_regex-mt','boost/regex.hpp','C++'): print 'We need the boost regular expression lib (incl. binary lib for linking).' Exit(1) - - + +# if not conf.CheckLibWithHeader('gavl', ['gavlconfig.h', 'gavl/gavl.h'], 'C'): + + if not conf.CheckPkgConfig('gavl', 1.0): + print 'Did not find Gmerlin Audio Video Lib [http://gmerlin.sourceforge.net/gavl.html], exiting.' + Exit(1) + else: + conf.env.mergeConf('gavl') + + if not conf.CheckPkgConfig('gtkmm-2.4', 2.8): + print 'Unable to configure GTK--, exiting.' + Exit(1) + + if not conf.CheckPkgConfig('cairomm-1.0', 0.6): + print 'Unable to configure Cairo--, exiting.' + Exit(1) + + if not conf.CheckPkgConfig('gdl-1.0', '0.6.1'): + print 'Unable to configure the GNOME DevTool Library, exiting.' + Exit(1) + + if not conf.CheckPkgConfig('xv'): Exit(1) +# if not conf.CheckPkgConfig('xext'): Exit(1) +# if not conf.CheckPkgConfig('sm'): Exit(1) +# +# obviously not needed? + + print "** Gathered Library Info: %s" % conf.env.libInfo.keys() + + # create new env containing the finished configuration return conf.Finish() @@ -245,7 +275,7 @@ def defineBuildTargets(env, artifacts): objlib = ( srcSubtree(env,'$SRCDIR/common') + srcSubtree(env,'$SRCDIR/lib') ) - plugobj = srcSubtree(env,'$SRCDIR/plugin', isShared=True) + objplug = srcSubtree(env,'$SRCDIR/plugin', isShared=True) core = ( env.StaticLibrary('$BINDIR/lumiback.la', objback) + env.StaticLibrary('$BINDIR/lumiproc.la', objproc) + env.StaticLibrary('$BINDIR/lumi.la', objlib) @@ -259,7 +289,16 @@ def defineBuildTargets(env, artifacts): env.Depends(objlib, precomp) artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core ) - artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', plugobj) + artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', objplug) + + # the Lumiera GTK GUI + envgtk = env.Clone().mergeConf(['gtkmm-2.4','cairomm-1.0','gdl-1.0','xv','xext','sm']) + objgui = srcSubtree(envgtk,'$SRCDIR/gui') + + artifacts['lumigui'] = ( envgtk.Program('$BINDIR/lumigui', objgui + core) + + env.Install('$BINDIR', env.Glob('$ICONDIR/*.png')) + + env.Install('$BINDIR', env.Glob('$SRCDIR/gui/*.rc')) + ) # call subdir SConscript(s) for independent components SConscript(dirs=[SRCDIR+'/tool'], exports='env artifacts core') @@ -275,7 +314,7 @@ def definePostBuildTargets(env, artifacts): il = env.Alias('install-lib', '$DESTDIR/lib') env.Alias('install', [ib, il]) - build = env.Alias('build', artifacts['lumiera']+artifacts['plugins']+artifacts['tools']) + build = env.Alias('build', artifacts['lumiera']+artifacts['lumigui']+artifacts['plugins']+artifacts['tools']) allbu = env.Alias('allbuild', build+artifacts['testsuite']) env.Default('build') # additional files to be cleaned when cleaning 'build' diff --git a/admin/scons/Buildhelper.py b/admin/scons/Buildhelper.py index c13fda4d3..02f17b2b4 100644 --- a/admin/scons/Buildhelper.py +++ b/admin/scons/Buildhelper.py @@ -90,6 +90,18 @@ def globRootdirs(roots): +def filterNodes(nlist, removeName=None): + """ filter out scons build nodes using the given criteria. + removeName: if set, remove all nodes with this srcname + """ + if removeName: + predicate = lambda n : not fnmatch.fnmatch(os.path.basename(str(n[0])), removeName) + else: + predicate = lambda n : True; + + return filter(predicate, nlist) + + def RegisterPrecompiledHeader_Builder(env): """ Registeres an Custom Builder for generating a precompiled Header. Note you should define a dependency to the PCH file diff --git a/admin/scons/LumieraEnvironment.py b/admin/scons/LumieraEnvironment.py index 48401a487..82d419a65 100644 --- a/admin/scons/LumieraEnvironment.py +++ b/admin/scons/LumieraEnvironment.py @@ -51,15 +51,15 @@ class LumieraEnvironment(Environment): for elm in other: self.mergeConf(elm) elif isinstance(other, str): - if not other in self.libInfo: - raise "Lib-info '%s' not available" % other - else: + if other in self.libInfo: self.mergeConf(self.libInfo[other]) else: self.Append (LIBS = other.get ('LIBS',[])) self.Append (LIBPATH = other.get ('LIBPATH', [])) self.Append (CPPPATH = other.get('CPPPATH', [])) self.Append (LINKFLAGS = other.get('LINKFLAGS', [])) + + return self def addLibInfo (self, libID, minVersion=0): @@ -75,7 +75,12 @@ class LumieraEnvironment(Environment): self.libInfo[libID] = libInfo = LumieraEnvironment() libInfo.ParseConfig ('pkg-config --cflags --libs '+ libID ) return libInfo - + + def Glob (self, pattern): + """ temporary workaround; newer versions of SCons provide this as a global function + """ + pattern = self.subst(pattern) + return glob.glob(pattern) class LumieraConfigContext(SConf): diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 06082da31..965ac6079 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -25,7 +25,7 @@ liblumicommon_a_CXXFLAGS = $(CXXFLAGS) -Wall liblumicommon_a_CPPFLAGS = -I$(top_srcdir)/src/ liblumicommon_a_SOURCES = \ - $(liblumicommon_a_srcdir)/time.cpp \ + $(liblumicommon_a_srcdir)/lumitime.cpp \ $(liblumicommon_a_srcdir)/util.cpp \ $(liblumicommon_a_srcdir)/visitor.cpp \ $(liblumicommon_a_srcdir)/cmdline.cpp \ @@ -43,7 +43,7 @@ noinst_HEADERS += \ $(liblumicommon_a_srcdir)/singleton.hpp \ $(liblumicommon_a_srcdir)/singletonpolicies.hpp \ $(liblumicommon_a_srcdir)/singletonpreconfigure.hpp \ - $(liblumicommon_a_srcdir)/time.hpp \ + $(liblumicommon_a_srcdir)/lumitime.hpp \ $(liblumicommon_a_srcdir)/typelist.hpp \ $(liblumicommon_a_srcdir)/visitor.hpp \ $(liblumicommon_a_srcdir)/visitordispatcher.hpp \ diff --git a/src/common/time.cpp b/src/common/lumitime.cpp similarity index 97% rename from src/common/time.cpp rename to src/common/lumitime.cpp index a37979c6b..bd50c78bf 100644 --- a/src/common/time.cpp +++ b/src/common/lumitime.cpp @@ -21,7 +21,7 @@ * *****************************************************/ -#include "common/time.hpp" +#include "common/lumitime.hpp" #include diff --git a/src/common/time.hpp b/src/common/lumitime.hpp similarity index 92% rename from src/common/time.hpp rename to src/common/lumitime.hpp index d065c3f36..33b5bb4c3 100644 --- a/src/common/time.hpp +++ b/src/common/lumitime.hpp @@ -1,5 +1,5 @@ /* - TIME.hpp - unified representation of a time point, including conversion functions + LUMITIME.hpp - unified representation of a time point, including conversion functions Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -21,8 +21,8 @@ */ -#ifndef LUMIERA_TIME_H -#define LUMIERA_TIME_H +#ifndef LUMIERA_LUMITIME_H +#define LUMIERA_LUMITIME_H #include diff --git a/src/lib/time.c b/src/lib/time.c index f9135ac8c..22340ee77 100644 --- a/src/lib/time.c +++ b/src/lib/time.c @@ -28,6 +28,7 @@ lumiera_tmpbuf_print_time (gavl_time_t time) { int milliseconds, seconds, minutes, hours; int negative; + if(time < 0) { diff --git a/src/proc/lumiera.hpp b/src/proc/lumiera.hpp index c00a70254..49822b469 100644 --- a/src/proc/lumiera.hpp +++ b/src/proc/lumiera.hpp @@ -32,7 +32,7 @@ #include "common/p.hpp" #include "common/util.hpp" -#include "common/time.hpp" +#include "common/lumitime.hpp" #include "common/error.hpp" ///< pulls in NoBug via nobugcfg.hpp #include "lib/appconfig.hpp" diff --git a/wiki/compatibility.html b/wiki/compatibility.html index a51d72bab..0d6077a15 100644 --- a/wiki/compatibility.html +++ b/wiki/compatibility.html @@ -747,19 +747,19 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS } //}}} -
+
! Programming Languages
 * C
 ** a C99 compatible compiler, some GCC extensions are used, most are optional.
 * C++
 ** C++98
 ** std::tr1 (for <std::tr1::memory>)
-** BOOST ~~(below are the DEBIAN package names)~~
-*** libboost-dev (=1.34.1-2)
-*** libboost-program-options-dev (=1.34.1-2)
-*** libboost-program-options1.34.1 (=1.34.1-2) ''NOTE: binary lib dependency''
-*** libboost-regex-dev (=1.34.1-2)
-*** libboost-regex1.34.1 (=1.34.1-2) ''binary lib depenency''
+* BOOST ~~(listed below are the DEBIAN package names)~~
+** libboost-dev (>=1.34.1-2)
+** libboost-program-options-dev (>=1.34.1-2)
+** libboost-program-options1.34.1 (>=1.34.1-2) ''NOTE: binary dependency''
+** libboost-regex-dev (>=1.34.1-2)
+** libboost-regex1.34.1 (>=1.34.1-2) ''binary..''
 ** //usually, newer versions are OK//
 
 * bash
@@ -769,7 +769,8 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
 * autotools
 * SCons
 ** //need either autotools or scons//
-** SCons (0.96.90), Python (2.3)
+** SCons (0.96), Python (2.4)
+** pkg-config
 * Doxygen
 * test.sh (included)
 
@@ -781,6 +782,14 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS
 * boost (see above, version 1.35 works too)
 * NoBug
 * [[GAVL|http://gmerlin.sourceforge.net/gavl.html]] (1.0.0) 
+* for the GUI: gtkmm-2.4 gdl-1.0 cairomm-1.0 xv
+** libgtkmm-2.4-dev (>=2.8)
+** libcairomm-1.0-dev (>=0.6.0)
+** libgdl-1-dev (>=0.6.1)
+*** libbonoboui2-dev (>=2.14.0)
+** libxv-dev ~~(1.0.2 is known to work)~~
+
+//usually, newer versions are OK//
 
 
diff --git a/wiki/index.html b/wiki/index.html index a2d9d19bf..75eedf40a 100644 --- a/wiki/index.html +++ b/wiki/index.html @@ -759,20 +759,26 @@ config.macros.timeline.handler = function(place,macroName,params,wikifier,paramS } //}}}
-
+
for __Building__
 * gcc (4.1), glibc6 (2.3), libstdc++6 (4.1)
-* [[build system|BuildSystem]] dependencies: SCons (0.96.90), Python (2.3)
+* [[build system|BuildSystem]] dependencies: SCons (0.96.90), Python (2.4), pkg-config
 * [[GAVL|http://gmerlin.sourceforge.net/gavl.html]] (1.0.0) 
 * NoBug for Logging, Tracing, Asserting (can be obtained from [[Pipapo.org|http://www.pipapo.org/pipawiki/NoBug]])
 * ~NoBug needs [[valgrind|Valgrind]] (3.2), execinfo.h and libpthread (&rarr; glibc)
 * std::tr1 &mdash; esp. for the former BOOST::shared_ptr (which is now proposed standard)
-* BOOST ~~(below are the DEBIAN package names)~~
-** libboost-dev (=1.34.1-2)
-** libboost-program-options-dev (=1.34.1-2)
-** libboost-program-options1.34.1 (=1.34.1-2) ''NOTE: binary dependency''
-** libboost-regex-dev (=1.34.1-2)
-** libboost-regex1.34.1 (=1.34.1-2) ''binary..''
+* BOOST ~~(listed below are the DEBIAN package names)~~
+** libboost-dev (>=1.34.1-2)
+** libboost-program-options-dev (>=1.34.1-2)
+** libboost-program-options1.34.1 (>=1.34.1-2) ''NOTE: binary dependency''
+** libboost-regex-dev (>=1.34.1-2)
+** libboost-regex1.34.1 (>=1.34.1-2) ''binary..''
+* for the GUI: gtkmm-2.4 gdl-1.0 cairomm-1.0 xv
+** libgtkmm-2.4-dev (>=2.8)
+** libcairomm-1.0-dev (>=0.6.0)
+** libgdl-1-dev (>=0.6.1)
+*** libbonoboui2-dev (>=2.14.0)
+** libxv-dev (>=1.0.2)
 //usually, newer versions are OK//
 
 boost 1.35 works too.