removed a few occurrences of 'linux2' in python files
parent
d161aa6490
commit
b5245c4cf6
|
@ -97,7 +97,7 @@ class _Automoc:
|
||||||
|
|
||||||
def __init__(self, objBuilderName):
|
def __init__(self, objBuilderName):
|
||||||
self.objBuilderName = objBuilderName
|
self.objBuilderName = objBuilderName
|
||||||
|
|
||||||
def __call__(self, target, source, env):
|
def __call__(self, target, source, env):
|
||||||
"""
|
"""
|
||||||
Smart autoscan function. Gets the list of objects for the Program
|
Smart autoscan function. Gets the list of objects for the Program
|
||||||
|
@ -112,25 +112,25 @@ class _Automoc:
|
||||||
debug = int(env.subst('$QT4_DEBUG'))
|
debug = int(env.subst('$QT4_DEBUG'))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
debug = 0
|
debug = 0
|
||||||
|
|
||||||
# some shortcuts used in the scanner
|
# some shortcuts used in the scanner
|
||||||
splitext = SCons.Util.splitext
|
splitext = SCons.Util.splitext
|
||||||
objBuilder = getattr(env, self.objBuilderName)
|
objBuilder = getattr(env, self.objBuilderName)
|
||||||
|
|
||||||
# some regular expressions:
|
# some regular expressions:
|
||||||
# Q_OBJECT detection
|
# Q_OBJECT detection
|
||||||
q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]')
|
q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]')
|
||||||
# cxx and c comment 'eater'
|
# cxx and c comment 'eater'
|
||||||
#comment = re.compile(r'(//.*)|(/\*(([^*])|(\*[^/]))*\*/)')
|
#comment = re.compile(r'(//.*)|(/\*(([^*])|(\*[^/]))*\*/)')
|
||||||
# CW: something must be wrong with the regexp. See also bug #998222
|
# CW: something must be wrong with the regexp. See also bug #998222
|
||||||
# CURRENTLY THERE IS NO TEST CASE FOR THAT
|
# CURRENTLY THERE IS NO TEST CASE FOR THAT
|
||||||
|
|
||||||
# The following is kind of hacky to get builders working properly (FIXME)
|
# The following is kind of hacky to get builders working properly (FIXME)
|
||||||
objBuilderEnv = objBuilder.env
|
objBuilderEnv = objBuilder.env
|
||||||
objBuilder.env = env
|
objBuilder.env = env
|
||||||
mocBuilderEnv = env.Moc4.env
|
mocBuilderEnv = env.Moc4.env
|
||||||
env.Moc4.env = env
|
env.Moc4.env = env
|
||||||
|
|
||||||
# make a deep copy for the result; MocH objects will be appended
|
# make a deep copy for the result; MocH objects will be appended
|
||||||
out_sources = source[:]
|
out_sources = source[:]
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ class _Automoc:
|
||||||
cpp = obj.sources[0]
|
cpp = obj.sources[0]
|
||||||
if not splitext(str(cpp))[1] in cxx_suffixes:
|
if not splitext(str(cpp))[1] in cxx_suffixes:
|
||||||
if debug:
|
if debug:
|
||||||
print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp)
|
print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp)
|
||||||
# c or fortran source
|
# c or fortran source
|
||||||
continue
|
continue
|
||||||
#cpp_contents = comment.sub('', cpp.get_contents())
|
#cpp_contents = comment.sub('', cpp.get_contents())
|
||||||
|
@ -236,7 +236,7 @@ def generate(env):
|
||||||
if not (fullpath is None) : return fullpath
|
if not (fullpath is None) : return fullpath
|
||||||
|
|
||||||
raise Exception("Qt4 command '" + command + "' not found. Tried: " + ', '.join(triedPaths))
|
raise Exception("Qt4 command '" + command + "' not found. Tried: " + ', '.join(triedPaths))
|
||||||
|
|
||||||
|
|
||||||
CLVar = SCons.Util.CLVar
|
CLVar = SCons.Util.CLVar
|
||||||
Action = SCons.Action.Action
|
Action = SCons.Action.Action
|
||||||
|
@ -416,7 +416,7 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) :
|
||||||
'QtMultimedia',
|
'QtMultimedia',
|
||||||
]
|
]
|
||||||
pclessModules = [
|
pclessModules = [
|
||||||
# in qt <= 4.3 designer and designerComponents are pcless, on qt4.4 they are not, so removed.
|
# in qt <= 4.3 designer and designerComponents are pcless, on qt4.4 they are not, so removed.
|
||||||
# 'QtDesigner',
|
# 'QtDesigner',
|
||||||
# 'QtDesignerComponents',
|
# 'QtDesignerComponents',
|
||||||
]
|
]
|
||||||
|
@ -446,7 +446,7 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) :
|
||||||
try : self.AppendUnique(CPPDEFINES=moduleDefines[module])
|
try : self.AppendUnique(CPPDEFINES=moduleDefines[module])
|
||||||
except: pass
|
except: pass
|
||||||
debugSuffix = ''
|
debugSuffix = ''
|
||||||
if sys.platform in ["darwin", "linux2"] and not crosscompiling :
|
if (sys.platform=='darwin' or sys.platform.startswith('linux2')) and not crosscompiling :
|
||||||
if debug : debugSuffix = '_debug'
|
if debug : debugSuffix = '_debug'
|
||||||
for module in modules :
|
for module in modules :
|
||||||
if module not in pclessModules : continue
|
if module not in pclessModules : continue
|
||||||
|
@ -461,7 +461,7 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) :
|
||||||
self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","qt4","QtAssistant")])
|
self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","qt4","QtAssistant")])
|
||||||
pcmodules.remove("QtAssistant")
|
pcmodules.remove("QtAssistant")
|
||||||
pcmodules.append("QtAssistantClient")
|
pcmodules.append("QtAssistantClient")
|
||||||
if sys.platform == 'linux2':
|
if sys.platform.startswith('linux'):
|
||||||
self.ParseConfig('pkg-config %s --libs --cflags'% ' '.join(pcmodules))
|
self.ParseConfig('pkg-config %s --libs --cflags'% ' '.join(pcmodules))
|
||||||
elif sys.platform == 'darwin':
|
elif sys.platform == 'darwin':
|
||||||
for module in pcmodules:
|
for module in pcmodules:
|
||||||
|
|
Loading…
Reference in New Issue