diff options
author | Timothy Pearson <[email protected]> | 2012-06-11 17:08:59 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-06-11 17:08:59 -0500 |
commit | a9b1841cb02aa39610031a9970bc0f9438415e68 (patch) | |
tree | 5ae2b425c3466e9c20de9073d5c2a501d10cddd7 /admin/kde.py | |
parent | 8f11ba72a15eea0833f18636ef3cc7dd9ab679a4 (diff) | |
download | kstreamripper-a9b1841cb02aa39610031a9970bc0f9438415e68.tar.gz kstreamripper-a9b1841cb02aa39610031a9970bc0f9438415e68.zip |
Fix kstreamripper build failures
Diffstat (limited to 'admin/kde.py')
-rw-r--r-- | admin/kde.py | 54 |
1 files changed, 37 insertions, 17 deletions
diff --git a/admin/kde.py b/admin/kde.py index 190094b..646bed9 100644 --- a/admin/kde.py +++ b/admin/kde.py @@ -39,6 +39,7 @@ def detect_kde(env): kdeincludes= env['ARGS'].get('kdeincludes', None) tdelibs = env['ARGS'].get('tdelibs', None) qtincludes = env['ARGS'].get('qtincludes', None) + tqtincludes= env['ARGS'].get('tqtincludes', None) qtlibs = env['ARGS'].get('qtlibs', None) tdedir = env['ARGS'].get('tdedir', None) @@ -48,10 +49,10 @@ def detect_kde(env): if tdedir: str="which %s 2>/dev/null" % (tdedir+'/bin/tde-config') kde_config = os.popen(str).read().strip() if len(kde_config): - print GREEN + 'tde-config was found as ' + kde_config + print GREEN + 'tde-config was found as ' + kde_config + NORMAL else: - if tdedir: print RED + 'tde-config was NOT found in the folder given ' + tdedir - else: print RED + 'tde-config was NOT found in your PATH' + if tdedir: print RED + 'tde-config was NOT found in the folder given ' + tdedir + NORMAL + else: print RED + 'tde-config was NOT found in your PATH' + NORMAL print "Make sure kde is installed properly" print "(missing package tdebase-devel?)" env.Exit(1) @@ -141,26 +142,44 @@ def detect_kde(env): env.Exit(1) env['QT_MOC'] = moc - ## check for the qt and kde includes - print "Checking for the qt includes : ", - if qtincludes and os.path.isfile(qtincludes + "/tqlayout.h"): + ## check for the tqt includes + print "Checking for the tqt includes : ", + if tqtincludes and os.path.isfile(tqtincludes + "/tqlayout.h"): # The user told where to look for and it looks valid - print GREEN+"ok "+qtincludes+NORMAL + print GREEN + "ok " + tqtincludes + NORMAL else: if os.path.isfile(qtdir + "/include/qlayout.h"): # Automatic detection - print GREEN+"ok "+qtdir + "/include/ "+NORMAL - qtincludes = qtdir + "/include/" + print GREEN + "ok " + qtdir + "/include/ " + NORMAL + tqtincludes = qtdir + "/include/" elif os.path.isfile("/usr/include/tqt/tqlayout.h"): # Debian probably - print YELLOW+"the qt headers were found in /usr/include/tqt/ "+NORMAL - qtincludes = "/usr/include/tqt" + print YELLOW + "the qt headers were found in /usr/include/tqt/ " + NORMAL + tqtincludes = "/usr/include/tqt" elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"): # Debian probably - print YELLOW+"the qt headers were found in /usr/include/qt4/ "+NORMAL - qtincludes = "/usr/include/qt4" + print YELLOW + "the qt headers were found in /usr/include/qt4/ " + NORMAL + tqtincludes = "/usr/include/qt4" + else: + print RED + "the qt headers were not found" + NORMAL + env.Exit(1) + + ## check for the qt includes + print "Checking for the qt includes : ", + if qtincludes and os.path.isfile(qtincludes + "/ntqglobal.h"): + # The user told where to look for and it looks valid + print GREEN + "ok " + qtincludes + NORMAL + else: + if os.path.isfile(qtdir + "/include/ntqglobal.h"): + # Automatic detection + print GREEN + "ok " + qtdir + "/include/ " + NORMAL + qtincludes = qtdir + "/include/" + elif os.path.isfile("/usr/include/tqt3/ntqglobal.h"): + # Debian probably + print YELLOW + "the qt headers were found in /usr/include/tqt3/ " + NORMAL + qtincludes = "/usr/include/tqt3" else: - print RED+"the qt headers were not found"+NORMAL + print RED + "the qt headers were not found" + NORMAL env.Exit(1) print "Checking for the tde includes : ", @@ -226,6 +245,7 @@ def detect_kde(env): ## qt libs and includes env['QTINCLUDEPATH']= qtincludes + env['TQTINCLUDEPATH']=tqtincludes if not qtlibs: qtlibs = qtdir+"/lib" env['QTLIBPATH']= qtlibs @@ -331,7 +351,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt opts.Save(cachefile, env) ## set default variables, one can override them in sconscript files - env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'] ]) + env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'], '-I'+env['TQTINCLUDEPATH'], '-include', 'tqt.h' ]) env.Append(LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ]) env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 @@ -368,7 +388,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt act.append('cat '+target[1].path+'.tmp >> '+target[1].path) act.append('rm -f '+target[1].path+'.tmp') act.append('echo \'#include "' + target[2].name + '"\' >> '+target[1].path) - act.append('moc-tqt $QT_MOC -o '+target[2].path+' '+target[0].path) + act.append('moc-tqt $QT_MOC '+target[0].path+' '+target[2].path) return act def uicEmitter(target, source, env): @@ -395,7 +415,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt src_suffix = '.ui' ) ###### moc file processing - env['QT_MOCCOM'] = ('$QT_MOC -o ${TARGETS[0]} $SOURCE') + env['QT_MOCCOM'] = ('moc-tqt $QT_MOC $SOURCE ${TARGETS[0]}') MOC_BUILDER = Builder( action = '$QT_MOCCOM', |