Fix kstreamripper build failures

pull/1/head
Timothy Pearson 12 years ago
parent 8f11ba72a1
commit a9b1841cb0

@ -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',

@ -37,6 +37,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)
@ -49,10 +50,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)
@ -142,24 +143,42 @@ 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/"
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"
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"
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
env.Exit(1)
@ -230,6 +249,7 @@ def detect_kde(env):
## qt libs and includes
env['QTINCLUDEPATH']=qtincludes
env['TQTINCLUDEPATH']=tqtincludes
if not qtlibs:
qtlibs=qtdir+"/lib"
env['QTLIBPATH']=qtlibs
@ -435,7 +455,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
@ -468,7 +488,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):
@ -495,7 +515,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',

@ -43,7 +43,7 @@ myenv.KDEprogram( "kstreamripper", kstreamripper_sources )
myenv.KDEaddpaths_includes( ['./', '../'] )
## Necessary libraries to link against
myenv.KDEaddlibs( ['tqt', 'kio', 'tdeui'] )
myenv.KDEaddlibs( ['tqt-mt', 'tqt', 'kio', 'tdeui', 'kdnssd'] )
if env['KDEm2']>3: myenv.KDEaddlibs( ['kdnssd'])
#############################
## Data to install

Loading…
Cancel
Save