Update scons to handle TDE

This closes Bug 946
pull/1/head
Timothy Pearson 13 years ago
parent be3ca7060f
commit 8f11ba72a1

@ -40,27 +40,47 @@ def detect_kde(env):
tdelibs = env['ARGS'].get('tdelibs', None) tdelibs = env['ARGS'].get('tdelibs', None)
qtincludes = env['ARGS'].get('qtincludes', None) qtincludes = env['ARGS'].get('qtincludes', None)
qtlibs = env['ARGS'].get('qtlibs', None) qtlibs = env['ARGS'].get('qtlibs', None)
tdedir = env['ARGS'].get('tdedir', None)
## Detect the kde libraries ## Detect the tde libraries
print "Checking for tde-config : ", print "Checking for tde-config : ",
kde_config = os.popen("which tde-config 2>/dev/null").read().strip() str="which tde-config 2>/dev/null"
if tdedir: str="which %s 2>/dev/null" % (tdedir+'/bin/tde-config')
kde_config = os.popen(str).read().strip()
if len(kde_config): if len(kde_config):
print GREEN + "tde-config was found" + NORMAL print GREEN + 'tde-config was found as ' + kde_config
else: else:
print RED + "tde-config was NOT found in your PATH"+ NORMAL 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'
print "Make sure kde is installed properly" print "Make sure kde is installed properly"
print "(missing package tdebase-devel?)" print "(missing package tdebase-devel?)"
env.Exit(1) env.Exit(1)
env['TDEDIR'] = os.popen('tde-config -prefix').read().strip() if tdedir: env['TDEDIR']=tdedir
else: env['TDEDIR'] = os.popen(kde_config+' -prefix').read().strip()
print "Checking for kde version : ",
kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1] print "Checking for tde version : ",
if int(kde_version[0]) != 3 or int(kde_version[2]) < 2: tde_version = os.popen(kde_config+" --version|grep TDE").read().strip().split()[1]
print RED + kde_version tde_major = tde_version.split('.')[0].lstrip('R')
print RED + "Your kde version can be too old" + NORMAL tde_minor = tde_version.split('.')[1]
print RED + "Please make sure kde is at least 3.2" + NORMAL tde_patch = tde_version.split('.')[2]
try:
env['KDEm1']=int(tde_major)
except:
pass
try:
env['KDEm2']=int(tde_minor)
except:
pass
try:
env['KDEm3']=int(tde_patch)
except:
pass
if int(tde_major) != 14:
print RED + tde_version
print RED + "Your tde version might be too old" + NORMAL
print RED + "Please make sure TDE is at least R14.0" + NORMAL
else: else:
print GREEN + kde_version + NORMAL print GREEN + tde_version + NORMAL
## Detect the qt library ## Detect the qt library
print "Checking for the qt library : ", print "Checking for the qt library : ",
@ -68,9 +88,13 @@ def detect_kde(env):
if qtdir: if qtdir:
print GREEN + "qt is in " + qtdir + NORMAL print GREEN + "qt is in " + qtdir + NORMAL
else: else:
libdir = os.popen('tde-config --expandvars --install lib').read().strip() libdir = os.popen(kde_config + ' --expandvars --install lib').read().strip()
libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la') libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la')
m = re.search('(.*)/lib/libqt.*', os.popen('ldd '+libtdeuiSO+' | grep libqt').read().strip().split()[2]) try:
m = re.search('(.*)/lib/libqt.*', os.popen('ldd '+libtdeuiSO+' | grep libqt').read().strip().split()[2])
except:
m = re.search('(.*)/lib/libtqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libtqt').read().strip().split()[2])
pass
if m: if m:
qtdir = m.group(1) qtdir = m.group(1)
print YELLOW+"qt was found as " + m.group(1) + NORMAL print YELLOW+"qt was found as " + m.group(1) + NORMAL
@ -81,7 +105,7 @@ def detect_kde(env):
env['QTDIR'] = qtdir.strip() env['QTDIR'] = qtdir.strip()
## Find the necessary programs uic-tqt and moc ## Find the necessary programs uic-tqt and moc
print "Checking for uic-tqt : ", print "Checking for uic-tqt : ",
uic = qtdir + "/bin/uic-tqt" uic = qtdir + "/bin/uic-tqt"
if os.path.isfile(uic): if os.path.isfile(uic):
print GREEN+"uic-tqt was found as "+uic+NORMAL print GREEN+"uic-tqt was found as "+uic+NORMAL
@ -106,6 +130,9 @@ def detect_kde(env):
moc = os.popen("which moc 2>/dev/null").read().strip() moc = os.popen("which moc 2>/dev/null").read().strip()
if len(moc): if len(moc):
print YELLOW+"moc was found as "+moc+NORMAL print YELLOW+"moc was found as "+moc+NORMAL
elif os.path.isfile("/usr/share/tqt3/bin/moc"):
moc = "/usr/share/tqt3/bin/moc"
print YELLOW+"moc was found as "+moc+NORMAL
elif os.path.isfile("/usr/share/qt3/bin/moc"): elif os.path.isfile("/usr/share/qt3/bin/moc"):
moc = "/usr/share/qt3/bin/moc" moc = "/usr/share/qt3/bin/moc"
print YELLOW+"moc was found as "+moc+NORMAL print YELLOW+"moc was found as "+moc+NORMAL
@ -116,7 +143,7 @@ def detect_kde(env):
## check for the qt and kde includes ## check for the qt and kde includes
print "Checking for the qt includes : ", print "Checking for the qt includes : ",
if qtincludes and os.path.isfile(qtincludes + "/qlayout.h"): if qtincludes and os.path.isfile(qtincludes + "/tqlayout.h"):
# The user told where to look for and it looks valid # The user told where to look for and it looks valid
print GREEN+"ok "+qtincludes+NORMAL print GREEN+"ok "+qtincludes+NORMAL
else: else:
@ -124,10 +151,10 @@ def detect_kde(env):
# Automatic detection # Automatic detection
print GREEN+"ok "+qtdir + "/include/ "+NORMAL print GREEN+"ok "+qtdir + "/include/ "+NORMAL
qtincludes = qtdir + "/include/" qtincludes = qtdir + "/include/"
elif os.path.isfile("/usr/include/qt3/qlayout.h"): elif os.path.isfile("/usr/include/tqt/tqlayout.h"):
# Debian probably # Debian probably
print YELLOW+"the qt headers were found in /usr/include/qt3/ "+NORMAL print YELLOW+"the qt headers were found in /usr/include/tqt/ "+NORMAL
qtincludes = "/usr/include/qt3" qtincludes = "/usr/include/tqt"
elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"): elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"):
# Debian probably # Debian probably
print YELLOW+"the qt headers were found in /usr/include/qt4/ "+NORMAL print YELLOW+"the qt headers were found in /usr/include/qt4/ "+NORMAL
@ -136,8 +163,8 @@ def detect_kde(env):
print RED+"the qt headers were not found"+NORMAL print RED+"the qt headers were not found"+NORMAL
env.Exit(1) env.Exit(1)
print "Checking for the kde includes : ", print "Checking for the tde includes : ",
kdeprefix = os.popen("tde-config --prefix").read().strip() kdeprefix = os.popen(kde_config + " --prefix").read().strip()
if not kdeincludes: if not kdeincludes:
kdeincludes = kdeprefix+"/include/" kdeincludes = kdeprefix+"/include/"
if os.path.isfile(kdeincludes + "/klineedit.h"): if os.path.isfile(kdeincludes + "/klineedit.h"):
@ -161,40 +188,40 @@ def detect_kde(env):
libdir = execprefix+"/lib" libdir = execprefix+"/lib"
subst_vars = lambda x: x.replace('${exec_prefix}',execprefix).replace('${datadir}',datadir).replace('${libdir}',libdir) subst_vars = lambda x: x.replace('${exec_prefix}',execprefix).replace('${datadir}',datadir).replace('${libdir}',libdir)
env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip()) env['KDEBIN'] = subst_vars(os.popen(kde_config + ' --install exe').read().strip())
env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip()) env['KDEAPPS'] = subst_vars(os.popen(kde_config + ' --install apps').read().strip())
env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip()) env['KDEDATA'] = subst_vars(os.popen(kde_config + ' --install data').read().strip())
env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip()) env['KDEMODULE']= subst_vars(os.popen(kde_config + ' --install module').read().strip())
env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip()) env['KDELOCALE']= subst_vars(os.popen(kde_config + ' --install locale').read().strip())
env['KDEDOC'] = subst_vars(os.popen('tde-config --install html').read().strip()) env['KDEDOC'] = subst_vars(os.popen(kde_config + ' --install html').read().strip())
env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip()) env['KDEKCFG'] = subst_vars(os.popen(kde_config + ' --install kcfg').read().strip())
env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip()) env['KDEXDG'] = subst_vars(os.popen(kde_config + ' --install xdgdata-apps').read().strip())
env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip()) env['KDEMENU'] = subst_vars(os.popen(kde_config + ' --install apps').read().strip())
env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip()) env['KDEMIME'] = subst_vars(os.popen(kde_config + ' --install mime').read().strip())
env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip()) env['KDEICONS'] = subst_vars(os.popen(kde_config + ' --install icon').read().strip())
env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip()) env['KDESERV'] = subst_vars(os.popen(kde_config + ' --install services').read().strip())
else: else:
# the user has given no prefix, install as a normal kde app # the user has given no prefix, install as a normal kde app
env['PREFIX'] = os.popen('tde-config --prefix').read().strip() env['PREFIX'] = os.popen(kde_config + ' --prefix').read().strip()
env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip() env['KDEBIN'] = os.popen(kde_config + ' --expandvars --install exe').read().strip()
env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip() env['KDEAPPS'] = os.popen(kde_config + ' --expandvars --install apps').read().strip()
env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip() env['KDEDATA'] = os.popen(kde_config + ' --expandvars --install data').read().strip()
env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip() env['KDEMODULE']= os.popen(kde_config + ' --expandvars --install module').read().strip()
env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip() env['KDELOCALE']= os.popen(kde_config + ' --expandvars --install locale').read().strip()
env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip() env['KDEDOC'] = os.popen(kde_config + ' --expandvars --install html').read().strip()
env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip() env['KDEKCFG'] = os.popen(kde_config + ' --expandvars --install kcfg').read().strip()
env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip() env['KDEXDG'] = os.popen(kde_config + ' --expandvars --install xdgdata-apps').read().strip()
env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip() env['KDEMENU'] = os.popen(kde_config + ' --expandvars --install apps').read().strip()
env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip() env['KDEMIME'] = os.popen(kde_config + ' --expandvars --install mime').read().strip()
env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip() env['KDEICONS'] = os.popen(kde_config + ' --expandvars --install icon').read().strip()
env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip() env['KDESERV'] = os.popen(kde_config + ' --expandvars --install services').read().strip()
env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip() env['QTPLUGINS']=os.popen(kde_config + ' --expandvars --install qtplugins').read().strip()
## kde libs and includes ## kde libs and includes
env['KDEINCLUDEPATH']= kdeincludes env['KDEINCLUDEPATH']= kdeincludes
if not tdelibs: if not tdelibs:
tdelibs = os.popen('tde-config --expandvars --install lib').read().strip() tdelibs = os.popen(kde_config + ' --expandvars --install lib').read().strip()
env['KDELIBPATH']= tdelibs env['KDELIBPATH']= tdelibs
## qt libs and includes ## qt libs and includes
@ -251,6 +278,7 @@ def generate(env):
"""+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin """+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin
"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share """+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share
"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib """+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib
"""+BOLD+"""* tdedir """+NORMAL+""": path to TDE directory, ie: /opt/trinity
"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...) """+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...)
"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...) """+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...)
"""+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs """+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs
@ -340,7 +368,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('cat '+target[1].path+'.tmp >> '+target[1].path)
act.append('rm -f '+target[1].path+'.tmp') act.append('rm -f '+target[1].path+'.tmp')
act.append('echo \'#include "' + target[2].name + '"\' >> '+target[1].path) act.append('echo \'#include "' + target[2].name + '"\' >> '+target[1].path)
act.append('$QT_MOC -o '+target[2].path+' '+target[0].path) act.append('moc-tqt $QT_MOC -o '+target[2].path+' '+target[0].path)
return act return act
def uicEmitter(target, source, env): def uicEmitter(target, source, env):

128
kde.py

@ -38,42 +38,50 @@ def detect_kde(env):
tdelibs = env['ARGS'].get('tdelibs', None) tdelibs = env['ARGS'].get('tdelibs', None)
qtincludes = env['ARGS'].get('qtincludes', None) qtincludes = env['ARGS'].get('qtincludes', None)
qtlibs = env['ARGS'].get('qtlibs', None) qtlibs = env['ARGS'].get('qtlibs', None)
tdedir = env['ARGS'].get('tdedir', None)
if libdir: if libdir:
libdir = libdir+libsuffix libdir = libdir+libsuffix
## Detect the kde libraries ## Detect the tde libraries
print "Checking for tde-config : ", print "Checking for tde-config : ",
kde_config = os.popen("which tde-config 2>/dev/null").read().strip() str="which tde-config 2>/dev/null"
if tdedir: str="which %s 2>/dev/null" % (tdedir+'/bin/tde-config')
kde_config = os.popen(str).read().strip()
if len(kde_config): if len(kde_config):
print GREEN+"tde-config was found"+NORMAL print GREEN + 'tde-config was found as ' + kde_config
else: else:
print RED+"tde-config was NOT found in your PATH"+NORMAL 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'
print "Make sure kde is installed properly" print "Make sure kde is installed properly"
print "(missing package tdebase-devel?)" print "(missing package tdebase-devel?)"
env.Exit(1) env.Exit(1)
env['TDEDIR'] = os.popen('tde-config -prefix').read().strip() if tdedir: env['TDEDIR']=tdedir
else: env['TDEDIR'] = os.popen(kde_config+' -prefix').read().strip()
print "Checking for kde version : ",
kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1] print "Checking for tde version : ",
tde_version = os.popen(kde_config + " --version|grep TDE").read().strip().split()[1]
tde_major = tde_version.split('.')[0].lstrip('R')
tde_minor = tde_version.split('.')[1]
tde_patch = tde_version.split('.')[2]
try: try:
env['KDEm1']=int(kde_version[0]) env['KDEm1']=int(tde_major)
except: except:
pass pass
try: try:
env['KDEm2']=int(kde_version[2]) env['KDEm2']=int(tde_minor)
except: except:
pass pass
try: try:
env['KDEm3']=int(kde_version[4]) env['KDEm3']=int(tde_patch)
except: except:
pass pass
if int(kde_version[0]) != 3 or int(kde_version[2]) < 2: if int(tde_major) != 14:
print RED+kde_version print RED + tde_version
print RED+"Your kde version can be too old"+NORMAL print RED + "Your tde version might be too old" + NORMAL
print RED+"Please make sure kde is at least 3.2"+NORMAL print RED + "Please make sure TDE is at least R14.0" + NORMAL
else: else:
print GREEN+kde_version+NORMAL print GREEN + tde_version + NORMAL
## Detect the qt library ## Detect the qt library
print "Checking for the qt library : ", print "Checking for the qt library : ",
@ -81,9 +89,13 @@ def detect_kde(env):
if qtdir: if qtdir:
print GREEN+"qt is in "+qtdir+NORMAL print GREEN+"qt is in "+qtdir+NORMAL
else: else:
libdir = os.popen('tde-config --expandvars --install lib').read().strip() libdir = os.popen(kde_config + ' --expandvars --install lib').read().strip()
libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la') libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la')
m = re.search('(.*)/lib/libqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libqt').read().strip().split()[2]) try:
m = re.search('(.*)/lib/libqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libqt').read().strip().split()[2])
except:
m = re.search('(.*)/lib/libtqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libtqt').read().strip().split()[2])
pass
if m: if m:
qtdir = m.group(1) qtdir = m.group(1)
print YELLOW+"qt was found as "+m.group(1)+NORMAL print YELLOW+"qt was found as "+m.group(1)+NORMAL
@ -94,7 +106,7 @@ def detect_kde(env):
env['QTDIR'] = qtdir.strip() env['QTDIR'] = qtdir.strip()
## Find the necessary programs uic-tqt and moc ## Find the necessary programs uic-tqt and moc
print "Checking for uic-tqt : ", print "Checking for uic-tqt : ",
uic = qtdir + "/bin/uic-tqt" uic = qtdir + "/bin/uic-tqt"
if os.path.isfile(uic): if os.path.isfile(uic):
print GREEN+"uic-tqt was found as "+uic+NORMAL print GREEN+"uic-tqt was found as "+uic+NORMAL
@ -119,6 +131,9 @@ def detect_kde(env):
moc = os.popen("which moc 2>/dev/null").read().strip() moc = os.popen("which moc 2>/dev/null").read().strip()
if len(moc): if len(moc):
print YELLOW + "moc was found as " + moc + NORMAL print YELLOW + "moc was found as " + moc + NORMAL
elif os.path.isfile("/usr/share/tqt3/bin/moc"):
moc = "/usr/share/tqt3/bin/moc"
print YELLOW + "moc was found as " + moc + NORMAL
elif os.path.isfile("/usr/share/qt3/bin/moc"): elif os.path.isfile("/usr/share/qt3/bin/moc"):
moc = "/usr/share/qt3/bin/moc" moc = "/usr/share/qt3/bin/moc"
print YELLOW + "moc was found as " + moc + NORMAL print YELLOW + "moc was found as " + moc + NORMAL
@ -129,7 +144,7 @@ def detect_kde(env):
## check for the qt and kde includes ## check for the qt and kde includes
print "Checking for the qt includes : ", print "Checking for the qt includes : ",
if qtincludes and os.path.isfile(qtincludes + "/qlayout.h"): if qtincludes and os.path.isfile(qtincludes + "/tqlayout.h"):
# The user told where to look for and it looks valid # The user told where to look for and it looks valid
print GREEN + "ok " + qtincludes + NORMAL print GREEN + "ok " + qtincludes + NORMAL
else: else:
@ -137,10 +152,10 @@ def detect_kde(env):
# Automatic detection # Automatic detection
print GREEN + "ok " + qtdir + "/include/ " + NORMAL print GREEN + "ok " + qtdir + "/include/ " + NORMAL
qtincludes = qtdir + "/include/" qtincludes = qtdir + "/include/"
elif os.path.isfile("/usr/include/qt3/qlayout.h"): elif os.path.isfile("/usr/include/tqt/tqlayout.h"):
# Debian probably # Debian probably
print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL print YELLOW + "the qt headers were found in /usr/include/tqt/ " + NORMAL
qtincludes = "/usr/include/qt3" qtincludes = "/usr/include/tqt"
elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"): elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"):
# Debian probably # Debian probably
print YELLOW + "the qt headers were found in /usr/include/qt4/ " + NORMAL print YELLOW + "the qt headers were found in /usr/include/qt4/ " + NORMAL
@ -149,8 +164,8 @@ def detect_kde(env):
print RED + "the qt headers were not found" + NORMAL print RED + "the qt headers were not found" + NORMAL
env.Exit(1) env.Exit(1)
print "Checking for the kde includes : ", print "Checking for the tde includes : ",
kdeprefix = os.popen("tde-config --prefix").read().strip() kdeprefix = os.popen(kde_config + " --prefix").read().strip()
if not kdeincludes: if not kdeincludes:
kdeincludes = kdeprefix+"/include/" kdeincludes = kdeprefix+"/include/"
if os.path.isfile(kdeincludes + "/klineedit.h"): if os.path.isfile(kdeincludes + "/klineedit.h"):
@ -175,42 +190,42 @@ def detect_kde(env):
subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',datadir).replace('${libdir}', libdir) subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',datadir).replace('${libdir}', libdir)
debian_fix = lambda x: x.replace('/usr/share', '${datadir}') debian_fix = lambda x: x.replace('/usr/share', '${datadir}')
env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip()) env['KDEBIN'] = subst_vars(os.popen(kde_config + ' --install exe').read().strip())
env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip()) env['KDEAPPS'] = subst_vars(os.popen(kde_config + ' --install apps').read().strip())
env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip()) env['KDEDATA'] = subst_vars(os.popen(kde_config + ' --install data').read().strip())
env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip()) env['KDEMODULE']= subst_vars(os.popen(kde_config + ' --install module').read().strip())
env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip()) env['KDELOCALE']= subst_vars(os.popen(kde_config + ' --install locale').read().strip())
env['KDEDOC'] = subst_vars( debian_fix(os.popen('tde-config --install html').read().strip()) ) env['KDEDOC'] = subst_vars( debian_fix(os.popen(kde_config + ' --install html').read().strip()) )
env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip()) env['KDEKCFG'] = subst_vars(os.popen(kde_config + ' --install kcfg').read().strip())
env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip()) env['KDEXDG'] = subst_vars(os.popen(kde_config + ' --install xdgdata-apps').read().strip())
env['KDEXDGDIR']= subst_vars(os.popen('tde-config --install xdgdata-dirs').read().strip()) env['KDEXDGDIR']= subst_vars(os.popen(kde_config + ' --install xdgdata-dirs').read().strip())
env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip()) env['KDEMENU'] = subst_vars(os.popen(kde_config + ' --install apps').read().strip())
env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip()) env['KDEMIME'] = subst_vars(os.popen(kde_config + ' --install mime').read().strip())
env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip()) env['KDEICONS'] = subst_vars(os.popen(kde_config + ' --install icon').read().strip())
env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip()) env['KDESERV'] = subst_vars(os.popen(kde_config + ' --install services').read().strip())
else: else:
# the user has given no prefix, install as a normal kde app # the user has given no prefix, install as a normal kde app
env['PREFIX'] = os.popen('tde-config --prefix').read().strip() env['PREFIX'] = os.popen(kde_config + ' --prefix').read().strip()
env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip() env['KDEBIN'] = os.popen(kde_config + ' --expandvars --install exe').read().strip()
env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip() env['KDEAPPS'] = os.popen(kde_config + ' --expandvars --install apps').read().strip()
env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip() env['KDEDATA'] = os.popen(kde_config + ' --expandvars --install data').read().strip()
env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip() env['KDEMODULE']= os.popen(kde_config + ' --expandvars --install module').read().strip()
env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip() env['KDELOCALE']= os.popen(kde_config + ' --expandvars --install locale').read().strip()
env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip() env['KDEDOC'] = os.popen(kde_config + ' --expandvars --install html').read().strip()
env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip() env['KDEKCFG'] = os.popen(kde_config + ' --expandvars --install kcfg').read().strip()
env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip() env['KDEXDG'] = os.popen(kde_config + ' --expandvars --install xdgdata-apps').read().strip()
env['KDEXDGDIR']= os.popen('tde-config --expandvars --install xdgdata-dirs').read().strip() env['KDEXDGDIR']= os.popen(kde_config + ' --expandvars --install xdgdata-dirs').read().strip()
env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip() env['KDEMENU'] = os.popen(kde_config + ' --expandvars --install apps').read().strip()
env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip() env['KDEMIME'] = os.popen(kde_config + ' --expandvars --install mime').read().strip()
env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip() env['KDEICONS'] = os.popen(kde_config + ' --expandvars --install icon').read().strip()
env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip() env['KDESERV'] = os.popen(kde_config + ' --expandvars --install services').read().strip()
env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip() env['QTPLUGINS']=os.popen(kde_config + ' --expandvars --install qtplugins').read().strip()
## kde libs and includes ## kde libs and includes
env['KDEINCLUDEPATH']=kdeincludes env['KDEINCLUDEPATH']=kdeincludes
if not tdelibs: if not tdelibs:
tdelibs=os.popen('tde-config --expandvars --install lib').read().strip() tdelibs=os.popen(kde_config + ' --expandvars --install lib').read().strip()
env['KDELIBPATH']=tdelibs env['KDELIBPATH']=tdelibs
## qt libs and includes ## qt libs and includes
@ -230,6 +245,7 @@ def generate(env):
"""+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin """+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin
"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share """+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share
"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib """+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib
"""+BOLD+"""* tdedir """+NORMAL+""": path to TDE directory, ie: /opt/trinity
"""+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32 """+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32
"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...) """+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...)
"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...) """+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...)
@ -452,7 +468,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('cat '+target[1].path+'.tmp >> '+target[1].path)
act.append('rm -f '+target[1].path+'.tmp') act.append('rm -f '+target[1].path+'.tmp')
act.append('echo \'#include "' + target[2].name + '"\' >> '+target[1].path) act.append('echo \'#include "' + target[2].name + '"\' >> '+target[1].path)
act.append('$QT_MOC -o '+target[2].path+' '+target[0].path) act.append('moc-tqt $QT_MOC -o '+target[2].path+' '+target[0].path)
return act return act
def uicEmitter(target, source, env): def uicEmitter(target, source, env):

Loading…
Cancel
Save