diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-06-25 13:23:34 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-06-25 13:23:34 (GMT) |
| commit | 595fdfa75d4757d5654bf3189c23c85a66ec6836 (patch) | |
| tree | 42481945819abab46424dfebf2a24fe077c53f14 | |
| parent | e9a95bd55757cce0e6e126660bc65561ae007baf (diff) | |
| download | swift-595fdfa75d4757d5654bf3189c23c85a66ec6836.zip swift-595fdfa75d4757d5654bf3189c23c85a66ec6836.tar.bz2 | |
Fix qt4.py tool for Arch
The tool had syntax errors (missing subprocess. in front of PIPE) and
SCons errors (missing conf.Finish() calls).
Test-Information:
Tested on Arch Linux 1.4.
Change-Id: Ibab23e1dc776ee9fe96de45221c4fb9659f4a185
| -rw-r--r-- | BuildTools/SCons/Tools/qt4.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/BuildTools/SCons/Tools/qt4.py b/BuildTools/SCons/Tools/qt4.py index 625f807..1fe2294 100644 --- a/BuildTools/SCons/Tools/qt4.py +++ b/BuildTools/SCons/Tools/qt4.py | |||
| @@ -209,7 +209,7 @@ def _detect(env): | |||
| 209 | moc = env.WhereIs('moc-qt4') or env.WhereIs('moc4') or env.WhereIs('moc') | 209 | moc = env.WhereIs('moc-qt4') or env.WhereIs('moc4') or env.WhereIs('moc') |
| 210 | if moc: | 210 | if moc: |
| 211 | # Test whether the moc command we found is real, or whether it is just the qtchooser dummy. | 211 | # Test whether the moc command we found is real, or whether it is just the qtchooser dummy. |
| 212 | p = subprocess.Popen([moc, "-v"], shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) | 212 | p = subprocess.Popen([moc, "-v"], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 213 | p.communicate() | 213 | p.communicate() |
| 214 | if p.returncode == 0: | 214 | if p.returncode == 0: |
| 215 | import sys | 215 | import sys |
| @@ -516,11 +516,13 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, version='4' | |||
| 516 | # Check if Qt is registered at pkg-config | 516 | # Check if Qt is registered at pkg-config |
| 517 | ret = test_conf.TryAction('pkg-config --exists \'%s\'' % modules_str)[0] | 517 | ret = test_conf.TryAction('pkg-config --exists \'%s\'' % modules_str)[0] |
| 518 | if ret != 1: | 518 | if ret != 1: |
| 519 | test_conf.Finish() | ||
| 519 | raise Exception("Qt has not been found using pkg-config.") | 520 | raise Exception("Qt has not been found using pkg-config.") |
| 520 | return | 521 | return |
| 521 | test_conf.env.ParseConfig("pkg-config --cflags --libs " + modules_str) | 522 | test_conf.env.ParseConfig("pkg-config --cflags --libs " + modules_str) |
| 522 | self.AppendUnique(LIBS=test_conf.env["LIBS"], LIBPATH=test_conf.env["LIBPATH"], CPPPATH=test_conf.env["CPPPATH"]) | 523 | self.AppendUnique(LIBS=test_conf.env["LIBS"], LIBPATH=test_conf.env["LIBPATH"], CPPPATH=test_conf.env["CPPPATH"]) |
| 523 | self["QT4_MOCCPPPATH"] = self["CPPPATH"] | 524 | self["QT4_MOCCPPPATH"] = self["CPPPATH"] |
| 525 | test_conf.Finish() | ||
| 524 | return | 526 | return |
| 525 | 527 | ||
| 526 | if sys.platform == "win32" or crosscompiling : | 528 | if sys.platform == "win32" or crosscompiling : |
Swift